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