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