build: Move man/Makefile.am into toplevel Makefile.am
[platform/upstream/weston.git] / configure.ac
1 m4_define([weston_major_version], [1])
2 m4_define([weston_minor_version], [4])
3 m4_define([weston_micro_version], [0])
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 subdir-objects])
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
208   SAVED_CPPFLAGS="$CPPFLAGS"
209   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
210   AC_CHECK_HEADERS([freerdp/version.h])
211   CPPFLAGS="$SAVED_CPPFLAGS"
212 fi
213
214 AC_ARG_WITH(cairo,
215             AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
216                            [Which Cairo renderer to use for the clients]),
217                            [],[with_cairo="image"])
218
219 if test "x$with_cairo" = "ximage"; then
220         cairo_modules="cairo"
221 else
222 if test "x$with_cairo" = "xgl"; then
223         cairo_modules="cairo-gl"
224 else
225 if test "x$with_cairo" = "xglesv2"; then
226         cairo_modules="cairo-glesv2"
227 else
228         AC_ERROR([Unknown cairo renderer requested])
229 fi
230 fi
231 fi
232
233 # Included for legacy compat
234 AC_ARG_WITH(cairo-glesv2,
235             AS_HELP_STRING([--with-cairo-glesv2],
236                            [Use GLESv2 cairo]))
237 if test "x$with_cairo_glesv2" = "xyes"; then
238   cairo_modules="cairo-glesv2"
239   with_cairo="glesv2"
240 fi
241
242 if test "x$cairo_modules" = "xcairo-glesv2"; then
243 AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
244 fi
245
246 PKG_CHECK_MODULES(PIXMAN, [pixman-1])
247 PKG_CHECK_MODULES(PNG, [libpng])
248 PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
249 AS_IF([test "x$have_webp" = "xyes"],
250       [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
251
252 AC_ARG_ENABLE(vaapi-recorder, [  --enable-vaapi-recorder],,
253               enable_vaapi_recorder=auto)
254 if test x$enable_vaapi_recorder != xno; then
255   PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
256                     [have_libva=yes], [have_libva=no])
257   if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
258     AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
259   fi
260   AS_IF([test "x$have_libva" = "xyes"],
261         [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
262 fi
263 AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
264
265
266 AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
267 if test x$have_jpeglib = xyes; then
268   JPEG_LIBS="-ljpeg"
269 else
270   AC_ERROR([libjpeg not found])
271 fi
272 AC_SUBST(JPEG_LIBS)
273
274 PKG_CHECK_MODULES(CAIRO, [cairo])
275
276 PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client])
277
278 AC_ARG_ENABLE(simple-clients,
279               AS_HELP_STRING([--disable-simple-clients],
280                              [do not build the simple wl_shm clients]),,
281               enable_simple_clients=yes)
282 AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
283 if test x$enable_simple_clients = xyes; then
284   PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
285 fi
286
287 AC_ARG_ENABLE(simple-egl-clients,
288               AS_HELP_STRING([--disable-simple-egl-clients],
289                              [do not build the simple EGL clients]),,
290               enable_simple_egl_clients="$enable_egl")
291 AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
292 if test x$enable_simple_egl_clients = xyes; then
293   PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
294                     [egl >= 7.10 glesv2 wayland-client wayland-egl wayland-cursor])
295 fi
296
297 AC_ARG_ENABLE(clients, [  --enable-clients],, enable_clients=yes)
298 AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
299 if test x$enable_clients = xyes; then
300   AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
301
302   PKG_CHECK_MODULES(CLIENT, [wayland-client cairo >= 1.10.0 xkbcommon wayland-cursor])
303   PKG_CHECK_MODULES(SERVER, [wayland-server])
304   PKG_CHECK_MODULES(WESTON_INFO, [wayland-client])
305
306   # Only check for cairo-egl if a GL or GLES renderer requested
307   AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
308     PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules],
309                       [have_cairo_egl=yes], [have_cairo_egl=no])
310     AS_IF([test "x$have_cairo_egl" = "xyes"],
311           [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
312           [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
313   [have_cairo_egl=no])
314
315   PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
316 fi
317
318 AC_ARG_ENABLE(resize-optimization,
319               AS_HELP_STRING([--disable-resize-optimization],
320                              [disable resize optimization allocating a big buffer in toytoolkit]),,
321               enable_resize_optimization=yes)
322 AS_IF([test "x$enable_resize_optimization" = "xyes"],
323       [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
324
325 PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198],
326                   [have_systemd_login=yes], [have_systemd_login=no])
327 AS_IF([test "x$have_systemd_login" = "xyes"],
328       [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
329 AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
330
331 PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
332                   [have_systemd_login_209=yes], [have_systemd_login_209=no])
333 AS_IF([test "x$have_systemd_login_209" = "xyes"],
334       [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
335
336 AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
337 AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
338 if test x$enable_weston_launch == xyes; then
339   AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no])
340   if test x$have_pam == xno; then
341     AC_ERROR([weston-launch requires pam])
342   fi
343   PAM_LIBS=-lpam
344   AC_SUBST(PAM_LIBS)
345 fi
346
347 if test x$enable_egl = xyes; then
348   PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no])
349 fi
350 AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes")
351
352 AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
353
354 AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
355                [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
356
357 AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
358                test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
359
360 AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
361                [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
362
363 AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
364
365 # CMS modules
366 AC_ARG_ENABLE(colord,
367               AS_HELP_STRING([--disable-colord],
368                              [do not build colord CMS support]),,
369               enable_colord=auto)
370 if test "x$enable_colord" != "xno"; then
371         PKG_CHECK_MODULES(COLORD,
372                           colord >= 0.1.27,
373                           have_colord=yes,
374                           have_colord=no)
375         if test "x$have_colord" = "xno" -a "x$enable_colord" = "xyes"; then
376           AC_MSG_ERROR([colord support explicitly requested, but colord couldn't be found])
377         fi
378         if test "x$have_colord" = "xyes"; then
379              enable_colord=yes
380         fi
381 fi
382 AM_CONDITIONAL(ENABLE_COLORD, test "x$enable_colord" = "xyes")
383
384 # dbus support
385 AC_ARG_ENABLE(dbus,
386               AS_HELP_STRING([--disable-dbus],
387                              [do not build with dbus support]),,
388               enable_dbus=auto)
389 if test "x$enable_dbus" != "xno"; then
390         PKG_CHECK_MODULES(DBUS,
391                           dbus-1 >= 1.6,
392                           have_dbus=yes,
393                           have_dbus=no)
394         if test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"; then
395                 AC_MSG_ERROR([dbus support explicitly requested, but libdbus couldn't be found])
396         fi
397         if test "x$have_dbus" = "xyes"; then
398                 enable_dbus=yes
399                 AC_DEFINE([HAVE_DBUS], [1], [Build with dbus support])
400         else
401                 enable_dbus=no
402         fi
403 fi
404 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
405
406 AC_ARG_ENABLE(wcap-tools, [  --disable-wcap-tools],, enable_wcap_tools=yes)
407 AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
408 if test x$enable_wcap_tools = xyes; then
409   AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
410   PKG_CHECK_MODULES(WCAP, [cairo])
411   WCAP_LIBS="$WCAP_LIBS -lm"
412 fi
413
414 PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
415 AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
416
417 if test "x$GCC" = "xyes"; then
418         GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
419                 -Wno-missing-field-initializers -g -fvisibility=hidden \
420                 -Wstrict-prototypes -Wmissing-prototypes"
421 fi
422 AC_SUBST(GCC_CFLAGS)
423
424 AC_ARG_ENABLE(libunwind,
425               AS_HELP_STRING([--disable-libunwind],
426                              [Disable libunwind usage for backtraces]),,
427               enable_libunwind=auto)
428 AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
429 if test "x$enable_libunwind" != "xno"; then
430         PKG_CHECK_MODULES(LIBUNWIND,
431                           libunwind,
432                           have_libunwind=yes,
433                           have_libunwind=no)
434         if test "x$have_libunwind" = "xno" -a "x$enable_libunwind" = "xyes"; then
435           AC_MSG_ERROR([libunwind support explicitly requested, but libunwind couldn't be found])
436         fi
437         if test "x$have_libunwind" = "xyes"; then
438              enable_libunwind=yes
439              AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
440         fi
441 fi
442
443
444 if test "x$WESTON_NATIVE_BACKEND" = "x"; then
445         WESTON_NATIVE_BACKEND="drm-backend.so"
446 fi
447 AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
448 AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
449                    [The default backend to load, if not wayland nor x11.])
450
451 if test "x$WESTON_SHELL_CLIENT" = "x"; then
452         WESTON_SHELL_CLIENT="weston-desktop-shell"
453 fi
454 AC_MSG_NOTICE([Weston's default desktop shell client: $WESTON_SHELL_CLIENT])
455 AC_DEFINE_UNQUOTED([WESTON_SHELL_CLIENT], ["$WESTON_SHELL_CLIENT"],
456                    [The default desktop shell client to load.])
457
458 AC_ARG_ENABLE(demo-clients-install,
459               AS_HELP_STRING([--enable-demo-clients-install],
460                              [Install demo clients built with weston]),,
461                              enable_demo_clients_install=no)
462 AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
463
464 PKG_CHECK_MODULES(LCMS, lcms2,
465                   [have_lcms=yes], [have_lcms=no])
466 if test "x$have_lcms" = xyes; then
467        AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
468 fi
469 AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
470
471 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
472 if test x$wayland_scanner = x; then
473         AC_MSG_ERROR([wayland-scanner is needed to compile weston])
474 fi
475
476 PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
477 AC_PATH_PROG(XMLLINT, xmllint)
478 AC_ARG_WITH([dtddir],
479             AS_HELP_STRING([--with-dtddir],
480                            [Directory containing the Wayland
481                             protocol DTD @<:@default=from pkgconfig@:>@]),
482             [dtddir="$withval"],
483             [dtddir=$($PKG_CONFIG --variable=pkgdatadir wayland-scanner)])
484 AC_SUBST([dtddir])
485 AM_CONDITIONAL([HAVE_XMLLINT], [test "x$XMLLINT" != "x" -a "x$dtddir" != "x"])
486
487 AC_CONFIG_FILES([Makefile
488                  shared/Makefile
489                  src/Makefile
490                  src/version.h
491                  src/weston.pc
492                  clients/Makefile
493                  tests/Makefile])
494 AC_OUTPUT
495
496 AC_MSG_RESULT([
497         Native Backend                  ${WESTON_NATIVE_BACKEND}
498         setuid Install                  ${enable_setuid_install}
499
500         Cairo Renderer                  ${with_cairo}
501         EGL                             ${enable_egl}
502         libxkbcommon                    ${enable_xkbcommon}
503         xcb_xkb                         ${have_xcb_xkb}
504         XWayland                        ${enable_xwayland}
505         dbus                            ${enable_dbus}
506
507         Build wcap utility              ${enable_wcap_tools}
508
509         weston-launch utility           ${enable_weston_launch}
510         systemd-login support           ${have_systemd_login}
511
512         DRM Compositor                  ${enable_drm_compositor}
513         X11 Compositor                  ${enable_x11_compositor}
514         Wayland Compositor              ${enable_wayland_compositor}
515         Headless Compositor             ${enable_headless_compositor}
516         RPI Compositor                  ${enable_rpi_compositor}
517         FBDEV Compositor                ${enable_fbdev_compositor}
518         RDP Compositor                  ${enable_rdp_compositor}
519
520         Raspberry Pi BCM headers        ${have_bcm_host}
521
522         Build Clients                   ${enable_clients}
523         Build EGL Clients               ${have_cairo_egl}
524         Build Simple Clients            ${enable_simple_clients}
525         Build Simple EGL Clients        ${enable_simple_egl_clients}
526
527         Install Demo Clients            ${enable_demo_clients_install}
528
529         Colord Support                  ${have_colord}
530         GLU Support                     ${have_glu}
531         LCMS2 Support                   ${have_lcms}
532         libwebp Support                 ${have_webp}
533         libunwind Support               ${have_libunwind}
534         VA H.264 encoding Support       ${have_libva}
535 ])