blob: 525810f188be4e5bd020e3effe5bb4b8a38baa04 [file] [log] [blame]
Bryce Harringtond45de282016-02-16 12:37:43 -08001m4_define([weston_major_version], [1])
Bryce Harrington2d825ed2016-05-31 17:10:40 -07002m4_define([weston_minor_version], [11])
Pekka Paalanenf9d46ed2016-06-01 11:05:46 +03003m4_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
Bryce Harrington46f1f052016-05-11 13:18:59 -070014WAYLAND_PREREQ_VERSION="1.10.0"
15
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050016AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
17AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
18AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
19AC_SUBST([WESTON_VERSION], [weston_version])
20
Guillem Joverdff63a22014-02-01 18:48:43 +010021AC_CONFIG_AUX_DIR([build-aux])
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -040022AC_CONFIG_HEADERS([config.h])
Thierry Reding0e6d9a72014-05-27 09:07:54 +020023AC_CONFIG_MACRO_DIR([m4])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010024
Daniel Stonec228e232013-05-22 18:03:19 +030025AC_USE_SYSTEM_EXTENSIONS
Kristian Høgsberg7e105f92013-08-21 15:44:57 -070026AC_SYS_LARGEFILE
Daniel Stonec228e232013-05-22 18:03:19 +030027
Kristian Høgsberg396a9bb2014-01-31 23:49:33 -080028AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010029
Kristian Høgsbergf0152da2010-10-12 17:24:20 -040030AM_SILENT_RULES([yes])
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050031
Javier Jardón5b7e43a2010-11-06 01:55:27 +010032# Check for programs
33AC_PROG_CC
Pekka Paalanena91291c2012-08-29 15:49:48 +030034AC_PROG_SED
Javier Jardón5b7e43a2010-11-06 01:55:27 +010035
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040036# Initialize libtool
37LT_PREREQ([2.2])
Kristian Høgsberg1c562182011-05-02 22:09:20 -040038LT_INIT([disable-static])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040039
Pekka Paalanena51e6fa2012-11-07 12:25:12 +020040AC_ARG_VAR([WESTON_NATIVE_BACKEND],
41 [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +010042AC_ARG_VAR([WESTON_SHELL_CLIENT],
43 [Set the default desktop shell client to load if none is specified in weston.ini. @<:@default=weston-desktop-shell@:>@])
Pekka Paalanena51e6fa2012-11-07 12:25:12 +020044
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050045PKG_PROG_PKG_CONFIG()
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050046
Quentin Glidic9992bdc2016-04-23 12:02:58 +020047WESTON_SEARCH_LIBS([DLOPEN], [dl], [dlopen])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040048
Gustavo Zacarias34d59852016-04-21 11:18:48 -030049# In old glibc versions (< 2.17) clock_gettime() is in librt
Quentin Glidic9992bdc2016-04-23 12:02:58 +020050WESTON_SEARCH_LIBS([CLOCK_GETTIME], [rt], [clock_gettime])
Gustavo Zacarias34d59852016-04-21 11:18:48 -030051
Rob Bradford5a4cea92013-06-04 13:23:01 +010052AC_CHECK_DECL(SFD_CLOEXEC,[],
53 [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],
54 [[#include <sys/signalfd.h>]])
55AC_CHECK_DECL(TFD_CLOEXEC,[],
56 [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
57 [[#include <sys/timerfd.h>]])
58AC_CHECK_DECL(CLOCK_MONOTONIC,[],
59 [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
60 [[#include <time.h>]])
Pekka Paalanen200019c2012-05-30 15:53:42 +030061AC_CHECK_HEADERS([execinfo.h])
62
Pekka Paalanen5b4ddbc2013-11-29 17:48:51 +020063AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
Pekka Paalanen1da1b8f2012-06-06 16:59:43 +030064
Bryce Harrington46f1f052016-05-11 13:18:59 -070065COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
Kristian Høgsberg08c40c32011-01-11 13:48:03 -050066
Jon A. Cruz179c1862015-07-15 19:22:43 -070067AC_CONFIG_FILES([doc/doxygen/tools.doxygen doc/doxygen/tooldev.doxygen])
68
69AC_ARG_ENABLE(devdocs,
70 AS_HELP_STRING([--disable-devdocs],
71 [do not enable building of developer documentation]),,
72 enable_devdocs=auto)
73if test "x$enable_devdocs" != "xno"; then
74 AC_CHECK_PROGS([DOXYGEN], [doxygen])
75 if test "x$DOXYGEN" = "x" -a "x$enable_devdocs" = "xyes"; then
76 AC_MSG_ERROR([Developer documentation explicitly requested, but Doxygen couldn't be found])
77 fi
78 if test "x$DOXYGEN" != "x"; then
79 enable_devdocs=yes
80 else
81 enable_devdocs=no
82 fi
83fi
84AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes")
85
Kristian Høgsbergf82a8062013-01-09 13:36:39 -050086AC_ARG_ENABLE(egl, [ --disable-egl],,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030087 enable_egl=yes)
88AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
89if test x$enable_egl = xyes; then
90 AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +000091 PKG_CHECK_MODULES(EGL, [egl glesv2])
92 PKG_CHECK_MODULES([EGL_TESTS], [egl glesv2 wayland-client wayland-egl])
Pekka Paalanena3525802014-06-12 16:49:29 +030093 PKG_CHECK_MODULES([GL_RENDERER], [libdrm])
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030094fi
95
Rob Bradford382ff462013-06-24 16:52:45 +010096AC_ARG_ENABLE(xkbcommon,
97 AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon
98 support: This is only useful in environments
99 where you do not have a hardware keyboard. If
100 libxkbcommon support is disabled clients will not
101 be sent a keymap and and must know how to
102 interpret the keycode sent for any key event.]),,
103 enable_xkbcommon=yes)
104if test x$enable_xkbcommon = xyes; then
105 AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
Kristian Høgsberg37424342013-10-25 12:49:00 -0700106 COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
Rob Bradford382ff462013-06-24 16:52:45 +0100107fi
108
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500109AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],,
110 enable_setuid_install=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800111AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500112
113
Tiago Vignatti629ce232012-05-23 23:04:14 +0300114AC_ARG_ENABLE(xwayland, [ --enable-xwayland],,
115 enable_xwayland=yes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100116AC_ARG_ENABLE(xwayland-test, [ --enable-xwayland-test],,
117 enable_xwayland_test=yes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300118AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100119AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300120if test x$enable_xwayland = xyes; then
Kristian Høgsbergbcfd07b2013-10-11 16:48:19 -0700121 PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300122 AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300123
124 AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH],
125 [Path to X server]), [XSERVER_PATH="$withval"],
Derek Foreman1f9d4f92015-02-09 09:57:28 -0600126 [XSERVER_PATH="/usr/bin/Xwayland"])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300127 AC_SUBST([XSERVER_PATH])
Quentin Glidicbb410052013-02-18 20:38:22 +0100128 if test x$enable_xwayland_test = xyes; then
Derek Foreman8771a142015-01-29 16:44:55 -0600129 PKG_CHECK_MODULES([XWAYLAND_TEST], x11)
Quentin Glidicbb410052013-02-18 20:38:22 +0100130 fi
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400131fi
132
Kristian Høgsbergd2c9d8a2013-11-24 14:37:07 -0800133PKG_CHECK_MODULES(LIBDRM, [libdrm],
134 [AC_DEFINE(HAVE_LIBDRM, 1, [Define if libdrm is available]) have_libdrm=yes], have_libdrm=no)
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400135
Kristian Høgsberga9410222011-01-14 17:22:35 -0500136AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],,
137 enable_x11_compositor=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800138AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes)
139if test x$enable_x11_compositor = xyes; then
Kristian Høgsberga010abf2011-05-11 13:46:29 -0400140 PKG_CHECK_MODULES([XCB], xcb)
141 xcb_save_LIBS=$LIBS
142 xcb_save_CFLAGS=$CFLAGS
143 CFLAGS=$XCB_CFLAGS
144 LIBS=$XCB_LIBS
145 AC_CHECK_FUNCS([xcb_poll_for_queued_event])
146 LIBS=$xcb_save_LIBS
147 CFLAGS=$xcb_save_CFLAGS
148
Damien Lespiaub5bae342013-03-28 15:20:54 +0000149 X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm"
Daniel Stone62b33b62012-06-22 13:21:35 +0100150
151 PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
152 [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
153 if test "x$have_xcb_xkb" = xyes; then
154 # Most versions of XCB have totally broken XKB bindings, where the
155 # events don't work. Make sure we can actually use them.
156 xcb_xkb_save_CFLAGS=$CFLAGS
157 CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS
158 AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType],
159 [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]])
160 CFLAGS=$xcb_xkb_save_CFLAGS
161 fi
162 if test "x$have_xcb_xkb" = xyes; then
163 X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb"
164 AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol])
165 fi
166
167 PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500168 AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor])
169fi
170
171
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500172AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],,
173 enable_drm_compositor=yes)
Kristian Høgsberg02b36f32013-11-24 14:45:23 -0800174AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
175if test x$enable_drm_compositor = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500176 AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
Pekka Paalanenab81f152015-08-24 14:27:07 +0300177 PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
Bryce Harringtona3582072015-08-14 12:23:13 -0700178 PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2],
179 [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports dmabuf import])],
180 [AC_MSG_WARN([gbm does not support dmabuf import, will omit that capability])])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500181fi
182
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100183
Jonas Ådahlfaec1eb2015-01-15 14:45:56 +0800184PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
Ander Conselvan de Oliveira70e2e682013-10-14 15:57:10 +0300185PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500186
Pekka Paalanenb00c79b2016-02-18 16:53:27 +0200187PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
Jonas Ådahl496adb32015-11-17 16:00:27 +0800188 [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
189AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
190
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500191AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
192 enable_wayland_compositor=yes)
Kristian Høgsberga9410222011-01-14 17:22:35 -0500193AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300194 test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes)
195if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500196 AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
197 [Build the Wayland (nested) compositor])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700198 PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= $WAYLAND_PREREQ_VERSION wayland-egl wayland-cursor])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500199fi
200
Pekka Paalanen3ae50bb2012-05-30 15:53:45 +0300201
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200202AC_ARG_ENABLE(headless-compositor, [ --enable-headless-compositor],,
203 enable_headless_compositor=yes)
204AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR,
205 test x$enable_headless_compositor = xyes)
Bryce Harrington19c8db92014-11-19 15:06:16 -0800206if test x$enable_headless_compositor = xyes; then
207 AC_DEFINE([BUILD_HEADLESS_COMPOSITOR], [1], [Build the headless compositor])
208fi
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200209
210
Philip Withnall4f499172013-02-02 12:02:32 +0000211AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],,
212 enable_fbdev_compositor=yes)
213AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
214 [test x$enable_fbdev_compositor = xyes])
215AS_IF([test x$enable_fbdev_compositor = xyes], [
216 AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
Adrian Negreanu7b8e9702013-09-26 19:31:32 +0300217 PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
Philip Withnall4f499172013-02-02 12:02:32 +0000218])
219
Hardeninga83409c2013-04-01 23:43:58 +0200220AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],,
221 enable_rdp_compositor=no)
222AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
223 [test x$enable_rdp_compositor = xyes])
224if test x$enable_rdp_compositor = xyes; then
Hardeningc077a842013-07-08 00:51:35 +0200225 AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
FORT David58b63ab2016-05-01 23:32:07 +0200226 PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
227 [],
228 [PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
229 )
Hardening04633b62014-01-10 11:33:06 +0100230
231 SAVED_CPPFLAGS="$CPPFLAGS"
232 CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
233 AC_CHECK_HEADERS([freerdp/version.h])
234 CPPFLAGS="$SAVED_CPPFLAGS"
Hardeninga83409c2013-04-01 23:43:58 +0200235fi
Philip Withnall4f499172013-02-02 12:02:32 +0000236
Kristian Høgsbergd33cc732014-05-09 15:32:02 -0700237AC_ARG_ENABLE([screen-sharing], [ --enable-screen-sharing],,
Jason Ekstrand47928d82014-04-02 19:54:01 -0500238 enable_screen_sharing=no)
239AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
240 [test x$enable_screen_sharing = xyes])
241if test x$enable_screen_sharing = xyes; then
242 PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
243
244 if test x$enable_rdp_compositor != xyes; then
245 AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
246 fi
247fi
248
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100249AC_ARG_WITH(cairo,
250 AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
251 [Which Cairo renderer to use for the clients]),
252 [],[with_cairo="image"])
253
254if test "x$with_cairo" = "ximage"; then
255 cairo_modules="cairo"
256else
257if test "x$with_cairo" = "xgl"; then
258 cairo_modules="cairo-gl"
Bryce Harrington42db3132015-05-19 13:24:37 -0700259 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 +0100260else
261if test "x$with_cairo" = "xglesv2"; then
262 cairo_modules="cairo-glesv2"
Bryce Harrington42db3132015-05-19 13:24:37 -0700263 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 +0100264else
265 AC_ERROR([Unknown cairo renderer requested])
266fi
267fi
268fi
269
270# Included for legacy compat
Pekka Paalanende7fe622012-10-16 17:27:18 +0300271AC_ARG_WITH(cairo-glesv2,
272 AS_HELP_STRING([--with-cairo-glesv2],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100273 [Use GLESv2 cairo]))
Pekka Paalanende7fe622012-10-16 17:27:18 +0300274if test "x$with_cairo_glesv2" = "xyes"; then
275 cairo_modules="cairo-glesv2"
Armin K0a8461b2013-08-14 03:13:53 +0200276 with_cairo="glesv2"
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100277fi
278
279if test "x$cairo_modules" = "xcairo-glesv2"; then
280AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
Kristian Høgsberg2d574392012-01-18 14:50:58 -0500281fi
282
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400283PKG_CHECK_MODULES(PIXMAN, [pixman-1])
284PKG_CHECK_MODULES(PNG, [libpng])
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000285
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000286AC_ARG_WITH([jpeg],
287 AS_HELP_STRING([--without-jpeg],
288 [Use jpeglib for JPEG decoding support [default=auto]]))
289AS_IF([test "x$with_jpeg" != "xno"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200290 [WESTON_SEARCH_LIBS([JPEG], [jpeg], [jpeg_CreateDecompress], [have_jpeglib=yes], [have_jpeglib=no])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000291 [have_jpeglib=no])
292AS_IF([test "x$have_jpeglib" = "xyes"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200293 [AC_DEFINE([HAVE_JPEG], [1], [Have jpeglib])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000294 [AS_IF([test "x$with_jpeg" = "xyes"],
295 [AC_MSG_ERROR([JPEG support explicitly requested, but jpeglib couldn't be found])])])
296
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000297AC_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
Tiago Vignatti4f238a52012-07-31 15:47:48 +0300321PKG_CHECK_MODULES(CAIRO, [cairo])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400322
Bryce Harrington46f1f052016-05-11 13:18:59 -0700323PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg8e293a52013-11-23 12:40:34 -0800324
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300325AC_ARG_ENABLE(simple-clients,
326 AS_HELP_STRING([--disable-simple-clients],
327 [do not build the simple wl_shm clients]),,
328 enable_simple_clients=yes)
329AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
Eric Anholt6f82cf52012-02-09 08:36:03 -0800330if test x$enable_simple_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300331 PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
332fi
333
334AC_ARG_ENABLE(simple-egl-clients,
335 AS_HELP_STRING([--disable-simple-egl-clients],
336 [do not build the simple EGL clients]),,
Kristian Høgsbergedb6a3b2013-09-03 22:59:17 -0700337 enable_simple_egl_clients="$enable_egl")
338AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
339if test x$enable_simple_egl_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300340 PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000341 [egl glesv2 wayland-client wayland-egl wayland-cursor])
Tiago Vignatti93165e32011-07-21 16:35:40 +0300342fi
Kristian Høgsberga9410222011-01-14 17:22:35 -0500343
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000344AC_ARG_ENABLE(simple-dmabuf-intel-client,
345 AS_HELP_STRING([--disable-simple-dmabuf-intel-client],
346 [do not build the simple dmabuf intel client]),,
347 enable_simple_dmabuf_intel_client="auto")
348if ! test "x$enable_simple_dmabuf_intel_client" = "xno"; then
349 PKG_CHECK_MODULES(SIMPLE_DMABUF_INTEL_CLIENT, [wayland-client libdrm libdrm_intel],
350 have_simple_dmabuf_intel_client=yes, have_simple_dmabuf_intel_client=no)
351 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 -0700352 AC_MSG_ERROR([Intel dmabuf client explicitly enabled, but libdrm_intel couldn't be found])
353 fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000354 enable_simple_dmabuf_intel_client="$have_simple_dmabuf_intel_client"
George Kiagiadakis53868982014-06-12 16:26:49 +0200355fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000356AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_INTEL_CLIENT, test "x$enable_simple_dmabuf_intel_client" = "xyes")
George Kiagiadakis53868982014-06-12 16:26:49 +0200357
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000358AC_ARG_ENABLE(simple-dmabuf-v4l-client,
359 AS_HELP_STRING([--disable-simple-dmabuf-v4l-client],
360 [do not build the simple dmabuf v4l client]),,
361 enable_simple_dmabuf_v4l_client="auto")
362if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
363 PKG_CHECK_MODULES(SIMPLE_DMABUF_V4L_CLIENT, [wayland-client libdrm],
364 have_simple_dmabuf_v4l_client=yes, have_simple_dmabuf_v4l_client=no)
365 if test "x$have_simple_dmabuf_v4l_client" = "xno" -a "x$enable_simple_dmabuf_v4l_client" = "xyes"; then
366 AC_MSG_ERROR([V4L dmabuf client explicitly enabled, but libdrm couldn't be found])
367 fi
368 enable_simple_dmabuf_v4l_client="$have_simple_dmabuf_v4l_client"
369fi
370AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
371
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400372AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800373AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
374if test x$enable_clients = xyes; then
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400375 AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
376
Bryce Harrington46f1f052016-05-11 13:18:59 -0700377 PKG_CHECK_MODULES(CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION cairo >= 1.10.0 xkbcommon wayland-cursor])
Armin Ka94e2852013-06-04 13:05:22 +0200378 PKG_CHECK_MODULES(SERVER, [wayland-server])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700379 PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400380
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100381 # Only check for cairo-egl if a GL or GLES renderer requested
382 AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000383 PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl cairo-egl >= 1.11.3 $cairo_modules],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100384 [have_cairo_egl=yes], [have_cairo_egl=no])
385 AS_IF([test "x$have_cairo_egl" = "xyes"],
386 [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
Armin K0a8461b2013-08-14 03:13:53 +0200387 [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
388 [have_cairo_egl=no])
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100389
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100390 PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400391fi
392
Louis-Francis Ratté-Boulianne6cd1de32013-05-22 18:03:11 +0300393AC_ARG_ENABLE(resize-optimization,
394 AS_HELP_STRING([--disable-resize-optimization],
395 [disable resize optimization allocating a big buffer in toytoolkit]),,
396 enable_resize_optimization=yes)
397AS_IF([test "x$enable_resize_optimization" = "xyes"],
398 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
399
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100400AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
401AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
402if test x$enable_weston_launch == xyes; then
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200403 WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100404 if test x$have_pam == xno; then
405 AC_ERROR([weston-launch requires pam])
406 fi
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100407fi
408
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100409AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
410
Armin Ka94e2852013-06-04 13:05:22 +0200411AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
412 [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
413
Pekka Paalanen51d21952012-01-31 16:35:18 +0200414AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300415 test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
Pekka Paalanen51d21952012-01-31 16:35:18 +0200416
Pekka Paalanen7ff7a802013-04-25 13:57:50 +0300417AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
418 [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
419
Kristian Høgsberg1c562182011-05-02 22:09:20 -0400420AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
421
Jason Ekstrand946a9482014-04-02 19:53:47 -0500422AC_ARG_ENABLE(fullscreen-shell,
423 AS_HELP_STRING([--disable-fullscreen-shell],
424 [do not build fullscreen-shell server plugin]),,
425 enable_fullscreen_shell=yes)
426AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL,
427 test "x$enable_fullscreen_shell" = "xyes")
428
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100429# CMS modules
430AC_ARG_ENABLE(colord,
431 AS_HELP_STRING([--disable-colord],
432 [do not build colord CMS support]),,
Armin K49c36c62013-05-30 15:16:40 +0200433 enable_colord=auto)
Armin K49c36c62013-05-30 15:16:40 +0200434if test "x$enable_colord" != "xno"; then
435 PKG_CHECK_MODULES(COLORD,
436 colord >= 0.1.27,
437 have_colord=yes,
438 have_colord=no)
439 if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
440 AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
441 fi
442 if test "x$have_colord" = "xyes"; then
443 enable_colord=yes
444 fi
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100445fi
Yanko Kaneti9b78adf2013-07-10 12:01:36 -0400446AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400447
David Herrmann59ab9002013-10-22 00:28:06 +0200448# dbus support
449AC_ARG_ENABLE(dbus,
450 AS_HELP_STRING([--disable-dbus],
451 [do not build with dbus support]),,
452 enable_dbus=auto)
453if test "x$enable_dbus" != "xno"; then
454 PKG_CHECK_MODULES(DBUS,
455 dbus-1 >= 1.6,
456 have_dbus=yes,
457 have_dbus=no)
458 if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
459 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
460 fi
461 if test "x$have_dbus" = "xyes"; then
462 enable_dbus=yes
463 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
464 else
465 enable_dbus=no
466 fi
467fi
468AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
469
Manuel Bachmannf989c382015-11-04 12:13:08 +0100470# systemd-login support
471AC_ARG_ENABLE(systemd-login,
472 AS_HELP_STRING([--enable-systemd-login],
473 [Enable logind support]),,
474 enable_systemd_login=auto)
475if test x$enable_systemd_login != xno -a x$have_dbus != xno; then
476 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
477 [libsystemd >= 209],
478 [have_systemd_login_209=yes;have_systemd_login=yes],
479 [have_systemd_login_209=no;have_systemd_login=no])
480
481 # Older versions of systemd package systemd-login separately. Fall back on that
482 AS_IF([test x$have_systemd_login != xyes],[
483 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
484 [libsystemd-login >= 198],
485 [have_systemd_login=yes],
486 [have_systemd_login=no])
487 ])
488else
489 have_systemd_login=no
490fi
491
492if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
493 AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209, libsystemd-login or dbus])
494fi
495
496AS_IF([test "x$have_systemd_login" = "xyes"],
497 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
498AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
499
500AS_IF([test "x$have_systemd_login_209" = "xyes"],
501 [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
502
503
Jon A. Cruz646aef52015-07-15 19:22:41 -0700504# Note that other features might want libxml2, or this feature might use
505# alternative xml libraries at some point. Therefore the feature and
506# pre-requisite concepts are split.
507AC_ARG_ENABLE(junit_xml,
508 AS_HELP_STRING([--disable-junit-xml],
509 [do not build with JUnit XML output]),,
510 enable_junit_xml=auto)
511if test "x$enable_junit_xml" != "xno"; then
512 PKG_CHECK_MODULES(LIBXML2,
513 [libxml-2.0 >= 2.6],
514 have_libxml2=yes,
515 have_libxml2=no)
516 if test "x$have_libxml2" = "xno" -a "x$enable_junit_xml" = "xyes"; then
517 AC_MSG_ERROR([JUnit XML support explicitly requested, but libxml2 couldn't be found])
518 fi
519 if test "x$have_libxml2" = "xyes"; then
520 enable_junit_xml=yes
521 AC_DEFINE(ENABLE_JUNIT_XML, [1], [Build Weston with JUnit output support])
522 else
523 enable_junit_xml=no
524 fi
525fi
526AM_CONDITIONAL(ENABLE_JUNIT_XML, test "x$enable_junit_xml" = "xyes")
527
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900528# ivi-shell support
529AC_ARG_ENABLE(ivi-shell,
530 AS_HELP_STRING([--disable-ivi-shell],
531 [do not build ivi-shell server plugin and client]),,
532 enable_ivi_shell=yes)
533AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
534
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400535AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes)
536AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
537if test x$enable_wcap_tools = xyes; then
538 AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
Kristian Høgsberg8d25a5a2012-07-20 18:05:10 -0400539 PKG_CHECK_MODULES(WCAP, [cairo])
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400540 WCAP_LIBS="$WCAP_LIBS -lm"
541fi
542
Pekka Paalanen4b141592012-08-03 14:39:16 +0300543PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
544AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400545
nobled48f975d2011-01-28 13:47:21 +0000546if test "x$GCC" = "xyes"; then
Pekka Paalanena95efd32013-01-18 12:11:10 +0200547 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
548 -Wno-missing-field-initializers -g -fvisibility=hidden \
Kristian Høgsberg6fd73cd2014-02-01 11:02:41 -0800549 -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -0500550fi
551AC_SUBST(GCC_CFLAGS)
552
Armin K49c36c62013-05-30 15:16:40 +0200553AC_ARG_ENABLE(libunwind,
554 AS_HELP_STRING([--disable-libunwind],
555 [Disable libunwind usage for backtraces]),,
556 enable_libunwind=auto)
Quentin Glidic5daccc32013-04-03 20:19:45 +0200557AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
Armin K49c36c62013-05-30 15:16:40 +0200558if test "x$enable_libunwind" != "xno"; then
559 PKG_CHECK_MODULES(LIBUNWIND,
560 libunwind,
561 have_libunwind=yes,
562 have_libunwind=no)
563 if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
564 AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
565 fi
566 if test "x$have_libunwind" = "xyes"; then
567 enable_libunwind=yes
568 AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
569 fi
570fi
571
Marcin Slusarz554a0da2013-02-18 13:27:22 -0500572
Pekka Paalanena51e6fa2012-11-07 12:25:12 +0200573if test "x$WESTON_NATIVE_BACKEND" = "x"; then
574 WESTON_NATIVE_BACKEND="drm-backend.so"
575fi
576AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
577AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
578 [The default backend to load, if not wayland nor x11.])
579
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +0100580if test "x$WESTON_SHELL_CLIENT" = "x"; then
581 WESTON_SHELL_CLIENT="weston-desktop-shell"
582fi
583AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
584AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
585 [The default desktop shell client to load.])
586
Kristian Høgsbergea520d52014-01-01 12:47:40 -0800587AC_ARG_ENABLE(demo-clients-install,
588 AS_HELP_STRING([--enable-demo-clients-install],
589 [Install demo clients built with weston]),,
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800590 enable_demo_clients_install=no)
591AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
Armin Kaac60212013-07-14 17:26:23 +0200592
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200593AC_ARG_ENABLE(lcms,
594 AS_HELP_STRING([--disable-lcms],
595 [Disable lcms support]),,
596 enable_lcms=auto)
597if test "x$enable_lcms" != "xno"; then
598 PKG_CHECK_MODULES(LCMS,
599 lcms2,
600 have_lcms=yes,
601 have_lcms=no)
602 if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
603 AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
604 fi
605 if test "x$have_lcms" = "xyes"; then
606 enable_lcms=yes
607 AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
608 fi
Richard Hughesb24e48e2013-05-09 20:31:09 +0100609fi
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200610AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
Richard Hughesb24e48e2013-05-09 20:31:09 +0100611
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200612AC_PATH_PROG([wayland_scanner], [wayland-scanner])
613if test x$wayland_scanner = x; then
Emil Velikov32318a52015-02-17 15:13:32 +0000614 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
615 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200616fi
Kristian Høgsbergb2d71852011-02-14 22:13:33 -0500617
Egor Starkov7ce2e972015-09-25 18:00:27 +0300618AC_ARG_ENABLE(systemd_notify,
619 AS_HELP_STRING([--enable-systemd-notify],
620 [Enables systemd notifications to
621 notify systemd about weston state
Friedrich, Eugen (ADITG/SW1)265aeb32016-04-05 20:43:29 +0000622 and update watchdog.
623 Also sockets provided by systemd
624 in case of socket-base activation
625 are added to wayland display]),,
Egor Starkov7ce2e972015-09-25 18:00:27 +0300626 enable_systemd_notify=no)
627AM_CONDITIONAL(SYSTEMD_NOTIFY_SUPPORT, test x$enable_systemd_notify = xyes)
628if test "x$enable_systemd_notify" = "xyes"; then
629 AC_DEFINE([SYSTEMD_NOTIFY_SUPPORT], [1], [Build the systemd sd_notify support])
630 PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
631fi
632
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800633AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800634
635AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
636
Kristian Høgsberg4a8767b2008-12-10 13:44:23 -0500637AC_OUTPUT
Armin K0a8461b2013-08-14 03:13:53 +0200638
639AC_MSG_RESULT([
640 Native Backend ${WESTON_NATIVE_BACKEND}
641 setuid Install ${enable_setuid_install}
642
643 Cairo Renderer ${with_cairo}
644 EGL ${enable_egl}
645 libxkbcommon ${enable_xkbcommon}
Jonas Ådahlb8e62d92013-10-25 23:18:02 +0200646 xcb_xkb ${have_xcb_xkb}
Armin K0a8461b2013-08-14 03:13:53 +0200647 XWayland ${enable_xwayland}
David Herrmann59ab9002013-10-22 00:28:06 +0200648 dbus ${enable_dbus}
Armin K0a8461b2013-08-14 03:13:53 +0200649
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900650 ivi-shell ${enable_ivi_shell}
651
Armin K0a8461b2013-08-14 03:13:53 +0200652 Build wcap utility ${enable_wcap_tools}
Jason Ekstrand946a9482014-04-02 19:53:47 -0500653 Build Fullscreen Shell ${enable_fullscreen_shell}
Jon A. Cruz179c1862015-07-15 19:22:43 -0700654 Enable developer documentation ${enable_devdocs}
Armin K0a8461b2013-08-14 03:13:53 +0200655
656 weston-launch utility ${enable_weston_launch}
David Herrmanncc5b2ed2013-10-22 00:28:09 +0200657 systemd-login support ${have_systemd_login}
Egor Starkov7ce2e972015-09-25 18:00:27 +0300658 systemd notify support ${enable_systemd_notify}
Armin K0a8461b2013-08-14 03:13:53 +0200659
660 DRM Compositor ${enable_drm_compositor}
661 X11 Compositor ${enable_x11_compositor}
662 Wayland Compositor ${enable_wayland_compositor}
663 Headless Compositor ${enable_headless_compositor}
Armin K0a8461b2013-08-14 03:13:53 +0200664 FBDEV Compositor ${enable_fbdev_compositor}
665 RDP Compositor ${enable_rdp_compositor}
Jason Ekstrand47928d82014-04-02 19:54:01 -0500666 Screen Sharing ${enable_screen_sharing}
Jon A. Cruz646aef52015-07-15 19:22:41 -0700667 JUnit XML output ${enable_junit_xml}
Armin K0a8461b2013-08-14 03:13:53 +0200668
669 Raspberry Pi BCM headers ${have_bcm_host}
670
671 Build Clients ${enable_clients}
672 Build EGL Clients ${have_cairo_egl}
673 Build Simple Clients ${enable_simple_clients}
674 Build Simple EGL Clients ${enable_simple_egl_clients}
675
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800676 Install Demo Clients ${enable_demo_clients_install}
Armin K0a8461b2013-08-14 03:13:53 +0200677
678 Colord Support ${have_colord}
Armin K0a8461b2013-08-14 03:13:53 +0200679 LCMS2 Support ${have_lcms}
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000680 libjpeg Support ${have_jpeglib}
Armin K0a8461b2013-08-14 03:13:53 +0200681 libwebp Support ${have_webp}
682 libunwind Support ${have_libunwind}
Ander Conselvan de Oliveira6aae4d32013-08-23 17:15:48 +0300683 VA H.264 encoding Support ${have_libva}
Armin K0a8461b2013-08-14 03:13:53 +0200684])