blob: ed59d54e319b29791b941f2f07d3e027bd4bcdbe [file] [log] [blame]
Bryce Harringtond45de282016-02-16 12:37:43 -08001m4_define([weston_major_version], [1])
2m4_define([weston_minor_version], [10])
Bryce Harringtonf6c854e2016-02-16 17:14:08 -08003m4_define([weston_micro_version], [90])
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -05004m4_define([weston_version],
5 [weston_major_version.weston_minor_version.weston_micro_version])
6
Javier Jardón5b7e43a2010-11-06 01:55:27 +01007AC_PREREQ([2.64])
Kristian Høgsberga7313e72012-02-08 16:35:12 -05008AC_INIT([weston],
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -05009 [weston_version],
10 [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=weston_version],
Kristian Høgsberga7313e72012-02-08 16:35:12 -050011 [weston],
Daniel Stone32d9ea12014-10-08 12:15:48 +010012 [http://wayland.freedesktop.org])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010013
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050014AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
15AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
16AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
17AC_SUBST([WESTON_VERSION], [weston_version])
18
Guillem Joverdff63a22014-02-01 18:48:43 +010019AC_CONFIG_AUX_DIR([build-aux])
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -040020AC_CONFIG_HEADERS([config.h])
Thierry Reding0e6d9a72014-05-27 09:07:54 +020021AC_CONFIG_MACRO_DIR([m4])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010022
Daniel Stonec228e232013-05-22 18:03:19 +030023AC_USE_SYSTEM_EXTENSIONS
Kristian Høgsberg7e105f92013-08-21 15:44:57 -070024AC_SYS_LARGEFILE
Daniel Stonec228e232013-05-22 18:03:19 +030025
Kristian Høgsberg396a9bb2014-01-31 23:49:33 -080026AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010027
Kristian Høgsbergf0152da2010-10-12 17:24:20 -040028AM_SILENT_RULES([yes])
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050029
Javier Jardón5b7e43a2010-11-06 01:55:27 +010030# Check for programs
31AC_PROG_CC
Pekka Paalanena91291c2012-08-29 15:49:48 +030032AC_PROG_SED
Javier Jardón5b7e43a2010-11-06 01:55:27 +010033
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040034# Initialize libtool
35LT_PREREQ([2.2])
Kristian Høgsberg1c562182011-05-02 22:09:20 -040036LT_INIT([disable-static])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040037
Pekka Paalanena51e6fa2012-11-07 12:25:12 +020038AC_ARG_VAR([WESTON_NATIVE_BACKEND],
39 [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +010040AC_ARG_VAR([WESTON_SHELL_CLIENT],
41 [Set the default desktop shell client to load if none is specified in weston.ini. @<:@default=weston-desktop-shell@:>@])
Pekka Paalanena51e6fa2012-11-07 12:25:12 +020042
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050043PKG_PROG_PKG_CONFIG()
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050044
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040045AC_CHECK_FUNC([dlopen], [],
46 AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
47AC_SUBST(DLOPEN_LIBS)
48
Rob Bradford5a4cea92013-06-04 13:23:01 +010049AC_CHECK_DECL(SFD_CLOEXEC,[],
50 [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],
51 [[#include <sys/signalfd.h>]])
52AC_CHECK_DECL(TFD_CLOEXEC,[],
53 [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
54 [[#include <sys/timerfd.h>]])
55AC_CHECK_DECL(CLOCK_MONOTONIC,[],
56 [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
57 [[#include <time.h>]])
Pekka Paalanen200019c2012-05-30 15:53:42 +030058AC_CHECK_HEADERS([execinfo.h])
59
Pekka Paalanen5b4ddbc2013-11-29 17:48:51 +020060AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
Pekka Paalanen1da1b8f2012-06-06 16:59:43 +030061
Bryce Harringtond45de282016-02-16 12:37:43 -080062COMPOSITOR_MODULES="wayland-server >= 1.10.0 pixman-1 >= 0.25.2"
Kristian Høgsberg08c40c32011-01-11 13:48:03 -050063
Jon A. Cruz179c1862015-07-15 19:22:43 -070064AC_CONFIG_FILES([doc/doxygen/tools.doxygen doc/doxygen/tooldev.doxygen])
65
66AC_ARG_ENABLE(devdocs,
67 AS_HELP_STRING([--disable-devdocs],
68 [do not enable building of developer documentation]),,
69 enable_devdocs=auto)
70if test "x$enable_devdocs" != "xno"; then
71 AC_CHECK_PROGS([DOXYGEN], [doxygen])
72 if test "x$DOXYGEN" = "x" -a "x$enable_devdocs" = "xyes"; then
73 AC_MSG_ERROR([Developer documentation explicitly requested, but Doxygen couldn't be found])
74 fi
75 if test "x$DOXYGEN" != "x"; then
76 enable_devdocs=yes
77 else
78 enable_devdocs=no
79 fi
80fi
81AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes")
82
Kristian Høgsbergf82a8062013-01-09 13:36:39 -050083AC_ARG_ENABLE(egl, [ --disable-egl],,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030084 enable_egl=yes)
85AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
86if test x$enable_egl = xyes; then
87 AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +000088 PKG_CHECK_MODULES(EGL, [egl glesv2])
89 PKG_CHECK_MODULES([EGL_TESTS], [egl glesv2 wayland-client wayland-egl])
Pekka Paalanena3525802014-06-12 16:49:29 +030090 PKG_CHECK_MODULES([GL_RENDERER], [libdrm])
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030091fi
92
Rob Bradford382ff462013-06-24 16:52:45 +010093AC_ARG_ENABLE(xkbcommon,
94 AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon
95 support: This is only useful in environments
96 where you do not have a hardware keyboard. If
97 libxkbcommon support is disabled clients will not
98 be sent a keymap and and must know how to
99 interpret the keycode sent for any key event.]),,
100 enable_xkbcommon=yes)
101if test x$enable_xkbcommon = xyes; then
102 AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
Kristian Høgsberg37424342013-10-25 12:49:00 -0700103 COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
Rob Bradford382ff462013-06-24 16:52:45 +0100104fi
105
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500106AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],,
107 enable_setuid_install=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800108AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500109
110
Tiago Vignatti629ce232012-05-23 23:04:14 +0300111AC_ARG_ENABLE(xwayland, [ --enable-xwayland],,
112 enable_xwayland=yes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100113AC_ARG_ENABLE(xwayland-test, [ --enable-xwayland-test],,
114 enable_xwayland_test=yes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300115AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100116AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300117if test x$enable_xwayland = xyes; then
Kristian Høgsbergbcfd07b2013-10-11 16:48:19 -0700118 PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300119 AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300120
121 AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH],
122 [Path to X server]), [XSERVER_PATH="$withval"],
Derek Foreman1f9d4f92015-02-09 09:57:28 -0600123 [XSERVER_PATH="/usr/bin/Xwayland"])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300124 AC_SUBST([XSERVER_PATH])
Quentin Glidicbb410052013-02-18 20:38:22 +0100125 if test x$enable_xwayland_test = xyes; then
Derek Foreman8771a142015-01-29 16:44:55 -0600126 PKG_CHECK_MODULES([XWAYLAND_TEST], x11)
Quentin Glidicbb410052013-02-18 20:38:22 +0100127 fi
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400128fi
129
Kristian Høgsbergd2c9d8a2013-11-24 14:37:07 -0800130PKG_CHECK_MODULES(LIBDRM, [libdrm],
131 [AC_DEFINE(HAVE_LIBDRM, 1, [Define if libdrm is available]) have_libdrm=yes], have_libdrm=no)
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400132
Kristian Høgsberga9410222011-01-14 17:22:35 -0500133AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],,
134 enable_x11_compositor=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800135AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes)
136if test x$enable_x11_compositor = xyes; then
Kristian Høgsberga010abf2011-05-11 13:46:29 -0400137 PKG_CHECK_MODULES([XCB], xcb)
138 xcb_save_LIBS=$LIBS
139 xcb_save_CFLAGS=$CFLAGS
140 CFLAGS=$XCB_CFLAGS
141 LIBS=$XCB_LIBS
142 AC_CHECK_FUNCS([xcb_poll_for_queued_event])
143 LIBS=$xcb_save_LIBS
144 CFLAGS=$xcb_save_CFLAGS
145
Damien Lespiaub5bae342013-03-28 15:20:54 +0000146 X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm"
Daniel Stone62b33b62012-06-22 13:21:35 +0100147
148 PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
149 [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
150 if test "x$have_xcb_xkb" = xyes; then
151 # Most versions of XCB have totally broken XKB bindings, where the
152 # events don't work. Make sure we can actually use them.
153 xcb_xkb_save_CFLAGS=$CFLAGS
154 CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS
155 AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType],
156 [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]])
157 CFLAGS=$xcb_xkb_save_CFLAGS
158 fi
159 if test "x$have_xcb_xkb" = xyes; then
160 X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb"
161 AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol])
162 fi
163
164 PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500165 AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor])
166fi
167
168
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500169AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],,
170 enable_drm_compositor=yes)
Kristian Høgsberg02b36f32013-11-24 14:45:23 -0800171AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
172if test x$enable_drm_compositor = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500173 AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
Pekka Paalanenab81f152015-08-24 14:27:07 +0300174 PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
Bryce Harringtona3582072015-08-14 12:23:13 -0700175 PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2],
176 [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports dmabuf import])],
177 [AC_MSG_WARN([gbm does not support dmabuf import, will omit that capability])])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500178fi
179
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100180
Jonas Ådahlfaec1eb2015-01-15 14:45:56 +0800181PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
Ander Conselvan de Oliveira70e2e682013-10-14 15:57:10 +0300182PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500183
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200184PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
Jonas Ådahl496adb32015-11-17 16:00:27 +0800185 [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
186AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
187
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500188AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
189 enable_wayland_compositor=yes)
Kristian Høgsberga9410222011-01-14 17:22:35 -0500190AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300191 test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes)
192if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500193 AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
194 [Build the Wayland (nested) compositor])
Pekka Paalanen68c83ca2014-08-26 13:26:13 +0300195 PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= 1.5.91 wayland-egl wayland-cursor])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500196fi
197
Pekka Paalanen3ae50bb2012-05-30 15:53:45 +0300198
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200199AC_ARG_ENABLE(headless-compositor, [ --enable-headless-compositor],,
200 enable_headless_compositor=yes)
201AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR,
202 test x$enable_headless_compositor = xyes)
Bryce Harrington19c8db92014-11-19 15:06:16 -0800203if test x$enable_headless_compositor = xyes; then
204 AC_DEFINE([BUILD_HEADLESS_COMPOSITOR], [1], [Build the headless compositor])
205fi
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200206
207
Pekka Paalanene8de35c2012-11-07 12:25:14 +0200208AC_ARG_ENABLE(rpi-compositor,
209 AS_HELP_STRING([--disable-rpi-compositor],
210 [do not build the Raspberry Pi backend]),,
211 enable_rpi_compositor=yes)
Pekka Paalanene31e0532013-05-22 18:03:07 +0300212AM_CONDITIONAL(ENABLE_RPI_COMPOSITOR, test "x$enable_rpi_compositor" = "xyes")
Pekka Paalanene8de35c2012-11-07 12:25:14 +0200213have_bcm_host="no"
Pekka Paalanene31e0532013-05-22 18:03:07 +0300214if test "x$enable_rpi_compositor" = "xyes"; then
Pekka Paalanene8de35c2012-11-07 12:25:14 +0200215 AC_DEFINE([BUILD_RPI_COMPOSITOR], [1], [Build the compositor for Raspberry Pi])
216 PKG_CHECK_MODULES(RPI_COMPOSITOR, [libudev >= 136 mtdev >= 1.1.0])
217 PKG_CHECK_MODULES(RPI_BCM_HOST, [bcm_host],
218 [have_bcm_host="yes"
219 AC_DEFINE([HAVE_BCM_HOST], [1], [have Raspberry Pi BCM headers])],
220 [AC_MSG_WARN([Raspberry Pi BCM host libraries not found, will use stubs instead.])])
221fi
222AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes")
223
224
Philip Withnall4f499172013-02-02 12:02:32 +0000225AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],,
226 enable_fbdev_compositor=yes)
227AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
228 [test x$enable_fbdev_compositor = xyes])
229AS_IF([test x$enable_fbdev_compositor = xyes], [
230 AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
Adrian Negreanu7b8e9702013-09-26 19:31:32 +0300231 PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
Philip Withnall4f499172013-02-02 12:02:32 +0000232])
233
Hardeninga83409c2013-04-01 23:43:58 +0200234AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],,
235 enable_rdp_compositor=no)
236AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
237 [test x$enable_rdp_compositor = xyes])
238if test x$enable_rdp_compositor = xyes; then
Hardeningc077a842013-07-08 00:51:35 +0200239 AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
Hardeninga83409c2013-04-01 23:43:58 +0200240 PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
Hardening04633b62014-01-10 11:33:06 +0100241
242 SAVED_CPPFLAGS="$CPPFLAGS"
243 CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
244 AC_CHECK_HEADERS([freerdp/version.h])
245 CPPFLAGS="$SAVED_CPPFLAGS"
Hardeninga83409c2013-04-01 23:43:58 +0200246fi
Philip Withnall4f499172013-02-02 12:02:32 +0000247
Kristian Høgsbergd33cc732014-05-09 15:32:02 -0700248AC_ARG_ENABLE([screen-sharing], [ --enable-screen-sharing],,
Jason Ekstrand47928d82014-04-02 19:54:01 -0500249 enable_screen_sharing=no)
250AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
251 [test x$enable_screen_sharing = xyes])
252if test x$enable_screen_sharing = xyes; then
253 PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
254
255 if test x$enable_rdp_compositor != xyes; then
256 AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
257 fi
258fi
259
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100260AC_ARG_WITH(cairo,
261 AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
262 [Which Cairo renderer to use for the clients]),
263 [],[with_cairo="image"])
264
265if test "x$with_cairo" = "ximage"; then
266 cairo_modules="cairo"
267else
268if test "x$with_cairo" = "xgl"; then
269 cairo_modules="cairo-gl"
Bryce Harrington42db3132015-05-19 13:24:37 -0700270 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 Bradford4c1a9bc2013-08-09 16:52:46 +0100271else
272if test "x$with_cairo" = "xglesv2"; then
273 cairo_modules="cairo-glesv2"
Bryce Harrington42db3132015-05-19 13:24:37 -0700274 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 Bradford4c1a9bc2013-08-09 16:52:46 +0100275else
276 AC_ERROR([Unknown cairo renderer requested])
277fi
278fi
279fi
280
281# Included for legacy compat
Pekka Paalanende7fe622012-10-16 17:27:18 +0300282AC_ARG_WITH(cairo-glesv2,
283 AS_HELP_STRING([--with-cairo-glesv2],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100284 [Use GLESv2 cairo]))
Pekka Paalanende7fe622012-10-16 17:27:18 +0300285if test "x$with_cairo_glesv2" = "xyes"; then
286 cairo_modules="cairo-glesv2"
Armin K0a8461b2013-08-14 03:13:53 +0200287 with_cairo="glesv2"
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100288fi
289
290if test "x$cairo_modules" = "xcairo-glesv2"; then
291AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
Kristian Høgsberg2d574392012-01-18 14:50:58 -0500292fi
293
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400294PKG_CHECK_MODULES(PIXMAN, [pixman-1])
295PKG_CHECK_MODULES(PNG, [libpng])
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000296
297AC_ARG_WITH([webp],
298 AS_HELP_STRING([--without-webp],
299 [Use libwebp for WebP decoding support [default=auto]]))
300AS_IF([test "x$with_webp" != "xno"],
301 [PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])],
302 [have_webp=no])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400303AS_IF([test "x$have_webp" = "xyes"],
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000304 [AC_DEFINE([HAVE_WEBP], [1], [Have webp])],
305 [AS_IF([test "x$with_webp" = "xyes"],
306 [AC_MSG_ERROR([WebP support explicitly requested, but libwebp couldn't be found])])])
Kristian Høgsberg5a315bc2012-05-15 22:33:43 -0400307
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700308AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
309 enable_vaapi_recorder=auto)
310if test x$enable_vaapi_recorder != xno; then
311 PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
312 [have_libva=yes], [have_libva=no])
313 if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
314 AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700315 fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700316 AS_IF([test "x$have_libva" = "xyes"],
317 [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700318fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700319AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700320
Ander Conselvan de Oliveira6aae4d32013-08-23 17:15:48 +0300321
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400322AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
323if test x$have_jpeglib = xyes; then
Kristian Høgsberg6006ecb2012-11-29 12:23:36 -0500324 JPEG_LIBS="-ljpeg"
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400325else
326 AC_ERROR([libjpeg not found])
327fi
Kristian Høgsberg6006ecb2012-11-29 12:23:36 -0500328AC_SUBST(JPEG_LIBS)
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400329
Tiago Vignatti4f238a52012-07-31 15:47:48 +0300330PKG_CHECK_MODULES(CAIRO, [cairo])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400331
Bryce Harringtond45de282016-02-16 12:37:43 -0800332PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.10.0])
Kristian Høgsberg8e293a52013-11-23 12:40:34 -0800333
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300334AC_ARG_ENABLE(simple-clients,
335 AS_HELP_STRING([--disable-simple-clients],
336 [do not build the simple wl_shm clients]),,
337 enable_simple_clients=yes)
338AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
Eric Anholt6f82cf52012-02-09 08:36:03 -0800339if test x$enable_simple_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300340 PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
341fi
342
343AC_ARG_ENABLE(simple-egl-clients,
344 AS_HELP_STRING([--disable-simple-egl-clients],
345 [do not build the simple EGL clients]),,
Kristian Høgsbergedb6a3b2013-09-03 22:59:17 -0700346 enable_simple_egl_clients="$enable_egl")
347AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
348if test x$enable_simple_egl_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300349 PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000350 [egl glesv2 wayland-client wayland-egl wayland-cursor])
Tiago Vignatti93165e32011-07-21 16:35:40 +0300351fi
Kristian Høgsberga9410222011-01-14 17:22:35 -0500352
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000353AC_ARG_ENABLE(simple-dmabuf-intel-client,
354 AS_HELP_STRING([--disable-simple-dmabuf-intel-client],
355 [do not build the simple dmabuf intel client]),,
356 enable_simple_dmabuf_intel_client="auto")
357if ! test "x$enable_simple_dmabuf_intel_client" = "xno"; then
358 PKG_CHECK_MODULES(SIMPLE_DMABUF_INTEL_CLIENT, [wayland-client libdrm libdrm_intel],
359 have_simple_dmabuf_intel_client=yes, have_simple_dmabuf_intel_client=no)
360 if test "x$have_simple_dmabuf_intel_client" = "xno" -a "x$enable_simple_dmabuf_intel_client" = "xyes"; then
Bryce Harringtoncb512c02015-08-14 12:44:50 -0700361 AC_MSG_ERROR([Intel dmabuf client explicitly enabled, but libdrm_intel couldn't be found])
362 fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000363 enable_simple_dmabuf_intel_client="$have_simple_dmabuf_intel_client"
George Kiagiadakis53868982014-06-12 16:26:49 +0200364fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000365AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_INTEL_CLIENT, test "x$enable_simple_dmabuf_intel_client" = "xyes")
George Kiagiadakis53868982014-06-12 16:26:49 +0200366
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000367AC_ARG_ENABLE(simple-dmabuf-v4l-client,
368 AS_HELP_STRING([--disable-simple-dmabuf-v4l-client],
369 [do not build the simple dmabuf v4l client]),,
370 enable_simple_dmabuf_v4l_client="auto")
371if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
372 PKG_CHECK_MODULES(SIMPLE_DMABUF_V4L_CLIENT, [wayland-client libdrm],
373 have_simple_dmabuf_v4l_client=yes, have_simple_dmabuf_v4l_client=no)
374 if test "x$have_simple_dmabuf_v4l_client" = "xno" -a "x$enable_simple_dmabuf_v4l_client" = "xyes"; then
375 AC_MSG_ERROR([V4L dmabuf client explicitly enabled, but libdrm couldn't be found])
376 fi
377 enable_simple_dmabuf_v4l_client="$have_simple_dmabuf_v4l_client"
378fi
379AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
380
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400381AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800382AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
383if test x$enable_clients = xyes; then
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400384 AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
385
Pekka Paalanen68c83ca2014-08-26 13:26:13 +0300386 PKG_CHECK_MODULES(CLIENT, [wayland-client >= 1.5.91 cairo >= 1.10.0 xkbcommon wayland-cursor])
Armin Ka94e2852013-06-04 13:05:22 +0200387 PKG_CHECK_MODULES(SERVER, [wayland-server])
Pekka Paalanen68c83ca2014-08-26 13:26:13 +0300388 PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= 1.5.91])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400389
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100390 # Only check for cairo-egl if a GL or GLES renderer requested
391 AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000392 PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl cairo-egl >= 1.11.3 $cairo_modules],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100393 [have_cairo_egl=yes], [have_cairo_egl=no])
394 AS_IF([test "x$have_cairo_egl" = "xyes"],
395 [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
Armin K0a8461b2013-08-14 03:13:53 +0200396 [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
397 [have_cairo_egl=no])
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100398
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100399 PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400400fi
401
Louis-Francis Ratté-Boulianne6cd1de32013-05-22 18:03:11 +0300402AC_ARG_ENABLE(resize-optimization,
403 AS_HELP_STRING([--disable-resize-optimization],
404 [disable resize optimization allocating a big buffer in toytoolkit]),,
405 enable_resize_optimization=yes)
406AS_IF([test "x$enable_resize_optimization" = "xyes"],
407 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
408
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100409AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
410AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
411if test x$enable_weston_launch == xyes; then
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100412 AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no])
413 if test x$have_pam == xno; then
414 AC_ERROR([weston-launch requires pam])
415 fi
Kristian Høgsbergd2c9d8a2013-11-24 14:37:07 -0800416 PAM_LIBS=-lpam
417 AC_SUBST(PAM_LIBS)
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100418fi
419
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100420AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
421
Armin Ka94e2852013-06-04 13:05:22 +0200422AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
423 [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
424
Pekka Paalanen51d21952012-01-31 16:35:18 +0200425AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300426 test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
Pekka Paalanen51d21952012-01-31 16:35:18 +0200427
Pekka Paalanen7ff7a802013-04-25 13:57:50 +0300428AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
429 [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
430
Kristian Høgsberg1c562182011-05-02 22:09:20 -0400431AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
432
Jason Ekstrand946a9482014-04-02 19:53:47 -0500433AC_ARG_ENABLE(fullscreen-shell,
434 AS_HELP_STRING([--disable-fullscreen-shell],
435 [do not build fullscreen-shell server plugin]),,
436 enable_fullscreen_shell=yes)
437AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL,
438 test "x$enable_fullscreen_shell" = "xyes")
439
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100440# CMS modules
441AC_ARG_ENABLE(colord,
442 AS_HELP_STRING([--disable-colord],
443 [do not build colord CMS support]),,
Armin K49c36c62013-05-30 15:16:40 +0200444 enable_colord=auto)
Armin K49c36c62013-05-30 15:16:40 +0200445if test "x$enable_colord" != "xno"; then
446 PKG_CHECK_MODULES(COLORD,
447 colord >= 0.1.27,
448 have_colord=yes,
449 have_colord=no)
450 if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
451 AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
452 fi
453 if test "x$have_colord" = "xyes"; then
454 enable_colord=yes
455 fi
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100456fi
Yanko Kaneti9b78adf2013-07-10 12:01:36 -0400457AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400458
David Herrmann59ab9002013-10-22 00:28:06 +0200459# dbus support
460AC_ARG_ENABLE(dbus,
461 AS_HELP_STRING([--disable-dbus],
462 [do not build with dbus support]),,
463 enable_dbus=auto)
464if test "x$enable_dbus" != "xno"; then
465 PKG_CHECK_MODULES(DBUS,
466 dbus-1 >= 1.6,
467 have_dbus=yes,
468 have_dbus=no)
469 if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
470 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
471 fi
472 if test "x$have_dbus" = "xyes"; then
473 enable_dbus=yes
474 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
475 else
476 enable_dbus=no
477 fi
478fi
479AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
480
Manuel Bachmannf989c382015-11-04 12:13:08 +0100481# systemd-login support
482AC_ARG_ENABLE(systemd-login,
483 AS_HELP_STRING([--enable-systemd-login],
484 [Enable logind support]),,
485 enable_systemd_login=auto)
486if test x$enable_systemd_login != xno -a x$have_dbus != xno; then
487 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
488 [libsystemd >= 209],
489 [have_systemd_login_209=yes;have_systemd_login=yes],
490 [have_systemd_login_209=no;have_systemd_login=no])
491
492 # Older versions of systemd package systemd-login separately. Fall back on that
493 AS_IF([test x$have_systemd_login != xyes],[
494 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
495 [libsystemd-login >= 198],
496 [have_systemd_login=yes],
497 [have_systemd_login=no])
498 ])
499else
500 have_systemd_login=no
501fi
502
503if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
504 AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209, libsystemd-login or dbus])
505fi
506
507AS_IF([test "x$have_systemd_login" = "xyes"],
508 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
509AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
510
511AS_IF([test "x$have_systemd_login_209" = "xyes"],
512 [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
513
514
Jon A. Cruz646aef52015-07-15 19:22:41 -0700515# Note that other features might want libxml2, or this feature might use
516# alternative xml libraries at some point. Therefore the feature and
517# pre-requisite concepts are split.
518AC_ARG_ENABLE(junit_xml,
519 AS_HELP_STRING([--disable-junit-xml],
520 [do not build with JUnit XML output]),,
521 enable_junit_xml=auto)
522if test "x$enable_junit_xml" != "xno"; then
523 PKG_CHECK_MODULES(LIBXML2,
524 [libxml-2.0 >= 2.6],
525 have_libxml2=yes,
526 have_libxml2=no)
527 if test "x$have_libxml2" = "xno" -a "x$enable_junit_xml" = "xyes"; then
528 AC_MSG_ERROR([JUnit XML support explicitly requested, but libxml2 couldn't be found])
529 fi
530 if test "x$have_libxml2" = "xyes"; then
531 enable_junit_xml=yes
532 AC_DEFINE(ENABLE_JUNIT_XML, [1], [Build Weston with JUnit output support])
533 else
534 enable_junit_xml=no
535 fi
536fi
537AM_CONDITIONAL(ENABLE_JUNIT_XML, test "x$enable_junit_xml" = "xyes")
538
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900539# ivi-shell support
540AC_ARG_ENABLE(ivi-shell,
541 AS_HELP_STRING([--disable-ivi-shell],
542 [do not build ivi-shell server plugin and client]),,
543 enable_ivi_shell=yes)
544AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
545
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400546AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes)
547AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
548if test x$enable_wcap_tools = xyes; then
549 AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
Kristian Høgsberg8d25a5a2012-07-20 18:05:10 -0400550 PKG_CHECK_MODULES(WCAP, [cairo])
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400551 WCAP_LIBS="$WCAP_LIBS -lm"
552fi
553
Pekka Paalanen4b141592012-08-03 14:39:16 +0300554PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
555AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400556
nobled48f975d2011-01-28 13:47:21 +0000557if test "x$GCC" = "xyes"; then
Pekka Paalanena95efd32013-01-18 12:11:10 +0200558 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
559 -Wno-missing-field-initializers -g -fvisibility=hidden \
Kristian Høgsberg6fd73cd2014-02-01 11:02:41 -0800560 -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -0500561fi
562AC_SUBST(GCC_CFLAGS)
563
Armin K49c36c62013-05-30 15:16:40 +0200564AC_ARG_ENABLE(libunwind,
565 AS_HELP_STRING([--disable-libunwind],
566 [Disable libunwind usage for backtraces]),,
567 enable_libunwind=auto)
Quentin Glidic5daccc32013-04-03 20:19:45 +0200568AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
Armin K49c36c62013-05-30 15:16:40 +0200569if test "x$enable_libunwind" != "xno"; then
570 PKG_CHECK_MODULES(LIBUNWIND,
571 libunwind,
572 have_libunwind=yes,
573 have_libunwind=no)
574 if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
575 AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
576 fi
577 if test "x$have_libunwind" = "xyes"; then
578 enable_libunwind=yes
579 AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
580 fi
581fi
582
Marcin Slusarz554a0da2013-02-18 13:27:22 -0500583
Pekka Paalanena51e6fa2012-11-07 12:25:12 +0200584if test "x$WESTON_NATIVE_BACKEND" = "x"; then
585 WESTON_NATIVE_BACKEND="drm-backend.so"
586fi
587AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
588AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
589 [The default backend to load, if not wayland nor x11.])
590
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +0100591if test "x$WESTON_SHELL_CLIENT" = "x"; then
592 WESTON_SHELL_CLIENT="weston-desktop-shell"
593fi
594AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
595AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
596 [The default desktop shell client to load.])
597
Kristian Høgsbergea520d52014-01-01 12:47:40 -0800598AC_ARG_ENABLE(demo-clients-install,
599 AS_HELP_STRING([--enable-demo-clients-install],
600 [Install demo clients built with weston]),,
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800601 enable_demo_clients_install=no)
602AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
Armin Kaac60212013-07-14 17:26:23 +0200603
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200604AC_ARG_ENABLE(lcms,
605 AS_HELP_STRING([--disable-lcms],
606 [Disable lcms support]),,
607 enable_lcms=auto)
608if test "x$enable_lcms" != "xno"; then
609 PKG_CHECK_MODULES(LCMS,
610 lcms2,
611 have_lcms=yes,
612 have_lcms=no)
613 if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
614 AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
615 fi
616 if test "x$have_lcms" = "xyes"; then
617 enable_lcms=yes
618 AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
619 fi
Richard Hughesb24e48e2013-05-09 20:31:09 +0100620fi
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200621AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
Richard Hughesb24e48e2013-05-09 20:31:09 +0100622
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200623AC_PATH_PROG([wayland_scanner], [wayland-scanner])
624if test x$wayland_scanner = x; then
Emil Velikov32318a52015-02-17 15:13:32 +0000625 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
626 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200627fi
Kristian Høgsbergb2d71852011-02-14 22:13:33 -0500628
Egor Starkov7ce2e972015-09-25 18:00:27 +0300629AC_ARG_ENABLE(systemd_notify,
630 AS_HELP_STRING([--enable-systemd-notify],
631 [Enables systemd notifications to
632 notify systemd about weston state
633 and update watchdog.]),,
634 enable_systemd_notify=no)
635AM_CONDITIONAL(SYSTEMD_NOTIFY_SUPPORT, test x$enable_systemd_notify = xyes)
636if test "x$enable_systemd_notify" = "xyes"; then
637 AC_DEFINE([SYSTEMD_NOTIFY_SUPPORT], [1], [Build the systemd sd_notify support])
638 PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
639fi
640
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800641AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800642
643AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
644
Kristian Høgsberg4a8767b2008-12-10 13:44:23 -0500645AC_OUTPUT
Armin K0a8461b2013-08-14 03:13:53 +0200646
647AC_MSG_RESULT([
648 Native Backend ${WESTON_NATIVE_BACKEND}
649 setuid Install ${enable_setuid_install}
650
651 Cairo Renderer ${with_cairo}
652 EGL ${enable_egl}
653 libxkbcommon ${enable_xkbcommon}
Jonas Ådahlb8e62d92013-10-25 23:18:02 +0200654 xcb_xkb ${have_xcb_xkb}
Armin K0a8461b2013-08-14 03:13:53 +0200655 XWayland ${enable_xwayland}
David Herrmann59ab9002013-10-22 00:28:06 +0200656 dbus ${enable_dbus}
Armin K0a8461b2013-08-14 03:13:53 +0200657
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900658 ivi-shell ${enable_ivi_shell}
659
Armin K0a8461b2013-08-14 03:13:53 +0200660 Build wcap utility ${enable_wcap_tools}
Jason Ekstrand946a9482014-04-02 19:53:47 -0500661 Build Fullscreen Shell ${enable_fullscreen_shell}
Jon A. Cruz179c1862015-07-15 19:22:43 -0700662 Enable developer documentation ${enable_devdocs}
Armin K0a8461b2013-08-14 03:13:53 +0200663
664 weston-launch utility ${enable_weston_launch}
David Herrmanncc5b2ed2013-10-22 00:28:09 +0200665 systemd-login support ${have_systemd_login}
Egor Starkov7ce2e972015-09-25 18:00:27 +0300666 systemd notify support ${enable_systemd_notify}
Armin K0a8461b2013-08-14 03:13:53 +0200667
668 DRM Compositor ${enable_drm_compositor}
669 X11 Compositor ${enable_x11_compositor}
670 Wayland Compositor ${enable_wayland_compositor}
671 Headless Compositor ${enable_headless_compositor}
672 RPI Compositor ${enable_rpi_compositor}
673 FBDEV Compositor ${enable_fbdev_compositor}
674 RDP Compositor ${enable_rdp_compositor}
Jason Ekstrand47928d82014-04-02 19:54:01 -0500675 Screen Sharing ${enable_screen_sharing}
Jon A. Cruz646aef52015-07-15 19:22:41 -0700676 JUnit XML output ${enable_junit_xml}
Armin K0a8461b2013-08-14 03:13:53 +0200677
678 Raspberry Pi BCM headers ${have_bcm_host}
679
680 Build Clients ${enable_clients}
681 Build EGL Clients ${have_cairo_egl}
682 Build Simple Clients ${enable_simple_clients}
683 Build Simple EGL Clients ${enable_simple_egl_clients}
684
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800685 Install Demo Clients ${enable_demo_clients_install}
Armin K0a8461b2013-08-14 03:13:53 +0200686
687 Colord Support ${have_colord}
Armin K0a8461b2013-08-14 03:13:53 +0200688 LCMS2 Support ${have_lcms}
689 libwebp Support ${have_webp}
690 libunwind Support ${have_libunwind}
Ander Conselvan de Oliveira6aae4d32013-08-23 17:15:48 +0300691 VA H.264 encoding Support ${have_libva}
Armin K0a8461b2013-08-14 03:13:53 +0200692])