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