Kristian Høgsberg | af4f2aa | 2013-02-15 20:53:20 -0500 | [diff] [blame] | 1 | m4_define([weston_major_version], [1]) |
Bryce Harrington | 2567c93 | 2015-06-02 16:23:53 -0700 | [diff] [blame] | 2 | m4_define([weston_minor_version], [8]) |
Bryce Harrington | 30e24ed | 2015-09-15 20:20:37 -0700 | [diff] [blame] | 3 | m4_define([weston_micro_version], [93]) |
Kristian Høgsberg | af4f2aa | 2013-02-15 20:53:20 -0500 | [diff] [blame] | 4 | m4_define([weston_version], |
| 5 | [weston_major_version.weston_minor_version.weston_micro_version]) |
| 6 | |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 7 | AC_PREREQ([2.64]) |
Kristian Høgsberg | a7313e7 | 2012-02-08 16:35:12 -0500 | [diff] [blame] | 8 | AC_INIT([weston], |
Kristian Høgsberg | af4f2aa | 2013-02-15 20:53:20 -0500 | [diff] [blame] | 9 | [weston_version], |
| 10 | [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=weston_version], |
Kristian Høgsberg | a7313e7 | 2012-02-08 16:35:12 -0500 | [diff] [blame] | 11 | [weston], |
Daniel Stone | 32d9ea1 | 2014-10-08 12:15:48 +0100 | [diff] [blame] | 12 | [http://wayland.freedesktop.org]) |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 13 | |
Kristian Høgsberg | af4f2aa | 2013-02-15 20:53:20 -0500 | [diff] [blame] | 14 | AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version]) |
| 15 | AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version]) |
| 16 | AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version]) |
| 17 | AC_SUBST([WESTON_VERSION], [weston_version]) |
| 18 | |
Guillem Jover | dff63a2 | 2014-02-01 18:48:43 +0100 | [diff] [blame] | 19 | AC_CONFIG_AUX_DIR([build-aux]) |
Kristian Høgsberg | d0c3b9d | 2010-10-25 11:40:03 -0400 | [diff] [blame] | 20 | AC_CONFIG_HEADERS([config.h]) |
Thierry Reding | 0e6d9a7 | 2014-05-27 09:07:54 +0200 | [diff] [blame] | 21 | AC_CONFIG_MACRO_DIR([m4]) |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 22 | |
Daniel Stone | c228e23 | 2013-05-22 18:03:19 +0300 | [diff] [blame] | 23 | AC_USE_SYSTEM_EXTENSIONS |
Kristian Høgsberg | 7e105f9 | 2013-08-21 15:44:57 -0700 | [diff] [blame] | 24 | AC_SYS_LARGEFILE |
Daniel Stone | c228e23 | 2013-05-22 18:03:19 +0300 | [diff] [blame] | 25 | |
Kristian Høgsberg | 396a9bb | 2014-01-31 23:49:33 -0800 | [diff] [blame] | 26 | AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects]) |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 27 | |
Kristian Høgsberg | f0152da | 2010-10-12 17:24:20 -0400 | [diff] [blame] | 28 | AM_SILENT_RULES([yes]) |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 29 | |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 30 | # Check for programs |
| 31 | AC_PROG_CC |
Pekka Paalanen | a91291c | 2012-08-29 15:49:48 +0300 | [diff] [blame] | 32 | AC_PROG_SED |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 33 | |
Kristian Høgsberg | 02ec0a5 | 2011-04-23 13:04:11 -0400 | [diff] [blame] | 34 | # Initialize libtool |
| 35 | LT_PREREQ([2.2]) |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 36 | LT_INIT([disable-static]) |
Kristian Høgsberg | 02ec0a5 | 2011-04-23 13:04:11 -0400 | [diff] [blame] | 37 | |
Pekka Paalanen | a51e6fa | 2012-11-07 12:25:12 +0200 | [diff] [blame] | 38 | AC_ARG_VAR([WESTON_NATIVE_BACKEND], |
| 39 | [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@]) |
Emilio Pozuelo Monfort | 8a81b83 | 2013-12-02 12:53:32 +0100 | [diff] [blame] | 40 | AC_ARG_VAR([WESTON_SHELL_CLIENT], |
| 41 | [Set the default desktop shell client to load if none is specified in weston.ini. @<:@default=weston-desktop-shell@:>@]) |
Pekka Paalanen | a51e6fa | 2012-11-07 12:25:12 +0200 | [diff] [blame] | 42 | |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 43 | PKG_PROG_PKG_CONFIG() |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 44 | |
Kristian Høgsberg | 02ec0a5 | 2011-04-23 13:04:11 -0400 | [diff] [blame] | 45 | AC_CHECK_FUNC([dlopen], [], |
| 46 | AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) |
| 47 | AC_SUBST(DLOPEN_LIBS) |
| 48 | |
Rob Bradford | 5a4cea9 | 2013-06-04 13:23:01 +0100 | [diff] [blame] | 49 | AC_CHECK_DECL(SFD_CLOEXEC,[], |
| 50 | [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")], |
| 51 | [[#include <sys/signalfd.h>]]) |
| 52 | AC_CHECK_DECL(TFD_CLOEXEC,[], |
| 53 | [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")], |
| 54 | [[#include <sys/timerfd.h>]]) |
| 55 | AC_CHECK_DECL(CLOCK_MONOTONIC,[], |
| 56 | [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")], |
| 57 | [[#include <time.h>]]) |
Pekka Paalanen | 200019c | 2012-05-30 15:53:42 +0300 | [diff] [blame] | 58 | AC_CHECK_HEADERS([execinfo.h]) |
| 59 | |
Pekka Paalanen | 5b4ddbc | 2013-11-29 17:48:51 +0200 | [diff] [blame] | 60 | AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) |
Pekka Paalanen | 1da1b8f | 2012-06-06 16:59:43 +0300 | [diff] [blame] | 61 | |
Bryce Harrington | 2567c93 | 2015-06-02 16:23:53 -0700 | [diff] [blame] | 62 | COMPOSITOR_MODULES="wayland-server >= 1.8.0 pixman-1 >= 0.25.2" |
Kristian Høgsberg | 08c40c3 | 2011-01-11 13:48:03 -0500 | [diff] [blame] | 63 | |
Jon A. Cruz | 179c186 | 2015-07-15 19:22:43 -0700 | [diff] [blame] | 64 | AC_CONFIG_FILES([doc/doxygen/tools.doxygen doc/doxygen/tooldev.doxygen]) |
| 65 | |
| 66 | AC_ARG_ENABLE(devdocs, |
| 67 | AS_HELP_STRING([--disable-devdocs], |
| 68 | [do not enable building of developer documentation]),, |
| 69 | enable_devdocs=auto) |
| 70 | if test "x$enable_devdocs" != "xno"; then |
| 71 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
| 72 | if test "x$DOXYGEN" = "x" -a "x$enable_devdocs" = "xyes"; then |
| 73 | AC_MSG_ERROR([Developer documentation explicitly requested, but Doxygen couldn't be found]) |
| 74 | fi |
| 75 | if test "x$DOXYGEN" != "x"; then |
| 76 | enable_devdocs=yes |
| 77 | else |
| 78 | enable_devdocs=no |
| 79 | fi |
| 80 | fi |
| 81 | AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes") |
| 82 | |
Kristian Høgsberg | f82a806 | 2013-01-09 13:36:39 -0500 | [diff] [blame] | 83 | AC_ARG_ENABLE(egl, [ --disable-egl],, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 84 | enable_egl=yes) |
| 85 | AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes) |
| 86 | if test x$enable_egl = xyes; then |
| 87 | AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support]) |
Ander Conselvan de Oliveira | 97f2952 | 2013-10-14 15:57:11 +0300 | [diff] [blame] | 88 | PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2]) |
Neil Roberts | 40c0c3f | 2013-10-29 20:13:45 +0000 | [diff] [blame] | 89 | PKG_CHECK_MODULES([EGL_TESTS], [egl >= 7.10 glesv2 wayland-client wayland-egl]) |
Pekka Paalanen | a352580 | 2014-06-12 16:49:29 +0300 | [diff] [blame] | 90 | PKG_CHECK_MODULES([GL_RENDERER], [libdrm]) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 91 | fi |
| 92 | |
Rob Bradford | 382ff46 | 2013-06-24 16:52:45 +0100 | [diff] [blame] | 93 | AC_ARG_ENABLE(xkbcommon, |
| 94 | AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon |
| 95 | support: This is only useful in environments |
| 96 | where you do not have a hardware keyboard. If |
| 97 | libxkbcommon support is disabled clients will not |
| 98 | be sent a keymap and and must know how to |
| 99 | interpret the keycode sent for any key event.]),, |
| 100 | enable_xkbcommon=yes) |
| 101 | if test x$enable_xkbcommon = xyes; then |
| 102 | AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support]) |
Kristian Høgsberg | 3742434 | 2013-10-25 12:49:00 -0700 | [diff] [blame] | 103 | COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0" |
Rob Bradford | 382ff46 | 2013-06-24 16:52:45 +0100 | [diff] [blame] | 104 | fi |
| 105 | |
Kristian Høgsberg | 44d4de6 | 2012-01-19 13:32:17 -0500 | [diff] [blame] | 106 | AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],, |
| 107 | enable_setuid_install=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 108 | AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes) |
Kristian Høgsberg | 44d4de6 | 2012-01-19 13:32:17 -0500 | [diff] [blame] | 109 | |
| 110 | |
Tiago Vignatti | 629ce23 | 2012-05-23 23:04:14 +0300 | [diff] [blame] | 111 | AC_ARG_ENABLE(xwayland, [ --enable-xwayland],, |
| 112 | enable_xwayland=yes) |
Quentin Glidic | bb41005 | 2013-02-18 20:38:22 +0100 | [diff] [blame] | 113 | AC_ARG_ENABLE(xwayland-test, [ --enable-xwayland-test],, |
| 114 | enable_xwayland_test=yes) |
Tiago Vignatti | 629ce23 | 2012-05-23 23:04:14 +0300 | [diff] [blame] | 115 | AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes) |
Quentin Glidic | bb41005 | 2013-02-18 20:38:22 +0100 | [diff] [blame] | 116 | AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes) |
Tiago Vignatti | 629ce23 | 2012-05-23 23:04:14 +0300 | [diff] [blame] | 117 | if test x$enable_xwayland = xyes; then |
Kristian Høgsberg | bcfd07b | 2013-10-11 16:48:19 -0700 | [diff] [blame] | 118 | PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb) |
Tiago Vignatti | 629ce23 | 2012-05-23 23:04:14 +0300 | [diff] [blame] | 119 | AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher]) |
Tiago Vignatti | 5884bcd | 2011-08-03 12:12:31 +0300 | [diff] [blame] | 120 | |
| 121 | AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH], |
| 122 | [Path to X server]), [XSERVER_PATH="$withval"], |
Derek Foreman | 1f9d4f9 | 2015-02-09 09:57:28 -0600 | [diff] [blame] | 123 | [XSERVER_PATH="/usr/bin/Xwayland"]) |
Tiago Vignatti | 5884bcd | 2011-08-03 12:12:31 +0300 | [diff] [blame] | 124 | AC_SUBST([XSERVER_PATH]) |
Quentin Glidic | bb41005 | 2013-02-18 20:38:22 +0100 | [diff] [blame] | 125 | if test x$enable_xwayland_test = xyes; then |
Derek Foreman | 8771a14 | 2015-01-29 16:44:55 -0600 | [diff] [blame] | 126 | PKG_CHECK_MODULES([XWAYLAND_TEST], x11) |
Quentin Glidic | bb41005 | 2013-02-18 20:38:22 +0100 | [diff] [blame] | 127 | fi |
Kristian Høgsberg | 5ec0a93 | 2011-07-01 10:46:40 -0400 | [diff] [blame] | 128 | fi |
| 129 | |
Kristian Høgsberg | d2c9d8a | 2013-11-24 14:37:07 -0800 | [diff] [blame] | 130 | PKG_CHECK_MODULES(LIBDRM, [libdrm], |
| 131 | [AC_DEFINE(HAVE_LIBDRM, 1, [Define if libdrm is available]) have_libdrm=yes], have_libdrm=no) |
Kristian Høgsberg | 5ec0a93 | 2011-07-01 10:46:40 -0400 | [diff] [blame] | 132 | |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 133 | AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],, |
| 134 | enable_x11_compositor=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 135 | AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes) |
| 136 | if test x$enable_x11_compositor = xyes; then |
Kristian Høgsberg | a010abf | 2011-05-11 13:46:29 -0400 | [diff] [blame] | 137 | PKG_CHECK_MODULES([XCB], xcb) |
| 138 | xcb_save_LIBS=$LIBS |
| 139 | xcb_save_CFLAGS=$CFLAGS |
| 140 | CFLAGS=$XCB_CFLAGS |
| 141 | LIBS=$XCB_LIBS |
| 142 | AC_CHECK_FUNCS([xcb_poll_for_queued_event]) |
| 143 | LIBS=$xcb_save_LIBS |
| 144 | CFLAGS=$xcb_save_CFLAGS |
| 145 | |
Damien Lespiau | b5bae34 | 2013-03-28 15:20:54 +0000 | [diff] [blame] | 146 | X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm" |
Daniel Stone | 62b33b6 | 2012-06-22 13:21:35 +0100 | [diff] [blame] | 147 | |
| 148 | PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb], |
| 149 | [have_xcb_xkb="yes"], [have_xcb_xkb="no"]) |
| 150 | if test "x$have_xcb_xkb" = xyes; then |
| 151 | # Most versions of XCB have totally broken XKB bindings, where the |
| 152 | # events don't work. Make sure we can actually use them. |
| 153 | xcb_xkb_save_CFLAGS=$CFLAGS |
| 154 | CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS |
| 155 | AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType], |
| 156 | [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]]) |
| 157 | CFLAGS=$xcb_xkb_save_CFLAGS |
| 158 | fi |
| 159 | if test "x$have_xcb_xkb" = xyes; then |
| 160 | X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb" |
| 161 | AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol]) |
| 162 | fi |
| 163 | |
| 164 | PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 165 | AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor]) |
| 166 | fi |
| 167 | |
| 168 | |
Kristian Høgsberg | 7d498b4 | 2011-01-23 13:50:42 -0500 | [diff] [blame] | 169 | AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],, |
| 170 | enable_drm_compositor=yes) |
Kristian Høgsberg | 02b36f3 | 2013-11-24 14:45:23 -0800 | [diff] [blame] | 171 | AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes) |
| 172 | if test x$enable_drm_compositor = xyes; then |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 173 | AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor]) |
Pekka Paalanen | ab81f15 | 2015-08-24 14:27:07 +0300 | [diff] [blame] | 174 | PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0]) |
Bryce Harrington | a358207 | 2015-08-14 12:23:13 -0700 | [diff] [blame] | 175 | PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2], |
| 176 | [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports dmabuf import])], |
| 177 | [AC_MSG_WARN([gbm does not support dmabuf import, will omit that capability])]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 178 | fi |
| 179 | |
Jonas Ådahl | e0de3c2 | 2014-03-12 22:08:42 +0100 | [diff] [blame] | 180 | |
Jonas Ådahl | faec1eb | 2015-01-15 14:45:56 +0800 | [diff] [blame] | 181 | PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0]) |
Ander Conselvan de Oliveira | 70e2e68 | 2013-10-14 15:57:10 +0300 | [diff] [blame] | 182 | PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 183 | |
Kristian Høgsberg | 7d498b4 | 2011-01-23 13:50:42 -0500 | [diff] [blame] | 184 | AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],, |
| 185 | enable_wayland_compositor=yes) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 186 | AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 187 | test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes) |
| 188 | if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 189 | AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1], |
| 190 | [Build the Wayland (nested) compositor]) |
Pekka Paalanen | 68c83ca | 2014-08-26 13:26:13 +0300 | [diff] [blame] | 191 | PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= 1.5.91 wayland-egl wayland-cursor]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 192 | fi |
| 193 | |
Pekka Paalanen | 3ae50bb | 2012-05-30 15:53:45 +0300 | [diff] [blame] | 194 | |
Ander Conselvan de Oliveira | 11f8d40 | 2012-10-29 18:19:24 +0200 | [diff] [blame] | 195 | AC_ARG_ENABLE(headless-compositor, [ --enable-headless-compositor],, |
| 196 | enable_headless_compositor=yes) |
| 197 | AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR, |
| 198 | test x$enable_headless_compositor = xyes) |
Bryce Harrington | 19c8db9 | 2014-11-19 15:06:16 -0800 | [diff] [blame] | 199 | if test x$enable_headless_compositor = xyes; then |
| 200 | AC_DEFINE([BUILD_HEADLESS_COMPOSITOR], [1], [Build the headless compositor]) |
| 201 | fi |
Ander Conselvan de Oliveira | 11f8d40 | 2012-10-29 18:19:24 +0200 | [diff] [blame] | 202 | |
| 203 | |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 204 | AC_ARG_ENABLE(rpi-compositor, |
| 205 | AS_HELP_STRING([--disable-rpi-compositor], |
| 206 | [do not build the Raspberry Pi backend]),, |
| 207 | enable_rpi_compositor=yes) |
Pekka Paalanen | e31e053 | 2013-05-22 18:03:07 +0300 | [diff] [blame] | 208 | AM_CONDITIONAL(ENABLE_RPI_COMPOSITOR, test "x$enable_rpi_compositor" = "xyes") |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 209 | have_bcm_host="no" |
Pekka Paalanen | e31e053 | 2013-05-22 18:03:07 +0300 | [diff] [blame] | 210 | if test "x$enable_rpi_compositor" = "xyes"; then |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 211 | AC_DEFINE([BUILD_RPI_COMPOSITOR], [1], [Build the compositor for Raspberry Pi]) |
| 212 | PKG_CHECK_MODULES(RPI_COMPOSITOR, [libudev >= 136 mtdev >= 1.1.0]) |
| 213 | PKG_CHECK_MODULES(RPI_BCM_HOST, [bcm_host], |
| 214 | [have_bcm_host="yes" |
| 215 | AC_DEFINE([HAVE_BCM_HOST], [1], [have Raspberry Pi BCM headers])], |
| 216 | [AC_MSG_WARN([Raspberry Pi BCM host libraries not found, will use stubs instead.])]) |
| 217 | fi |
| 218 | AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes") |
| 219 | |
| 220 | |
Philip Withnall | 4f49917 | 2013-02-02 12:02:32 +0000 | [diff] [blame] | 221 | AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],, |
| 222 | enable_fbdev_compositor=yes) |
| 223 | AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR], |
| 224 | [test x$enable_fbdev_compositor = xyes]) |
| 225 | AS_IF([test x$enable_fbdev_compositor = xyes], [ |
| 226 | AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor]) |
Adrian Negreanu | 7b8e970 | 2013-09-26 19:31:32 +0300 | [diff] [blame] | 227 | PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0]) |
Philip Withnall | 4f49917 | 2013-02-02 12:02:32 +0000 | [diff] [blame] | 228 | ]) |
| 229 | |
Hardening | a83409c | 2013-04-01 23:43:58 +0200 | [diff] [blame] | 230 | AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],, |
| 231 | enable_rdp_compositor=no) |
| 232 | AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR], |
| 233 | [test x$enable_rdp_compositor = xyes]) |
| 234 | if test x$enable_rdp_compositor = xyes; then |
Hardening | c077a84 | 2013-07-08 00:51:35 +0200 | [diff] [blame] | 235 | AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor]) |
Hardening | a83409c | 2013-04-01 23:43:58 +0200 | [diff] [blame] | 236 | PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0]) |
Hardening | 04633b6 | 2014-01-10 11:33:06 +0100 | [diff] [blame] | 237 | |
| 238 | SAVED_CPPFLAGS="$CPPFLAGS" |
| 239 | CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS" |
| 240 | AC_CHECK_HEADERS([freerdp/version.h]) |
| 241 | CPPFLAGS="$SAVED_CPPFLAGS" |
Hardening | a83409c | 2013-04-01 23:43:58 +0200 | [diff] [blame] | 242 | fi |
Philip Withnall | 4f49917 | 2013-02-02 12:02:32 +0000 | [diff] [blame] | 243 | |
Kristian Høgsberg | d33cc73 | 2014-05-09 15:32:02 -0700 | [diff] [blame] | 244 | AC_ARG_ENABLE([screen-sharing], [ --enable-screen-sharing],, |
Jason Ekstrand | 47928d8 | 2014-04-02 19:54:01 -0500 | [diff] [blame] | 245 | enable_screen_sharing=no) |
| 246 | AM_CONDITIONAL([ENABLE_SCREEN_SHARING], |
| 247 | [test x$enable_screen_sharing = xyes]) |
| 248 | if test x$enable_screen_sharing = xyes; then |
| 249 | PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client]) |
| 250 | |
| 251 | if test x$enable_rdp_compositor != xyes; then |
| 252 | AC_MSG_WARN([The screen-share.so module requires the RDP backend.]) |
| 253 | fi |
| 254 | fi |
| 255 | |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 256 | AC_ARG_WITH(cairo, |
| 257 | AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@] |
| 258 | [Which Cairo renderer to use for the clients]), |
| 259 | [],[with_cairo="image"]) |
| 260 | |
| 261 | if test "x$with_cairo" = "ximage"; then |
| 262 | cairo_modules="cairo" |
| 263 | else |
| 264 | if test "x$with_cairo" = "xgl"; then |
| 265 | cairo_modules="cairo-gl" |
Bryce Harrington | 42db313 | 2015-05-19 13:24:37 -0700 | [diff] [blame] | 266 | AC_MSG_WARN([The --with-cairo=gl option can cause increased resource usage and potential instability, and thus is not recommended. It is needed only for a few special demo programs.]) |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 267 | else |
| 268 | if test "x$with_cairo" = "xglesv2"; then |
| 269 | cairo_modules="cairo-glesv2" |
Bryce Harrington | 42db313 | 2015-05-19 13:24:37 -0700 | [diff] [blame] | 270 | AC_MSG_WARN([The --with-cairo=gles2 option can cause increased resource usage and potential instability, and thus is not recommended. It is needed only for a few special demo programs.]) |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 271 | else |
| 272 | AC_ERROR([Unknown cairo renderer requested]) |
| 273 | fi |
| 274 | fi |
| 275 | fi |
| 276 | |
| 277 | # Included for legacy compat |
Pekka Paalanen | de7fe62 | 2012-10-16 17:27:18 +0300 | [diff] [blame] | 278 | AC_ARG_WITH(cairo-glesv2, |
| 279 | AS_HELP_STRING([--with-cairo-glesv2], |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 280 | [Use GLESv2 cairo])) |
Pekka Paalanen | de7fe62 | 2012-10-16 17:27:18 +0300 | [diff] [blame] | 281 | if test "x$with_cairo_glesv2" = "xyes"; then |
| 282 | cairo_modules="cairo-glesv2" |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 283 | with_cairo="glesv2" |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 284 | fi |
| 285 | |
| 286 | if test "x$cairo_modules" = "xcairo-glesv2"; then |
| 287 | AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend]) |
Kristian Høgsberg | 2d57439 | 2012-01-18 14:50:58 -0500 | [diff] [blame] | 288 | fi |
| 289 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 290 | PKG_CHECK_MODULES(PIXMAN, [pixman-1]) |
| 291 | PKG_CHECK_MODULES(PNG, [libpng]) |
| 292 | PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no]) |
| 293 | AS_IF([test "x$have_webp" = "xyes"], |
| 294 | [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) |
Kristian Høgsberg | 5a315bc | 2012-05-15 22:33:43 -0400 | [diff] [blame] | 295 | |
Kristian Høgsberg | 0eac34a | 2013-08-30 14:28:22 -0700 | [diff] [blame] | 296 | AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],, |
| 297 | enable_vaapi_recorder=auto) |
| 298 | if test x$enable_vaapi_recorder != xno; then |
| 299 | PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0], |
| 300 | [have_libva=yes], [have_libva=no]) |
| 301 | if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then |
| 302 | AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found]) |
Kristian Høgsberg | 0eac34a | 2013-08-30 14:28:22 -0700 | [diff] [blame] | 303 | fi |
Kristian Høgsberg | 1f7ce6e | 2013-09-03 22:46:02 -0700 | [diff] [blame] | 304 | AS_IF([test "x$have_libva" = "xyes"], |
| 305 | [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])]) |
Kristian Høgsberg | 0eac34a | 2013-08-30 14:28:22 -0700 | [diff] [blame] | 306 | fi |
Kristian Høgsberg | 1f7ce6e | 2013-09-03 22:46:02 -0700 | [diff] [blame] | 307 | AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes) |
Kristian Høgsberg | 0eac34a | 2013-08-30 14:28:22 -0700 | [diff] [blame] | 308 | |
Ander Conselvan de Oliveira | 6aae4d3 | 2013-08-23 17:15:48 +0300 | [diff] [blame] | 309 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 310 | AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes) |
| 311 | if test x$have_jpeglib = xyes; then |
Kristian Høgsberg | 6006ecb | 2012-11-29 12:23:36 -0500 | [diff] [blame] | 312 | JPEG_LIBS="-ljpeg" |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 313 | else |
| 314 | AC_ERROR([libjpeg not found]) |
| 315 | fi |
Kristian Høgsberg | 6006ecb | 2012-11-29 12:23:36 -0500 | [diff] [blame] | 316 | AC_SUBST(JPEG_LIBS) |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 317 | |
Tiago Vignatti | 4f238a5 | 2012-07-31 15:47:48 +0300 | [diff] [blame] | 318 | PKG_CHECK_MODULES(CAIRO, [cairo]) |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 319 | |
Bryce Harrington | 2567c93 | 2015-06-02 16:23:53 -0700 | [diff] [blame] | 320 | PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.8.0]) |
Kristian Høgsberg | 8e293a5 | 2013-11-23 12:40:34 -0800 | [diff] [blame] | 321 | |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 322 | AC_ARG_ENABLE(simple-clients, |
| 323 | AS_HELP_STRING([--disable-simple-clients], |
| 324 | [do not build the simple wl_shm clients]),, |
| 325 | enable_simple_clients=yes) |
| 326 | AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes") |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 327 | if test x$enable_simple_clients = xyes; then |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 328 | PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client]) |
| 329 | fi |
| 330 | |
| 331 | AC_ARG_ENABLE(simple-egl-clients, |
| 332 | AS_HELP_STRING([--disable-simple-egl-clients], |
| 333 | [do not build the simple EGL clients]),, |
Kristian Høgsberg | edb6a3b | 2013-09-03 22:59:17 -0700 | [diff] [blame] | 334 | enable_simple_egl_clients="$enable_egl") |
| 335 | AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes") |
| 336 | if test x$enable_simple_egl_clients = xyes; then |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 337 | PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT, |
Kristian Høgsberg | 191e0ee | 2012-10-29 17:41:46 -0400 | [diff] [blame] | 338 | [egl >= 7.10 glesv2 wayland-client wayland-egl wayland-cursor]) |
Tiago Vignatti | 93165e3 | 2011-07-21 16:35:40 +0300 | [diff] [blame] | 339 | fi |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 340 | |
George Kiagiadakis | 5386898 | 2014-06-12 16:26:49 +0200 | [diff] [blame] | 341 | AC_ARG_ENABLE(simple-intel-dmabuf-client, |
| 342 | AS_HELP_STRING([--disable-simple-intel-dmabuf-client], |
| 343 | [do not build the simple intel dmabuf client]),, |
Bryce Harrington | cb512c0 | 2015-08-14 12:44:50 -0700 | [diff] [blame] | 344 | enable_simple_intel_dmabuf_client="auto") |
| 345 | if ! test "x$enable_simple_intel_dmabuf_client" = "xno"; then |
| 346 | PKG_CHECK_MODULES(SIMPLE_DMABUF_CLIENT, [wayland-client libdrm libdrm_intel], |
| 347 | have_simple_dmabuf_client=yes, have_simple_dmabuf_client=no) |
| 348 | if test "x$have_simple_dmabuf_client" = "xno" -a "x$enable_simple_intel_dmabuf_client" = "xyes"; then |
| 349 | AC_MSG_ERROR([Intel dmabuf client explicitly enabled, but libdrm_intel couldn't be found]) |
| 350 | fi |
Pekka Paalanen | 8358305 | 2015-08-17 09:59:13 +0300 | [diff] [blame] | 351 | enable_simple_intel_dmabuf_client="$have_simple_dmabuf_client" |
George Kiagiadakis | 5386898 | 2014-06-12 16:26:49 +0200 | [diff] [blame] | 352 | fi |
Bryce Harrington | cb512c0 | 2015-08-14 12:44:50 -0700 | [diff] [blame] | 353 | AM_CONDITIONAL(BUILD_SIMPLE_INTEL_DMABUF_CLIENT, test "x$enable_simple_intel_dmabuf_client" = "xyes") |
George Kiagiadakis | 5386898 | 2014-06-12 16:26:49 +0200 | [diff] [blame] | 354 | |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 355 | AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 356 | AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes) |
| 357 | if test x$enable_clients = xyes; then |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 358 | AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients]) |
| 359 | |
Pekka Paalanen | 68c83ca | 2014-08-26 13:26:13 +0300 | [diff] [blame] | 360 | PKG_CHECK_MODULES(CLIENT, [wayland-client >= 1.5.91 cairo >= 1.10.0 xkbcommon wayland-cursor]) |
Armin K | a94e285 | 2013-06-04 13:05:22 +0200 | [diff] [blame] | 361 | PKG_CHECK_MODULES(SERVER, [wayland-server]) |
Pekka Paalanen | 68c83ca | 2014-08-26 13:26:13 +0300 | [diff] [blame] | 362 | PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= 1.5.91]) |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 363 | |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 364 | # Only check for cairo-egl if a GL or GLES renderer requested |
| 365 | AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [ |
| 366 | PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules], |
| 367 | [have_cairo_egl=yes], [have_cairo_egl=no]) |
| 368 | AS_IF([test "x$have_cairo_egl" = "xyes"], |
| 369 | [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])], |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 370 | [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])], |
| 371 | [have_cairo_egl=no]) |
Rob Bradford | 4c1a9bc | 2013-08-09 16:52:46 +0100 | [diff] [blame] | 372 | |
Jan Arne Petersen | 0a1cf39 | 2013-01-16 21:26:42 +0100 | [diff] [blame] | 373 | PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no]) |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 374 | fi |
| 375 | |
Louis-Francis Ratté-Boulianne | 6cd1de3 | 2013-05-22 18:03:11 +0300 | [diff] [blame] | 376 | AC_ARG_ENABLE(resize-optimization, |
| 377 | AS_HELP_STRING([--disable-resize-optimization], |
| 378 | [disable resize optimization allocating a big buffer in toytoolkit]),, |
| 379 | enable_resize_optimization=yes) |
| 380 | AS_IF([test "x$enable_resize_optimization" = "xyes"], |
| 381 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) |
| 382 | |
Kristian Høgsberg | 4fd9d26 | 2014-01-22 10:45:26 -0800 | [diff] [blame] | 383 | PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198], |
David Herrmann | cc5b2ed | 2013-10-22 00:28:09 +0200 | [diff] [blame] | 384 | [have_systemd_login=yes], [have_systemd_login=no]) |
| 385 | AS_IF([test "x$have_systemd_login" = "xyes"], |
| 386 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) |
| 387 | AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes") |
| 388 | |
| 389 | PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209], |
| 390 | [have_systemd_login_209=yes], [have_systemd_login_209=no]) |
| 391 | AS_IF([test "x$have_systemd_login_209" = "xyes"], |
| 392 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])]) |
| 393 | |
Benjamin Franzke | bfeda13 | 2012-01-30 14:04:04 +0100 | [diff] [blame] | 394 | AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) |
| 395 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes) |
| 396 | if test x$enable_weston_launch == xyes; then |
Benjamin Franzke | bfeda13 | 2012-01-30 14:04:04 +0100 | [diff] [blame] | 397 | AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no]) |
| 398 | if test x$have_pam == xno; then |
| 399 | AC_ERROR([weston-launch requires pam]) |
| 400 | fi |
Kristian Høgsberg | d2c9d8a | 2013-11-24 14:37:07 -0800 | [diff] [blame] | 401 | PAM_LIBS=-lpam |
| 402 | AC_SUBST(PAM_LIBS) |
Benjamin Franzke | bfeda13 | 2012-01-30 14:04:04 +0100 | [diff] [blame] | 403 | fi |
| 404 | |
Jan Arne Petersen | 0a1cf39 | 2013-01-16 21:26:42 +0100 | [diff] [blame] | 405 | AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") |
| 406 | |
Armin K | a94e285 | 2013-06-04 13:05:22 +0200 | [diff] [blame] | 407 | AM_CONDITIONAL(HAVE_CAIRO_GLESV2, |
| 408 | [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"]) |
| 409 | |
Pekka Paalanen | 51d2195 | 2012-01-31 16:35:18 +0200 | [diff] [blame] | 410 | AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 411 | test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes") |
Pekka Paalanen | 51d2195 | 2012-01-31 16:35:18 +0200 | [diff] [blame] | 412 | |
Pekka Paalanen | 7ff7a80 | 2013-04-25 13:57:50 +0300 | [diff] [blame] | 413 | AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT, |
| 414 | [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"]) |
| 415 | |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 416 | AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true) |
| 417 | |
Jason Ekstrand | 946a948 | 2014-04-02 19:53:47 -0500 | [diff] [blame] | 418 | AC_ARG_ENABLE(fullscreen-shell, |
| 419 | AS_HELP_STRING([--disable-fullscreen-shell], |
| 420 | [do not build fullscreen-shell server plugin]),, |
| 421 | enable_fullscreen_shell=yes) |
| 422 | AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL, |
| 423 | test "x$enable_fullscreen_shell" = "xyes") |
| 424 | |
Richard Hughes | be7c4dd | 2013-05-11 09:48:22 +0100 | [diff] [blame] | 425 | # CMS modules |
| 426 | AC_ARG_ENABLE(colord, |
| 427 | AS_HELP_STRING([--disable-colord], |
| 428 | [do not build colord CMS support]),, |
Armin K | 49c36c6 | 2013-05-30 15:16:40 +0200 | [diff] [blame] | 429 | enable_colord=auto) |
Armin K | 49c36c6 | 2013-05-30 15:16:40 +0200 | [diff] [blame] | 430 | if test "x$enable_colord" != "xno"; then |
| 431 | PKG_CHECK_MODULES(COLORD, |
| 432 | colord >= 0.1.27, |
| 433 | have_colord=yes, |
| 434 | have_colord=no) |
| 435 | if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then |
| 436 | AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found]) |
| 437 | fi |
| 438 | if test "x$have_colord" = "xyes"; then |
| 439 | enable_colord=yes |
| 440 | fi |
Richard Hughes | be7c4dd | 2013-05-11 09:48:22 +0100 | [diff] [blame] | 441 | fi |
Yanko Kaneti | 9b78adf | 2013-07-10 12:01:36 -0400 | [diff] [blame] | 442 | AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes") |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 443 | |
David Herrmann | 59ab900 | 2013-10-22 00:28:06 +0200 | [diff] [blame] | 444 | # dbus support |
| 445 | AC_ARG_ENABLE(dbus, |
| 446 | AS_HELP_STRING([--disable-dbus], |
| 447 | [do not build with dbus support]),, |
| 448 | enable_dbus=auto) |
| 449 | if test "x$enable_dbus" != "xno"; then |
| 450 | PKG_CHECK_MODULES(DBUS, |
| 451 | dbus-1 >= 1.6, |
| 452 | have_dbus=yes, |
| 453 | have_dbus=no) |
| 454 | if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then |
| 455 | AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found]) |
| 456 | fi |
| 457 | if test "x$have_dbus" = "xyes"; then |
| 458 | enable_dbus=yes |
| 459 | AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support]) |
| 460 | else |
| 461 | enable_dbus=no |
| 462 | fi |
| 463 | fi |
| 464 | AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") |
| 465 | |
Jon A. Cruz | 646aef5 | 2015-07-15 19:22:41 -0700 | [diff] [blame] | 466 | # Note that other features might want libxml2, or this feature might use |
| 467 | # alternative xml libraries at some point. Therefore the feature and |
| 468 | # pre-requisite concepts are split. |
| 469 | AC_ARG_ENABLE(junit_xml, |
| 470 | AS_HELP_STRING([--disable-junit-xml], |
| 471 | [do not build with JUnit XML output]),, |
| 472 | enable_junit_xml=auto) |
| 473 | if test "x$enable_junit_xml" != "xno"; then |
| 474 | PKG_CHECK_MODULES(LIBXML2, |
| 475 | [libxml-2.0 >= 2.6], |
| 476 | have_libxml2=yes, |
| 477 | have_libxml2=no) |
| 478 | if test "x$have_libxml2" = "xno" -a "x$enable_junit_xml" = "xyes"; then |
| 479 | AC_MSG_ERROR([JUnit XML support explicitly requested, but libxml2 couldn't be found]) |
| 480 | fi |
| 481 | if test "x$have_libxml2" = "xyes"; then |
| 482 | enable_junit_xml=yes |
| 483 | AC_DEFINE(ENABLE_JUNIT_XML, [1], [Build Weston with JUnit output support]) |
| 484 | else |
| 485 | enable_junit_xml=no |
| 486 | fi |
| 487 | fi |
| 488 | AM_CONDITIONAL(ENABLE_JUNIT_XML, test "x$enable_junit_xml" = "xyes") |
| 489 | |
Nobuhiko Tanibata | 6f9df65 | 2014-11-27 13:22:00 +0900 | [diff] [blame] | 490 | # ivi-shell support |
| 491 | AC_ARG_ENABLE(ivi-shell, |
| 492 | AS_HELP_STRING([--disable-ivi-shell], |
| 493 | [do not build ivi-shell server plugin and client]),, |
| 494 | enable_ivi_shell=yes) |
| 495 | AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes") |
| 496 | |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 497 | AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes) |
| 498 | AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes) |
| 499 | if test x$enable_wcap_tools = xyes; then |
| 500 | AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools]) |
Kristian Høgsberg | 8d25a5a | 2012-07-20 18:05:10 -0400 | [diff] [blame] | 501 | PKG_CHECK_MODULES(WCAP, [cairo]) |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 502 | WCAP_LIBS="$WCAP_LIBS -lm" |
| 503 | fi |
| 504 | |
Pekka Paalanen | 4b14159 | 2012-08-03 14:39:16 +0300 | [diff] [blame] | 505 | PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no) |
| 506 | AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes") |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 507 | |
nobled | 48f975d | 2011-01-28 13:47:21 +0000 | [diff] [blame] | 508 | if test "x$GCC" = "xyes"; then |
Pekka Paalanen | a95efd3 | 2013-01-18 12:11:10 +0200 | [diff] [blame] | 509 | GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \ |
| 510 | -Wno-missing-field-initializers -g -fvisibility=hidden \ |
Kristian Høgsberg | 6fd73cd | 2014-02-01 11:02:41 -0800 | [diff] [blame] | 511 | -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare" |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 512 | fi |
| 513 | AC_SUBST(GCC_CFLAGS) |
| 514 | |
Armin K | 49c36c6 | 2013-05-30 15:16:40 +0200 | [diff] [blame] | 515 | AC_ARG_ENABLE(libunwind, |
| 516 | AS_HELP_STRING([--disable-libunwind], |
| 517 | [Disable libunwind usage for backtraces]),, |
| 518 | enable_libunwind=auto) |
Quentin Glidic | 5daccc3 | 2013-04-03 20:19:45 +0200 | [diff] [blame] | 519 | AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes]) |
Armin K | 49c36c6 | 2013-05-30 15:16:40 +0200 | [diff] [blame] | 520 | if test "x$enable_libunwind" != "xno"; then |
| 521 | PKG_CHECK_MODULES(LIBUNWIND, |
| 522 | libunwind, |
| 523 | have_libunwind=yes, |
| 524 | have_libunwind=no) |
| 525 | if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then |
| 526 | AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found]) |
| 527 | fi |
| 528 | if test "x$have_libunwind" = "xyes"; then |
| 529 | enable_libunwind=yes |
| 530 | AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support]) |
| 531 | fi |
| 532 | fi |
| 533 | |
Marcin Slusarz | 554a0da | 2013-02-18 13:27:22 -0500 | [diff] [blame] | 534 | |
Pekka Paalanen | a51e6fa | 2012-11-07 12:25:12 +0200 | [diff] [blame] | 535 | if test "x$WESTON_NATIVE_BACKEND" = "x"; then |
| 536 | WESTON_NATIVE_BACKEND="drm-backend.so" |
| 537 | fi |
| 538 | AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND]) |
| 539 | AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"], |
| 540 | [The default backend to load, if not wayland nor x11.]) |
| 541 | |
Emilio Pozuelo Monfort | 8a81b83 | 2013-12-02 12:53:32 +0100 | [diff] [blame] | 542 | if test "x$WESTON_SHELL_CLIENT" = "x"; then |
| 543 | WESTON_SHELL_CLIENT="weston-desktop-shell" |
| 544 | fi |
| 545 | AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT]) |
| 546 | AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"], |
| 547 | [The default desktop shell client to load.]) |
| 548 | |
Kristian Høgsberg | ea520d5 | 2014-01-01 12:47:40 -0800 | [diff] [blame] | 549 | AC_ARG_ENABLE(demo-clients-install, |
| 550 | AS_HELP_STRING([--enable-demo-clients-install], |
| 551 | [Install demo clients built with weston]),, |
Ricardo Vieira | 14613ba | 2014-01-02 15:31:14 -0800 | [diff] [blame] | 552 | enable_demo_clients_install=no) |
| 553 | AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"]) |
Armin K | aac6021 | 2013-07-14 17:26:23 +0200 | [diff] [blame] | 554 | |
Richard Hughes | b24e48e | 2013-05-09 20:31:09 +0100 | [diff] [blame] | 555 | PKG_CHECK_MODULES(LCMS, lcms2, |
| 556 | [have_lcms=yes], [have_lcms=no]) |
| 557 | if test "x$have_lcms" = xyes; then |
| 558 | AC_DEFINE(HAVE_LCMS, 1, [Have lcms support]) |
| 559 | fi |
| 560 | AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes]) |
| 561 | |
Quentin Glidic | 9f43cb4 | 2013-08-24 20:36:10 +0200 | [diff] [blame] | 562 | AC_PATH_PROG([wayland_scanner], [wayland-scanner]) |
| 563 | if test x$wayland_scanner = x; then |
Emil Velikov | 32318a5 | 2015-02-17 15:13:32 +0000 | [diff] [blame] | 564 | PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner]) |
| 565 | wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` |
Quentin Glidic | 9f43cb4 | 2013-08-24 20:36:10 +0200 | [diff] [blame] | 566 | fi |
Kristian Høgsberg | b2d7185 | 2011-02-14 22:13:33 -0500 | [diff] [blame] | 567 | |
Kristian Høgsberg | 0987f81 | 2014-01-27 22:02:41 -0800 | [diff] [blame] | 568 | AC_CONFIG_FILES([Makefile src/version.h src/weston.pc]) |
Kristian Høgsberg | 0aa19e9 | 2014-01-31 16:33:48 -0800 | [diff] [blame] | 569 | |
| 570 | AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD]) |
| 571 | |
Kristian Høgsberg | 4a8767b | 2008-12-10 13:44:23 -0500 | [diff] [blame] | 572 | AC_OUTPUT |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 573 | |
| 574 | AC_MSG_RESULT([ |
| 575 | Native Backend ${WESTON_NATIVE_BACKEND} |
| 576 | setuid Install ${enable_setuid_install} |
| 577 | |
| 578 | Cairo Renderer ${with_cairo} |
| 579 | EGL ${enable_egl} |
| 580 | libxkbcommon ${enable_xkbcommon} |
Jonas Ådahl | b8e62d9 | 2013-10-25 23:18:02 +0200 | [diff] [blame] | 581 | xcb_xkb ${have_xcb_xkb} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 582 | XWayland ${enable_xwayland} |
David Herrmann | 59ab900 | 2013-10-22 00:28:06 +0200 | [diff] [blame] | 583 | dbus ${enable_dbus} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 584 | |
Nobuhiko Tanibata | 6f9df65 | 2014-11-27 13:22:00 +0900 | [diff] [blame] | 585 | ivi-shell ${enable_ivi_shell} |
| 586 | |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 587 | Build wcap utility ${enable_wcap_tools} |
Jason Ekstrand | 946a948 | 2014-04-02 19:53:47 -0500 | [diff] [blame] | 588 | Build Fullscreen Shell ${enable_fullscreen_shell} |
Jon A. Cruz | 179c186 | 2015-07-15 19:22:43 -0700 | [diff] [blame] | 589 | Enable developer documentation ${enable_devdocs} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 590 | |
| 591 | weston-launch utility ${enable_weston_launch} |
David Herrmann | cc5b2ed | 2013-10-22 00:28:09 +0200 | [diff] [blame] | 592 | systemd-login support ${have_systemd_login} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 593 | |
| 594 | DRM Compositor ${enable_drm_compositor} |
| 595 | X11 Compositor ${enable_x11_compositor} |
| 596 | Wayland Compositor ${enable_wayland_compositor} |
| 597 | Headless Compositor ${enable_headless_compositor} |
| 598 | RPI Compositor ${enable_rpi_compositor} |
| 599 | FBDEV Compositor ${enable_fbdev_compositor} |
| 600 | RDP Compositor ${enable_rdp_compositor} |
Jason Ekstrand | 47928d8 | 2014-04-02 19:54:01 -0500 | [diff] [blame] | 601 | Screen Sharing ${enable_screen_sharing} |
Jon A. Cruz | 646aef5 | 2015-07-15 19:22:41 -0700 | [diff] [blame] | 602 | JUnit XML output ${enable_junit_xml} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 603 | |
| 604 | Raspberry Pi BCM headers ${have_bcm_host} |
| 605 | |
| 606 | Build Clients ${enable_clients} |
| 607 | Build EGL Clients ${have_cairo_egl} |
| 608 | Build Simple Clients ${enable_simple_clients} |
| 609 | Build Simple EGL Clients ${enable_simple_egl_clients} |
| 610 | |
Ricardo Vieira | 14613ba | 2014-01-02 15:31:14 -0800 | [diff] [blame] | 611 | Install Demo Clients ${enable_demo_clients_install} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 612 | |
| 613 | Colord Support ${have_colord} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 614 | LCMS2 Support ${have_lcms} |
| 615 | libwebp Support ${have_webp} |
| 616 | libunwind Support ${have_libunwind} |
Ander Conselvan de Oliveira | 6aae4d3 | 2013-08-23 17:15:48 +0300 | [diff] [blame] | 617 | VA H.264 encoding Support ${have_libva} |
Armin K | 0a8461b | 2013-08-14 03:13:53 +0200 | [diff] [blame] | 618 | ]) |