Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 1 | AC_PREREQ([2.64]) |
Kristian Høgsberg | a7313e7 | 2012-02-08 16:35:12 -0500 | [diff] [blame] | 2 | AC_INIT([weston], |
Kristian Høgsberg | 42470cf | 2012-10-22 18:50:03 -0400 | [diff] [blame] | 3 | [1.0.0], |
Kristian Høgsberg | a7313e7 | 2012-02-08 16:35:12 -0500 | [diff] [blame] | 4 | [https://bugs.freedesktop.org/enter_bug.cgi?product=weston], |
| 5 | [weston], |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 6 | [http://wayland.freedesktop.org/]) |
| 7 | |
Kristian Høgsberg | d0c3b9d | 2010-10-25 11:40:03 -0400 | [diff] [blame] | 8 | AC_CONFIG_HEADERS([config.h]) |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 9 | |
Kristian Høgsberg | 3b03b3d | 2012-02-09 11:18:16 -0500 | [diff] [blame] | 10 | AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 11 | |
Kristian Høgsberg | f0152da | 2010-10-12 17:24:20 -0400 | [diff] [blame] | 12 | AM_SILENT_RULES([yes]) |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 13 | |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 14 | # Check for programs |
| 15 | AC_PROG_CC |
Pekka Paalanen | 3ae50bb | 2012-05-30 15:53:45 +0300 | [diff] [blame] | 16 | AC_PROG_CXX |
Pekka Paalanen | a91291c | 2012-08-29 15:49:48 +0300 | [diff] [blame] | 17 | AC_PROG_SED |
Javier Jardón | 5b7e43a | 2010-11-06 01:55:27 +0100 | [diff] [blame] | 18 | |
Kristian Høgsberg | 02ec0a5 | 2011-04-23 13:04:11 -0400 | [diff] [blame] | 19 | # Initialize libtool |
| 20 | LT_PREREQ([2.2]) |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 21 | LT_INIT([disable-static]) |
Kristian Høgsberg | 02ec0a5 | 2011-04-23 13:04:11 -0400 | [diff] [blame] | 22 | |
Pekka Paalanen | a51e6fa | 2012-11-07 12:25:12 +0200 | [diff] [blame] | 23 | AC_ARG_VAR([WESTON_NATIVE_BACKEND], |
| 24 | [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@]) |
| 25 | |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 26 | PKG_PROG_PKG_CONFIG() |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 27 | |
Kristian Høgsberg | 02ec0a5 | 2011-04-23 13:04:11 -0400 | [diff] [blame] | 28 | AC_CHECK_FUNC([dlopen], [], |
| 29 | AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) |
| 30 | AC_SUBST(DLOPEN_LIBS) |
| 31 | |
Pekka Paalanen | 200019c | 2012-05-30 15:53:42 +0300 | [diff] [blame] | 32 | AC_CHECK_HEADERS([execinfo.h]) |
| 33 | |
Pekka Paalanen | b7a9498 | 2012-06-12 17:42:25 +0300 | [diff] [blame] | 34 | AC_CHECK_FUNCS([mkostemp strchrnul]) |
Pekka Paalanen | 1da1b8f | 2012-06-06 16:59:43 +0300 | [diff] [blame] | 35 | |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 36 | COMPOSITOR_MODULES="wayland-server xkbcommon pixman-1" |
Kristian Høgsberg | 08c40c3 | 2011-01-11 13:48:03 -0500 | [diff] [blame] | 37 | |
Kristian Høgsberg | f82a806 | 2013-01-09 13:36:39 -0500 | [diff] [blame] | 38 | AC_ARG_ENABLE(egl, [ --disable-egl],, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 39 | enable_egl=yes) |
| 40 | AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes) |
| 41 | if test x$enable_egl = xyes; then |
| 42 | AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support]) |
| 43 | COMPOSITOR_MODULES="$COMPOSITOR_MODULES egl >= 7.10 glesv2" |
| 44 | fi |
| 45 | |
| 46 | PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES]) |
Kristian Høgsberg | 5ec0a93 | 2011-07-01 10:46:40 -0400 | [diff] [blame] | 47 | |
Kristian Høgsberg | 44d4de6 | 2012-01-19 13:32:17 -0500 | [diff] [blame] | 48 | AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],, |
| 49 | enable_setuid_install=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 50 | AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes) |
Kristian Høgsberg | 44d4de6 | 2012-01-19 13:32:17 -0500 | [diff] [blame] | 51 | |
| 52 | |
Tiago Vignatti | 629ce23 | 2012-05-23 23:04:14 +0300 | [diff] [blame] | 53 | AC_ARG_ENABLE(xwayland, [ --enable-xwayland],, |
| 54 | enable_xwayland=yes) |
| 55 | AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes) |
| 56 | if test x$enable_xwayland = xyes; then |
Tiago Vignatti | 90fada4 | 2012-07-16 12:02:08 -0400 | [diff] [blame] | 57 | PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcursor cairo-xcb) |
Tiago Vignatti | 629ce23 | 2012-05-23 23:04:14 +0300 | [diff] [blame] | 58 | AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher]) |
Tiago Vignatti | 5884bcd | 2011-08-03 12:12:31 +0300 | [diff] [blame] | 59 | |
| 60 | AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH], |
| 61 | [Path to X server]), [XSERVER_PATH="$withval"], |
| 62 | [XSERVER_PATH="$bindir/Xorg"]) |
| 63 | AC_SUBST([XSERVER_PATH]) |
Kristian Høgsberg | 5ec0a93 | 2011-07-01 10:46:40 -0400 | [diff] [blame] | 64 | fi |
| 65 | |
| 66 | |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 67 | AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],, |
| 68 | enable_x11_compositor=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 69 | AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes) |
| 70 | if test x$enable_x11_compositor = xyes; then |
Kristian Høgsberg | a010abf | 2011-05-11 13:46:29 -0400 | [diff] [blame] | 71 | PKG_CHECK_MODULES([XCB], xcb) |
| 72 | xcb_save_LIBS=$LIBS |
| 73 | xcb_save_CFLAGS=$CFLAGS |
| 74 | CFLAGS=$XCB_CFLAGS |
| 75 | LIBS=$XCB_LIBS |
| 76 | AC_CHECK_FUNCS([xcb_poll_for_queued_event]) |
| 77 | LIBS=$xcb_save_LIBS |
| 78 | CFLAGS=$xcb_save_CFLAGS |
| 79 | |
Daniel Stone | 62b33b6 | 2012-06-22 13:21:35 +0100 | [diff] [blame] | 80 | X11_COMPOSITOR_MODULES="x11 x11-xcb" |
| 81 | |
| 82 | PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb], |
| 83 | [have_xcb_xkb="yes"], [have_xcb_xkb="no"]) |
| 84 | if test "x$have_xcb_xkb" = xyes; then |
| 85 | # Most versions of XCB have totally broken XKB bindings, where the |
| 86 | # events don't work. Make sure we can actually use them. |
| 87 | xcb_xkb_save_CFLAGS=$CFLAGS |
| 88 | CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS |
| 89 | AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType], |
| 90 | [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]]) |
| 91 | CFLAGS=$xcb_xkb_save_CFLAGS |
| 92 | fi |
| 93 | if test "x$have_xcb_xkb" = xyes; then |
| 94 | X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb" |
| 95 | AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol]) |
| 96 | fi |
| 97 | |
| 98 | PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 99 | AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor]) |
| 100 | fi |
| 101 | |
| 102 | |
Kristian Høgsberg | 7d498b4 | 2011-01-23 13:50:42 -0500 | [diff] [blame] | 103 | AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],, |
| 104 | enable_drm_compositor=yes) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 105 | AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes -a x$enable_egl = xyes) |
| 106 | if test x$enable_drm_compositor = xyes -a x$enable_egl = xyes; then |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 107 | AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor]) |
Rob Bradford | eb95d0d | 2012-05-08 14:49:15 +0100 | [diff] [blame] | 108 | PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 109 | fi |
| 110 | |
| 111 | |
Kristian Høgsberg | 7d498b4 | 2011-01-23 13:50:42 -0500 | [diff] [blame] | 112 | AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],, |
| 113 | enable_wayland_compositor=yes) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 114 | AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 115 | test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes) |
| 116 | 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] | 117 | AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1], |
| 118 | [Build the Wayland (nested) compositor]) |
Kristian Høgsberg | 80492e2 | 2011-04-26 11:10:32 -0400 | [diff] [blame] | 119 | PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client wayland-egl]) |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 120 | fi |
| 121 | |
Pekka Paalanen | 3ae50bb | 2012-05-30 15:53:45 +0300 | [diff] [blame] | 122 | |
Ander Conselvan de Oliveira | 11f8d40 | 2012-10-29 18:19:24 +0200 | [diff] [blame] | 123 | AC_ARG_ENABLE(headless-compositor, [ --enable-headless-compositor],, |
| 124 | enable_headless_compositor=yes) |
| 125 | AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR, |
| 126 | test x$enable_headless_compositor = xyes) |
| 127 | |
| 128 | |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 129 | AC_ARG_ENABLE(rpi-compositor, |
| 130 | AS_HELP_STRING([--disable-rpi-compositor], |
| 131 | [do not build the Raspberry Pi backend]),, |
| 132 | enable_rpi_compositor=yes) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 133 | AM_CONDITIONAL(ENABLE_RPI_COMPOSITOR, test "x$enable_rpi_compositor" = "xyes" -a "x$enable_egl" = "xyes") |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 134 | have_bcm_host="no" |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 135 | if test x$enable_rpi_compositor = xyes -a x$enable_egl = xyes; then |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 136 | AC_DEFINE([BUILD_RPI_COMPOSITOR], [1], [Build the compositor for Raspberry Pi]) |
| 137 | PKG_CHECK_MODULES(RPI_COMPOSITOR, [libudev >= 136 mtdev >= 1.1.0]) |
| 138 | PKG_CHECK_MODULES(RPI_BCM_HOST, [bcm_host], |
| 139 | [have_bcm_host="yes" |
| 140 | AC_DEFINE([HAVE_BCM_HOST], [1], [have Raspberry Pi BCM headers])], |
| 141 | [AC_MSG_WARN([Raspberry Pi BCM host libraries not found, will use stubs instead.])]) |
| 142 | fi |
| 143 | AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes") |
| 144 | |
| 145 | |
Pekka Paalanen | de7fe62 | 2012-10-16 17:27:18 +0300 | [diff] [blame] | 146 | AC_ARG_WITH(cairo-glesv2, |
| 147 | AS_HELP_STRING([--with-cairo-glesv2], |
| 148 | [Use GLESv2 cairo instead of full GL])) |
| 149 | if test "x$with_cairo_glesv2" = "xyes"; then |
| 150 | cairo_modules="cairo-glesv2" |
Kristian Høgsberg | 2d57439 | 2012-01-18 14:50:58 -0500 | [diff] [blame] | 151 | AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend]) |
Pekka Paalanen | de7fe62 | 2012-10-16 17:27:18 +0300 | [diff] [blame] | 152 | else |
| 153 | cairo_modules="cairo-gl" |
Kristian Høgsberg | 2d57439 | 2012-01-18 14:50:58 -0500 | [diff] [blame] | 154 | fi |
| 155 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 156 | PKG_CHECK_MODULES(PIXMAN, [pixman-1]) |
| 157 | PKG_CHECK_MODULES(PNG, [libpng]) |
| 158 | PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no]) |
| 159 | AS_IF([test "x$have_webp" = "xyes"], |
| 160 | [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) |
Kristian Høgsberg | 5a315bc | 2012-05-15 22:33:43 -0400 | [diff] [blame] | 161 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 162 | AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes) |
| 163 | if test x$have_jpeglib = xyes; then |
Kristian Høgsberg | 6006ecb | 2012-11-29 12:23:36 -0500 | [diff] [blame] | 164 | JPEG_LIBS="-ljpeg" |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 165 | else |
| 166 | AC_ERROR([libjpeg not found]) |
| 167 | fi |
Kristian Høgsberg | 6006ecb | 2012-11-29 12:23:36 -0500 | [diff] [blame] | 168 | AC_SUBST(JPEG_LIBS) |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 169 | |
Tiago Vignatti | 4f238a5 | 2012-07-31 15:47:48 +0300 | [diff] [blame] | 170 | PKG_CHECK_MODULES(CAIRO, [cairo]) |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 171 | |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 172 | AC_ARG_ENABLE(simple-clients, |
| 173 | AS_HELP_STRING([--disable-simple-clients], |
| 174 | [do not build the simple wl_shm clients]),, |
| 175 | enable_simple_clients=yes) |
| 176 | AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes") |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 177 | if test x$enable_simple_clients = xyes; then |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 178 | PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client]) |
| 179 | fi |
| 180 | |
| 181 | AC_ARG_ENABLE(simple-egl-clients, |
| 182 | AS_HELP_STRING([--disable-simple-egl-clients], |
| 183 | [do not build the simple EGL clients]),, |
| 184 | enable_simple_egl_clients=yes) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 185 | AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes" -a "x$enable_egl" = "xyes") |
| 186 | if test x$enable_simple_egl_clients = xyes -a x$enable_egl = xyes; then |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 187 | PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT, |
Kristian Høgsberg | 191e0ee | 2012-10-29 17:41:46 -0400 | [diff] [blame] | 188 | [egl >= 7.10 glesv2 wayland-client wayland-egl wayland-cursor]) |
Tiago Vignatti | 93165e3 | 2011-07-21 16:35:40 +0300 | [diff] [blame] | 189 | fi |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 190 | |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 191 | AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 192 | AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes) |
| 193 | if test x$enable_clients = xyes; then |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 194 | AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients]) |
| 195 | |
Pekka Paalanen | fb39d8d | 2012-10-16 17:27:19 +0300 | [diff] [blame] | 196 | PKG_CHECK_MODULES(CLIENT, [wayland-client cairo >= 1.10.0 xkbcommon wayland-cursor]) |
Philipp Brüschweiler | 585acb0 | 2012-08-15 17:12:00 +0200 | [diff] [blame] | 197 | PKG_CHECK_MODULES(WESTON_INFO, [wayland-client]) |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 198 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 199 | PKG_CHECK_MODULES(POPPLER, [poppler-glib glib-2.0 gobject-2.0 gio-2.0 ], |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 200 | [have_poppler=yes], [have_poppler=no]) |
Pekka Paalanen | fb39d8d | 2012-10-16 17:27:19 +0300 | [diff] [blame] | 201 | PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules], |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 202 | [have_cairo_egl=yes], [have_cairo_egl=no]) |
| 203 | AS_IF([test "x$have_cairo_egl" = "xyes"], |
Benjamin Franzke | 22d5481 | 2011-07-16 19:50:32 +0000 | [diff] [blame] | 204 | [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])], |
Pekka Paalanen | e462897 | 2012-10-16 17:27:17 +0300 | [diff] [blame] | 205 | [AC_MSG_WARN([clients will use cairo image, cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])]) |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 206 | fi |
| 207 | |
Benjamin Franzke | bfeda13 | 2012-01-30 14:04:04 +0100 | [diff] [blame] | 208 | AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) |
| 209 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes) |
| 210 | if test x$enable_weston_launch == xyes; then |
| 211 | PKG_CHECK_MODULES(WESTON_LAUNCH, [libdrm]) |
| 212 | PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login], |
| 213 | [have_systemd_login=yes], [have_systemd_login=no]) |
| 214 | AS_IF([test "x$have_systemd_login" = "xyes"], |
| 215 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) |
| 216 | |
| 217 | AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no]) |
| 218 | if test x$have_pam == xno; then |
| 219 | AC_ERROR([weston-launch requires pam]) |
| 220 | fi |
| 221 | WESTON_LAUNCH_LIBS="$WESTON_LAUNCH_LIBS -lpam" |
| 222 | fi |
| 223 | |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 224 | AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes" -a "$xenable_egl" = "xyes") |
| 225 | if test x$enable_egl = xyes; then |
| 226 | PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no]) |
| 227 | fi |
Kristian Høgsberg | b98905e | 2012-10-29 13:06:02 -0400 | [diff] [blame] | 228 | |
| 229 | |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 230 | AM_CONDITIONAL(HAVE_POPPLER, test "x$have_poppler" = "xyes") |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 231 | |
Pekka Paalanen | 51d2195 | 2012-01-31 16:35:18 +0200 | [diff] [blame] | 232 | AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame] | 233 | 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] | 234 | |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 235 | AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true) |
| 236 | |
Pekka Paalanen | 379d3d1 | 2012-10-16 17:27:22 +0300 | [diff] [blame] | 237 | AC_ARG_ENABLE(tablet-shell, |
| 238 | AS_HELP_STRING([--disable-tablet-shell], |
| 239 | [do not build tablet-shell server plugin and client]),, |
Kristian Høgsberg | 64f1c3f | 2011-11-14 15:50:03 -0500 | [diff] [blame] | 240 | enable_tablet_shell=yes) |
| 241 | AM_CONDITIONAL(ENABLE_TABLET_SHELL, |
Pekka Paalanen | 379d3d1 | 2012-10-16 17:27:22 +0300 | [diff] [blame] | 242 | test "x$enable_tablet_shell" = "xyes") |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 243 | |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 244 | |
| 245 | AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes) |
| 246 | AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes) |
| 247 | if test x$enable_wcap_tools = xyes; then |
| 248 | AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools]) |
Kristian Høgsberg | 8d25a5a | 2012-07-20 18:05:10 -0400 | [diff] [blame] | 249 | PKG_CHECK_MODULES(WCAP, [cairo]) |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 250 | WCAP_LIBS="$WCAP_LIBS -lm" |
| 251 | fi |
| 252 | |
| 253 | AC_CHECK_PROG(RSVG_CONVERT, rsvg-convert, rsvg-convert) |
| 254 | AM_CONDITIONAL(HAVE_RSVG_CONVERT, test -n "$RSVG_CONVERT") |
| 255 | |
Pekka Paalanen | 4b14159 | 2012-08-03 14:39:16 +0300 | [diff] [blame] | 256 | PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no) |
| 257 | AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes") |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 258 | |
nobled | 48f975d | 2011-01-28 13:47:21 +0000 | [diff] [blame] | 259 | if test "x$GCC" = "xyes"; then |
Pekka Paalanen | 15643f6 | 2012-06-01 12:20:25 +0300 | [diff] [blame] | 260 | my_common_gcc_flags="-Wall -Wextra -Wno-unused-parameter \ |
| 261 | -Wno-missing-field-initializers -g -fvisibility=hidden" |
| 262 | GCC_CFLAGS="$my_common_gcc_flags \ |
| 263 | -Wstrict-prototypes -Wmissing-prototypes" |
| 264 | GCC_CXXFLAGS="$my_common_gcc_flags" |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 265 | fi |
| 266 | AC_SUBST(GCC_CFLAGS) |
Pekka Paalanen | 15643f6 | 2012-06-01 12:20:25 +0300 | [diff] [blame] | 267 | AC_SUBST(GCC_CXXFLAGS) |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 268 | |
Pekka Paalanen | a51e6fa | 2012-11-07 12:25:12 +0200 | [diff] [blame] | 269 | if test "x$WESTON_NATIVE_BACKEND" = "x"; then |
| 270 | WESTON_NATIVE_BACKEND="drm-backend.so" |
| 271 | fi |
| 272 | AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND]) |
| 273 | AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"], |
| 274 | [The default backend to load, if not wayland nor x11.]) |
| 275 | |
Kristian Høgsberg | b2d7185 | 2011-02-14 22:13:33 -0500 | [diff] [blame] | 276 | WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol']) |
| 277 | |
| 278 | AC_CONFIG_FILES([Makefile |
Pekka Paalanen | c1765c6 | 2011-12-05 15:58:11 +0200 | [diff] [blame] | 279 | shared/Makefile |
Kristian Høgsberg | 8334bc1 | 2012-01-03 10:29:47 -0500 | [diff] [blame] | 280 | src/Makefile |
Kristian Høgsberg | a921901 | 2012-05-21 15:03:32 -0400 | [diff] [blame] | 281 | src/xwayland/Makefile |
Kristian Høgsberg | f0152da | 2010-10-12 17:24:20 -0400 | [diff] [blame] | 282 | clients/Makefile |
Kristian Høgsberg | 2bcb2fc | 2012-05-25 18:03:52 -0400 | [diff] [blame] | 283 | wcap/Makefile |
Kristian Høgsberg | f6a5f7d | 2012-01-03 11:02:46 -0500 | [diff] [blame] | 284 | data/Makefile |
Pekka Paalanen | 4520d5c | 2012-01-16 15:04:28 +0200 | [diff] [blame] | 285 | protocol/Makefile |
Pekka Paalanen | a91291c | 2012-08-29 15:49:48 +0300 | [diff] [blame] | 286 | man/Makefile |
Pekka Paalanen | 4520d5c | 2012-01-16 15:04:28 +0200 | [diff] [blame] | 287 | tests/Makefile]) |
Kristian Høgsberg | 4a8767b | 2008-12-10 13:44:23 -0500 | [diff] [blame] | 288 | AC_OUTPUT |