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