blob: fe65bdae6a1abfac5497366fecab3961f9951bf0 [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])
Emil Velikov7fe47f32016-07-22 14:51:51 +01006m4_define([libweston_major_version], [0])
7m4_define([libweston_minor_version], [0])
8m4_define([libweston_patch_version], [0])
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -05009
Javier Jardón5b7e43a2010-11-06 01:55:27 +010010AC_PREREQ([2.64])
Kristian Høgsberga7313e72012-02-08 16:35:12 -050011AC_INIT([weston],
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050012 [weston_version],
13 [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=weston_version],
Kristian Høgsberga7313e72012-02-08 16:35:12 -050014 [weston],
Daniel Stone32d9ea12014-10-08 12:15:48 +010015 [http://wayland.freedesktop.org])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010016
Pekka Paalanen96c205a2016-08-11 17:56:48 +030017WAYLAND_PREREQ_VERSION="1.11.90"
Bryce Harrington46f1f052016-05-11 13:18:59 -070018
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050019AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
20AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
21AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
22AC_SUBST([WESTON_VERSION], [weston_version])
Emil Velikov7fe47f32016-07-22 14:51:51 +010023AC_SUBST([LIBWESTON_MAJOR], [libweston_major_version])
24# We use minor as current and age since on ABI/API break/removal we bump major
25# so minor will be reset to 0.
26m4_define([lt_current], [libweston_minor_version])
27m4_define([lt_revision], [libweston_patch_version])
28m4_define([lt_age], [libweston_minor_version])
29AC_SUBST([LT_VERSION_INFO], [lt_current:lt_revision:lt_age])
Kristian Høgsbergaf4f2aa2013-02-15 20:53:20 -050030
Guillem Joverdff63a22014-02-01 18:48:43 +010031AC_CONFIG_AUX_DIR([build-aux])
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -040032AC_CONFIG_HEADERS([config.h])
Thierry Reding0e6d9a72014-05-27 09:07:54 +020033AC_CONFIG_MACRO_DIR([m4])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010034
Daniel Stonec228e232013-05-22 18:03:19 +030035AC_USE_SYSTEM_EXTENSIONS
Kristian Høgsberg7e105f92013-08-21 15:44:57 -070036AC_SYS_LARGEFILE
Daniel Stonec228e232013-05-22 18:03:19 +030037
Kristian Høgsberg396a9bb2014-01-31 23:49:33 -080038AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
Javier Jardón5b7e43a2010-11-06 01:55:27 +010039
Kristian Høgsbergf0152da2010-10-12 17:24:20 -040040AM_SILENT_RULES([yes])
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050041
Javier Jardón5b7e43a2010-11-06 01:55:27 +010042# Check for programs
43AC_PROG_CC
Pekka Paalanena91291c2012-08-29 15:49:48 +030044AC_PROG_SED
Javier Jardón5b7e43a2010-11-06 01:55:27 +010045
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040046# Initialize libtool
47LT_PREREQ([2.2])
Kristian Høgsberg1c562182011-05-02 22:09:20 -040048LT_INIT([disable-static])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040049
Pekka Paalanena51e6fa2012-11-07 12:25:12 +020050AC_ARG_VAR([WESTON_NATIVE_BACKEND],
51 [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 +010052AC_ARG_VAR([WESTON_SHELL_CLIENT],
53 [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 +020054
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050055PKG_PROG_PKG_CONFIG()
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -050056
Quentin Glidic9992bdc2016-04-23 12:02:58 +020057WESTON_SEARCH_LIBS([DLOPEN], [dl], [dlopen])
Kristian Høgsberg02ec0a52011-04-23 13:04:11 -040058
Gustavo Zacarias34d59852016-04-21 11:18:48 -030059# In old glibc versions (< 2.17) clock_gettime() is in librt
Quentin Glidic9992bdc2016-04-23 12:02:58 +020060WESTON_SEARCH_LIBS([CLOCK_GETTIME], [rt], [clock_gettime])
Gustavo Zacarias34d59852016-04-21 11:18:48 -030061
Rob Bradford5a4cea92013-06-04 13:23:01 +010062AC_CHECK_DECL(SFD_CLOEXEC,[],
63 [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],
64 [[#include <sys/signalfd.h>]])
65AC_CHECK_DECL(TFD_CLOEXEC,[],
66 [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
67 [[#include <sys/timerfd.h>]])
68AC_CHECK_DECL(CLOCK_MONOTONIC,[],
69 [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
70 [[#include <time.h>]])
Pekka Paalanen200019c2012-05-30 15:53:42 +030071AC_CHECK_HEADERS([execinfo.h])
72
Pekka Paalanen5b4ddbc2013-11-29 17:48:51 +020073AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
Pekka Paalanen1da1b8f2012-06-06 16:59:43 +030074
Bryce Harrington46f1f052016-05-11 13:18:59 -070075COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
Kristian Høgsberg08c40c32011-01-11 13:48:03 -050076
Jon A. Cruz179c1862015-07-15 19:22:43 -070077AC_CONFIG_FILES([doc/doxygen/tools.doxygen doc/doxygen/tooldev.doxygen])
78
79AC_ARG_ENABLE(devdocs,
80 AS_HELP_STRING([--disable-devdocs],
81 [do not enable building of developer documentation]),,
82 enable_devdocs=auto)
83if test "x$enable_devdocs" != "xno"; then
84 AC_CHECK_PROGS([DOXYGEN], [doxygen])
85 if test "x$DOXYGEN" = "x" -a "x$enable_devdocs" = "xyes"; then
86 AC_MSG_ERROR([Developer documentation explicitly requested, but Doxygen couldn't be found])
87 fi
88 if test "x$DOXYGEN" != "x"; then
89 enable_devdocs=yes
90 else
91 enable_devdocs=no
92 fi
93fi
94AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes")
95
Kristian Høgsbergf82a8062013-01-09 13:36:39 -050096AC_ARG_ENABLE(egl, [ --disable-egl],,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +030097 enable_egl=yes)
98AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
99if test x$enable_egl = xyes; then
100 AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000101 PKG_CHECK_MODULES(EGL, [egl glesv2])
102 PKG_CHECK_MODULES([EGL_TESTS], [egl glesv2 wayland-client wayland-egl])
Pekka Paalanena3525802014-06-12 16:49:29 +0300103 PKG_CHECK_MODULES([GL_RENDERER], [libdrm])
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300104fi
105
Rob Bradford382ff462013-06-24 16:52:45 +0100106AC_ARG_ENABLE(xkbcommon,
107 AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon
108 support: This is only useful in environments
109 where you do not have a hardware keyboard. If
110 libxkbcommon support is disabled clients will not
111 be sent a keymap and and must know how to
112 interpret the keycode sent for any key event.]),,
113 enable_xkbcommon=yes)
114if test x$enable_xkbcommon = xyes; then
115 AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
Kristian Høgsberg37424342013-10-25 12:49:00 -0700116 COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
Rob Bradford382ff462013-06-24 16:52:45 +0100117fi
118
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500119AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],,
120 enable_setuid_install=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800121AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
Kristian Høgsberg44d4de62012-01-19 13:32:17 -0500122
123
Tiago Vignatti629ce232012-05-23 23:04:14 +0300124AC_ARG_ENABLE(xwayland, [ --enable-xwayland],,
125 enable_xwayland=yes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100126AC_ARG_ENABLE(xwayland-test, [ --enable-xwayland-test],,
127 enable_xwayland_test=yes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300128AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
Quentin Glidicbb410052013-02-18 20:38:22 +0100129AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300130if test x$enable_xwayland = xyes; then
Kristian Høgsbergbcfd07b2013-10-11 16:48:19 -0700131 PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb)
Tiago Vignatti629ce232012-05-23 23:04:14 +0300132 AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300133
134 AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH],
135 [Path to X server]), [XSERVER_PATH="$withval"],
Derek Foreman1f9d4f92015-02-09 09:57:28 -0600136 [XSERVER_PATH="/usr/bin/Xwayland"])
Tiago Vignatti5884bcd2011-08-03 12:12:31 +0300137 AC_SUBST([XSERVER_PATH])
Quentin Glidicbb410052013-02-18 20:38:22 +0100138 if test x$enable_xwayland_test = xyes; then
Derek Foreman8771a142015-01-29 16:44:55 -0600139 PKG_CHECK_MODULES([XWAYLAND_TEST], x11)
Quentin Glidicbb410052013-02-18 20:38:22 +0100140 fi
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400141fi
142
Kristian Høgsbergd2c9d8a2013-11-24 14:37:07 -0800143PKG_CHECK_MODULES(LIBDRM, [libdrm],
144 [AC_DEFINE(HAVE_LIBDRM, 1, [Define if libdrm is available]) have_libdrm=yes], have_libdrm=no)
Kristian Høgsberg5ec0a932011-07-01 10:46:40 -0400145
Kristian Høgsberga9410222011-01-14 17:22:35 -0500146AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],,
147 enable_x11_compositor=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800148AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes)
149if test x$enable_x11_compositor = xyes; then
Kristian Høgsberga010abf2011-05-11 13:46:29 -0400150 PKG_CHECK_MODULES([XCB], xcb)
151 xcb_save_LIBS=$LIBS
152 xcb_save_CFLAGS=$CFLAGS
153 CFLAGS=$XCB_CFLAGS
154 LIBS=$XCB_LIBS
155 AC_CHECK_FUNCS([xcb_poll_for_queued_event])
156 LIBS=$xcb_save_LIBS
157 CFLAGS=$xcb_save_CFLAGS
158
Damien Lespiaub5bae342013-03-28 15:20:54 +0000159 X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm"
Daniel Stone62b33b62012-06-22 13:21:35 +0100160
161 PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
162 [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
163 if test "x$have_xcb_xkb" = xyes; then
164 # Most versions of XCB have totally broken XKB bindings, where the
165 # events don't work. Make sure we can actually use them.
166 xcb_xkb_save_CFLAGS=$CFLAGS
167 CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS
168 AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType],
169 [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]])
170 CFLAGS=$xcb_xkb_save_CFLAGS
171 fi
172 if test "x$have_xcb_xkb" = xyes; then
173 X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb"
174 AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol])
175 fi
176
177 PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500178 AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor])
179fi
180
181
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500182AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],,
183 enable_drm_compositor=yes)
Kristian Høgsberg02b36f32013-11-24 14:45:23 -0800184AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
185if test x$enable_drm_compositor = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500186 AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
Pekka Paalanenab81f152015-08-24 14:27:07 +0300187 PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
Bryce Harringtona3582072015-08-14 12:23:13 -0700188 PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2],
189 [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports dmabuf import])],
190 [AC_MSG_WARN([gbm does not support dmabuf import, will omit that capability])])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500191fi
192
Jonas Ådahle0de3c22014-03-12 22:08:42 +0100193
Jonas Ådahlfaec1eb2015-01-15 14:45:56 +0800194PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
Ander Conselvan de Oliveira70e2e682013-10-14 15:57:10 +0300195PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500196
Quentin Glidic9c5dd7e2016-08-12 10:41:37 +0200197PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
Jonas Ådahl496adb32015-11-17 16:00:27 +0800198 [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
199AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
200
Kristian Høgsberg7d498b42011-01-23 13:50:42 -0500201AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
202 enable_wayland_compositor=yes)
Kristian Høgsberga9410222011-01-14 17:22:35 -0500203AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300204 test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes)
205if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
Kristian Høgsberga9410222011-01-14 17:22:35 -0500206 AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
207 [Build the Wayland (nested) compositor])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700208 PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= $WAYLAND_PREREQ_VERSION wayland-egl wayland-cursor])
Kristian Høgsberga9410222011-01-14 17:22:35 -0500209fi
210
Pekka Paalanen3ae50bb2012-05-30 15:53:45 +0300211
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200212AC_ARG_ENABLE(headless-compositor, [ --enable-headless-compositor],,
213 enable_headless_compositor=yes)
214AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR,
215 test x$enable_headless_compositor = xyes)
Bryce Harrington19c8db92014-11-19 15:06:16 -0800216if test x$enable_headless_compositor = xyes; then
217 AC_DEFINE([BUILD_HEADLESS_COMPOSITOR], [1], [Build the headless compositor])
218fi
Ander Conselvan de Oliveira11f8d402012-10-29 18:19:24 +0200219
220
Philip Withnall4f499172013-02-02 12:02:32 +0000221AC_ARG_ENABLE([fbdev-compositor], [ --enable-fbdev-compositor],,
222 enable_fbdev_compositor=yes)
223AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
224 [test x$enable_fbdev_compositor = xyes])
225AS_IF([test x$enable_fbdev_compositor = xyes], [
226 AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
Adrian Negreanu7b8e9702013-09-26 19:31:32 +0300227 PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
Philip Withnall4f499172013-02-02 12:02:32 +0000228])
229
Hardeninga83409c2013-04-01 23:43:58 +0200230AC_ARG_ENABLE([rdp-compositor], [ --enable-rdp-compositor],,
231 enable_rdp_compositor=no)
232AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
233 [test x$enable_rdp_compositor = xyes])
234if test x$enable_rdp_compositor = xyes; then
Hardeningc077a842013-07-08 00:51:35 +0200235 AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
FORT David58b63ab2016-05-01 23:32:07 +0200236 PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
237 [],
238 [PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
239 )
Hardening04633b62014-01-10 11:33:06 +0100240
241 SAVED_CPPFLAGS="$CPPFLAGS"
242 CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
243 AC_CHECK_HEADERS([freerdp/version.h])
244 CPPFLAGS="$SAVED_CPPFLAGS"
Hardeninga83409c2013-04-01 23:43:58 +0200245fi
Philip Withnall4f499172013-02-02 12:02:32 +0000246
Kristian Høgsbergd33cc732014-05-09 15:32:02 -0700247AC_ARG_ENABLE([screen-sharing], [ --enable-screen-sharing],,
Jason Ekstrand47928d82014-04-02 19:54:01 -0500248 enable_screen_sharing=no)
249AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
250 [test x$enable_screen_sharing = xyes])
251if test x$enable_screen_sharing = xyes; then
252 PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
253
254 if test x$enable_rdp_compositor != xyes; then
255 AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
256 fi
257fi
258
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100259AC_ARG_WITH(cairo,
260 AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
261 [Which Cairo renderer to use for the clients]),
262 [],[with_cairo="image"])
263
264if test "x$with_cairo" = "ximage"; then
265 cairo_modules="cairo"
266else
267if test "x$with_cairo" = "xgl"; then
268 cairo_modules="cairo-gl"
Bryce Harrington42db3132015-05-19 13:24:37 -0700269 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 +0100270else
271if test "x$with_cairo" = "xglesv2"; then
272 cairo_modules="cairo-glesv2"
Bryce Harrington42db3132015-05-19 13:24:37 -0700273 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 +0100274else
275 AC_ERROR([Unknown cairo renderer requested])
276fi
277fi
278fi
279
280# Included for legacy compat
Pekka Paalanende7fe622012-10-16 17:27:18 +0300281AC_ARG_WITH(cairo-glesv2,
282 AS_HELP_STRING([--with-cairo-glesv2],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100283 [Use GLESv2 cairo]))
Pekka Paalanende7fe622012-10-16 17:27:18 +0300284if test "x$with_cairo_glesv2" = "xyes"; then
285 cairo_modules="cairo-glesv2"
Armin K0a8461b2013-08-14 03:13:53 +0200286 with_cairo="glesv2"
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100287fi
288
289if test "x$cairo_modules" = "xcairo-glesv2"; then
290AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
Kristian Høgsberg2d574392012-01-18 14:50:58 -0500291fi
292
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400293PKG_CHECK_MODULES(PIXMAN, [pixman-1])
294PKG_CHECK_MODULES(PNG, [libpng])
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000295
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000296AC_ARG_WITH([jpeg],
297 AS_HELP_STRING([--without-jpeg],
298 [Use jpeglib for JPEG decoding support [default=auto]]))
299AS_IF([test "x$with_jpeg" != "xno"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200300 [WESTON_SEARCH_LIBS([JPEG], [jpeg], [jpeg_CreateDecompress], [have_jpeglib=yes], [have_jpeglib=no])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000301 [have_jpeglib=no])
302AS_IF([test "x$have_jpeglib" = "xyes"],
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200303 [AC_DEFINE([HAVE_JPEG], [1], [Have jpeglib])],
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000304 [AS_IF([test "x$with_jpeg" = "xyes"],
305 [AC_MSG_ERROR([JPEG support explicitly requested, but jpeglib couldn't be found])])])
306
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000307AC_ARG_WITH([webp],
308 AS_HELP_STRING([--without-webp],
309 [Use libwebp for WebP decoding support [default=auto]]))
310AS_IF([test "x$with_webp" != "xno"],
311 [PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])],
312 [have_webp=no])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400313AS_IF([test "x$have_webp" = "xyes"],
Emmanuel Gil Peyrot58b7a152016-02-16 01:57:51 +0000314 [AC_DEFINE([HAVE_WEBP], [1], [Have webp])],
315 [AS_IF([test "x$with_webp" = "xyes"],
316 [AC_MSG_ERROR([WebP support explicitly requested, but libwebp couldn't be found])])])
Kristian Høgsberg5a315bc2012-05-15 22:33:43 -0400317
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700318AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
319 enable_vaapi_recorder=auto)
320if test x$enable_vaapi_recorder != xno; then
321 PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
322 [have_libva=yes], [have_libva=no])
323 if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
324 AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700325 fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700326 AS_IF([test "x$have_libva" = "xyes"],
327 [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700328fi
Kristian Høgsberg1f7ce6e2013-09-03 22:46:02 -0700329AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
Kristian Høgsberg0eac34a2013-08-30 14:28:22 -0700330
Tiago Vignatti4f238a52012-07-31 15:47:48 +0300331PKG_CHECK_MODULES(CAIRO, [cairo])
Kristian Høgsbergf02a6492012-03-12 01:05:25 -0400332
Pekka Paalanen924cd942016-05-20 17:25:38 +0300333PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION pixman-1])
Kristian Høgsberg8e293a52013-11-23 12:40:34 -0800334
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300335AC_ARG_ENABLE(simple-clients,
336 AS_HELP_STRING([--disable-simple-clients],
337 [do not build the simple wl_shm clients]),,
338 enable_simple_clients=yes)
339AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
Eric Anholt6f82cf52012-02-09 08:36:03 -0800340if test x$enable_simple_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300341 PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
342fi
343
344AC_ARG_ENABLE(simple-egl-clients,
345 AS_HELP_STRING([--disable-simple-egl-clients],
346 [do not build the simple EGL clients]),,
Kristian Høgsbergedb6a3b2013-09-03 22:59:17 -0700347 enable_simple_egl_clients="$enable_egl")
348AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
349if test x$enable_simple_egl_clients = xyes; then
Pekka Paalanen5f8a67c2012-10-16 17:27:20 +0300350 PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000351 [egl glesv2 wayland-client wayland-egl wayland-cursor])
Tiago Vignatti93165e32011-07-21 16:35:40 +0300352fi
Kristian Høgsberga9410222011-01-14 17:22:35 -0500353
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000354AC_ARG_ENABLE(simple-dmabuf-intel-client,
355 AS_HELP_STRING([--disable-simple-dmabuf-intel-client],
356 [do not build the simple dmabuf intel client]),,
357 enable_simple_dmabuf_intel_client="auto")
358if ! test "x$enable_simple_dmabuf_intel_client" = "xno"; then
359 PKG_CHECK_MODULES(SIMPLE_DMABUF_INTEL_CLIENT, [wayland-client libdrm libdrm_intel],
360 have_simple_dmabuf_intel_client=yes, have_simple_dmabuf_intel_client=no)
361 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 -0700362 AC_MSG_ERROR([Intel dmabuf client explicitly enabled, but libdrm_intel couldn't be found])
363 fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000364 enable_simple_dmabuf_intel_client="$have_simple_dmabuf_intel_client"
George Kiagiadakis53868982014-06-12 16:26:49 +0200365fi
Emmanuel Gil Peyrot3b65b0b2016-01-11 19:04:36 +0000366AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_INTEL_CLIENT, test "x$enable_simple_dmabuf_intel_client" = "xyes")
George Kiagiadakis53868982014-06-12 16:26:49 +0200367
Emmanuel Gil Peyrot5d43af32016-01-11 19:04:38 +0000368AC_ARG_ENABLE(simple-dmabuf-v4l-client,
369 AS_HELP_STRING([--disable-simple-dmabuf-v4l-client],
370 [do not build the simple dmabuf v4l client]),,
371 enable_simple_dmabuf_v4l_client="auto")
372if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
373 PKG_CHECK_MODULES(SIMPLE_DMABUF_V4L_CLIENT, [wayland-client libdrm],
374 have_simple_dmabuf_v4l_client=yes, have_simple_dmabuf_v4l_client=no)
375 if test "x$have_simple_dmabuf_v4l_client" = "xno" -a "x$enable_simple_dmabuf_v4l_client" = "xyes"; then
376 AC_MSG_ERROR([V4L dmabuf client explicitly enabled, but libdrm couldn't be found])
377 fi
378 enable_simple_dmabuf_v4l_client="$have_simple_dmabuf_v4l_client"
379fi
380AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
381
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400382AC_ARG_ENABLE(clients, [ --enable-clients],, enable_clients=yes)
Eric Anholt6f82cf52012-02-09 08:36:03 -0800383AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
384if test x$enable_clients = xyes; then
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400385 AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
386
Bryce Harrington46f1f052016-05-11 13:18:59 -0700387 PKG_CHECK_MODULES(CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION cairo >= 1.10.0 xkbcommon wayland-cursor])
Armin Ka94e2852013-06-04 13:05:22 +0200388 PKG_CHECK_MODULES(SERVER, [wayland-server])
Bryce Harrington46f1f052016-05-11 13:18:59 -0700389 PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= $WAYLAND_PREREQ_VERSION])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400390
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100391 # Only check for cairo-egl if a GL or GLES renderer requested
392 AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
Ucan, Emre (ADITG/SW1)7d967da2015-11-18 10:23:50 +0000393 PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl cairo-egl >= 1.11.3 $cairo_modules],
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100394 [have_cairo_egl=yes], [have_cairo_egl=no])
395 AS_IF([test "x$have_cairo_egl" = "xyes"],
396 [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
Armin K0a8461b2013-08-14 03:13:53 +0200397 [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
398 [have_cairo_egl=no])
Rob Bradford4c1a9bc2013-08-09 16:52:46 +0100399
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100400 PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
Kristian Høgsberg60c15082011-04-26 11:47:00 -0400401fi
402
Louis-Francis Ratté-Boulianne6cd1de32013-05-22 18:03:11 +0300403AC_ARG_ENABLE(resize-optimization,
404 AS_HELP_STRING([--disable-resize-optimization],
405 [disable resize optimization allocating a big buffer in toytoolkit]),,
406 enable_resize_optimization=yes)
407AS_IF([test "x$enable_resize_optimization" = "xyes"],
408 [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
409
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100410AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
411AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
412if test x$enable_weston_launch == xyes; then
Quentin Glidic9992bdc2016-04-23 12:02:58 +0200413 WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100414 if test x$have_pam == xno; then
415 AC_ERROR([weston-launch requires pam])
416 fi
Benjamin Franzkebfeda132012-01-30 14:04:04 +0100417fi
418
Jan Arne Petersen0a1cf392013-01-16 21:26:42 +0100419AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
420
Armin Ka94e2852013-06-04 13:05:22 +0200421AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
422 [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
423
Pekka Paalanen51d21952012-01-31 16:35:18 +0200424AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
Vasily Khoruzhick1bfe2e62013-01-08 19:09:02 +0300425 test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
Pekka Paalanen51d21952012-01-31 16:35:18 +0200426
Pekka Paalanen7ff7a802013-04-25 13:57:50 +0300427AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
428 [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
429
Kristian Høgsberg1c562182011-05-02 22:09:20 -0400430AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
431
Jason Ekstrand946a9482014-04-02 19:53:47 -0500432AC_ARG_ENABLE(fullscreen-shell,
433 AS_HELP_STRING([--disable-fullscreen-shell],
434 [do not build fullscreen-shell server plugin]),,
435 enable_fullscreen_shell=yes)
436AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL,
437 test "x$enable_fullscreen_shell" = "xyes")
438
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100439# CMS modules
440AC_ARG_ENABLE(colord,
441 AS_HELP_STRING([--disable-colord],
442 [do not build colord CMS support]),,
Armin K49c36c62013-05-30 15:16:40 +0200443 enable_colord=auto)
Armin K49c36c62013-05-30 15:16:40 +0200444if test "x$enable_colord" != "xno"; then
445 PKG_CHECK_MODULES(COLORD,
446 colord >= 0.1.27,
447 have_colord=yes,
448 have_colord=no)
449 if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
450 AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
451 fi
452 if test "x$have_colord" = "xyes"; then
453 enable_colord=yes
454 fi
Richard Hughesbe7c4dd2013-05-11 09:48:22 +0100455fi
Yanko Kaneti9b78adf2013-07-10 12:01:36 -0400456AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400457
David Herrmann59ab9002013-10-22 00:28:06 +0200458# dbus support
459AC_ARG_ENABLE(dbus,
460 AS_HELP_STRING([--disable-dbus],
461 [do not build with dbus support]),,
462 enable_dbus=auto)
463if test "x$enable_dbus" != "xno"; then
464 PKG_CHECK_MODULES(DBUS,
465 dbus-1 >= 1.6,
466 have_dbus=yes,
467 have_dbus=no)
468 if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
469 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
470 fi
471 if test "x$have_dbus" = "xyes"; then
472 enable_dbus=yes
473 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
474 else
475 enable_dbus=no
476 fi
477fi
478AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
479
Manuel Bachmannf989c382015-11-04 12:13:08 +0100480# systemd-login support
481AC_ARG_ENABLE(systemd-login,
482 AS_HELP_STRING([--enable-systemd-login],
483 [Enable logind support]),,
484 enable_systemd_login=auto)
485if test x$enable_systemd_login != xno -a x$have_dbus != xno; then
486 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
487 [libsystemd >= 209],
488 [have_systemd_login_209=yes;have_systemd_login=yes],
489 [have_systemd_login_209=no;have_systemd_login=no])
490
491 # Older versions of systemd package systemd-login separately. Fall back on that
492 AS_IF([test x$have_systemd_login != xyes],[
493 PKG_CHECK_MODULES(SYSTEMD_LOGIN,
494 [libsystemd-login >= 198],
495 [have_systemd_login=yes],
496 [have_systemd_login=no])
497 ])
498else
499 have_systemd_login=no
500fi
501
502if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
503 AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209, libsystemd-login or dbus])
504fi
505
506AS_IF([test "x$have_systemd_login" = "xyes"],
507 [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
508AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
509
510AS_IF([test "x$have_systemd_login_209" = "xyes"],
511 [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
512
513
Jon A. Cruz646aef52015-07-15 19:22:41 -0700514# Note that other features might want libxml2, or this feature might use
515# alternative xml libraries at some point. Therefore the feature and
516# pre-requisite concepts are split.
517AC_ARG_ENABLE(junit_xml,
518 AS_HELP_STRING([--disable-junit-xml],
519 [do not build with JUnit XML output]),,
520 enable_junit_xml=auto)
521if test "x$enable_junit_xml" != "xno"; then
522 PKG_CHECK_MODULES(LIBXML2,
523 [libxml-2.0 >= 2.6],
524 have_libxml2=yes,
525 have_libxml2=no)
526 if test "x$have_libxml2" = "xno" -a "x$enable_junit_xml" = "xyes"; then
527 AC_MSG_ERROR([JUnit XML support explicitly requested, but libxml2 couldn't be found])
528 fi
529 if test "x$have_libxml2" = "xyes"; then
530 enable_junit_xml=yes
531 AC_DEFINE(ENABLE_JUNIT_XML, [1], [Build Weston with JUnit output support])
532 else
533 enable_junit_xml=no
534 fi
535fi
536AM_CONDITIONAL(ENABLE_JUNIT_XML, test "x$enable_junit_xml" = "xyes")
537
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900538# ivi-shell support
539AC_ARG_ENABLE(ivi-shell,
540 AS_HELP_STRING([--disable-ivi-shell],
541 [do not build ivi-shell server plugin and client]),,
542 enable_ivi_shell=yes)
543AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
544
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400545AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes)
546AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
547if test x$enable_wcap_tools = xyes; then
548 AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
Kristian Høgsberg8d25a5a2012-07-20 18:05:10 -0400549 PKG_CHECK_MODULES(WCAP, [cairo])
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400550 WCAP_LIBS="$WCAP_LIBS -lm"
551fi
552
Pekka Paalanen4b141592012-08-03 14:39:16 +0300553PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
554AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
Kristian Høgsberg61cfa662012-05-26 13:19:22 -0400555
nobled48f975d2011-01-28 13:47:21 +0000556if test "x$GCC" = "xyes"; then
Pekka Paalanena95efd32013-01-18 12:11:10 +0200557 GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
Daniel Stonead0241d2016-06-18 16:04:30 +1000558 -Wno-shift-negative-value -Wno-missing-field-initializers \
559 -g -fvisibility=hidden \
Kristian Høgsberg6fd73cd2014-02-01 11:02:41 -0800560 -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
Kristian Høgsbergd4de54e2008-12-04 22:48:50 -0500561fi
562AC_SUBST(GCC_CFLAGS)
563
Armin K49c36c62013-05-30 15:16:40 +0200564AC_ARG_ENABLE(libunwind,
565 AS_HELP_STRING([--disable-libunwind],
566 [Disable libunwind usage for backtraces]),,
567 enable_libunwind=auto)
Quentin Glidic5daccc32013-04-03 20:19:45 +0200568AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
Armin K49c36c62013-05-30 15:16:40 +0200569if test "x$enable_libunwind" != "xno"; then
570 PKG_CHECK_MODULES(LIBUNWIND,
571 libunwind,
572 have_libunwind=yes,
573 have_libunwind=no)
574 if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
575 AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
576 fi
577 if test "x$have_libunwind" = "xyes"; then
578 enable_libunwind=yes
579 AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
580 fi
581fi
582
Marcin Slusarz554a0da2013-02-18 13:27:22 -0500583
Pekka Paalanena51e6fa2012-11-07 12:25:12 +0200584if test "x$WESTON_NATIVE_BACKEND" = "x"; then
585 WESTON_NATIVE_BACKEND="drm-backend.so"
586fi
587AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
588AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
589 [The default backend to load, if not wayland nor x11.])
590
Emilio Pozuelo Monfort8a81b832013-12-02 12:53:32 +0100591if test "x$WESTON_SHELL_CLIENT" = "x"; then
592 WESTON_SHELL_CLIENT="weston-desktop-shell"
593fi
594AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
595AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
596 [The default desktop shell client to load.])
597
Kristian Høgsbergea520d52014-01-01 12:47:40 -0800598AC_ARG_ENABLE(demo-clients-install,
599 AS_HELP_STRING([--enable-demo-clients-install],
600 [Install demo clients built with weston]),,
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800601 enable_demo_clients_install=no)
602AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
Armin Kaac60212013-07-14 17:26:23 +0200603
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200604AC_ARG_ENABLE(lcms,
605 AS_HELP_STRING([--disable-lcms],
606 [Disable lcms support]),,
607 enable_lcms=auto)
608if test "x$enable_lcms" != "xno"; then
609 PKG_CHECK_MODULES(LCMS,
610 lcms2,
611 have_lcms=yes,
612 have_lcms=no)
613 if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
614 AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
615 fi
616 if test "x$have_lcms" = "xyes"; then
617 enable_lcms=yes
618 AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
619 fi
Richard Hughesb24e48e2013-05-09 20:31:09 +0100620fi
Jussi Kukkonen3375cca2015-11-27 16:37:35 +0200621AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
Richard Hughesb24e48e2013-05-09 20:31:09 +0100622
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200623AC_PATH_PROG([wayland_scanner], [wayland-scanner])
624if test x$wayland_scanner = x; then
Emil Velikov32318a52015-02-17 15:13:32 +0000625 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
626 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
Quentin Glidic9f43cb42013-08-24 20:36:10 +0200627fi
Kristian Høgsbergb2d71852011-02-14 22:13:33 -0500628
Egor Starkov7ce2e972015-09-25 18:00:27 +0300629AC_ARG_ENABLE(systemd_notify,
630 AS_HELP_STRING([--enable-systemd-notify],
631 [Enables systemd notifications to
632 notify systemd about weston state
Friedrich, Eugen (ADITG/SW1)265aeb32016-04-05 20:43:29 +0000633 and update watchdog.
634 Also sockets provided by systemd
635 in case of socket-base activation
636 are added to wayland display]),,
Egor Starkov7ce2e972015-09-25 18:00:27 +0300637 enable_systemd_notify=no)
638AM_CONDITIONAL(SYSTEMD_NOTIFY_SUPPORT, test x$enable_systemd_notify = xyes)
639if test "x$enable_systemd_notify" = "xyes"; then
640 AC_DEFINE([SYSTEMD_NOTIFY_SUPPORT], [1], [Build the systemd sd_notify support])
641 PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
642fi
643
Pekka Paalanenb5e3ea22016-06-03 17:12:10 +0300644AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc])
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800645
Giulio Camuffo9e445982016-06-02 21:48:15 +0300646# AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
647# libweston_abi_version here, and outside [] because of m4 quoting rules
Emil Velikov7fe47f32016-07-22 14:51:51 +0100648AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[.pc:libweston/libweston.pc.in])
Quentin Glidic248dd102016-08-12 10:41:34 +0200649AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[.pc:libweston-desktop/libweston-desktop.pc.in])
Giulio Camuffo9e445982016-06-02 21:48:15 +0300650
Kristian Høgsberg0aa19e92014-01-31 16:33:48 -0800651AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
652
Kristian Høgsberg4a8767b2008-12-10 13:44:23 -0500653AC_OUTPUT
Armin K0a8461b2013-08-14 03:13:53 +0200654
655AC_MSG_RESULT([
656 Native Backend ${WESTON_NATIVE_BACKEND}
657 setuid Install ${enable_setuid_install}
658
659 Cairo Renderer ${with_cairo}
660 EGL ${enable_egl}
661 libxkbcommon ${enable_xkbcommon}
Jonas Ådahlb8e62d92013-10-25 23:18:02 +0200662 xcb_xkb ${have_xcb_xkb}
Armin K0a8461b2013-08-14 03:13:53 +0200663 XWayland ${enable_xwayland}
David Herrmann59ab9002013-10-22 00:28:06 +0200664 dbus ${enable_dbus}
Armin K0a8461b2013-08-14 03:13:53 +0200665
Nobuhiko Tanibata6f9df652014-11-27 13:22:00 +0900666 ivi-shell ${enable_ivi_shell}
667
Armin K0a8461b2013-08-14 03:13:53 +0200668 Build wcap utility ${enable_wcap_tools}
Jason Ekstrand946a9482014-04-02 19:53:47 -0500669 Build Fullscreen Shell ${enable_fullscreen_shell}
Jon A. Cruz179c1862015-07-15 19:22:43 -0700670 Enable developer documentation ${enable_devdocs}
Armin K0a8461b2013-08-14 03:13:53 +0200671
672 weston-launch utility ${enable_weston_launch}
David Herrmanncc5b2ed2013-10-22 00:28:09 +0200673 systemd-login support ${have_systemd_login}
Egor Starkov7ce2e972015-09-25 18:00:27 +0300674 systemd notify support ${enable_systemd_notify}
Armin K0a8461b2013-08-14 03:13:53 +0200675
676 DRM Compositor ${enable_drm_compositor}
677 X11 Compositor ${enable_x11_compositor}
678 Wayland Compositor ${enable_wayland_compositor}
679 Headless Compositor ${enable_headless_compositor}
Armin K0a8461b2013-08-14 03:13:53 +0200680 FBDEV Compositor ${enable_fbdev_compositor}
681 RDP Compositor ${enable_rdp_compositor}
Jason Ekstrand47928d82014-04-02 19:54:01 -0500682 Screen Sharing ${enable_screen_sharing}
Jon A. Cruz646aef52015-07-15 19:22:41 -0700683 JUnit XML output ${enable_junit_xml}
Armin K0a8461b2013-08-14 03:13:53 +0200684
Armin K0a8461b2013-08-14 03:13:53 +0200685 Build Clients ${enable_clients}
686 Build EGL Clients ${have_cairo_egl}
687 Build Simple Clients ${enable_simple_clients}
688 Build Simple EGL Clients ${enable_simple_egl_clients}
689
Ricardo Vieira14613ba2014-01-02 15:31:14 -0800690 Install Demo Clients ${enable_demo_clients_install}
Armin K0a8461b2013-08-14 03:13:53 +0200691
692 Colord Support ${have_colord}
Armin K0a8461b2013-08-14 03:13:53 +0200693 LCMS2 Support ${have_lcms}
Emmanuel Gil Peyrot66e16142016-02-16 01:57:52 +0000694 libjpeg Support ${have_jpeglib}
Armin K0a8461b2013-08-14 03:13:53 +0200695 libwebp Support ${have_webp}
696 libunwind Support ${have_libunwind}
Ander Conselvan de Oliveira6aae4d32013-08-23 17:15:48 +0300697 VA H.264 encoding Support ${have_libva}
Armin K0a8461b2013-08-14 03:13:53 +0200698])