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