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