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 | |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 38 | AC_ARG_ENABLE(egl, [ --disable-egl],, |
| 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 | 3ae50bb | 2012-05-30 15:53:45 +0300 | [diff] [blame] | 129 | AC_ARG_ENABLE(android-compositor, |
| 130 | AS_HELP_STRING([--disable-android-compositor], |
| 131 | [do not build-test the Android 4.0 backend]),, |
| 132 | enable_android_compositor=yes) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 133 | AM_CONDITIONAL(ENABLE_ANDROID_COMPOSITOR, test x$enable_android_compositor = xyes -a x$enable_egl = xyes) |
| 134 | if test x$enable_android_compositor = xyes -a x$enable_egl = xyes; then |
Pekka Paalanen | 3ae50bb | 2012-05-30 15:53:45 +0300 | [diff] [blame] | 135 | AC_DEFINE([BUILD_ANDROID_COMPOSITOR], [1], [Build the compositor for Android 4.0]) |
Pekka Paalanen | 4ddf1b2 | 2012-08-03 14:39:13 +0300 | [diff] [blame] | 136 | PKG_CHECK_MODULES(ANDROID_COMPOSITOR, [mtdev >= 1.1.0]) |
Pekka Paalanen | 3ae50bb | 2012-05-30 15:53:45 +0300 | [diff] [blame] | 137 | fi |
| 138 | |
Pekka Paalanen | e8de35c | 2012-11-07 12:25:14 +0200 | [diff] [blame] | 139 | |
| 140 | AC_ARG_ENABLE(rpi-compositor, |
| 141 | AS_HELP_STRING([--disable-rpi-compositor], |
| 142 | [do not build the Raspberry Pi backend]),, |
| 143 | enable_rpi_compositor=yes) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 144 | 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] | 145 | have_bcm_host="no" |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 146 | 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] | 147 | AC_DEFINE([BUILD_RPI_COMPOSITOR], [1], [Build the compositor for Raspberry Pi]) |
| 148 | PKG_CHECK_MODULES(RPI_COMPOSITOR, [libudev >= 136 mtdev >= 1.1.0]) |
| 149 | PKG_CHECK_MODULES(RPI_BCM_HOST, [bcm_host], |
| 150 | [have_bcm_host="yes" |
| 151 | AC_DEFINE([HAVE_BCM_HOST], [1], [have Raspberry Pi BCM headers])], |
| 152 | [AC_MSG_WARN([Raspberry Pi BCM host libraries not found, will use stubs instead.])]) |
| 153 | fi |
| 154 | AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes") |
| 155 | |
| 156 | |
Pekka Paalanen | de7fe62 | 2012-10-16 17:27:18 +0300 | [diff] [blame] | 157 | AC_ARG_WITH(cairo-glesv2, |
| 158 | AS_HELP_STRING([--with-cairo-glesv2], |
| 159 | [Use GLESv2 cairo instead of full GL])) |
| 160 | if test "x$with_cairo_glesv2" = "xyes"; then |
| 161 | cairo_modules="cairo-glesv2" |
Kristian Høgsberg | 2d57439 | 2012-01-18 14:50:58 -0500 | [diff] [blame] | 162 | AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend]) |
Pekka Paalanen | de7fe62 | 2012-10-16 17:27:18 +0300 | [diff] [blame] | 163 | else |
| 164 | cairo_modules="cairo-gl" |
Kristian Høgsberg | 2d57439 | 2012-01-18 14:50:58 -0500 | [diff] [blame] | 165 | fi |
| 166 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 167 | PKG_CHECK_MODULES(PIXMAN, [pixman-1]) |
| 168 | PKG_CHECK_MODULES(PNG, [libpng]) |
| 169 | PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no]) |
| 170 | AS_IF([test "x$have_webp" = "xyes"], |
| 171 | [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) |
Kristian Høgsberg | 5a315bc | 2012-05-15 22:33:43 -0400 | [diff] [blame] | 172 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 173 | AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes) |
| 174 | if test x$have_jpeglib = xyes; then |
Kristian Høgsberg | 6006ecb | 2012-11-29 12:23:36 -0500 | [diff] [blame] | 175 | JPEG_LIBS="-ljpeg" |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 176 | else |
| 177 | AC_ERROR([libjpeg not found]) |
| 178 | fi |
Kristian Høgsberg | 6006ecb | 2012-11-29 12:23:36 -0500 | [diff] [blame] | 179 | AC_SUBST(JPEG_LIBS) |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 180 | |
Tiago Vignatti | 4f238a5 | 2012-07-31 15:47:48 +0300 | [diff] [blame] | 181 | PKG_CHECK_MODULES(CAIRO, [cairo]) |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 182 | |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 183 | AC_ARG_ENABLE(simple-clients, |
| 184 | AS_HELP_STRING([--disable-simple-clients], |
| 185 | [do not build the simple wl_shm clients]),, |
| 186 | enable_simple_clients=yes) |
| 187 | AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes") |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 188 | if test x$enable_simple_clients = xyes; then |
Pekka Paalanen | 5f8a67c | 2012-10-16 17:27:20 +0300 | [diff] [blame] | 189 | PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client]) |
| 190 | fi |
| 191 | |
| 192 | AC_ARG_ENABLE(simple-egl-clients, |
| 193 | AS_HELP_STRING([--disable-simple-egl-clients], |
| 194 | [do not build the simple EGL clients]),, |
| 195 | enable_simple_egl_clients=yes) |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 196 | AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes" -a "x$enable_egl" = "xyes") |
| 197 | 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] | 198 | PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT, |
Kristian Høgsberg | 191e0ee | 2012-10-29 17:41:46 -0400 | [diff] [blame] | 199 | [egl >= 7.10 glesv2 wayland-client wayland-egl wayland-cursor]) |
Tiago Vignatti | 93165e3 | 2011-07-21 16:35:40 +0300 | [diff] [blame] | 200 | fi |
Kristian Høgsberg | a941022 | 2011-01-14 17:22:35 -0500 | [diff] [blame] | 201 | |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 202 | AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes) |
Eric Anholt | 6f82cf5 | 2012-02-09 08:36:03 -0800 | [diff] [blame] | 203 | AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes) |
| 204 | if test x$enable_clients = xyes; then |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 205 | AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients]) |
| 206 | |
Pekka Paalanen | fb39d8d | 2012-10-16 17:27:19 +0300 | [diff] [blame] | 207 | 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] | 208 | PKG_CHECK_MODULES(WESTON_INFO, [wayland-client]) |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 209 | |
Kristian Høgsberg | f02a649 | 2012-03-12 01:05:25 -0400 | [diff] [blame] | 210 | 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] | 211 | [have_poppler=yes], [have_poppler=no]) |
Pekka Paalanen | fb39d8d | 2012-10-16 17:27:19 +0300 | [diff] [blame] | 212 | 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] | 213 | [have_cairo_egl=yes], [have_cairo_egl=no]) |
| 214 | AS_IF([test "x$have_cairo_egl" = "xyes"], |
Benjamin Franzke | 22d5481 | 2011-07-16 19:50:32 +0000 | [diff] [blame] | 215 | [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])], |
Pekka Paalanen | e462897 | 2012-10-16 17:27:17 +0300 | [diff] [blame] | 216 | [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] | 217 | fi |
| 218 | |
Benjamin Franzke | bfeda13 | 2012-01-30 14:04:04 +0100 | [diff] [blame] | 219 | AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) |
| 220 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes) |
| 221 | if test x$enable_weston_launch == xyes; then |
| 222 | PKG_CHECK_MODULES(WESTON_LAUNCH, [libdrm]) |
| 223 | PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login], |
| 224 | [have_systemd_login=yes], [have_systemd_login=no]) |
| 225 | AS_IF([test "x$have_systemd_login" = "xyes"], |
| 226 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) |
| 227 | |
| 228 | AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no]) |
| 229 | if test x$have_pam == xno; then |
| 230 | AC_ERROR([weston-launch requires pam]) |
| 231 | fi |
| 232 | WESTON_LAUNCH_LIBS="$WESTON_LAUNCH_LIBS -lpam" |
| 233 | fi |
| 234 | |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 235 | AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes" -a "$xenable_egl" = "xyes") |
| 236 | if test x$enable_egl = xyes; then |
| 237 | PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no]) |
| 238 | fi |
Kristian Høgsberg | b98905e | 2012-10-29 13:06:02 -0400 | [diff] [blame] | 239 | |
| 240 | |
Kristian Høgsberg | 60c1508 | 2011-04-26 11:47:00 -0400 | [diff] [blame] | 241 | AM_CONDITIONAL(HAVE_POPPLER, test "x$have_poppler" = "xyes") |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 242 | |
Pekka Paalanen | 51d2195 | 2012-01-31 16:35:18 +0200 | [diff] [blame] | 243 | AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS, |
Vasily Khoruzhick | 1bfe2e6 | 2013-01-08 19:09:02 +0300 | [diff] [blame^] | 244 | 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] | 245 | |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 246 | AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true) |
| 247 | |
Pekka Paalanen | 379d3d1 | 2012-10-16 17:27:22 +0300 | [diff] [blame] | 248 | AC_ARG_ENABLE(tablet-shell, |
| 249 | AS_HELP_STRING([--disable-tablet-shell], |
| 250 | [do not build tablet-shell server plugin and client]),, |
Kristian Høgsberg | 64f1c3f | 2011-11-14 15:50:03 -0500 | [diff] [blame] | 251 | enable_tablet_shell=yes) |
| 252 | AM_CONDITIONAL(ENABLE_TABLET_SHELL, |
Pekka Paalanen | 379d3d1 | 2012-10-16 17:27:22 +0300 | [diff] [blame] | 253 | test "x$enable_tablet_shell" = "xyes") |
Kristian Høgsberg | 1c56218 | 2011-05-02 22:09:20 -0400 | [diff] [blame] | 254 | |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 255 | |
| 256 | AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes) |
| 257 | AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes) |
| 258 | if test x$enable_wcap_tools = xyes; then |
| 259 | AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools]) |
Kristian Høgsberg | 8d25a5a | 2012-07-20 18:05:10 -0400 | [diff] [blame] | 260 | PKG_CHECK_MODULES(WCAP, [cairo]) |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 261 | WCAP_LIBS="$WCAP_LIBS -lm" |
| 262 | fi |
| 263 | |
| 264 | AC_CHECK_PROG(RSVG_CONVERT, rsvg-convert, rsvg-convert) |
| 265 | AM_CONDITIONAL(HAVE_RSVG_CONVERT, test -n "$RSVG_CONVERT") |
| 266 | |
Pekka Paalanen | 4b14159 | 2012-08-03 14:39:16 +0300 | [diff] [blame] | 267 | PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no) |
| 268 | AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes") |
Kristian Høgsberg | 61cfa66 | 2012-05-26 13:19:22 -0400 | [diff] [blame] | 269 | |
nobled | 48f975d | 2011-01-28 13:47:21 +0000 | [diff] [blame] | 270 | if test "x$GCC" = "xyes"; then |
Pekka Paalanen | 15643f6 | 2012-06-01 12:20:25 +0300 | [diff] [blame] | 271 | my_common_gcc_flags="-Wall -Wextra -Wno-unused-parameter \ |
| 272 | -Wno-missing-field-initializers -g -fvisibility=hidden" |
| 273 | GCC_CFLAGS="$my_common_gcc_flags \ |
| 274 | -Wstrict-prototypes -Wmissing-prototypes" |
| 275 | GCC_CXXFLAGS="$my_common_gcc_flags" |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 276 | fi |
| 277 | AC_SUBST(GCC_CFLAGS) |
Pekka Paalanen | 15643f6 | 2012-06-01 12:20:25 +0300 | [diff] [blame] | 278 | AC_SUBST(GCC_CXXFLAGS) |
Kristian Høgsberg | d4de54e | 2008-12-04 22:48:50 -0500 | [diff] [blame] | 279 | |
Pekka Paalanen | a51e6fa | 2012-11-07 12:25:12 +0200 | [diff] [blame] | 280 | if test "x$WESTON_NATIVE_BACKEND" = "x"; then |
| 281 | WESTON_NATIVE_BACKEND="drm-backend.so" |
| 282 | fi |
| 283 | AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND]) |
| 284 | AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"], |
| 285 | [The default backend to load, if not wayland nor x11.]) |
| 286 | |
Kristian Høgsberg | b2d7185 | 2011-02-14 22:13:33 -0500 | [diff] [blame] | 287 | WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol']) |
| 288 | |
| 289 | AC_CONFIG_FILES([Makefile |
Pekka Paalanen | c1765c6 | 2011-12-05 15:58:11 +0200 | [diff] [blame] | 290 | shared/Makefile |
Kristian Høgsberg | 8334bc1 | 2012-01-03 10:29:47 -0500 | [diff] [blame] | 291 | src/Makefile |
Kristian Høgsberg | a921901 | 2012-05-21 15:03:32 -0400 | [diff] [blame] | 292 | src/xwayland/Makefile |
Kristian Høgsberg | f0152da | 2010-10-12 17:24:20 -0400 | [diff] [blame] | 293 | clients/Makefile |
Kristian Høgsberg | 2bcb2fc | 2012-05-25 18:03:52 -0400 | [diff] [blame] | 294 | wcap/Makefile |
Kristian Høgsberg | f6a5f7d | 2012-01-03 11:02:46 -0500 | [diff] [blame] | 295 | data/Makefile |
Pekka Paalanen | 4520d5c | 2012-01-16 15:04:28 +0200 | [diff] [blame] | 296 | protocol/Makefile |
Pekka Paalanen | a91291c | 2012-08-29 15:49:48 +0300 | [diff] [blame] | 297 | man/Makefile |
Pekka Paalanen | 4520d5c | 2012-01-16 15:04:28 +0200 | [diff] [blame] | 298 | tests/Makefile]) |
Kristian Høgsberg | 4a8767b | 2008-12-10 13:44:23 -0500 | [diff] [blame] | 299 | AC_OUTPUT |