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