blob: 87e67fedc186660c983577c8e84d241ad11e6d17 [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
Pekka Paalanene8de35c2012-11-07 12:25:14 +0200211AC_ARG_ENABLE(rpi-compositor,
212 AS_HELP_STRING([--disable-rpi-compositor],
213 [do not build the Raspberry Pi backend]),,
214 enable_rpi_compositor=yes)
Pekka Paalanene31e0532013-05-22 18:03:07 +0300215AM_CONDITIONAL(ENABLE_RPI_COMPOSITOR, test "x$enable_rpi_compositor" = "xyes")
Pekka Paalanene8de35c2012-11-07 12:25:14 +0200216have_bcm_host="no"
Pekka Paalanene31e0532013-05-22 18:03:07 +0300217if test "x$enable_rpi_compositor" = "xyes"; then
Pekka Paalanene8de35c2012-11-07 12:25:14 +0200218 AC_DEFINE([BUILD_RPI_COMPOSITOR], [1], [Build the compositor for Raspberry Pi])
219 PKG_CHECK_MODULES(RPI_COMPOSITOR, [libudev >= 136 mtdev >= 1.1.0])
220 PKG_CHECK_MODULES(RPI_BCM_HOST, [bcm_host],
221 [have_bcm_host="yes"
222 AC_DEFINE([HAVE_BCM_HOST], [1], [have Raspberry Pi BCM headers])],
223 [AC_MSG_WARN([Raspberry Pi BCM host libraries not found, will use stubs instead.])])
224fi
225AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes")
226
227
Philip Withnall4f499172013-02-02 12:02:32 +0000228AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],,
229 enable_fbdev_compositor=yes)
230AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
231 [test x$enable_fbdev_compositor = xyes])
232AS_IF([test x$enable_fbdev_compositor = xyes], [
233 AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
Adrian Negreanu7b8e9702013-09-26 19:31:32 +0300234 PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
Philip Withnall4f499172013-02-02 12:02:32 +0000235])
236
Hardeninga83409c2013-04-01 23:43:58 +0200237AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],,
238 enable_rdp_compositor=no)
239AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
240 [test x$enable_rdp_compositor = xyes])
241if test x$enable_rdp_compositor = xyes; then
Hardeningc077a842013-07-08 00:51:35 +0200242 AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
FORT David58b63ab2016-05-01 23:32:07 +0200243 PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
244 [],
245 [PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
246 )
Hardening04633b62014-01-10 11:33:06 +0100247
248 SAVED_CPPFLAGS="$CPPFLAGS"
249 CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
250 AC_CHECK_HEADERS([freerdp/version.h])
251 CPPFLAGS="$SAVED_CPPFLAGS"
Hardeninga83409c2013-04-01 23:43:58 +0200252fi
Philip Withnall4f499172013-02-02 12:02:32 +0000253
Kristian Høgsbergd33cc732014-05-09 15:32:02 -0700254AC_ARG_ENABLE([screen-sharing], [ --enable-screen-sharing],,
Jason Ekstrand47928d82014-04-02 19:54:01 -0500255 enable_screen_sharing=no)
256AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
257 [test x$enable_screen_sharing = xyes])
258if test x$enable_screen_sharing = xyes; then
259 PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
260
261 if test x$enable_rdp_compositor != xyes; then
262 AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
263 fi
264fi
265
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100266AC_ARG_WITH(cairo,
267 AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
268 [Which Cairo renderer to use for the clients]),
269 [],[with_cairo="image"])
270
271if test "x$with_cairo" = "ximage"; then
272 cairo_modules="cairo"
273else
274if test "x$with_cairo" = "xgl"; then
275 cairo_modules="cairo-gl"
Bryce Harrington42db3132015-05-19 13:24:37 -0700276 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 +0100277else
278if test "x$with_cairo" = "xglesv2"; then
279 cairo_modules="cairo-glesv2"
Bryce Harrington42db3132015-05-19 13:24:37 -0700280 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 +0100281else
282 AC_ERROR([Unknown cairo renderer requested])
283fi
284fi
285fi
286
287# Included for legacy compat
Pekka Paalanende7fe622012-10-16 17:27:18 +0300288AC_ARG_WITH(cairo-glesv2,
289 AS_HELP_STRING([--with-cairo-glesv2],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100290 [Use GLESv2 cairo]))
Pekka Paalanende7fe622012-10-16 17:27:18 +0300291if test "x$with_cairo_glesv2" = "xyes"; then
292 cairo_modules="cairo-glesv2"
Armin K0a8461b2013-08-14 03:13:53 +0200293 with_cairo="glesv2"
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100294fi
295
296if test "x$cairo_modules" = "xcairo-glesv2"; then
297AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
Kristian Høgsberg2d574392012-01-18 14:50:58 -0500298fi
299
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400300PKG_CHECK_MODULES(PIXMAN, [pixman-1])
301PKG_CHECK_MODULES(PNG, [libpng])
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000302
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000303AC_ARG_WITH([jpeg],
304 AS_HELP_STRING([--without-jpeg],
305 [Use jpeglib for JPEG decoding support [default=auto]]))
306AS_IF([test "x$with_jpeg" != "xno"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200307 [WESTON_SEARCH_LIBS([JPEG], [jpeg], [jpeg_CreateDecompress], [have_jpeglib=yes], [have_jpeglib=no])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000308 [have_jpeglib=no])
309AS_IF([test "x$have_jpeglib" = "xyes"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200310 [AC_DEFINE([HAVE_JPEG], [1], [Have jpeglib])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000311 [AS_IF([test "x$with_jpeg" = "xyes"],
312 [AC_MSG_ERROR([JPEG support explicitly requested, but jpeglib couldn't be found])])])
313
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000314AC_ARG_WITH([webp],
315 AS_HELP_STRING([--without-webp],
316 [Use libwebp for WebP decoding support [default=auto]]))
317AS_IF([test "x$with_webp" != "xno"],
318 [PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])],
319 [have_webp=no])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400320AS_IF([test "x$have_webp" = "xyes"],
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000321 [AC_DEFINE([HAVE_WEBP], [1], [Have webp])],
322 [AS_IF([test "x$with_webp" = "xyes"],
323 [AC_MSG_ERROR([WebP support explicitly requested, but libwebp couldn't be found])])])
Kristian Høgsberg5a315bc2012-05-15 22:33:43 -0400324
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700325AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
326 enable_vaapi_recorder=auto)
327if test x$enable_vaapi_recorder != xno; then
328 PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
329 [have_libva=yes], [have_libva=no])
330 if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
331 AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700332 fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700333 AS_IF([test "x$have_libva" = "xyes"],
334 [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700335fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700336AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700337
Tiago Vignatti4f238a52012-07-31 15:47:48 +0300338PKG_CHECK_MODULES(CAIRO, [cairo])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400339
Bryce Harrington46f1f052016-05-11 13:18:59 -0700340PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg8e293a52013-11-23 12:40:34 -0800341
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300342AC_ARG_ENABLE(simple-clients,
343 AS_HELP_STRING([--disable-simple-clients],
344 [do not build the simple wl_shm clients]),,
345 enable_simple_clients=yes)
346AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
Eric Anholt6f82cf52012-02-09 08:36:03 -0800347if test x$enable_simple_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300348 PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
349fi
350
351AC_ARG_ENABLE(simple-egl-clients,
352 AS_HELP_STRING([--disable-simple-egl-clients],
353 [do not build the simple EGL clients]),,
Kristian Høgsbergedb6a3b2013-09-03 22:59:17 -0700354 enable_simple_egl_clients="$enable_egl")
355AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
356if test x$enable_simple_egl_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300357 PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000358 [egl glesv2 wayland-client wayland-egl wayland-cursor])
Tiago Vignatti93165e32011-07-21 16:35:40 +0300359fi
Kristian Høgsberga9410222011-01-14 17:22:35 -0500360
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000361AC_ARG_ENABLE(simple-dmabuf-intel-client,
362 AS_HELP_STRING([--disable-simple-dmabuf-intel-client],
363 [do not build the simple dmabuf intel client]),,
364 enable_simple_dmabuf_intel_client="auto")
365if ! test "x$enable_simple_dmabuf_intel_client" = "xno"; then
366 PKG_CHECK_MODULES(SIMPLE_DMABUF_INTEL_CLIENT, [wayland-client libdrm libdrm_intel],
367 have_simple_dmabuf_intel_client=yes, have_simple_dmabuf_intel_client=no)
368 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 -0700369 AC_MSG_ERROR([Intel dmabuf client explicitly enabled, but libdrm_intel couldn't be found])
370 fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000371 enable_simple_dmabuf_intel_client="$have_simple_dmabuf_intel_client"
George Kiagiadakis53868982014-06-12 16:26:49 +0200372fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000373AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_INTEL_CLIENT, test "x$enable_simple_dmabuf_intel_client" = "xyes")
George Kiagiadakis53868982014-06-12 16:26:49 +0200374
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000375AC_ARG_ENABLE(simple-dmabuf-v4l-client,
376 AS_HELP_STRING([--disable-simple-dmabuf-v4l-client],
377 [do not build the simple dmabuf v4l client]),,
378 enable_simple_dmabuf_v4l_client="auto")
379if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
380 PKG_CHECK_MODULES(SIMPLE_DMABUF_V4L_CLIENT, [wayland-client libdrm],
381 have_simple_dmabuf_v4l_client=yes, have_simple_dmabuf_v4l_client=no)
382 if test "x$have_simple_dmabuf_v4l_client" = "xno" -a "x$enable_simple_dmabuf_v4l_client" = "xyes"; then
383 AC_MSG_ERROR([V4L dmabuf client explicitly enabled, but libdrm couldn't be found])
384 fi
385 enable_simple_dmabuf_v4l_client="$have_simple_dmabuf_v4l_client"
386fi
387AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
388
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400389AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800390AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
391if test x$enable_clients = xyes; then
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400392 AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
393
Bryce Harrington46f1f052016-05-11 13:18:59 -0700394 PKG_CHECK_MODULES(CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION cairo >= 1.10.0 xkbcommon wayland-cursor])
Armin Ka94e2852013-06-04 13:05:22 +0200395 PKG_CHECK_MODULES(SERVER, [wayland-server])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700396 PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400397
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100398 # Only check for cairo-egl if a GL or GLES renderer requested
399 AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000400 PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl cairo-egl >= 1.11.3 $cairo_modules],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100401 [have_cairo_egl=yes], [have_cairo_egl=no])
402 AS_IF([test "x$have_cairo_egl" = "xyes"],
403 [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
Armin K0a8461b2013-08-14 03:13:53 +0200404 [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
405 [have_cairo_egl=no])
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100406
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100407 PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400408fi
409
Louis-Francis Ratté-Boulianne6cd1de32013-05-22 18:03:11 +0300410AC_ARG_ENABLE(resize-optimization,
411 AS_HELP_STRING([--disable-resize-optimization],
412 [disable resize optimization allocating a big buffer in toytoolkit]),,
413 enable_resize_optimization=yes)
414AS_IF([test "x$enable_resize_optimization" = "xyes"],
415 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
416
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100417AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
418AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
419if test x$enable_weston_launch == xyes; then
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200420 WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100421 if test x$have_pam == xno; then
422 AC_ERROR([weston-launch requires pam])
423 fi
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100424fi
425
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100426AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
427
Armin Ka94e2852013-06-04 13:05:22 +0200428AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
429 [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
430
Pekka Paalanen51d21952012-01-31 16:35:18 +0200431AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300432 test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
Pekka Paalanen51d21952012-01-31 16:35:18 +0200433
Pekka Paalanen7ff7a802013-04-25 13:57:50 +0300434AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
435 [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
436
Kristian Høgsberg1c562182011-05-02 22:09:20 -0400437AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
438
Jason Ekstrand946a9482014-04-02 19:53:47 -0500439AC_ARG_ENABLE(fullscreen-shell,
440 AS_HELP_STRING([--disable-fullscreen-shell],
441 [do not build fullscreen-shell server plugin]),,
442 enable_fullscreen_shell=yes)
443AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL,
444 test "x$enable_fullscreen_shell" = "xyes")
445
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100446# CMS modules
447AC_ARG_ENABLE(colord,
448 AS_HELP_STRING([--disable-colord],
449 [do not build colord CMS support]),,
Armin K49c36c62013-05-30 15:16:40 +0200450 enable_colord=auto)
Armin K49c36c62013-05-30 15:16:40 +0200451if test "x$enable_colord" != "xno"; then
452 PKG_CHECK_MODULES(COLORD,
453 colord >= 0.1.27,
454 have_colord=yes,
455 have_colord=no)
456 if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
457 AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
458 fi
459 if test "x$have_colord" = "xyes"; then
460 enable_colord=yes
461 fi
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100462fi
Yanko Kaneti9b78adf2013-07-10 12:01:36 -0400463AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400464
David Herrmann59ab9002013-10-22 00:28:06 +0200465# dbus support
466AC_ARG_ENABLE(dbus,
467 AS_HELP_STRING([--disable-dbus],
468 [do not build with dbus support]),,
469 enable_dbus=auto)
470if test "x$enable_dbus" != "xno"; then
471 PKG_CHECK_MODULES(DBUS,
472 dbus-1 >= 1.6,
473 have_dbus=yes,
474 have_dbus=no)
475 if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
476 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
477 fi
478 if test "x$have_dbus" = "xyes"; then
479 enable_dbus=yes
480 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
481 else
482 enable_dbus=no
483 fi
484fi
485AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
486
Manuel Bachmannf989c382015-11-04 12:13:08 +0100487# systemd-login support
488AC_ARG_ENABLE(systemd-login,
489 AS_HELP_STRING([--enable-systemd-login],
490 [Enable logind support]),,
491 enable_systemd_login=auto)
492if test x$enable_systemd_login != xno -a x$have_dbus != xno; then
493 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
494 [libsystemd >= 209],
495 [have_systemd_login_209=yes;have_systemd_login=yes],
496 [have_systemd_login_209=no;have_systemd_login=no])
497
498 # Older versions of systemd package systemd-login separately. Fall back on that
499 AS_IF([test x$have_systemd_login != xyes],[
500 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
501 [libsystemd-login >= 198],
502 [have_systemd_login=yes],
503 [have_systemd_login=no])
504 ])
505else
506 have_systemd_login=no
507fi
508
509if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
510 AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209, libsystemd-login or dbus])
511fi
512
513AS_IF([test "x$have_systemd_login" = "xyes"],
514 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
515AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
516
517AS_IF([test "x$have_systemd_login_209" = "xyes"],
518 [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
519
520
Jon A. Cruz646aef52015-07-15 19:22:41 -0700521# Note that other features might want libxml2, or this feature might use
522# alternative xml libraries at some point. Therefore the feature and
523# pre-requisite concepts are split.
524AC_ARG_ENABLE(junit_xml,
525 AS_HELP_STRING([--disable-junit-xml],
526 [do not build with JUnit XML output]),,
527 enable_junit_xml=auto)
528if test "x$enable_junit_xml" != "xno"; then
529 PKG_CHECK_MODULES(LIBXML2,
530 [libxml-2.0 >= 2.6],
531 have_libxml2=yes,
532 have_libxml2=no)
533 if test "x$have_libxml2" = "xno" -a "x$enable_junit_xml" = "xyes"; then
534 AC_MSG_ERROR([JUnit XML support explicitly requested, but libxml2 couldn't be found])
535 fi
536 if test "x$have_libxml2" = "xyes"; then
537 enable_junit_xml=yes
538 AC_DEFINE(ENABLE_JUNIT_XML, [1], [Build Weston with JUnit output support])
539 else
540 enable_junit_xml=no
541 fi
542fi
543AM_CONDITIONAL(ENABLE_JUNIT_XML, test "x$enable_junit_xml" = "xyes")
544
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900545# ivi-shell support
546AC_ARG_ENABLE(ivi-shell,
547 AS_HELP_STRING([--disable-ivi-shell],
548 [do not build ivi-shell server plugin and client]),,
549 enable_ivi_shell=yes)
550AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
551
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400552AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes)
553AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
554if test x$enable_wcap_tools = xyes; then
555 AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
Kristian Høgsberg8d25a5a2012-07-20 18:05:10 -0400556 PKG_CHECK_MODULES(WCAP, [cairo])
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400557 WCAP_LIBS="$WCAP_LIBS -lm"
558fi
559
Pekka Paalanen4b141592012-08-03 14:39:16 +0300560PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
561AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400562
nobled48f975d2011-01-28 13:47:21 +0000563if test "x$GCC" = "xyes"; then
Pekka Paalanena95efd32013-01-18 12:11:10 +0200564 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
565 -Wno-missing-field-initializers -g -fvisibility=hidden \
Kristian Høgsberg6fd73cd2014-02-01 11:02:41 -0800566 -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -0500567fi
568AC_SUBST(GCC_CFLAGS)
569
Armin K49c36c62013-05-30 15:16:40 +0200570AC_ARG_ENABLE(libunwind,
571 AS_HELP_STRING([--disable-libunwind],
572 [Disable libunwind usage for backtraces]),,
573 enable_libunwind=auto)
Quentin Glidic5daccc32013-04-03 20:19:45 +0200574AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
Armin K49c36c62013-05-30 15:16:40 +0200575if test "x$enable_libunwind" != "xno"; then
576 PKG_CHECK_MODULES(LIBUNWIND,
577 libunwind,
578 have_libunwind=yes,
579 have_libunwind=no)
580 if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
581 AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
582 fi
583 if test "x$have_libunwind" = "xyes"; then
584 enable_libunwind=yes
585 AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
586 fi
587fi
588
Marcin Slusarz554a0da2013-02-18 13:27:22 -0500589
Pekka Paalanena51e6fa2012-11-07 12:25:12 +0200590if test "x$WESTON_NATIVE_BACKEND" = "x"; then
591 WESTON_NATIVE_BACKEND="drm-backend.so"
592fi
593AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
594AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
595 [The default backend to load, if not wayland nor x11.])
596
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +0100597if test "x$WESTON_SHELL_CLIENT" = "x"; then
598 WESTON_SHELL_CLIENT="weston-desktop-shell"
599fi
600AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
601AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
602 [The default desktop shell client to load.])
603
Kristian Høgsbergea520d52014-01-01 12:47:40 -0800604AC_ARG_ENABLE(demo-clients-install,
605 AS_HELP_STRING([--enable-demo-clients-install],
606 [Install demo clients built with weston]),,
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800607 enable_demo_clients_install=no)
608AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
Armin Kaac60212013-07-14 17:26:23 +0200609
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200610AC_ARG_ENABLE(lcms,
611 AS_HELP_STRING([--disable-lcms],
612 [Disable lcms support]),,
613 enable_lcms=auto)
614if test "x$enable_lcms" != "xno"; then
615 PKG_CHECK_MODULES(LCMS,
616 lcms2,
617 have_lcms=yes,
618 have_lcms=no)
619 if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
620 AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
621 fi
622 if test "x$have_lcms" = "xyes"; then
623 enable_lcms=yes
624 AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
625 fi
Richard Hughesb24e48e2013-05-09 20:31:09 +0100626fi
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200627AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
Richard Hughesb24e48e2013-05-09 20:31:09 +0100628
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200629AC_PATH_PROG([wayland_scanner], [wayland-scanner])
630if test x$wayland_scanner = x; then
Emil Velikov32318a52015-02-17 15:13:32 +0000631 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
632 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200633fi
Kristian Høgsbergb2d71852011-02-14 22:13:33 -0500634
Egor Starkov7ce2e972015-09-25 18:00:27 +0300635AC_ARG_ENABLE(systemd_notify,
636 AS_HELP_STRING([--enable-systemd-notify],
637 [Enables systemd notifications to
638 notify systemd about weston state
Friedrich, Eugen (ADITG/SW1)265aeb32016-04-05 20:43:29 +0000639 and update watchdog.
640 Also sockets provided by systemd
641 in case of socket-base activation
642 are added to wayland display]),,
Egor Starkov7ce2e972015-09-25 18:00:27 +0300643 enable_systemd_notify=no)
644AM_CONDITIONAL(SYSTEMD_NOTIFY_SUPPORT, test x$enable_systemd_notify = xyes)
645if test "x$enable_systemd_notify" = "xyes"; then
646 AC_DEFINE([SYSTEMD_NOTIFY_SUPPORT], [1], [Build the systemd sd_notify support])
647 PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
648fi
649
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800650AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800651
652AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
653
Kristian Høgsberg4a8767b2008-12-10 13:44:23 -0500654AC_OUTPUT
Armin K0a8461b2013-08-14 03:13:53 +0200655
656AC_MSG_RESULT([
657 Native Backend ${WESTON_NATIVE_BACKEND}
658 setuid Install ${enable_setuid_install}
659
660 Cairo Renderer ${with_cairo}
661 EGL ${enable_egl}
662 libxkbcommon ${enable_xkbcommon}
Jonas Ådahlb8e62d92013-10-25 23:18:02 +0200663 xcb_xkb ${have_xcb_xkb}
Armin K0a8461b2013-08-14 03:13:53 +0200664 XWayland ${enable_xwayland}
David Herrmann59ab9002013-10-22 00:28:06 +0200665 dbus ${enable_dbus}
Armin K0a8461b2013-08-14 03:13:53 +0200666
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900667 ivi-shell ${enable_ivi_shell}
668
Armin K0a8461b2013-08-14 03:13:53 +0200669 Build wcap utility ${enable_wcap_tools}
Jason Ekstrand946a9482014-04-02 19:53:47 -0500670 Build Fullscreen Shell ${enable_fullscreen_shell}
Jon A. Cruz179c1862015-07-15 19:22:43 -0700671 Enable developer documentation ${enable_devdocs}
Armin K0a8461b2013-08-14 03:13:53 +0200672
673 weston-launch utility ${enable_weston_launch}
David Herrmanncc5b2ed2013-10-22 00:28:09 +0200674 systemd-login support ${have_systemd_login}
Egor Starkov7ce2e972015-09-25 18:00:27 +0300675 systemd notify support ${enable_systemd_notify}
Armin K0a8461b2013-08-14 03:13:53 +0200676
677 DRM Compositor ${enable_drm_compositor}
678 X11 Compositor ${enable_x11_compositor}
679 Wayland Compositor ${enable_wayland_compositor}
680 Headless Compositor ${enable_headless_compositor}
681 RPI Compositor ${enable_rpi_compositor}
682 FBDEV Compositor ${enable_fbdev_compositor}
683 RDP Compositor ${enable_rdp_compositor}
Jason Ekstrand47928d82014-04-02 19:54:01 -0500684 Screen Sharing ${enable_screen_sharing}
Jon A. Cruz646aef52015-07-15 19:22:41 -0700685 JUnit XML output ${enable_junit_xml}
Armin K0a8461b2013-08-14 03:13:53 +0200686
687 Raspberry Pi BCM headers ${have_bcm_host}
688
689 Build Clients ${enable_clients}
690 Build EGL Clients ${have_cairo_egl}
691 Build Simple Clients ${enable_simple_clients}
692 Build Simple EGL Clients ${enable_simple_egl_clients}
693
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800694 Install Demo Clients ${enable_demo_clients_install}
Armin K0a8461b2013-08-14 03:13:53 +0200695
696 Colord Support ${have_colord}
Armin K0a8461b2013-08-14 03:13:53 +0200697 LCMS2 Support ${have_lcms}
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000698 libjpeg Support ${have_jpeglib}
Armin K0a8461b2013-08-14 03:13:53 +0200699 libwebp Support ${have_webp}
700 libunwind Support ${have_libunwind}
Ander Conselvan de Oliveira6aae4d32013-08-23 17:15:48 +0300701 VA H.264 encoding Support ${have_libva}
Armin K0a8461b2013-08-14 03:13:53 +0200702])