compositor: send the output_created signal after inserting it in the list
[platform/upstream/weston.git] / configure.ac
1 m4_define([weston_major_version], [1])
2 m4_define([weston_minor_version], [7])
3 m4_define([weston_micro_version], [91])
4 m4_define([weston_version],
5           [weston_major_version.weston_minor_version.weston_micro_version])
6
7 AC_PREREQ([2.64])
8 AC_INIT([weston],
9         [weston_version],
10         [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=weston_version],
11         [weston],
12         [http://wayland.freedesktop.org])
13
14 AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
15 AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
16 AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
17 AC_SUBST([WESTON_VERSION], [weston_version])
18
19 AC_CONFIG_AUX_DIR([build-aux])
20 AC_CONFIG_HEADERS([config.h])
21 AC_CONFIG_MACRO_DIR([m4])
22
23 AC_USE_SYSTEM_EXTENSIONS
24 AC_SYS_LARGEFILE
25
26 AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
27
28 AM_SILENT_RULES([yes])
29
30 # Check for programs
31 AC_PROG_CC
32 AC_PROG_SED
33
34 # Initialize libtool
35 LT_PREREQ([2.2])
36 LT_INIT([disable-static])
37
38 AC_ARG_VAR([WESTON_NATIVE_BACKEND],
39            [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
40 AC_ARG_VAR([WESTON_SHELL_CLIENT],
41            [Set the default desktop shell client to load if none is specified in weston.ini. @<:@default=weston-desktop-shell@:>@])
42
43 PKG_PROG_PKG_CONFIG()
44
45 AC_CHECK_FUNC([dlopen], [],
46               AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
47 AC_SUBST(DLOPEN_LIBS)
48
49 AC_CHECK_DECL(SFD_CLOEXEC,[],
50               [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],
51               [[#include <sys/signalfd.h>]])
52 AC_CHECK_DECL(TFD_CLOEXEC,[],
53               [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
54               [[#include <sys/timerfd.h>]])
55 AC_CHECK_DECL(CLOCK_MONOTONIC,[],
56               [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
57               [[#include <time.h>]])
58 AC_CHECK_HEADERS([execinfo.h])
59
60 AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
61
62 COMPOSITOR_MODULES="wayland-server >= 1.7.91 pixman-1 >= 0.25.2"
63
64 AC_ARG_ENABLE(egl, [  --disable-egl],,
65               enable_egl=yes)
66 AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
67 if test x$enable_egl = xyes; then
68         AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
69         PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2])
70         PKG_CHECK_MODULES([EGL_TESTS], [egl >= 7.10 glesv2 wayland-client wayland-egl])
71 fi
72
73 AC_ARG_ENABLE(xkbcommon,
74               AS_HELP_STRING([--disable-xkbcommon], [Disable libxkbcommon
75                               support: This is only useful in environments
76                               where you do not have a hardware keyboard. If
77                               libxkbcommon support is disabled clients will not
78                               be sent a keymap and and must know how to
79                               interpret the keycode sent for any key event.]),,
80               enable_xkbcommon=yes)
81 if test x$enable_xkbcommon = xyes; then
82         AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
83         COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
84 fi
85
86 AC_ARG_ENABLE(setuid-install, [  --enable-setuid-install],,
87               enable_setuid_install=yes)
88 AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
89
90
91 AC_ARG_ENABLE(xwayland, [  --enable-xwayland],,
92               enable_xwayland=yes)
93 AC_ARG_ENABLE(xwayland-test, [  --enable-xwayland-test],,
94               enable_xwayland_test=yes)
95 AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
96 AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
97 if test x$enable_xwayland = xyes; then
98   PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb)
99   AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
100
101   AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH],
102               [Path to X server]), [XSERVER_PATH="$withval"],
103               [XSERVER_PATH="/usr/bin/Xwayland"])
104   AC_SUBST([XSERVER_PATH])
105   if test x$enable_xwayland_test = xyes; then
106     PKG_CHECK_MODULES([XWAYLAND_TEST], x11)
107   fi
108 fi
109
110 PKG_CHECK_MODULES(LIBDRM, [libdrm],
111                   [AC_DEFINE(HAVE_LIBDRM, 1, [Define if libdrm is available]) have_libdrm=yes], have_libdrm=no)
112
113 AC_ARG_ENABLE(x11-compositor, [  --enable-x11-compositor],,
114               enable_x11_compositor=yes)
115 AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes)
116 if test x$enable_x11_compositor = xyes; then
117   PKG_CHECK_MODULES([XCB], xcb)
118   xcb_save_LIBS=$LIBS
119   xcb_save_CFLAGS=$CFLAGS
120   CFLAGS=$XCB_CFLAGS
121   LIBS=$XCB_LIBS
122   AC_CHECK_FUNCS([xcb_poll_for_queued_event])
123   LIBS=$xcb_save_LIBS
124   CFLAGS=$xcb_save_CFLAGS
125
126   X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm"
127
128   PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
129                     [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
130   if test "x$have_xcb_xkb" = xyes; then
131         # Most versions of XCB have totally broken XKB bindings, where the
132         # events don't work.  Make sure we can actually use them.
133         xcb_xkb_save_CFLAGS=$CFLAGS
134         CFLAGS=$X11_COMPOSITOR_XKB_CFLAGS
135         AC_CHECK_MEMBER([struct xcb_xkb_state_notify_event_t.xkbType],
136                         [], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]])
137         CFLAGS=$xcb_xkb_save_CFLAGS
138   fi
139   if test "x$have_xcb_xkb" = xyes; then
140         X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb"
141         AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol])
142   fi
143
144   PKG_CHECK_MODULES(X11_COMPOSITOR, [$X11_COMPOSITOR_MODULES])
145   AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor])
146 fi
147
148
149 AC_ARG_ENABLE(drm-compositor, [  --enable-drm-compositor],,
150               enable_drm_compositor=yes)
151 AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
152 if test x$enable_drm_compositor = xyes; then
153   AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
154   PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
155 fi
156
157
158 PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
159 PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
160
161 AC_ARG_ENABLE(wayland-compositor, [  --enable-wayland-compositor],,
162               enable_wayland_compositor=yes)
163 AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
164                test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes)
165 if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
166   AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
167             [Build the Wayland (nested) compositor])
168   PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= 1.5.91 wayland-egl wayland-cursor])
169 fi
170
171
172 AC_ARG_ENABLE(headless-compositor, [  --enable-headless-compositor],,
173               enable_headless_compositor=yes)
174 AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR,
175                test x$enable_headless_compositor = xyes)
176 if test x$enable_headless_compositor = xyes; then
177   AC_DEFINE([BUILD_HEADLESS_COMPOSITOR], [1], [Build the headless compositor])
178 fi
179
180
181 AC_ARG_ENABLE(rpi-compositor,
182               AS_HELP_STRING([--disable-rpi-compositor],
183                              [do not build the Raspberry Pi backend]),,
184               enable_rpi_compositor=yes)
185 AM_CONDITIONAL(ENABLE_RPI_COMPOSITOR, test "x$enable_rpi_compositor" = "xyes")
186 have_bcm_host="no"
187 if test "x$enable_rpi_compositor" = "xyes"; then
188   AC_DEFINE([BUILD_RPI_COMPOSITOR], [1], [Build the compositor for Raspberry Pi])
189   PKG_CHECK_MODULES(RPI_COMPOSITOR, [libudev >= 136 mtdev >= 1.1.0])
190   PKG_CHECK_MODULES(RPI_BCM_HOST, [bcm_host],
191                     [have_bcm_host="yes"
192                      AC_DEFINE([HAVE_BCM_HOST], [1], [have Raspberry Pi BCM headers])],
193                     [AC_MSG_WARN([Raspberry Pi BCM host libraries not found, will use stubs instead.])])
194 fi
195 AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes")
196
197
198 AC_ARG_ENABLE([fbdev-compositor], [  --enable-fbdev-compositor],,
199               enable_fbdev_compositor=yes)
200 AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
201                [test x$enable_fbdev_compositor = xyes])
202 AS_IF([test x$enable_fbdev_compositor = xyes], [
203   AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
204   PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
205 ])
206
207 AC_ARG_ENABLE([rdp-compositor], [  --enable-rdp-compositor],,
208               enable_rdp_compositor=no)
209 AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
210                [test x$enable_rdp_compositor = xyes])
211 if test x$enable_rdp_compositor = xyes; then
212   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
213   PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
214
215   SAVED_CPPFLAGS="$CPPFLAGS"
216   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
217   AC_CHECK_HEADERS([freerdp/version.h])
218   CPPFLAGS="$SAVED_CPPFLAGS"
219 fi
220
221 AC_ARG_ENABLE([screen-sharing], [  --enable-screen-sharing],,
222               enable_screen_sharing=no)
223 AM_CONDITIONAL([ENABLE_SCREEN_SHARING],
224                [test x$enable_screen_sharing = xyes])
225 if test x$enable_screen_sharing = xyes; then
226   PKG_CHECK_MODULES(SCREEN_SHARE, [wayland-client])
227
228   if test x$enable_rdp_compositor != xyes; then
229     AC_MSG_WARN([The screen-share.so module requires the RDP backend.])
230   fi
231 fi
232
233 AC_ARG_WITH(cairo,
234             AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
235                            [Which Cairo renderer to use for the clients]),
236                            [],[with_cairo="image"])
237
238 if test "x$with_cairo" = "ximage"; then
239         cairo_modules="cairo"
240 else
241 if test "x$with_cairo" = "xgl"; then
242         cairo_modules="cairo-gl"
243 else
244 if test "x$with_cairo" = "xglesv2"; then
245         cairo_modules="cairo-glesv2"
246 else
247         AC_ERROR([Unknown cairo renderer requested])
248 fi
249 fi
250 fi
251
252 # Included for legacy compat
253 AC_ARG_WITH(cairo-glesv2,
254             AS_HELP_STRING([--with-cairo-glesv2],
255                            [Use GLESv2 cairo]))
256 if test "x$with_cairo_glesv2" = "xyes"; then
257   cairo_modules="cairo-glesv2"
258   with_cairo="glesv2"
259 fi
260
261 if test "x$cairo_modules" = "xcairo-glesv2"; then
262 AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
263 fi
264
265 PKG_CHECK_MODULES(PIXMAN, [pixman-1])
266 PKG_CHECK_MODULES(PNG, [libpng])
267 PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
268 AS_IF([test "x$have_webp" = "xyes"],
269       [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
270
271 AC_ARG_ENABLE(vaapi-recorder, [  --enable-vaapi-recorder],,
272               enable_vaapi_recorder=auto)
273 if test x$enable_vaapi_recorder != xno; then
274   PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
275                     [have_libva=yes], [have_libva=no])
276   if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
277     AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
278   fi
279   AS_IF([test "x$have_libva" = "xyes"],
280         [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
281 fi
282 AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
283
284
285 AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
286 if test x$have_jpeglib = xyes; then
287   JPEG_LIBS="-ljpeg"
288 else
289   AC_ERROR([libjpeg not found])
290 fi
291 AC_SUBST(JPEG_LIBS)
292
293 PKG_CHECK_MODULES(CAIRO, [cairo])
294
295 PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.7.91])
296
297 AC_ARG_ENABLE(simple-clients,
298               AS_HELP_STRING([--disable-simple-clients],
299                              [do not build the simple wl_shm clients]),,
300               enable_simple_clients=yes)
301 AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
302 if test x$enable_simple_clients = xyes; then
303   PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
304 fi
305
306 AC_ARG_ENABLE(simple-egl-clients,
307               AS_HELP_STRING([--disable-simple-egl-clients],
308                              [do not build the simple EGL clients]),,
309               enable_simple_egl_clients="$enable_egl")
310 AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
311 if test x$enable_simple_egl_clients = xyes; then
312   PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
313                     [egl >= 7.10 glesv2 wayland-client wayland-egl wayland-cursor])
314 fi
315
316 AC_ARG_ENABLE(clients, [  --enable-clients],, enable_clients=yes)
317 AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
318 if test x$enable_clients = xyes; then
319   AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
320
321   PKG_CHECK_MODULES(CLIENT, [wayland-client >= 1.5.91 cairo >= 1.10.0 xkbcommon wayland-cursor])
322   PKG_CHECK_MODULES(SERVER, [wayland-server])
323   PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= 1.5.91])
324
325   # Only check for cairo-egl if a GL or GLES renderer requested
326   AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
327     PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules],
328                       [have_cairo_egl=yes], [have_cairo_egl=no])
329     AS_IF([test "x$have_cairo_egl" = "xyes"],
330           [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
331           [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
332   [have_cairo_egl=no])
333
334   PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
335 fi
336
337 AC_ARG_ENABLE(resize-optimization,
338               AS_HELP_STRING([--disable-resize-optimization],
339                              [disable resize optimization allocating a big buffer in toytoolkit]),,
340               enable_resize_optimization=yes)
341 AS_IF([test "x$enable_resize_optimization" = "xyes"],
342       [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
343
344 PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198],
345                   [have_systemd_login=yes], [have_systemd_login=no])
346 AS_IF([test "x$have_systemd_login" = "xyes"],
347       [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
348 AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
349
350 PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
351                   [have_systemd_login_209=yes], [have_systemd_login_209=no])
352 AS_IF([test "x$have_systemd_login_209" = "xyes"],
353       [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
354
355 AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
356 AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
357 if test x$enable_weston_launch == xyes; then
358   AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no])
359   if test x$have_pam == xno; then
360     AC_ERROR([weston-launch requires pam])
361   fi
362   PAM_LIBS=-lpam
363   AC_SUBST(PAM_LIBS)
364 fi
365
366 if test x$enable_egl = xyes; then
367   PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no])
368 fi
369 AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes")
370
371 AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
372
373 AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
374                [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
375
376 AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
377                test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
378
379 AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
380                [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
381
382 AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
383
384 AC_ARG_ENABLE(fullscreen-shell,
385               AS_HELP_STRING([--disable-fullscreen-shell],
386                              [do not build fullscreen-shell server plugin]),,
387               enable_fullscreen_shell=yes)
388 AM_CONDITIONAL(ENABLE_FULLSCREEN_SHELL,
389                test "x$enable_fullscreen_shell" = "xyes")
390
391 # CMS modules
392 AC_ARG_ENABLE(colord,
393               AS_HELP_STRING([--disable-colord],
394                              [do not build colord CMS support]),,
395               enable_colord=auto)
396 if test "x$enable_colord" != "xno"; then
397         PKG_CHECK_MODULES(COLORD,
398                           colord >= 0.1.27,
399                           have_colord=yes,
400                           have_colord=no)
401         if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
402           AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
403         fi
404         if test "x$have_colord" = "xyes"; then
405              enable_colord=yes
406         fi
407 fi
408 AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
409
410 # dbus support
411 AC_ARG_ENABLE(dbus,
412               AS_HELP_STRING([--disable-dbus],
413                              [do not build with dbus support]),,
414               enable_dbus=auto)
415 if test "x$enable_dbus" != "xno"; then
416         PKG_CHECK_MODULES(DBUS,
417                           dbus-1 >= 1.6,
418                           have_dbus=yes,
419                           have_dbus=no)
420         if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
421                 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
422         fi
423         if test "x$have_dbus" = "xyes"; then
424                 enable_dbus=yes
425                 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
426         else
427                 enable_dbus=no
428         fi
429 fi
430 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
431
432 # ivi-shell support
433 AC_ARG_ENABLE(ivi-shell,
434               AS_HELP_STRING([--disable-ivi-shell],
435                              [do not build ivi-shell server plugin and client]),,
436               enable_ivi_shell=yes)
437 AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
438
439 AC_ARG_ENABLE(wcap-tools, [  --disable-wcap-tools],, enable_wcap_tools=yes)
440 AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
441 if test x$enable_wcap_tools = xyes; then
442   AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
443   PKG_CHECK_MODULES(WCAP, [cairo])
444   WCAP_LIBS="$WCAP_LIBS -lm"
445 fi
446
447 PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
448 AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
449
450 if test "x$GCC" = "xyes"; then
451         GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
452                 -Wno-missing-field-initializers -g -fvisibility=hidden \
453                 -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
454 fi
455 AC_SUBST(GCC_CFLAGS)
456
457 AC_ARG_ENABLE(libunwind,
458               AS_HELP_STRING([--disable-libunwind],
459                              [Disable libunwind usage for backtraces]),,
460               enable_libunwind=auto)
461 AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
462 if test "x$enable_libunwind" != "xno"; then
463         PKG_CHECK_MODULES(LIBUNWIND,
464                           libunwind,
465                           have_libunwind=yes,
466                           have_libunwind=no)
467         if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
468           AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
469         fi
470         if test "x$have_libunwind" = "xyes"; then
471              enable_libunwind=yes
472              AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
473         fi
474 fi
475
476
477 if test "x$WESTON_NATIVE_BACKEND" = "x"; then
478         WESTON_NATIVE_BACKEND="drm-backend.so"
479 fi
480 AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
481 AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
482                    [The default backend to load, if not wayland nor x11.])
483
484 if test "x$WESTON_SHELL_CLIENT" = "x"; then
485         WESTON_SHELL_CLIENT="weston-desktop-shell"
486 fi
487 AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
488 AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
489                    [The default desktop shell client to load.])
490
491 AC_ARG_ENABLE(demo-clients-install,
492               AS_HELP_STRING([--enable-demo-clients-install],
493                              [Install demo clients built with weston]),,
494                              enable_demo_clients_install=no)
495 AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
496
497 PKG_CHECK_MODULES(LCMS, lcms2,
498                   [have_lcms=yes], [have_lcms=no])
499 if test "x$have_lcms" = xyes; then
500        AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
501 fi
502 AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
503
504 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
505 if test x$wayland_scanner = x; then
506         PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
507         wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
508 fi
509
510 AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
511
512 AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
513
514 AC_OUTPUT
515
516 AC_MSG_RESULT([
517         Native Backend                  ${WESTON_NATIVE_BACKEND}
518         setuid Install                  ${enable_setuid_install}
519
520         Cairo Renderer                  ${with_cairo}
521         EGL                             ${enable_egl}
522         libxkbcommon                    ${enable_xkbcommon}
523         xcb_xkb                         ${have_xcb_xkb}
524         XWayland                        ${enable_xwayland}
525         dbus                            ${enable_dbus}
526
527         ivi-shell                       ${enable_ivi_shell}
528
529         Build wcap utility              ${enable_wcap_tools}
530         Build Fullscreen Shell          ${enable_fullscreen_shell}
531
532         weston-launch utility           ${enable_weston_launch}
533         systemd-login support           ${have_systemd_login}
534
535         DRM Compositor                  ${enable_drm_compositor}
536         X11 Compositor                  ${enable_x11_compositor}
537         Wayland Compositor              ${enable_wayland_compositor}
538         Headless Compositor             ${enable_headless_compositor}
539         RPI Compositor                  ${enable_rpi_compositor}
540         FBDEV Compositor                ${enable_fbdev_compositor}
541         RDP Compositor                  ${enable_rdp_compositor}
542         Screen Sharing                  ${enable_screen_sharing}
543
544         Raspberry Pi BCM headers        ${have_bcm_host}
545
546         Build Clients                   ${enable_clients}
547         Build EGL Clients               ${have_cairo_egl}
548         Build Simple Clients            ${enable_simple_clients}
549         Build Simple EGL Clients        ${enable_simple_egl_clients}
550
551         Install Demo Clients            ${enable_demo_clients_install}
552
553         Colord Support                  ${have_colord}
554         GLU Support                     ${have_glu}
555         LCMS2 Support                   ${have_lcms}
556         libwebp Support                 ${have_webp}
557         libunwind Support               ${have_libunwind}
558         VA H.264 encoding Support       ${have_libva}
559 ])