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