wayland: Pull gdk-pixbuf in a private dependency
[profile/ivi/clutter.git] / configure.ac
1 # clutter package version number, (as distinct from shared library version)
2 # An odd micro number indicates in-progress development from Git
3 # An even micro number indicates a released version
4 #
5 # Making a point release:
6 # - increase clutter_micro_version to the next even number
7 # - increase clutter_interface_age to the next even number
8 # After the release:
9 # - increase clutter_micro_version to the next odd number
10 # - increase clutter_interface_version to the next odd number
11 m4_define([clutter_major_version], [1])
12 m4_define([clutter_minor_version], [9])
13 m4_define([clutter_micro_version], [3])
14
15 # • for stable releases: increase the interface age by 1 for each release;
16 #   if the API changes, set to 0. interface_age and binary_age are used to
17 #   create the soname of the shared object:
18 #
19 #  (<minor> * 100 + <micro>) - <interface_age>
20 #
21 # this allows using the same soname for different micro-releases in case
22 # no API was added or deprecated. for instance:
23 #
24 #   clutter 1.2.0  -> 100 * 2 + 0  = 200, interface age = 0 -> 200
25 #   clutter 1.2.2  -> 100 * 2 + 2  = 202, interface age = 2 -> 200
26 #   clutter 1.2.4  -> 100 * 2 + 4  = 204, interface age = 4 -> 200
27 #   [ API addition, deprecation ]
28 #   clutter 1.2.6  -> 100 * 2 + 6  = 206, interface age = 0 -> 206
29 #   clutter 1.2.8  -> 100 * 2 + 8  = 208, interface age = 2 -> 206
30 #   clutter 1.2.10 -> 100 * 2 + 10 = 210, interface age = 4 -> 206
31 #   ...
32 #
33 # • for development releases: keep clutter_interface_age to 0
34 m4_define([clutter_interface_age], [0])
35
36 m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
37
38 m4_define([clutter_release_status],
39           [m4_if(m4_eval(clutter_micro_version % 2), [1], [git],
40                  [m4_if(m4_eval(clutter_minor_version % 2), [1], [snapshot],
41                                                                  [release])])])
42
43 m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version])
44
45 # change this only when breaking the API
46 m4_define([clutter_api_version], [1.0])
47
48 AC_PREREQ([2.63])
49
50 AC_INIT([clutter],
51         [clutter_version],
52         [http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
53         [clutter],
54         [http://www.clutter-project.org])
55
56 AC_CONFIG_SRCDIR([clutter/clutter.h])
57 AC_CONFIG_HEADERS([config.h])
58 AC_CONFIG_AUX_DIR([build])
59 AC_CONFIG_MACRO_DIR([build/autotools])
60
61 AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
62 AM_SILENT_RULES([yes])
63
64 AC_SUBST([CLUTTER_MAJOR_VERSION],  [clutter_major_version])
65 AC_SUBST([CLUTTER_MINOR_VERSION],  [clutter_minor_version])
66 AC_SUBST([CLUTTER_MICRO_VERSION],  [clutter_micro_version])
67 AC_SUBST([CLUTTER_VERSION],        [clutter_version])
68 AC_SUBST([CLUTTER_API_VERSION],    [clutter_api_version])
69 AC_SUBST([CLUTTER_API_VERSION_AM], [$CLUTTER_MAJOR_VERSION\_0])
70 AC_SUBST([CLUTTER_RELEASE_STATUS], [clutter_release_status])
71
72 m4_define([lt_current],  [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
73 m4_define([lt_revision], [clutter_interface_age])
74 m4_define([lt_age],      [m4_eval(clutter_binary_age - clutter_interface_age)])
75 CLUTTER_LT_CURRENT=lt_current
76 CLUTTER_LT_REV=lt_revision
77 CLUTTER_LT_AGE=lt_age
78 CLUTTER_LT_VERSION="$CLUTTER_LT_CURRENT:$CLUTTER_LT_REV:$CLUTTER_LT_AGE"
79 CLUTTER_LT_LDFLAGS="-version-info $CLUTTER_LT_VERSION"
80 AC_SUBST([CLUTTER_LT_CURRENT],  [lt_current])
81 AC_SUBST([CLUTTER_LT_REVISION], [lt_revision])
82 AC_SUBST([CLUTTER_LT_VERSION],  [$CLUTTER_LT_VERSION])
83
84 AC_PROG_SED
85
86 dnl = Preliminary platform checks =============================================
87
88 AC_CANONICAL_HOST
89
90 platform_win32=no
91 platform_quartz=no
92 platform_linux=no
93
94 AC_MSG_CHECKING([if building for some Win32 platform])
95 AS_CASE([$host],
96         [*-*-mingw*|*-*-cygwin*],
97         [
98           CLUTTER_LT_LDFLAGS="$CLUTTER_LT_LDFLAGS -no-undefined"
99           platform_win32=yes
100         ],
101
102         []
103 )
104 AC_MSG_RESULT([$platform_win32])
105
106 AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
107
108 AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
109 AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
110
111 AC_CHECK_HEADER([GL/glx.h], [platform_glx=yes], [platform_glx=no])
112 AC_CHECK_LIB([GL], [glXCreateContext], [platform_glx=yes], [platform_glx=no])
113 AM_CONDITIONAL(OS_GLX, [test "$platform_glx" = "yes"])
114
115 AC_SUBST(CLUTTER_LT_LDFLAGS)
116
117 AC_CACHE_SAVE
118
119 dnl = Dependencies =========================================================
120
121 # Checks for programs.
122 AM_PROG_CC_C_O
123
124 # require libtool >= 2.2
125 LT_PREREQ([2.2.6])
126 LT_INIT([disable-static])
127
128 # Checks for header files.
129 AC_HEADER_STDC
130
131 # required versions for dependencies
132 m4_define([glib_req_version],           [2.31.0])
133 m4_define([cogl_req_version],           [1.9.1])
134 m4_define([json_glib_req_version],      [0.12.0])
135 m4_define([atk_req_version],            [2.1.5])
136 m4_define([cairo_req_version],          [1.10])
137 m4_define([pango_req_version],          [1.20])
138 m4_define([gi_req_version],             [0.9.5])
139 m4_define([uprof_req_version],          [0.3])
140 m4_define([gtk_doc_req_version],        [1.15])
141 m4_define([xfixes_req_version],         [3])
142 m4_define([xcomposite_req_version],     [0.4])
143 m4_define([gdk_req_version],            [3.0.0])
144
145 AC_SUBST([GLIB_REQ_VERSION],       [glib_req_version])
146 AC_SUBST([COGL_REQ_VERSION],       [cogl_req_version])
147 AC_SUBST([JSON_GLIB_REQ_VERSION],  [json_glib_req_version])
148 AC_SUBST([ATK_REQ_VERSION],        [atk_req_version])
149 AC_SUBST([CAIRO_REQ_VERSION],      [cairo_req_version])
150 AC_SUBST([PANGO_REQ_VERSION],      [pango_req_version])
151 AC_SUBST([GI_REQ_VERSION],         [gi_req_version])
152 AC_SUBST([UPROF_REQ_VERSION],      [uprof_req_version])
153 AC_SUBST([GTK_DOC_REQ_VERSION],    [gtk_doc_req_version])
154 AC_SUBST([XFIXES_REQ_VERSION],     [xfixes_req_version])
155 AC_SUBST([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
156 AC_SUBST([GDK_REQ_VERSION],        [gdk_req_version])
157
158 # Checks for typedefs, structures, and compiler characteristics.
159 AM_PATH_GLIB_2_0([glib_req_version],
160                  [],
161                  [AC_MSG_ERROR([glib-2.0 is required])],
162                  [gobject gthread gmodule-no-export])
163
164 # Check for -Bsymbolic-functions to avoid intra-library PLT jumps
165 AC_ARG_ENABLE([Bsymbolic],
166               [AS_HELP_STRING([--disable-Bsymbolic],
167                               [Avoid linking with -Bsymbolic])],
168               [],
169               [
170                 saved_LDFLAGS="${LDFLAGS}"
171                 AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
172                 LDFLAGS=-Wl,-Bsymbolic-functions
173                 AC_TRY_LINK([], [int main (void) { return 0; }],
174                             [
175                               AC_MSG_RESULT([yes])
176                               enable_Bsymbolic=yes
177                             ],
178                             [
179                               AC_MSG_RESULT([no])
180                               enable_Bsymbolic=no
181                             ])
182                 LDFLAGS="${saved_LDFLAGS}"
183               ])
184
185 AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
186 AC_SUBST(CLUTTER_LINK_FLAGS)
187
188 AC_CACHE_SAVE
189
190 dnl ========================================================================
191
192 FLAVOUR_LIBS=""
193 FLAVOUR_CFLAGS=""
194 CLUTTER_BACKENDS=""
195 CLUTTER_INPUT_BACKENDS=""
196 CLUTTER_CONFIG_DEFINES=
197
198 experimental_backend=no
199 experimental_input_backend=no
200
201 # base dependencies for core
202 CLUTTER_BASE_PC_FILES="cogl-1.0 >= $COGL_REQ_VERSION cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION cogl-pango-1.0 json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
203
204 # backend specific pkg-config files
205 BACKEND_PC_FILES=""
206
207 dnl === Clutter windowing system backend ======================================
208
209 AC_ARG_ENABLE([x11-backend],
210               [AS_HELP_STRING([--enable-x11-backend=@<:@yes/no@:>@], [Enable the X11 backend (default=check)])],
211               [enable_x11=$enableval],
212               [enable_x11=check])
213 AC_ARG_ENABLE([win32-backend],
214               [AS_HELP_STRING([--enable-win32-backend=@<:@yes/no@:>@], [Enable the Windows backend (default=check)])],
215               [enable_win32=$enableval],
216               [enable_win32=check])
217 AC_ARG_ENABLE([quartz-backend],
218               [AS_HELP_STRING([--enable-quartz-backend=@<:@yes/no@:>@], [Enable the OS X backend (default=check)])],
219               [enable_osx=$enableval],
220               [enable_osx=check])
221 AC_ARG_ENABLE([gdk-backend],
222               [AS_HELP_STRING([--enable-gdk-backend=@<:@yes/no@:>@], [Enable the GDK backend (default=check)])],
223               [enable_gdk=$enableval],
224               [enable_gdk=check])
225 AC_ARG_ENABLE([wayland-backend],
226               [AS_HELP_STRING([--enable-wayland-backend=@<:@yes/no@:>@], [Enable the Wayland client backend (default=no)])],
227               [enable_wayland=$enableval],
228               [enable_wayland=no])
229 AC_ARG_ENABLE([egl-backend],
230               [AS_HELP_STRING([--enable-egl-backend=@<:@yes/no@:>@], [Enable the EGL framebuffer backend (default=no)])],
231               [enable_egl=$enableval],
232               [enable_egl=no])
233 AC_ARG_ENABLE([cex100-backend],
234               [AS_HELP_STRING([--enable-cex100-backend=@<:@yes/no@:>@], [Enable the CEx100 backend (default=no)])],
235               [enable_cex100=$enableval],
236               [enable_cex100=no])
237
238 dnl Define default values
239 AS_IF([test "x$enable_x11" = "xcheck"],
240       [
241         AS_IF([test "x$platform_glx" = "xyes"], [enable_x11=yes], [enable_x11=no])
242       ])
243
244 AS_IF([test "x$enable_win32" = "xcheck"],
245       [
246         AS_IF([test "x$platform_win32" = "xyes"], [enable_win32=yes], [enable_win32=no])
247       ])
248
249 AS_IF([test "x$enable_osx" = "xcheck"],
250       [
251         AS_IF([test "x$platform_quartz" = "xyes"], [enable_osx=yes], [enable_osx=no])
252       ])
253
254 AS_IF([test "x$enable_gdk" = "xcheck"],
255       [
256         PKG_CHECK_EXISTS([gdk-3.0 >= gdk_req_version], [enable_gdk=yes], [enable_gdk=no])
257       ])
258
259 dnl Per-backend rules
260 AS_IF([test "x$enable_x11" = "xyes"],
261       [
262         CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11"
263         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS x11"
264
265         SUPPORT_X11=1
266         SUPPORT_GLX=1
267         SUPPORT_COGL=1
268
269         # Mesa 7.3 added a GL pkg-config file, finally, but if a pkg-config
270         # file isn't found just add -lGL and hope for the best.
271         PKG_CHECK_EXISTS([gl],
272                          [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"],
273                          [FLAVOUR_LIBS="$FLAVOUR_LIBS -lGL"])
274
275         # We might fall back to DRM for sync-to-vblank on GLX
276         PKG_CHECK_EXISTS([libdrm],
277                          [
278                            AC_DEFINE([HAVE_DRM], [1], [Have libdrm support])
279                            BACKEND_PC_FILES="$BACKEND_PC_FILES libdrm"
280                          ],
281                          [])
282
283         # we use fontconfig API and pango-fc when the fontconfig
284         # configuration changes
285         PKG_CHECK_EXISTS([pangoft2],
286                          [
287                            AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
288                            BACKEND_PC_FILES="$BACKEND_PC_FILES pangoft2"
289                          ],
290                          [])
291
292         AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend])
293       ])
294
295 AS_IF([test "x$enable_gdk" = "xyes"],
296       [
297         CLUTTER_BACKENDS="$CLUTTER_BACKENDS gdk"
298         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS gdk"
299
300         SUPPORT_GDK=1
301         SUPPORT_COGL=1
302
303         BACKEND_PC_FILES="$BACKEND_PC_FILES gdk-3.0"
304         PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
305       ])
306
307 AS_IF([test "x$enable_wayland" = "xyes"],
308       [
309         CLUTTER_BACKENDS="$CLUTTER_BACKENDS wayland"
310         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS wayland"
311
312         experimental_backend="yes"
313
314         SUPPORT_WAYLAND=1
315
316         PKG_CHECK_EXISTS([wayland-client xkbcommon gdk-pixbuf-2.0],
317                          [
318                             BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon",
319                             BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE gdk-pixbuf-2.0"
320                          ],
321                          [])
322
323         AC_DEFINE([HAVE_CLUTTER_WAYLAND], [1], [Have the Wayland client backend])
324       ])
325
326 dnl Note this is orthogonal to the client side support and you can
327 dnl use the Wayland compositor features with any of the clutter
328 dnl backends with corresponding Cogl support.
329 AC_ARG_ENABLE([wayland-compositor],
330               [AS_HELP_STRING([--enable-wayland-compositor=@<:@yes/no@:>@],
331                               [Enable Wayland compositor features (default=no)])],
332               [],
333               [AS_IF([test "x$SUPPORT_EGL" = "x1"],
334                      [enable_wayland_compositor=yes],
335                      [enable_wayland_compositor=no])
336               ])
337
338 AS_IF([test "x$enable_wayland_compositor" = "xyes"],
339       [
340         PKG_CHECK_EXISTS([wayland-server],
341                          [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-server"], [])
342         SUPPORT_WAYLAND_COMPOSITOR=1
343         CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
344 #define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
345         AC_DEFINE([HAVE_CLUTTER_WAYLAND_COMPOSITOR], [1], [Have Wayland compositor support])
346       ])
347
348 AM_CONDITIONAL(SUPPORT_WAYLAND_COMPOSITOR, [test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"])
349
350 AS_IF([test "x$enable_wayland_compositor" != "xyes" -a "x$enable_wayland" != "xyes"],
351       [
352         # The wayland headers introduce so much symbol shadowing that build
353         # logs become incomprehensible with -Wshadow so we only use it for
354         # non-wayland builds.
355         MAINTAINER_COMPILER_FLAGS="-Wshadow"
356       ])
357
358 AS_IF([test "x$enable_cex100" = "xyes"],
359       [
360         CLUTTER_BACKENDS="$CLUTTER_BACKENDS cex100"
361
362         experimental_backend="yes"
363
364         SUPPORT_COGL=1
365         SUPPORT_CEX100=1
366
367         have_gdl=no
368         AC_CHECK_HEADERS([libgdl.h], [have_gdl=yes])
369
370         AS_IF([test "x$have_gdl" = "xno"],
371               [
372                 AC_CHECK_HEADERS([CE4100/libgdl.h],
373                                  [
374                                    FLAVOUR_CFLAGS="-I/usr/include/CE4100"
375                                    have_gdl=yes
376                                    CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
377                                  ])
378               ])
379
380         AS_IF([test "x$have_gdl" = "xno"],
381               [AC_MSG_ERROR([libgdl.h not found but the CEx100 backend has been explicitly enabled])])
382
383         AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
384
385         FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl"
386
387         AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend])
388         AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
389         AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
390       ])
391
392 AS_IF([test "x$enable_egl" = "xyes"],
393       [
394         CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
395
396         experimental_backend="yes"
397
398         SUPPORT_EGL=1
399         SUPPORT_COGL=1
400
401         # if Mesa has support for egl, we can use it as well
402         PKG_CHECK_EXISTS([egl],
403                          [
404                            BACKEND_PC_FILES="$BACKEND_PC_FILES egl"
405                          ],
406                          [])
407
408         FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS"
409         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS"
410
411         AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
412
413         AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
414       ])
415
416 AS_IF([test "x$enable_osx" = "xyes"],
417       [
418         CLUTTER_BACKENDS="$CLUTTER_BACKENDS osx"
419         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS osx"
420
421         AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend])
422
423         FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
424
425         SUPPORT_OSX=1
426       ])
427
428 AS_IF([test "x$enable_win32" = "xyes"],
429       [
430         CLUTTER_BACKENDS="$CLUTTER_BACKENDS win32"
431         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS win32"
432
433         AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend])
434
435         FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm"
436         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500"
437
438         AC_CHECK_TOOL(WINDRES, [windres], [AC_MSG_ERROR([*** windres is required])])
439
440         SUPPORT_WIN32=1
441       ])
442
443 AS_IF([test "x$CLUTTER_BACKENDS" = "x"],
444       [
445         AC_MSG_ERROR([No backend enabled. You need to enable at least one backend.])
446       ])
447
448 # additional input backends
449
450 AC_ARG_ENABLE([tslib-input],
451               [AS_HELP_STRING([--enable-tslib-input=@<:@yes/no@:>@], [Enable TSLib for input events (default=no)])],
452               [enable_tslib=$enableval],
453               [enable_tslib=no])
454 AC_ARG_ENABLE([evdev-input],
455               [AS_HELP_STRING([--with-evdev=@<:@yes/no@:>@], [Enable evdev for input events (default=no)])],
456               [enable_evdev=$enableval],
457               [enable_evdev=no])
458
459 AS_IF([test "x$enable_tslib" = "xyes"],
460       [
461         PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no])
462         AS_IF([test "x$have_tslib" = "xyes"],
463               [
464                 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS tslib"
465                 experimental_input_backend="yes"
466                 AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])
467                 SUPPORT_TSLIB=1
468               ])
469       ])
470
471 AS_IF([test "x$enable_evdev" = "xyes"],
472       [
473         PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], [have_evdev=yes], [have_evdev=no])
474         AS_IF([test "x$have_evdev" = "xyes"],
475               [
476                 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
477                 BACKEND_PC_FILES="$BACKEND_PC_FILES gudev-1.0 xkbcommon"
478                 experimental_input_backend="yes"
479                 AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
480                 SUPPORT_EVDEV=1
481               ])
482       ])
483
484 # conditionals for use in automake files...
485 AM_CONDITIONAL(SUPPORT_GLX,     [test "x$SUPPORT_GLX" = "x1"])
486 AM_CONDITIONAL(SUPPORT_X11,     [test "x$SUPPORT_X11" = "x1"])
487 AM_CONDITIONAL(SUPPORT_GDK,     [test "x$SUPPORT_GDK" = "x1"])
488 AM_CONDITIONAL(SUPPORT_EGL,     [test "x$SUPPORT_EGL" = "x1"])
489 AM_CONDITIONAL(SUPPORT_OSX,     [test "x$SUPPORT_OSX" = "x1"])
490 AM_CONDITIONAL(SUPPORT_WIN32,   [test "x$SUPPORT_WIN32" = "x1"])
491 AM_CONDITIONAL(SUPPORT_CEX100,  [test "x$SUPPORT_CEX100" = "x1"])
492 AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$SUPPORT_WAYLAND" = "x1"])
493 AM_CONDITIONAL(SUPPORT_STUB,    [test "x$SUPPORT_WIN32" = "x1" -o \
494                                       "x$SUPPORT_OSX" = "x1"])
495
496 AM_CONDITIONAL(USE_COGL,  [test "x$SUPPORT_COGL" = "x1"])
497 AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
498 AM_CONDITIONAL(USE_EVDEV, [test "x$have_evdev" = "xyes"])
499 AM_CONDITIONAL(USE_GLD,   [test "x$have_gdl" = "xyes"])
500
501 dnl Instead of using AM_CFLAGS to ensure
502 dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter
503 dnl and cogl code we use a define in config.h instead. This helps ensure
504 dnl other tools such as glib-mkenums and gir-scanner don't end up
505 dnl using the define also.
506 AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
507
508 dnl strip leading spaces
509 CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* }
510 AC_SUBST(CLUTTER_BACKENDS)
511
512 CLUTTER_INPUT_BACKENDS=${CLUTTER_INPUT_BACKENDS#* }
513 AC_SUBST(CLUTTER_INPUT_BACKENDS)
514
515 AC_CACHE_SAVE
516
517 dnl === Clutter configuration =================================================
518
519 # windowing systems
520 AS_IF([test "x$SUPPORT_X11" = "x1"],
521       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
522 #define CLUTTER_WINDOWING_X11 \"x11\"
523 #define CLUTTER_INPUT_X11 \"x11\""])
524 AS_IF([test "x$SUPPORT_GDK" = "x1"],
525       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
526 #define CLUTTER_WINDOWING_GDK \"gdk\"
527 #define CLUTTER_INPUT_GDK \"gdk\""])
528 AS_IF([test "x$SUPPORT_GLX" = "x1"],
529       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
530 #define CLUTTER_WINDOWING_GLX \"glx\""])
531 AS_IF([test "x$SUPPORT_EGL" = "x1"],
532       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
533 #define CLUTTER_WINDOWING_EGL \"eglnative\""])
534 AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
535       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
536 #define CLUTTER_WINDOWING_WAYLAND \"wayland\""])
537 AS_IF([test "x$SUPPORT_OSX" = "x1"],
538       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
539 #define CLUTTER_WINDOWING_OSX \"osx\"
540 #define CLUTTER_INPUT_OSX \"osx\""])
541 AS_IF([test "x$SUPPORT_WIN32" = "x1"],
542       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
543 #define CLUTTER_WINDOWING_WIN32 \"win32\"
544 #define CLUTTER_INPUT_WIN32 \"win32\""])
545 AS_IF([test "x$SUPPORT_CEX100" = "x1"],
546       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
547 #define CLUTTER_WINDOWING_CEX100 \"cex100\""])
548 AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
549       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
550 #define CLUTTER_INPUT_EVDEV \"evdev\""])
551 AS_IF([test "x$SUPPORT_TSLIB" = "x1"],
552       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
553 #define CLUTTER_INPUT_TSLIB \"tslib\""])
554 AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
555       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
556 #define CLUTTER_INPUT_WAYLAND \"wayland\""])
557
558 # the 'null' input backend is special
559 CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
560 #define CLUTTER_INPUT_NULL \"null\""
561
562 AC_SUBST([CLUTTER_CONFIG_DEFINES])
563
564 dnl === Clutter substitutions kept for backwards compatibility ================
565 AC_SUBST([CLUTTER_WINSYS],       [deprecated])
566 AC_SUBST([CLUTTER_WINSYS_BASE],  [deprecated])
567 AC_SUBST([CLUTTER_STAGE_TYPE],   [deprecated])
568 AC_SUBST([CLUTTER_SONAME_INFIX], [deprecated])
569 AC_SUBST([CLUTTER_FLAVOUR],      [deprecated])
570 AC_SUBST([CLUTTER_COGL],         [deprecated])
571 AC_SUBST([COGL_DRIVER],          [deprecated])
572
573 dnl === Image loading backend =================================================
574 IMAGE_PC_FILES=""
575
576 dnl === X11 checks, only for X11-based backends ===============================
577 X11_PC_FILES=""
578 X11_EXTS=""
579 x11_tests=no
580
581 AS_IF([test "x$SUPPORT_X11" = "x1"],
582       [
583         # base X11 includes and libraries
584         AC_MSG_CHECKING([for X11])
585
586         # start with pkg-config
587         PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
588         AS_IF([test "x$have_x11" = "xyes"],
589               [
590                 X11_PC_FILES="x11"
591
592                 # we actually need to ask for CFLAGS and LIBS
593                 X11_CFLAGS=`$PKG_CONFIG --cflags $X11_PC_FILES`
594                 X11_LIBS=`$PKG_CONFIG --libs $X11_PC_FILES`
595
596                 AC_MSG_RESULT([found])
597               ],
598               [
599                 # no pkg-config, let's go old school
600                 AC_PATH_X
601
602                 AS_IF([test "x$no_x" = "xyes"],
603                       [AC_MSG_ERROR([No X11 Libraries found])],
604                       [
605                         AS_IF([test "x$x_includes" != "xNONE" && test -n "$x_includes"],
606                               [X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`])
607
608                         AS_IF([test "x$x_libraries" != "xNONE" && test -n "$x_libraries"],
609                               [X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`])
610
611                         AC_MSG_RESULT([found])
612                       ]
613                 )
614               ]
615         )
616
617         # XEXT (required)
618         AC_MSG_CHECKING([for XEXT extension])
619         PKG_CHECK_EXISTS([xext], [have_xext=yes], [have_xext=no])
620         AS_IF([test "x$have_xext" = "xyes"],
621               [
622                 AC_DEFINE(HAVE_XEXT, [1], [Define to 1 if we have the XEXT X extension])
623
624                 X11_LIBS="$X11_LIBS -lXext"
625                 X11_PC_FILES="$X11_PC_FILES xext"
626                 X11_EXTS="$X11_EXTS xext"
627
628                 AC_MSG_RESULT([found])
629               ],
630               [AC_MSG_ERROR([Not found])]
631         )
632
633         # XFIXES (required)
634         AC_MSG_CHECKING([for XFIXES extension >= $XFIXES_REQ_VERSION])
635         PKG_CHECK_EXISTS([xfixes >= $XFIXES_REQ_VERSION], [have_xfixes=yes], [have_xfixes=no])
636         AS_IF([test "x$have_xfixes" = "xyes"],
637               [
638                 AC_DEFINE(HAVE_XFIXES, [1], [Define to 1 if we have the XFIXES X extension])
639
640                 X11_LIBS="$X11_LIBS -lXfixes"
641                 X11_PC_FILES="$X11_PC_FILES xfixes >= $XFIXES_REQ_VERSION"
642                 X11_EXTS="$X11_EXTS xfixes"
643
644                 AC_MSG_RESULT([found])
645               ],
646               [AC_MSG_ERROR([Not found])]
647         )
648
649         # XDAMAGE (required)
650         AC_MSG_CHECKING([for XDAMAGE extension])
651         PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
652         AS_IF([test "x$have_xdamage" = "xyes"],
653               [
654                 AC_DEFINE(HAVE_XDAMAGE, [1], [Define to 1 if we have the XDAMAGE X extension])
655
656                 X11_LIBS="$X11_LIBS -lXdamage"
657                 X11_PC_FILES="$X11_PC_FILES xdamage"
658                 X11_EXTS="$X11_EXTS xdamage"
659
660                 AC_MSG_RESULT([found])
661               ],
662               [AC_MSG_ERROR([not found])]
663         )
664
665         # XCOMPOSITE (optional)
666         AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
667         PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
668         AS_IF([test "x$have_xcomposite" = "xyes"],
669               [
670                 AC_DEFINE(HAVE_XCOMPOSITE, [1], [Define to 1 if we have the XCOMPOSITE X extension])
671
672                 X11_LIBS="$X11_LIBS -lXcomposite"
673                 X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
674                 X11_EXTS="$X11_EXTS xcomposite"
675
676                 AC_MSG_RESULT([found])
677               ],
678               [AC_MSG_ERROR([not found])]
679         )
680
681         # X Generic Extensions (optional)
682         clutter_save_CPPFLAGS="$CPPFLAGS"
683         CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
684
685         clutter_save_LIBS="$LIBS"
686         LIBS="$LIBS $X11_LIBS"
687
688         have_xge=no
689         AC_CHECK_FUNC([XGetEventData],
690                       [
691                         AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
692                         have_xge=yes
693                         X11_EXTS="$X11_EXTS xge"
694                       ])
695
696         CPPFLAGS="$clutter_save_CPPFLAGS"
697         LIBS="$clutter_save_LIBS"
698
699         # XI (optional)
700         AC_ARG_ENABLE([xinput],
701                       [AS_HELP_STRING([--enable-xinput], [Use the XI X extension])],
702                       [],
703                       [enable_xinput=yes])
704
705         AS_IF([test "x$enable_xinput" = "xyes"],
706               [
707                 PKG_CHECK_EXISTS([xi], [have_xinput=yes], [have_xinput=no])
708               ],
709               [
710                 have_xinput=no
711               ])
712
713         AS_CASE([$have_xinput],
714
715                 [yes],
716                 [
717                   AC_CHECK_HEADERS([X11/extensions/XInput2.h],
718                                    [
719                                      have_xinput2=yes
720                                      AC_DEFINE([HAVE_XINPUT_2],
721                                                [1],
722                                                [Define to 1 if XI2 is available])
723                                    ],
724                                    [
725                                      have_xinput2=no
726                                      AC_DEFINE([HAVE_XINPUT],
727                                                [1],
728                                                [Define to 1 if XInput is available])
729                                    ])
730
731                   X11_LIBS="$X11_LIBS $XINPUT_LIBS"
732                   X11_PC_FILES="$X11_PC_FILES xi"
733                   X11_EXTS="$X11_EXTS xi"
734                 ],
735
736                 [no],
737                 [have_xinput2=no],
738
739                 [*],
740                 [AC_MSG_ERROR([Invalid argument for --enable-xinput])]
741         )
742
743         # XKB
744         clutter_save_CPPFLAGS="$CPPFLAGS"
745         CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
746
747         clutter_save_LIBS="$LIBS"
748         LIBS="$LIBS $X11_LIBS"
749
750         have_xkb=no
751         AC_CHECK_FUNC([XkbQueryExtension],
752                       [
753                         AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
754                         have_xkb=yes
755
756                         X11_EXTS="$X11_EXTS xkb"
757                       ])
758
759         CPPFLAGS="$clutter_save_CPPFLAGS"
760         LIBS="$clutter_save_LIBS"
761
762         x11_tests=yes
763         BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
764         FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
765         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
766       ]
767 )
768
769 AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
770 AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"])
771
772 X11_EXTS=${X11_EXTS#* }
773
774 AC_CACHE_SAVE
775
776 dnl === Enable debug level ====================================================
777
778 m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
779 AC_ARG_ENABLE([debug],
780               [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
781                               [Control Clutter debugging level @<:@default=]debug_default[@:>@])],
782               [],
783               [enable_debug=debug_default])
784
785 AS_CASE([$enable_debug],
786
787         [yes],
788         [
789           test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
790           CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
791         ],
792
793         [minimum],
794         [CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"],
795
796         [no],
797         [CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
798
799         [AC_MSG_ERROR([Unknown argument for --enable-debug])]
800 )
801
802 AC_SUBST(CLUTTER_DEBUG_CFLAGS)
803
804 dnl === Enable deprecation guards ==================================================
805
806 m4_define([deprecated_default],
807           [m4_if(m4_eval(clutter_minor_version % 2),
808                  [1],
809                  [no],
810                  [yes])])
811
812 AC_ARG_ENABLE([deprecated],
813               [AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
814                               [Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
815               [],
816               [enable_deprecated=deprecated_default])
817
818 AS_CASE([$enable_deprecated],
819
820         [no],
821         [
822           CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED"
823         ],
824
825         [yes],
826         [
827           CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS -DCLUTTER_DISABLE_DEPRECATION_WARNINGS"
828         ],
829
830         [AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
831 )
832
833 AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
834
835
836 dnl === Conformance test suite ================================================
837
838 AC_ARG_ENABLE([conformance],
839               [AS_HELP_STRING([--enable-conformance=@<:@no/yes@:>@],
840                               [Build conformance test suite @<:@default=yes@:>@])],
841               [],
842               [enable_conformance=yes])
843
844 AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_conformance" = "xyes"])
845
846 dnl === Profiling =============================================================
847
848 m4_define([profile_default], [no])
849 AC_ARG_ENABLE(profile,
850               AS_HELP_STRING([--enable-profile=@<:@no/yes@:>@],
851                              [Turn on profiling support. yes; All profiling probe points are compiled in and may be runtime enabled. no; No profiling support will built into clutter.  @<:@default=no@:>@]),
852               [],
853               [enable_profile=profile_default])
854
855 AS_CASE([$enable_profile],
856
857         [yes],
858         [
859           AS_IF([test "x$GCC" = "xyes"],
860                 [
861                   PKG_CHECK_MODULES([PROFILE_DEP], [uprof-0.3])
862                   CLUTTER_PROFILE_CFLAGS="-DCLUTTER_ENABLE_PROFILE $PROFILE_DEP_CFLAGS"
863                   CLUTTER_PROFILE_LDFLAGS="$PROFILE_DEP_LIBS"
864
865                   AS_IF([test "x$enable_debug" = "xyes"], [CLUTTER_PROFILE_CFLAGS+=" -DUPROF_DEBUG"])
866                 ],
867                 [
868                   AC_MSG_ERROR([--enable-profile is currently only supported if using GCC])
869                 ])
870         ],
871
872         [no],
873         [
874           CLUTTER_PROFILE_CFLAGS=""
875           CLUTTER_PROFILE_LDFLAGS=""
876         ],
877
878         [*], [AC_MSG_ERROR([Invalid value for --enable-profile])]
879 )
880 AM_CONDITIONAL(PROFILE, test "x$enable_profile" != "xno")
881 AC_SUBST(CLUTTER_PROFILE_CFLAGS)
882 AC_SUBST(CLUTTER_PROFILE_LDFLAGS)
883
884 dnl === Coverage report =======================================================
885
886 AC_PATH_PROG([GCOV], [gcov], [enable_gcov=no])
887
888 AC_MSG_CHECKING([whether to build with gcov testing])
889
890 AC_ARG_ENABLE([gcov],
891               [AS_HELP_STRING([--enable-gcov],
892                               [Whether to enable coverage testing (requires gcc
893 and gcov)])],
894               [],
895               [enable_gcov=no])
896
897 AS_IF([test "x$enable_gcov" = "xyes" && test "x$GCC" = "xyes"],
898       [
899         AS_IF([test "x$enable_conformance" = "xno"],
900               [AC_MSG_WARN([Conformance test suite is disabled, the coverage report will be incomplete])],
901               [AC_MSG_RESULT([yes])]
902         )
903
904         GCOV_CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
905         GCOV_LDFLAGS="-lgcov"
906       ],
907       [AC_MSG_RESULT([no])]
908 )
909
910 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"])
911 AC_SUBST([GCOV_CFLAGS])
912 AC_SUBST([GCOV_LDFLAGS])
913
914 dnl === Enable strict compiler flags ==========================================
915
916 # use strict compiler flags only when building from git; the rules for
917 # distcheck will take care of turning this on when making a release
918 m4_define([maintainer_flags_default], [m4_if(m4_eval(clutter_micro_version % 2), [1], [yes], [no])])
919 AC_ARG_ENABLE([maintainer-flags],
920               [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
921                               [Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
922               [],
923               [enable_maintainer_flags=maintainer_flags_default])
924
925 MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
926                            -Wall -Wcast-align -Wuninitialized
927                            -Wno-strict-aliasing -Wempty-body -Wformat
928                            -Wformat-security -Winit-self
929                            -Wdeclaration-after-statement -Wvla
930                            -Wpointer-arith"
931
932 AS_CASE([$enable_maintainer_flags],
933         [yes],
934         [
935           AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
936         ],
937
938         [no],
939         [
940         ],
941
942         [error],
943         [
944           MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
945           AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
946         ],
947
948         [*],
949         [AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
950 )
951
952 # strip leading spaces
953 MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#*  }
954 AC_SUBST(MAINTAINER_CFLAGS)
955
956 dnl === Dependencies, compiler flags and linker libraries =====================
957 # strip leading space
958 BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
959
960 CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $IMAGE_PC_FILES $BACKEND_PC_FILES"
961 PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
962 AC_SUBST(CLUTTER_REQUIRES)
963
964
965 CLUTTER_REQUIRES_PRIVATE="$CLUTTER_BASE_PC_FILES_PRIVATE $IMAGE_PC_FILES_PRIVATE $BACKEND_PC_FILES_PRIVATE"
966 PKG_CHECK_MODULES(CLUTTER_DEPS_PRIVATE, [$CLUTTER_REQUIRES_PRIVATE])
967 AC_SUBST(CLUTTER_REQUIRES_PRIVATE)
968
969 CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_PROFILE_CFLAGS $GLIB_CFLAGS"
970 CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_PROFILE_LDFLAGS $GLIB_LIBS"
971 AC_SUBST(CLUTTER_CFLAGS)
972 AC_SUBST(CLUTTER_LIBS)
973
974
975 dnl === GObject-Introspection check ===========================================
976
977 GOBJECT_INTROSPECTION_CHECK([gi_req_version])
978
979 dnl === GTK Doc check =========================================================
980
981 GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
982
983 # we don't want to build the documentation from a Git clone unless we
984 # explicitly tell configure to do so; this allows avoiding to recurse into
985 # the documentation directory when building Clutter inside Poky for a
986 # target device that doesn't have gtk-doc installed. for reference
987 # see: http://bugzilla.openedhand.com/show_bug.cgi?id=1047
988 #
989 # we use autogen.sh as it exists only inside the Git clones, and it
990 # is not packaged into tarballs.
991 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
992
993 # prefixes for fixing gtk-doc references
994 CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
995 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
996 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
997 COGL_PREFIX="`$PKG_CONFIG --variable=prefix cogl-1.0`"
998 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
999 AC_SUBST(CAIRO_PREFIX)
1000 AC_SUBST(GLIB_PREFIX)
1001 AC_SUBST(PANGO_PREFIX)
1002 AC_SUBST(COGL_PREFIX)
1003 AC_SUBST(ATK_PREFIX)
1004
1005 dnl === Manual ================================================================
1006
1007 AC_ARG_ENABLE([docs],
1008               [AS_HELP_STRING([--enable-docs=@<:@no/yes@:>@],
1009                               [Build optional documentation; requires xsltproc and jw.])],
1010               [enable_docs=$enableval],
1011               [enable_docs=no])
1012
1013 enable_pdfs=no
1014 AS_IF([test "x$enable_docs" = "xyes"],
1015       [
1016         AC_PATH_PROG(JW, [jw], [no])
1017         AS_IF([test "x$JW" = "xno"],
1018               [
1019                 AC_MSG_WARN([jw not found; pdf generation has been disabled])
1020               ],
1021               [enable_pdfs=yes])
1022
1023         AC_PATH_PROG(XSLTPROC, [xsltproc], [no])
1024         AS_IF([test "x$XSLTPROC" = "xno"],
1025               [
1026                 AC_MSG_ERROR([xsltproc not found])
1027               ])
1028       ]
1029 )
1030
1031 AM_CONDITIONAL(ENABLE_DOCS, [test "x$enable_docs" = "xyes"])
1032 AM_CONDITIONAL(ENABLE_PDFS, [test "x$enable_pdfs" = "xyes"])
1033
1034 dnl === I18N ==================================================================
1035
1036 AM_GNU_GETTEXT_VERSION([0.17])
1037 AM_GNU_GETTEXT([external])
1038
1039 GETTEXT_PACKAGE="clutter-1.0"
1040 AC_SUBST(GETTEXT_PACKAGE)
1041 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
1042                    ["$GETTEXT_PACKAGE"],
1043                    [The prefix for our gettext translation domains.])
1044 AS_ALL_LINGUAS
1045
1046 dnl ===========================================================================
1047
1048 AC_CONFIG_FILES([
1049         Makefile
1050         config.h.win32
1051         README
1052
1053         build/Makefile
1054         build/autotools/Makefile
1055         build/mingw/Makefile
1056         build/win32/Makefile
1057         build/win32/vs9/Makefile
1058         build/win32/vs10/Makefile
1059
1060         clutter/Makefile
1061         clutter/clutter-config.h
1062         clutter/clutter-version.h
1063         clutter/clutter-version.h.win32
1064         clutter/clutter-$CLUTTER_API_VERSION.pc:clutter/clutter.pc.in
1065
1066         clutter/cally/cally-$CLUTTER_API_VERSION.pc:clutter/cally/cally.pc.in
1067
1068         clutter/cex100/clutter-cex100.h
1069
1070         tests/Makefile
1071         tests/accessibility/Makefile
1072         tests/conform/Makefile
1073         tests/conform/test-launcher.sh
1074         tests/data/Makefile
1075         tests/interactive/Makefile
1076         tests/interactive/wrapper.sh
1077         tests/micro-bench/Makefile
1078         tests/performance/Makefile
1079
1080         doc/Makefile
1081         doc/reference/Makefile
1082         doc/reference/clutter/Makefile
1083         doc/reference/clutter/clutter-docs.xml
1084         doc/reference/cally/Makefile
1085         doc/reference/cally/cally-docs.xml
1086         doc/common/Makefile
1087         doc/cookbook/Makefile
1088         doc/cookbook/clutter-cookbook.xml
1089         doc/cookbook/examples/Makefile
1090
1091         po/Makefile.in
1092 ])
1093
1094 AC_OUTPUT
1095
1096 dnl === Summary ===============================================================
1097
1098 echo ""
1099 echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
1100
1101 # Global flags
1102 echo ""
1103 echo " • Global:"
1104 echo "        Prefix: ${prefix}"
1105 echo "        Libdir: ${libdir}"
1106 echo "        Sysconfdir: ${sysconfdir}"
1107
1108 # Compiler/Debug related flags
1109 echo ""
1110 echo " • Compiler options:"
1111 echo "        Clutter debug level: ${enable_debug}"
1112 echo "        Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
1113 echo "        Profiling enabled: ${enable_profile}"
1114 echo "        Enable coverage tests: ${enable_gcov}"
1115 echo "        Enable deprecated symbols: ${enable_deprecated}"
1116
1117 # Documentation
1118 echo ""
1119 echo " • Documentation:"
1120 echo "        Build API Reference: ${enable_gtk_doc}"
1121 echo "        Build Additional Documentation: ${enable_docs} (Generate PDF: ${enable_pdfs})"
1122
1123 # Miscellaneous
1124 echo ""
1125 echo " • Extra:"
1126 echo "        Build introspection data: ${enable_introspection}"
1127 echo "        Build conformance test suite: ${enable_conformance}"
1128 echo "        Build X11-specific tests: ${x11_tests}"
1129
1130 # Clutter backend related flags
1131 echo ""
1132 echo " • Clutter Backends:"
1133
1134 if test "x$experimental_backend" = "xno"; then
1135 echo "        Windowing systems: ${CLUTTER_BACKENDS}"
1136 else
1137 echo "        Windowing systems: ${CLUTTER_BACKENDS} (WARNING: Experimental backends enabled)"
1138 fi
1139
1140 if test "x$experimental_input_backend" = "xno"; then
1141 echo "        Input backends: ${CLUTTER_INPUT_BACKENDS}"
1142 else
1143 echo "        Input backends: ${CLUTTER_INPUT_BACKENDS} (WARNING: Experimental backends enabled)"
1144 fi
1145
1146 if test "x$SUPPORT_X11" = "x1"; then
1147 echo ""
1148 echo "     - X11 backend options:"
1149 echo "        Enabled extensions: ${X11_EXTS}"
1150 echo "        Build X11-specific tests: ${x11_tests}"
1151 fi
1152
1153 if test "x$SUPPORT_CEX100" = "x1"; then
1154 echo ""
1155 echo "     - CEx100 backend options (WARNING: Experimental):"
1156 echo "        libGDL include prefix: ${CLUTTER_CEX100_LIBGDL_PREFIX}"
1157 fi
1158
1159 if test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"; then
1160 echo ""
1161 echo "     - Wayland compositor support enabled (WARNING: Experimental)"
1162 fi
1163
1164 echo ""
1165
1166 # General warning about experimental features
1167 if test "x$experimental_backend" = "xyes"; then
1168 echo ""
1169 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1170 echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
1171 echo ""
1172 echo "  The stability of your build might be affected by one or more"
1173 echo "  experimental backends or experimental and unsupported features"
1174 echo ""
1175 echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
1176 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1177 echo ""
1178 fi