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