blob: f2638fea8e2ed89d63cb57591f82feda8641d19e [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])
Giulio Camuffo179fcda2016-06-02 21:48:14 +03006m4_define([libweston_abi_version], [0])
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -05007
Javier Jardón5b7e43a2010-11-06 01:55:27 +01008AC_PREREQ([2.64])
Kristian Høgsberga7313e72012-02-08 16:35:12 -05009AC_INIT([weston],
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050010 [weston_version],
11 [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=weston_version],
Kristian Høgsberga7313e72012-02-08 16:35:12 -050012 [weston],
Daniel Stone32d9ea12014-10-08 12:15:48 +010013 [http://wayland.freedesktop.org])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010014
Bryce Harrington46f1f052016-05-11 13:18:59 -070015WAYLAND_PREREQ_VERSION="1.10.0"
16
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050017AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
18AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
19AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
20AC_SUBST([WESTON_VERSION], [weston_version])
Giulio Camuffo179fcda2016-06-02 21:48:14 +030021AC_SUBST([LIBWESTON_ABI_VERSION], [libweston_abi_version])
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050022
Guillem Joverdff63a22014-02-01 18:48:43 +010023AC_CONFIG_AUX_DIR([build-aux])
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -040024AC_CONFIG_HEADERS([config.h])
Thierry Reding0e6d9a72014-05-27 09:07:54 +020025AC_CONFIG_MACRO_DIR([m4])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010026
Daniel Stonec228e232013-05-22 18:03:19 +030027AC_USE_SYSTEM_EXTENSIONS
Kristian Høgsberg7e105f92013-08-21 15:44:57 -070028AC_SYS_LARGEFILE
Daniel Stonec228e232013-05-22 18:03:19 +030029
Kristian Høgsberg396a9bb2014-01-31 23:49:33 -080030AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010031
Kristian Høgsbergf0152da2010-10-12 17:24:20 -040032AM_SILENT_RULES([yes])
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050033
Javier Jardón5b7e43a2010-11-06 01:55:27 +010034# Check for programs
35AC_PROG_CC
Pekka Paalanena91291c2012-08-29 15:49:48 +030036AC_PROG_SED
Javier Jardón5b7e43a2010-11-06 01:55:27 +010037
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040038# Initialize libtool
39LT_PREREQ([2.2])
Kristian Høgsberg1c562182011-05-02 22:09:20 -040040LT_INIT([disable-static])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040041
Pekka Paalanena51e6fa2012-11-07 12:25:12 +020042AC_ARG_VAR([WESTON_NATIVE_BACKEND],
43 [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 +010044AC_ARG_VAR([WESTON_SHELL_CLIENT],
45 [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 +020046
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050047PKG_PROG_PKG_CONFIG()
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050048
Quentin Glidic9992bdc2016-04-23 12:02:58 +020049WESTON_SEARCH_LIBS([DLOPEN], [dl], [dlopen])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040050
Gustavo Zacarias34d59852016-04-21 11:18:48 -030051# In old glibc versions (< 2.17) clock_gettime() is in librt
Quentin Glidic9992bdc2016-04-23 12:02:58 +020052WESTON_SEARCH_LIBS([CLOCK_GETTIME], [rt], [clock_gettime])
Gustavo Zacarias34d59852016-04-21 11:18:48 -030053
Rob Bradford5a4cea92013-06-04 13:23:01 +010054AC_CHECK_DECL(SFD_CLOEXEC,[],
55 [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],
56 [[#include <sys/signalfd.h>]])
57AC_CHECK_DECL(TFD_CLOEXEC,[],
58 [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
59 [[#include <sys/timerfd.h>]])
60AC_CHECK_DECL(CLOCK_MONOTONIC,[],
61 [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
62 [[#include <time.h>]])
Pekka Paalanen200019c2012-05-30 15:53:42 +030063AC_CHECK_HEADERS([execinfo.h])
64
Pekka Paalanen5b4ddbc2013-11-29 17:48:51 +020065AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
Pekka Paalanen1da1b8f2012-06-06 16:59:43 +030066
Bryce Harrington46f1f052016-05-11 13:18:59 -070067COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
Kristian Høgsberg08c40c32011-01-11 13:48:03 -050068
Jon A. Cruz179c1862015-07-15 19:22:43 -070069AC_CONFIG_FILES([doc/doxygen/tools.doxygen doc/doxygen/tooldev.doxygen])
70
71AC_ARG_ENABLE(devdocs,
72 AS_HELP_STRING([--disable-devdocs],
73 [do not enable building of developer documentation]),,
74 enable_devdocs=auto)
75if test "x$enable_devdocs" != "xno"; then
76 AC_CHECK_PROGS([DOXYGEN], [doxygen])
77 if test "x$DOXYGEN" = "x" -a "x$enable_devdocs" = "xyes"; then
78 AC_MSG_ERROR([Developer documentation explicitly requested, but Doxygen couldn't be found])
79 fi
80 if test "x$DOXYGEN" != "x"; then
81 enable_devdocs=yes
82 else
83 enable_devdocs=no
84 fi
85fi
86AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes")
87
Kristian Høgsbergf82a8062013-01-09 13:36:39 -050088AC_ARG_ENABLE(egl, [ --disable-egl],,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030089 enable_egl=yes)
90AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
91if test x$enable_egl = xyes; then
92 AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +000093 PKG_CHECK_MODULES(EGL, [egl glesv2])
94 PKG_CHECK_MODULES([EGL_TESTS], [egl glesv2 wayland-client wayland-egl])
Pekka Paalanena3525802014-06-12 16:49:29 +030095 PKG_CHECK_MODULES([GL_RENDERER], [libdrm])
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030096fi
97
Rob Bradford382ff462013-06-24 16:52:45 +010098AC_ARG_ENABLE(xkbcommon,
99 AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon
100 support: This is only useful in environments
101 where you do not have a hardware keyboard. If
102 libxkbcommon support is disabled clients will not
103 be sent a keymap and and must know how to
104 interpret the keycode sent for any key event.]),,
105 enable_xkbcommon=yes)
106if test x$enable_xkbcommon = xyes; then
107 AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
Kristian Høgsberg37424342013-10-25 12:49:00 -0700108 COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
Rob Bradford382ff462013-06-24 16:52:45 +0100109fi
110
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500111AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],,
112 enable_setuid_install=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800113AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500114
115
Tiago Vignatti629ce232012-05-23 23:04:14 +0300116AC_ARG_ENABLE(xwayland, [ --enable-xwayland],,
117 enable_xwayland=yes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100118AC_ARG_ENABLE(xwayland-test, [ --enable-xwayland-test],,
119 enable_xwayland_test=yes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300120AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100121AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300122if test x$enable_xwayland = xyes; then
Kristian Høgsbergbcfd07b2013-10-11 16:48:19 -0700123 PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300124 AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300125
126 AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH],
127 [Path to X server]), [XSERVER_PATH="$withval"],
Derek Foreman1f9d4f92015-02-09 09:57:28 -0600128 [XSERVER_PATH="/usr/bin/Xwayland"])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300129 AC_SUBST([XSERVER_PATH])
Quentin Glidicbb410052013-02-18 20:38:22 +0100130 if test x$enable_xwayland_test = xyes; then
Derek Foreman8771a142015-01-29 16:44:55 -0600131 PKG_CHECK_MODULES([XWAYLAND_TEST], x11)
Quentin Glidicbb410052013-02-18 20:38:22 +0100132 fi
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400133fi
134
Kristian Høgsbergd2c9d8a2013-11-24 14:37:07 -0800135PKG_CHECK_MODULES(LIBDRM, [libdrm],
136 [AC_DEFINE(HAVE_LIBDRM, 1, [Define if libdrm is available]) have_libdrm=yes], have_libdrm=no)
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400137
Kristian Høgsberga9410222011-01-14 17:22:35 -0500138AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],,
139 enable_x11_compositor=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800140AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes)
141if test x$enable_x11_compositor = xyes; then
Kristian Høgsberga010abf2011-05-11 13:46:29 -0400142 PKG_CHECK_MODULES([XCB], xcb)
143 xcb_save_LIBS=$LIBS
144 xcb_save_CFLAGS=$CFLAGS
145 CFLAGS=$XCB_CFLAGS
146 LIBS=$XCB_LIBS
147 AC_CHECK_FUNCS([xcb_poll_for_queued_event])
148 LIBS=$xcb_save_LIBS
149 CFLAGS=$xcb_save_CFLAGS
150
Damien Lespiaub5bae342013-03-28 15:20:54 +0000151 X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm"
Daniel Stone62b33b62012-06-22 13:21:35 +0100152
153 PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
154 [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
155 if test "x$have_xcb_xkb" = xyes; then
156 # Most versions of XCB have totally broken XKB bindings, where the
157 # events don't work. Make sure we can actually use them.
158 xcb_xkb_save_CFLAGS=$CFLAGS
159 CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS
160 AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType],
161 [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]])
162 CFLAGS=$xcb_xkb_save_CFLAGS
163 fi
164 if test "x$have_xcb_xkb" = xyes; then
165 X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb"
166 AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol])
167 fi
168
169 PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500170 AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor])
171fi
172
173
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500174AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],,
175 enable_drm_compositor=yes)
Kristian Høgsberg02b36f32013-11-24 14:45:23 -0800176AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
177if test x$enable_drm_compositor = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500178 AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
Pekka Paalanenab81f152015-08-24 14:27:07 +0300179 PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
Bryce Harringtona3582072015-08-14 12:23:13 -0700180 PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2],
181 [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports dmabuf import])],
182 [AC_MSG_WARN([gbm does not support dmabuf import, will omit that capability])])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500183fi
184
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100185
Jonas Ådahlfaec1eb2015-01-15 14:45:56 +0800186PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
Ander Conselvan de Oliveira70e2e682013-10-14 15:57:10 +0300187PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500188
Pekka Paalanene95ad5c2016-04-15 14:47:08 +0300189PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.4],
Jonas Ådahl496adb32015-11-17 16:00:27 +0800190 [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
191AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
192
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500193AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
194 enable_wayland_compositor=yes)
Kristian Høgsberga9410222011-01-14 17:22:35 -0500195AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300196 test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes)
197if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500198 AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
199 [Build the Wayland (nested) compositor])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700200 PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= $WAYLAND_PREREQ_VERSION wayland-egl wayland-cursor])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500201fi
202
Pekka Paalanen3ae50bb2012-05-30 15:53:45 +0300203
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200204AC_ARG_ENABLE(headless-compositor, [ --enable-headless-compositor],,
205 enable_headless_compositor=yes)
206AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR,
207 test x$enable_headless_compositor = xyes)
Bryce Harrington19c8db92014-11-19 15:06:16 -0800208if test x$enable_headless_compositor = xyes; then
209 AC_DEFINE([BUILD_HEADLESS_COMPOSITOR], [1], [Build the headless compositor])
210fi
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200211
212
Philip Withnall4f499172013-02-02 12:02:32 +0000213AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],,
214 enable_fbdev_compositor=yes)
215AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
216 [test x$enable_fbdev_compositor = xyes])
217AS_IF([test x$enable_fbdev_compositor = xyes], [
218 AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
Adrian Negreanu7b8e9702013-09-26 19:31:32 +0300219 PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
Philip Withnall4f499172013-02-02 12:02:32 +0000220])
221
Hardeninga83409c2013-04-01 23:43:58 +0200222AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],,
223 enable_rdp_compositor=no)
224AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
225 [test x$enable_rdp_compositor = xyes])
226if test x$enable_rdp_compositor = xyes; then
Hardeningc077a842013-07-08 00:51:35 +0200227 AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
FORT David58b63ab2016-05-01 23:32:07 +0200228 PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
229 [],
230 [PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
231 )
Hardening04633b62014-01-10 11:33:06 +0100232
233 SAVED_CPPFLAGS="$CPPFLAGS"
234 CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
235 AC_CHECK_HEADERS([freerdp/version.h])
236 CPPFLAGS="$SAVED_CPPFLAGS"
Hardeninga83409c2013-04-01 23:43:58 +0200237fi
Philip Withnall4f499172013-02-02 12:02:32 +0000238
Kristian Høgsbergd33cc732014-05-09 15:32:02 -0700239AC_ARG_ENABLE([screen-sharing], [ --enable-screen-sharing],,
Jason Ekstrand47928d82014-04-02 19:54:01 -0500240 enable_screen_sharing=no)
241AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
242 [test x$enable_screen_sharing = xyes])
243if test x$enable_screen_sharing = xyes; then
244 PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
245
246 if test x$enable_rdp_compositor != xyes; then
247 AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
248 fi
249fi
250
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100251AC_ARG_WITH(cairo,
252 AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
253 [Which Cairo renderer to use for the clients]),
254 [],[with_cairo="image"])
255
256if test "x$with_cairo" = "ximage"; then
257 cairo_modules="cairo"
258else
259if test "x$with_cairo" = "xgl"; then
260 cairo_modules="cairo-gl"
Bryce Harrington42db3132015-05-19 13:24:37 -0700261 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 +0100262else
263if test "x$with_cairo" = "xglesv2"; then
264 cairo_modules="cairo-glesv2"
Bryce Harrington42db3132015-05-19 13:24:37 -0700265 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 +0100266else
267 AC_ERROR([Unknown cairo renderer requested])
268fi
269fi
270fi
271
272# Included for legacy compat
Pekka Paalanende7fe622012-10-16 17:27:18 +0300273AC_ARG_WITH(cairo-glesv2,
274 AS_HELP_STRING([--with-cairo-glesv2],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100275 [Use GLESv2 cairo]))
Pekka Paalanende7fe622012-10-16 17:27:18 +0300276if test "x$with_cairo_glesv2" = "xyes"; then
277 cairo_modules="cairo-glesv2"
Armin K0a8461b2013-08-14 03:13:53 +0200278 with_cairo="glesv2"
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100279fi
280
281if test "x$cairo_modules" = "xcairo-glesv2"; then
282AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
Kristian Høgsberg2d574392012-01-18 14:50:58 -0500283fi
284
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400285PKG_CHECK_MODULES(PIXMAN, [pixman-1])
286PKG_CHECK_MODULES(PNG, [libpng])
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000287
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000288AC_ARG_WITH([jpeg],
289 AS_HELP_STRING([--without-jpeg],
290 [Use jpeglib for JPEG decoding support [default=auto]]))
291AS_IF([test "x$with_jpeg" != "xno"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200292 [WESTON_SEARCH_LIBS([JPEG], [jpeg], [jpeg_CreateDecompress], [have_jpeglib=yes], [have_jpeglib=no])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000293 [have_jpeglib=no])
294AS_IF([test "x$have_jpeglib" = "xyes"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200295 [AC_DEFINE([HAVE_JPEG], [1], [Have jpeglib])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000296 [AS_IF([test "x$with_jpeg" = "xyes"],
297 [AC_MSG_ERROR([JPEG support explicitly requested, but jpeglib couldn't be found])])])
298
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000299AC_ARG_WITH([webp],
300 AS_HELP_STRING([--without-webp],
301 [Use libwebp for WebP decoding support [default=auto]]))
302AS_IF([test "x$with_webp" != "xno"],
303 [PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])],
304 [have_webp=no])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400305AS_IF([test "x$have_webp" = "xyes"],
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000306 [AC_DEFINE([HAVE_WEBP], [1], [Have webp])],
307 [AS_IF([test "x$with_webp" = "xyes"],
308 [AC_MSG_ERROR([WebP support explicitly requested, but libwebp couldn't be found])])])
Kristian Høgsberg5a315bc2012-05-15 22:33:43 -0400309
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700310AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
311 enable_vaapi_recorder=auto)
312if test x$enable_vaapi_recorder != xno; then
313 PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
314 [have_libva=yes], [have_libva=no])
315 if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
316 AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700317 fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700318 AS_IF([test "x$have_libva" = "xyes"],
319 [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700320fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700321AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700322
Tiago Vignatti4f238a52012-07-31 15:47:48 +0300323PKG_CHECK_MODULES(CAIRO, [cairo])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400324
Bryce Harrington46f1f052016-05-11 13:18:59 -0700325PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg8e293a52013-11-23 12:40:34 -0800326
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300327AC_ARG_ENABLE(simple-clients,
328 AS_HELP_STRING([--disable-simple-clients],
329 [do not build the simple wl_shm clients]),,
330 enable_simple_clients=yes)
331AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
Eric Anholt6f82cf52012-02-09 08:36:03 -0800332if test x$enable_simple_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300333 PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
334fi
335
336AC_ARG_ENABLE(simple-egl-clients,
337 AS_HELP_STRING([--disable-simple-egl-clients],
338 [do not build the simple EGL clients]),,
Kristian Høgsbergedb6a3b2013-09-03 22:59:17 -0700339 enable_simple_egl_clients="$enable_egl")
340AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
341if test x$enable_simple_egl_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300342 PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000343 [egl glesv2 wayland-client wayland-egl wayland-cursor])
Tiago Vignatti93165e32011-07-21 16:35:40 +0300344fi
Kristian Høgsberga9410222011-01-14 17:22:35 -0500345
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000346AC_ARG_ENABLE(simple-dmabuf-intel-client,
347 AS_HELP_STRING([--disable-simple-dmabuf-intel-client],
348 [do not build the simple dmabuf intel client]),,
349 enable_simple_dmabuf_intel_client="auto")
350if ! test "x$enable_simple_dmabuf_intel_client" = "xno"; then
351 PKG_CHECK_MODULES(SIMPLE_DMABUF_INTEL_CLIENT, [wayland-client libdrm libdrm_intel],
352 have_simple_dmabuf_intel_client=yes, have_simple_dmabuf_intel_client=no)
353 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 -0700354 AC_MSG_ERROR([Intel dmabuf client explicitly enabled, but libdrm_intel couldn't be found])
355 fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000356 enable_simple_dmabuf_intel_client="$have_simple_dmabuf_intel_client"
George Kiagiadakis53868982014-06-12 16:26:49 +0200357fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000358AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_INTEL_CLIENT, test "x$enable_simple_dmabuf_intel_client" = "xyes")
George Kiagiadakis53868982014-06-12 16:26:49 +0200359
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000360AC_ARG_ENABLE(simple-dmabuf-v4l-client,
361 AS_HELP_STRING([--disable-simple-dmabuf-v4l-client],
362 [do not build the simple dmabuf v4l client]),,
363 enable_simple_dmabuf_v4l_client="auto")
364if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
365 PKG_CHECK_MODULES(SIMPLE_DMABUF_V4L_CLIENT, [wayland-client libdrm],
366 have_simple_dmabuf_v4l_client=yes, have_simple_dmabuf_v4l_client=no)
367 if test "x$have_simple_dmabuf_v4l_client" = "xno" -a "x$enable_simple_dmabuf_v4l_client" = "xyes"; then
368 AC_MSG_ERROR([V4L dmabuf client explicitly enabled, but libdrm couldn't be found])
369 fi
370 enable_simple_dmabuf_v4l_client="$have_simple_dmabuf_v4l_client"
371fi
372AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
373
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400374AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800375AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
376if test x$enable_clients = xyes; then
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400377 AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
378
Bryce Harrington46f1f052016-05-11 13:18:59 -0700379 PKG_CHECK_MODULES(CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION cairo >= 1.10.0 xkbcommon wayland-cursor])
Armin Ka94e2852013-06-04 13:05:22 +0200380 PKG_CHECK_MODULES(SERVER, [wayland-server])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700381 PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400382
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100383 # Only check for cairo-egl if a GL or GLES renderer requested
384 AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000385 PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl cairo-egl >= 1.11.3 $cairo_modules],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100386 [have_cairo_egl=yes], [have_cairo_egl=no])
387 AS_IF([test "x$have_cairo_egl" = "xyes"],
388 [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
Armin K0a8461b2013-08-14 03:13:53 +0200389 [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
390 [have_cairo_egl=no])
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100391
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100392 PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400393fi
394
Louis-Francis Ratté-Boulianne6cd1de32013-05-22 18:03:11 +0300395AC_ARG_ENABLE(resize-optimization,
396 AS_HELP_STRING([--disable-resize-optimization],
397 [disable resize optimization allocating a big buffer in toytoolkit]),,
398 enable_resize_optimization=yes)
399AS_IF([test "x$enable_resize_optimization" = "xyes"],
400 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
401
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100402AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
403AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
404if test x$enable_weston_launch == xyes; then
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200405 WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100406 if test x$have_pam == xno; then
407 AC_ERROR([weston-launch requires pam])
408 fi
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100409fi
410
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100411AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
412
Armin Ka94e2852013-06-04 13:05:22 +0200413AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
414 [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
415
Pekka Paalanen51d21952012-01-31 16:35:18 +0200416AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300417 test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
Pekka Paalanen51d21952012-01-31 16:35:18 +0200418
Pekka Paalanen7ff7a802013-04-25 13:57:50 +0300419AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
420 [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
421
Kristian Høgsberg1c562182011-05-02 22:09:20 -0400422AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
423
Jason Ekstrand946a9482014-04-02 19:53:47 -0500424AC_ARG_ENABLE(fullscreen-shell,
425 AS_HELP_STRING([--disable-fullscreen-shell],
426 [do not build fullscreen-shell server plugin]),,
427 enable_fullscreen_shell=yes)
428AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL,
429 test "x$enable_fullscreen_shell" = "xyes")
430
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100431# CMS modules
432AC_ARG_ENABLE(colord,
433 AS_HELP_STRING([--disable-colord],
434 [do not build colord CMS support]),,
Armin K49c36c62013-05-30 15:16:40 +0200435 enable_colord=auto)
Armin K49c36c62013-05-30 15:16:40 +0200436if test "x$enable_colord" != "xno"; then
437 PKG_CHECK_MODULES(COLORD,
438 colord >= 0.1.27,
439 have_colord=yes,
440 have_colord=no)
441 if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
442 AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
443 fi
444 if test "x$have_colord" = "xyes"; then
445 enable_colord=yes
446 fi
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100447fi
Yanko Kaneti9b78adf2013-07-10 12:01:36 -0400448AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400449
David Herrmann59ab9002013-10-22 00:28:06 +0200450# dbus support
451AC_ARG_ENABLE(dbus,
452 AS_HELP_STRING([--disable-dbus],
453 [do not build with dbus support]),,
454 enable_dbus=auto)
455if test "x$enable_dbus" != "xno"; then
456 PKG_CHECK_MODULES(DBUS,
457 dbus-1 >= 1.6,
458 have_dbus=yes,
459 have_dbus=no)
460 if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
461 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
462 fi
463 if test "x$have_dbus" = "xyes"; then
464 enable_dbus=yes
465 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
466 else
467 enable_dbus=no
468 fi
469fi
470AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
471
Manuel Bachmannf989c382015-11-04 12:13:08 +0100472# systemd-login support
473AC_ARG_ENABLE(systemd-login,
474 AS_HELP_STRING([--enable-systemd-login],
475 [Enable logind support]),,
476 enable_systemd_login=auto)
477if test x$enable_systemd_login != xno -a x$have_dbus != xno; then
478 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
479 [libsystemd >= 209],
480 [have_systemd_login_209=yes;have_systemd_login=yes],
481 [have_systemd_login_209=no;have_systemd_login=no])
482
483 # Older versions of systemd package systemd-login separately. Fall back on that
484 AS_IF([test x$have_systemd_login != xyes],[
485 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
486 [libsystemd-login >= 198],
487 [have_systemd_login=yes],
488 [have_systemd_login=no])
489 ])
490else
491 have_systemd_login=no
492fi
493
494if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
495 AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209, libsystemd-login or dbus])
496fi
497
498AS_IF([test "x$have_systemd_login" = "xyes"],
499 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
500AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
501
502AS_IF([test "x$have_systemd_login_209" = "xyes"],
503 [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
504
505
Jon A. Cruz646aef52015-07-15 19:22:41 -0700506# Note that other features might want libxml2, or this feature might use
507# alternative xml libraries at some point. Therefore the feature and
508# pre-requisite concepts are split.
509AC_ARG_ENABLE(junit_xml,
510 AS_HELP_STRING([--disable-junit-xml],
511 [do not build with JUnit XML output]),,
512 enable_junit_xml=auto)
513if test "x$enable_junit_xml" != "xno"; then
514 PKG_CHECK_MODULES(LIBXML2,
515 [libxml-2.0 >= 2.6],
516 have_libxml2=yes,
517 have_libxml2=no)
518 if test "x$have_libxml2" = "xno" -a "x$enable_junit_xml" = "xyes"; then
519 AC_MSG_ERROR([JUnit XML support explicitly requested, but libxml2 couldn't be found])
520 fi
521 if test "x$have_libxml2" = "xyes"; then
522 enable_junit_xml=yes
523 AC_DEFINE(ENABLE_JUNIT_XML, [1], [Build Weston with JUnit output support])
524 else
525 enable_junit_xml=no
526 fi
527fi
528AM_CONDITIONAL(ENABLE_JUNIT_XML, test "x$enable_junit_xml" = "xyes")
529
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900530# ivi-shell support
531AC_ARG_ENABLE(ivi-shell,
532 AS_HELP_STRING([--disable-ivi-shell],
533 [do not build ivi-shell server plugin and client]),,
534 enable_ivi_shell=yes)
535AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
536
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400537AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes)
538AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
539if test x$enable_wcap_tools = xyes; then
540 AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
Kristian Høgsberg8d25a5a2012-07-20 18:05:10 -0400541 PKG_CHECK_MODULES(WCAP, [cairo])
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400542 WCAP_LIBS="$WCAP_LIBS -lm"
543fi
544
Pekka Paalanen4b141592012-08-03 14:39:16 +0300545PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
546AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400547
nobled48f975d2011-01-28 13:47:21 +0000548if test "x$GCC" = "xyes"; then
Pekka Paalanena95efd32013-01-18 12:11:10 +0200549 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
Daniel Stonead0241d2016-06-18 16:04:30 +1000550 -Wno-shift-negative-value -Wno-missing-field-initializers \
551 -g -fvisibility=hidden \
Kristian Høgsberg6fd73cd2014-02-01 11:02:41 -0800552 -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -0500553fi
554AC_SUBST(GCC_CFLAGS)
555
Armin K49c36c62013-05-30 15:16:40 +0200556AC_ARG_ENABLE(libunwind,
557 AS_HELP_STRING([--disable-libunwind],
558 [Disable libunwind usage for backtraces]),,
559 enable_libunwind=auto)
Quentin Glidic5daccc32013-04-03 20:19:45 +0200560AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
Armin K49c36c62013-05-30 15:16:40 +0200561if test "x$enable_libunwind" != "xno"; then
562 PKG_CHECK_MODULES(LIBUNWIND,
563 libunwind,
564 have_libunwind=yes,
565 have_libunwind=no)
566 if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
567 AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
568 fi
569 if test "x$have_libunwind" = "xyes"; then
570 enable_libunwind=yes
571 AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
572 fi
573fi
574
Marcin Slusarz554a0da2013-02-18 13:27:22 -0500575
Pekka Paalanena51e6fa2012-11-07 12:25:12 +0200576if test "x$WESTON_NATIVE_BACKEND" = "x"; then
577 WESTON_NATIVE_BACKEND="drm-backend.so"
578fi
579AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
580AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
581 [The default backend to load, if not wayland nor x11.])
582
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +0100583if test "x$WESTON_SHELL_CLIENT" = "x"; then
584 WESTON_SHELL_CLIENT="weston-desktop-shell"
585fi
586AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
587AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
588 [The default desktop shell client to load.])
589
Kristian Høgsbergea520d52014-01-01 12:47:40 -0800590AC_ARG_ENABLE(demo-clients-install,
591 AS_HELP_STRING([--enable-demo-clients-install],
592 [Install demo clients built with weston]),,
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800593 enable_demo_clients_install=no)
594AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
Armin Kaac60212013-07-14 17:26:23 +0200595
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200596AC_ARG_ENABLE(lcms,
597 AS_HELP_STRING([--disable-lcms],
598 [Disable lcms support]),,
599 enable_lcms=auto)
600if test "x$enable_lcms" != "xno"; then
601 PKG_CHECK_MODULES(LCMS,
602 lcms2,
603 have_lcms=yes,
604 have_lcms=no)
605 if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
606 AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
607 fi
608 if test "x$have_lcms" = "xyes"; then
609 enable_lcms=yes
610 AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
611 fi
Richard Hughesb24e48e2013-05-09 20:31:09 +0100612fi
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200613AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
Richard Hughesb24e48e2013-05-09 20:31:09 +0100614
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200615AC_PATH_PROG([wayland_scanner], [wayland-scanner])
616if test x$wayland_scanner = x; then
Emil Velikov32318a52015-02-17 15:13:32 +0000617 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
618 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200619fi
Kristian Høgsbergb2d71852011-02-14 22:13:33 -0500620
Egor Starkov7ce2e972015-09-25 18:00:27 +0300621AC_ARG_ENABLE(systemd_notify,
622 AS_HELP_STRING([--enable-systemd-notify],
623 [Enables systemd notifications to
624 notify systemd about weston state
Friedrich, Eugen (ADITG/SW1)265aeb32016-04-05 20:43:29 +0000625 and update watchdog.
626 Also sockets provided by systemd
627 in case of socket-base activation
628 are added to wayland display]),,
Egor Starkov7ce2e972015-09-25 18:00:27 +0300629 enable_systemd_notify=no)
630AM_CONDITIONAL(SYSTEMD_NOTIFY_SUPPORT, test x$enable_systemd_notify = xyes)
631if test "x$enable_systemd_notify" = "xyes"; then
632 AC_DEFINE([SYSTEMD_NOTIFY_SUPPORT], [1], [Build the systemd sd_notify support])
633 PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
634fi
635
Kristian Høgsberg0987f812014-01-27 22:02:41 -0800636AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800637
Giulio Camuffo9e445982016-06-02 21:48:15 +0300638# AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
639# libweston_abi_version here, and outside [] because of m4 quoting rules
640AC_CONFIG_FILES([src/libweston-]libweston_abi_version[.pc:src/libweston.pc.in])
641
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800642AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
643
Kristian Høgsberg4a8767b2008-12-10 13:44:23 -0500644AC_OUTPUT
Armin K0a8461b2013-08-14 03:13:53 +0200645
646AC_MSG_RESULT([
647 Native Backend ${WESTON_NATIVE_BACKEND}
648 setuid Install ${enable_setuid_install}
649
650 Cairo Renderer ${with_cairo}
651 EGL ${enable_egl}
652 libxkbcommon ${enable_xkbcommon}
Jonas Ådahlb8e62d92013-10-25 23:18:02 +0200653 xcb_xkb ${have_xcb_xkb}
Armin K0a8461b2013-08-14 03:13:53 +0200654 XWayland ${enable_xwayland}
David Herrmann59ab9002013-10-22 00:28:06 +0200655 dbus ${enable_dbus}
Armin K0a8461b2013-08-14 03:13:53 +0200656
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900657 ivi-shell ${enable_ivi_shell}
658
Armin K0a8461b2013-08-14 03:13:53 +0200659 Build wcap utility ${enable_wcap_tools}
Jason Ekstrand946a9482014-04-02 19:53:47 -0500660 Build Fullscreen Shell ${enable_fullscreen_shell}
Jon A. Cruz179c1862015-07-15 19:22:43 -0700661 Enable developer documentation ${enable_devdocs}
Armin K0a8461b2013-08-14 03:13:53 +0200662
663 weston-launch utility ${enable_weston_launch}
David Herrmanncc5b2ed2013-10-22 00:28:09 +0200664 systemd-login support ${have_systemd_login}
Egor Starkov7ce2e972015-09-25 18:00:27 +0300665 systemd notify support ${enable_systemd_notify}
Armin K0a8461b2013-08-14 03:13:53 +0200666
667 DRM Compositor ${enable_drm_compositor}
668 X11 Compositor ${enable_x11_compositor}
669 Wayland Compositor ${enable_wayland_compositor}
670 Headless Compositor ${enable_headless_compositor}
Armin K0a8461b2013-08-14 03:13:53 +0200671 FBDEV Compositor ${enable_fbdev_compositor}
672 RDP Compositor ${enable_rdp_compositor}
Jason Ekstrand47928d82014-04-02 19:54:01 -0500673 Screen Sharing ${enable_screen_sharing}
Jon A. Cruz646aef52015-07-15 19:22:41 -0700674 JUnit XML output ${enable_junit_xml}
Armin K0a8461b2013-08-14 03:13:53 +0200675
Armin K0a8461b2013-08-14 03:13:53 +0200676 Build Clients ${enable_clients}
677 Build EGL Clients ${have_cairo_egl}
678 Build Simple Clients ${enable_simple_clients}
679 Build Simple EGL Clients ${enable_simple_egl_clients}
680
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800681 Install Demo Clients ${enable_demo_clients_install}
Armin K0a8461b2013-08-14 03:13:53 +0200682
683 Colord Support ${have_colord}
Armin K0a8461b2013-08-14 03:13:53 +0200684 LCMS2 Support ${have_lcms}
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000685 libjpeg Support ${have_jpeglib}
Armin K0a8461b2013-08-14 03:13:53 +0200686 libwebp Support ${have_webp}
687 libunwind Support ${have_libunwind}
Ander Conselvan de Oliveira6aae4d32013-08-23 17:15:48 +0300688 VA H.264 encoding Support ${have_libva}
Armin K0a8461b2013-08-14 03:13:53 +0200689])