script: Add loading from a resource
[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], [7])
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.10])
133 m4_define([cogl_req_version],           [1.9.4])
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 # private base dependencies
205 CLUTTER_BASE_PC_FILES_PRIVATE=""
206
207 # backend specific pkg-config files
208 BACKEND_PC_FILES=""
209
210 # private backend specific dependencies
211 BACKEND_PC_FILES_PRIVATE=""
212
213 dnl === Clutter windowing system backend ======================================
214
215 AC_ARG_ENABLE([x11-backend],
216               [AS_HELP_STRING([--enable-x11-backend=@<:@yes/no@:>@], [Enable the X11 backend (default=check)])],
217               [enable_x11=$enableval],
218               [enable_x11=check])
219 AC_ARG_ENABLE([win32-backend],
220               [AS_HELP_STRING([--enable-win32-backend=@<:@yes/no@:>@], [Enable the Windows backend (default=check)])],
221               [enable_win32=$enableval],
222               [enable_win32=check])
223 AC_ARG_ENABLE([quartz-backend],
224               [AS_HELP_STRING([--enable-quartz-backend=@<:@yes/no@:>@], [Enable the OS X backend (default=check)])],
225               [enable_osx=$enableval],
226               [enable_osx=check])
227 AC_ARG_ENABLE([gdk-backend],
228               [AS_HELP_STRING([--enable-gdk-backend=@<:@yes/no@:>@], [Enable the GDK backend (default=check)])],
229               [enable_gdk=$enableval],
230               [enable_gdk=check])
231 AC_ARG_ENABLE([wayland-backend],
232               [AS_HELP_STRING([--enable-wayland-backend=@<:@yes/no@:>@], [Enable the Wayland client backend (default=no)])],
233               [enable_wayland=$enableval],
234               [enable_wayland=no])
235 AC_ARG_ENABLE([egl-backend],
236               [AS_HELP_STRING([--enable-egl-backend=@<:@yes/no@:>@], [Enable the EGL framebuffer backend (default=no)])],
237               [enable_egl=$enableval],
238               [enable_egl=no])
239 AC_ARG_ENABLE([cex100-backend],
240               [AS_HELP_STRING([--enable-cex100-backend=@<:@yes/no@:>@], [Enable the CEx100 backend (default=no)])],
241               [enable_cex100=$enableval],
242               [enable_cex100=no])
243
244 dnl Define default values
245 AS_IF([test "x$enable_x11" = "xcheck"],
246       [
247         AS_IF([test "x$platform_glx" = "xyes"], [enable_x11=yes], [enable_x11=no])
248       ])
249
250 AS_IF([test "x$enable_win32" = "xcheck"],
251       [
252         AS_IF([test "x$platform_win32" = "xyes"], [enable_win32=yes], [enable_win32=no])
253       ])
254
255 AS_IF([test "x$enable_osx" = "xcheck"],
256       [
257         AS_IF([test "x$platform_quartz" = "xyes"], [enable_osx=yes], [enable_osx=no])
258       ])
259
260 AS_IF([test "x$enable_gdk" = "xcheck"],
261       [
262         PKG_CHECK_EXISTS([gdk-3.0 >= gdk_req_version], [enable_gdk=yes], [enable_gdk=no])
263       ])
264
265 dnl Per-backend rules
266 AS_IF([test "x$enable_x11" = "xyes"],
267       [
268         CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11"
269         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS x11"
270
271         SUPPORT_X11=1
272         SUPPORT_GLX=1
273         SUPPORT_COGL=1
274
275         # we use fontconfig API and pango-ft2 when the fontconfig
276         # configuration changes; we don't expose any API for this
277         # so we add pango-ft2 to the private Requires.
278         PKG_CHECK_EXISTS([pangoft2],
279                          [
280                            AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
281                            BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE pangoft2"
282                          ],
283                          [])
284
285         AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend])
286       ])
287
288 AS_IF([test "x$enable_gdk" = "xyes"],
289       [
290         CLUTTER_BACKENDS="$CLUTTER_BACKENDS gdk"
291         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS gdk"
292
293         SUPPORT_GDK=1
294         SUPPORT_COGL=1
295
296         BACKEND_PC_FILES="$BACKEND_PC_FILES gdk-3.0"
297       ])
298
299 AS_IF([test "x$enable_wayland" = "xyes"],
300       [
301         CLUTTER_BACKENDS="$CLUTTER_BACKENDS wayland"
302         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS wayland"
303
304         experimental_backend="yes"
305
306         SUPPORT_WAYLAND=1
307
308         PKG_CHECK_EXISTS([wayland-client xkbcommon gdk-pixbuf-2.0],
309                          [
310                             BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon",
311                             BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE gdk-pixbuf-2.0"
312                          ],
313                          [])
314
315         AC_DEFINE([HAVE_CLUTTER_WAYLAND], [1], [Have the Wayland client backend])
316       ])
317
318 dnl Note this is orthogonal to the client side support and you can
319 dnl use the Wayland compositor features with any of the clutter
320 dnl backends with corresponding Cogl support.
321 AC_ARG_ENABLE([wayland-compositor],
322               [AS_HELP_STRING([--enable-wayland-compositor=@<:@yes/no@:>@],
323                               [Enable Wayland compositor features (default=no)])],
324               [],
325               [AS_IF([test "x$SUPPORT_EGL" = "x1"],
326                      [enable_wayland_compositor=yes],
327                      [enable_wayland_compositor=no])
328               ])
329
330 AS_IF([test "x$enable_wayland_compositor" = "xyes"],
331       [
332         PKG_CHECK_EXISTS([wayland-server],
333                          [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-server"], [])
334         SUPPORT_WAYLAND_COMPOSITOR=1
335         CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
336 #define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
337         AC_DEFINE([HAVE_CLUTTER_WAYLAND_COMPOSITOR], [1], [Have Wayland compositor support])
338       ])
339
340 AM_CONDITIONAL(SUPPORT_WAYLAND_COMPOSITOR, [test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"])
341
342 AS_IF([test "x$enable_wayland_compositor" != "xyes" -a "x$enable_wayland" != "xyes"],
343       [
344         # The wayland headers introduce so much symbol shadowing that build
345         # logs become incomprehensible with -Wshadow so we only use it for
346         # non-wayland builds.
347         MAINTAINER_COMPILER_FLAGS="-Wshadow"
348       ])
349
350 AS_IF([test "x$enable_cex100" = "xyes"],
351       [
352         CLUTTER_BACKENDS="$CLUTTER_BACKENDS cex100"
353
354         experimental_backend="yes"
355
356         SUPPORT_COGL=1
357         SUPPORT_CEX100=1
358
359         have_gdl=no
360         AC_CHECK_HEADERS([libgdl.h], [have_gdl=yes])
361
362         AS_IF([test "x$have_gdl" = "xno"],
363               [
364                 AC_CHECK_HEADERS([CE4100/libgdl.h],
365                                  [
366                                    FLAVOUR_CFLAGS="-I/usr/include/CE4100"
367                                    have_gdl=yes
368                                    CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
369                                  ])
370               ])
371
372         AS_IF([test "x$have_gdl" = "xno"],
373               [AC_MSG_ERROR([libgdl.h not found but the CEx100 backend has been explicitly enabled])])
374
375         AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
376
377         FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl"
378
379         AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend])
380         AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
381         AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
382       ])
383
384 AS_IF([test "x$enable_egl" = "xyes"],
385       [
386         CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
387
388         experimental_backend="yes"
389
390         SUPPORT_EGL=1
391         SUPPORT_COGL=1
392
393         FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS"
394         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS"
395
396         AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
397
398         AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
399       ])
400
401 AS_IF([test "x$enable_osx" = "xyes"],
402       [
403         CLUTTER_BACKENDS="$CLUTTER_BACKENDS osx"
404         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS osx"
405
406         AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend])
407
408         FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
409
410         SUPPORT_OSX=1
411       ])
412
413 AS_IF([test "x$enable_win32" = "xyes"],
414       [
415         CLUTTER_BACKENDS="$CLUTTER_BACKENDS win32"
416         CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS win32"
417
418         AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend])
419
420         FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm"
421         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500"
422
423         AC_CHECK_TOOL(WINDRES, [windres], [AC_MSG_ERROR([*** windres is required])])
424
425         SUPPORT_WIN32=1
426       ])
427
428 AS_IF([test "x$CLUTTER_BACKENDS" = "x"],
429       [
430         AC_MSG_ERROR([No backend enabled. You need to enable at least one backend.])
431       ])
432
433 # additional input backends
434
435 AC_ARG_ENABLE([tslib-input],
436               [AS_HELP_STRING([--enable-tslib-input=@<:@yes/no@:>@], [Enable TSLib for input events (default=no)])],
437               [enable_tslib=$enableval],
438               [enable_tslib=no])
439 AC_ARG_ENABLE([evdev-input],
440               [AS_HELP_STRING([--with-evdev=@<:@yes/no@:>@], [Enable evdev for input events (default=no)])],
441               [enable_evdev=$enableval],
442               [enable_evdev=no])
443
444 AS_IF([test "x$enable_tslib" = "xyes"],
445       [
446         PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no])
447         AS_IF([test "x$have_tslib" = "xyes"],
448               [
449                 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS tslib"
450                 experimental_input_backend="yes"
451                 AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])
452                 SUPPORT_TSLIB=1
453               ])
454       ])
455
456 AS_IF([test "x$enable_evdev" = "xyes"],
457       [
458         PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], [have_evdev=yes], [have_evdev=no])
459         AS_IF([test "x$have_evdev" = "xyes"],
460               [
461                 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
462                 BACKEND_PC_FILES="$BACKEND_PC_FILES gudev-1.0 xkbcommon"
463                 experimental_input_backend="yes"
464                 AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
465                 SUPPORT_EVDEV=1
466               ])
467       ])
468
469 # conditionals for use in automake files...
470 AM_CONDITIONAL(SUPPORT_GLX,     [test "x$SUPPORT_GLX" = "x1"])
471 AM_CONDITIONAL(SUPPORT_X11,     [test "x$SUPPORT_X11" = "x1"])
472 AM_CONDITIONAL(SUPPORT_GDK,     [test "x$SUPPORT_GDK" = "x1"])
473 AM_CONDITIONAL(SUPPORT_EGL,     [test "x$SUPPORT_EGL" = "x1"])
474 AM_CONDITIONAL(SUPPORT_OSX,     [test "x$SUPPORT_OSX" = "x1"])
475 AM_CONDITIONAL(SUPPORT_WIN32,   [test "x$SUPPORT_WIN32" = "x1"])
476 AM_CONDITIONAL(SUPPORT_CEX100,  [test "x$SUPPORT_CEX100" = "x1"])
477 AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$SUPPORT_WAYLAND" = "x1"])
478
479 AM_CONDITIONAL(USE_COGL,  [test "x$SUPPORT_COGL" = "x1"])
480 AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
481 AM_CONDITIONAL(USE_EVDEV, [test "x$have_evdev" = "xyes"])
482 AM_CONDITIONAL(USE_GLD,   [test "x$have_gdl" = "xyes"])
483
484 dnl Instead of using AM_CFLAGS to ensure
485 dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter
486 dnl and cogl code we use a define in config.h instead. This helps ensure
487 dnl other tools such as glib-mkenums and gir-scanner don't end up
488 dnl using the define also.
489 AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
490
491 dnl strip leading spaces
492 CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* }
493 AC_SUBST(CLUTTER_BACKENDS)
494
495 CLUTTER_INPUT_BACKENDS=${CLUTTER_INPUT_BACKENDS#* }
496 AC_SUBST(CLUTTER_INPUT_BACKENDS)
497
498 AC_CACHE_SAVE
499
500 dnl === Clutter configuration =================================================
501
502 # windowing systems
503 AS_IF([test "x$SUPPORT_X11" = "x1"],
504       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
505 #define CLUTTER_WINDOWING_X11 \"x11\"
506 #define CLUTTER_INPUT_X11 \"x11\""])
507 AS_IF([test "x$SUPPORT_GDK" = "x1"],
508       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
509 #define CLUTTER_WINDOWING_GDK \"gdk\"
510 #define CLUTTER_INPUT_GDK \"gdk\""])
511 AS_IF([test "x$SUPPORT_GLX" = "x1"],
512       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
513 #define CLUTTER_WINDOWING_GLX \"glx\""])
514 AS_IF([test "x$SUPPORT_EGL" = "x1"],
515       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
516 #define CLUTTER_WINDOWING_EGL \"eglnative\""])
517 AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
518       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
519 #define CLUTTER_WINDOWING_WAYLAND \"wayland\""])
520 AS_IF([test "x$SUPPORT_OSX" = "x1"],
521       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
522 #define CLUTTER_WINDOWING_OSX \"osx\"
523 #define CLUTTER_INPUT_OSX \"osx\""])
524 AS_IF([test "x$SUPPORT_WIN32" = "x1"],
525       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
526 #define CLUTTER_WINDOWING_WIN32 \"win32\"
527 #define CLUTTER_INPUT_WIN32 \"win32\""])
528 AS_IF([test "x$SUPPORT_CEX100" = "x1"],
529       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
530 #define CLUTTER_WINDOWING_CEX100 \"cex100\""])
531 AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
532       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
533 #define CLUTTER_INPUT_EVDEV \"evdev\""])
534 AS_IF([test "x$SUPPORT_TSLIB" = "x1"],
535       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
536 #define CLUTTER_INPUT_TSLIB \"tslib\""])
537 AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
538       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
539 #define CLUTTER_INPUT_WAYLAND \"wayland\""])
540
541 # the 'null' input backend is special
542 CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
543 #define CLUTTER_INPUT_NULL \"null\""
544
545 AC_SUBST([CLUTTER_CONFIG_DEFINES])
546
547 dnl === Clutter substitutions kept for backwards compatibility ================
548 AC_SUBST([CLUTTER_WINSYS],       [deprecated])
549 AC_SUBST([CLUTTER_WINSYS_BASE],  [deprecated])
550 AC_SUBST([CLUTTER_STAGE_TYPE],   [deprecated])
551 AC_SUBST([CLUTTER_SONAME_INFIX], [deprecated])
552 AC_SUBST([CLUTTER_FLAVOUR],      [deprecated])
553 AC_SUBST([CLUTTER_COGL],         [deprecated])
554 AC_SUBST([COGL_DRIVER],          [deprecated])
555
556 dnl === X11 checks, only for X11-based backends ===============================
557 X11_PC_FILES=""
558 X11_EXTS=""
559 x11_tests=no
560
561 AS_IF([test "x$SUPPORT_X11" = "x1"],
562       [
563         # base X11 includes and libraries
564         AC_MSG_CHECKING([for X11])
565
566         # start with pkg-config
567         PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
568         AS_IF([test "x$have_x11" = "xyes"],
569               [
570                 X11_PC_FILES="x11"
571
572                 # we actually need to ask for CFLAGS and LIBS
573                 X11_CFLAGS=`$PKG_CONFIG --cflags $X11_PC_FILES`
574                 X11_LIBS=`$PKG_CONFIG --libs $X11_PC_FILES`
575
576                 AC_MSG_RESULT([found])
577               ],
578               [
579                 # no pkg-config, let's go old school
580                 AC_PATH_X
581
582                 AS_IF([test "x$no_x" = "xyes"],
583                       [AC_MSG_ERROR([No X11 Libraries found])],
584                       [
585                         AS_IF([test "x$x_includes" != "xNONE" && test -n "$x_includes"],
586                               [X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`])
587
588                         AS_IF([test "x$x_libraries" != "xNONE" && test -n "$x_libraries"],
589                               [X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`])
590
591                         AC_MSG_RESULT([found])
592                       ]
593                 )
594               ]
595         )
596
597         # XEXT (required)
598         AC_MSG_CHECKING([for XEXT extension])
599         PKG_CHECK_EXISTS([xext], [have_xext=yes], [have_xext=no])
600         AS_IF([test "x$have_xext" = "xyes"],
601               [
602                 AC_DEFINE(HAVE_XEXT, [1], [Define to 1 if we have the XEXT X extension])
603
604                 X11_LIBS="$X11_LIBS -lXext"
605                 X11_PC_FILES="$X11_PC_FILES xext"
606                 X11_EXTS="$X11_EXTS xext"
607
608                 AC_MSG_RESULT([found])
609               ],
610               [AC_MSG_ERROR([Not found])]
611         )
612
613         # XFIXES (required)
614         AC_MSG_CHECKING([for XFIXES extension >= $XFIXES_REQ_VERSION])
615         PKG_CHECK_EXISTS([xfixes >= $XFIXES_REQ_VERSION], [have_xfixes=yes], [have_xfixes=no])
616         AS_IF([test "x$have_xfixes" = "xyes"],
617               [
618                 AC_DEFINE(HAVE_XFIXES, [1], [Define to 1 if we have the XFIXES X extension])
619
620                 X11_LIBS="$X11_LIBS -lXfixes"
621                 X11_PC_FILES="$X11_PC_FILES xfixes >= $XFIXES_REQ_VERSION"
622                 X11_EXTS="$X11_EXTS xfixes"
623
624                 AC_MSG_RESULT([found])
625               ],
626               [AC_MSG_ERROR([Not found])]
627         )
628
629         # XDAMAGE (required)
630         AC_MSG_CHECKING([for XDAMAGE extension])
631         PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
632         AS_IF([test "x$have_xdamage" = "xyes"],
633               [
634                 AC_DEFINE(HAVE_XDAMAGE, [1], [Define to 1 if we have the XDAMAGE X extension])
635
636                 X11_LIBS="$X11_LIBS -lXdamage"
637                 X11_PC_FILES="$X11_PC_FILES xdamage"
638                 X11_EXTS="$X11_EXTS xdamage"
639
640                 AC_MSG_RESULT([found])
641               ],
642               [AC_MSG_ERROR([not found])]
643         )
644
645         # XCOMPOSITE (optional)
646         AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
647         PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
648         AS_IF([test "x$have_xcomposite" = "xyes"],
649               [
650                 AC_DEFINE(HAVE_XCOMPOSITE, [1], [Define to 1 if we have the XCOMPOSITE X extension])
651
652                 X11_LIBS="$X11_LIBS -lXcomposite"
653                 X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
654                 X11_EXTS="$X11_EXTS xcomposite"
655
656                 AC_MSG_RESULT([found])
657               ],
658               [AC_MSG_ERROR([not found])]
659         )
660
661         # X Generic Extensions (optional)
662         clutter_save_CPPFLAGS="$CPPFLAGS"
663         CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
664
665         clutter_save_LIBS="$LIBS"
666         LIBS="$LIBS $X11_LIBS"
667
668         have_xge=no
669         AC_CHECK_FUNC([XGetEventData],
670                       [
671                         AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
672                         have_xge=yes
673                         X11_EXTS="$X11_EXTS xge"
674                       ])
675
676         CPPFLAGS="$clutter_save_CPPFLAGS"
677         LIBS="$clutter_save_LIBS"
678
679         # XI (optional)
680         AC_ARG_ENABLE([xinput],
681                       [AS_HELP_STRING([--enable-xinput], [Use the XI X extension])],
682                       [],
683                       [enable_xinput=yes])
684
685         AS_IF([test "x$enable_xinput" = "xyes"],
686               [
687                 PKG_CHECK_EXISTS([xi], [have_xinput=yes], [have_xinput=no])
688               ],
689               [
690                 have_xinput=no
691               ])
692
693         AS_CASE([$have_xinput],
694
695                 [yes],
696                 [
697                   AC_CHECK_HEADERS([X11/extensions/XInput2.h],
698                                    [
699                                      have_xinput2=yes
700                                      AC_DEFINE([HAVE_XINPUT_2],
701                                                [1],
702                                                [Define to 1 if XI2 is available])
703                                    ],
704                                    [
705                                      have_xinput2=no
706                                      AC_DEFINE([HAVE_XINPUT],
707                                                [1],
708                                                [Define to 1 if XInput is available])
709                                    ])
710
711                   X11_LIBS="$X11_LIBS $XINPUT_LIBS"
712                   X11_PC_FILES="$X11_PC_FILES xi"
713                   X11_EXTS="$X11_EXTS xi"
714                 ],
715
716                 [no],
717                 [have_xinput2=no],
718
719                 [*],
720                 [AC_MSG_ERROR([Invalid argument for --enable-xinput])]
721         )
722
723         # XKB
724         clutter_save_CPPFLAGS="$CPPFLAGS"
725         CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
726
727         clutter_save_LIBS="$LIBS"
728         LIBS="$LIBS $X11_LIBS"
729
730         have_xkb=no
731         AC_CHECK_FUNC([XkbQueryExtension],
732                       [
733                         AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
734                         have_xkb=yes
735
736                         X11_EXTS="$X11_EXTS xkb"
737                       ])
738
739         CPPFLAGS="$clutter_save_CPPFLAGS"
740         LIBS="$clutter_save_LIBS"
741
742         x11_tests=yes
743         BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
744         FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
745         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
746       ]
747 )
748
749 AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
750 AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"])
751
752 X11_EXTS=${X11_EXTS#* }
753
754 AC_CACHE_SAVE
755
756 dnl === Enable debug level ====================================================
757
758 m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
759 AC_ARG_ENABLE([debug],
760               [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
761                               [Control Clutter debugging level @<:@default=]debug_default[@:>@])],
762               [],
763               [enable_debug=debug_default])
764
765 AS_CASE([$enable_debug],
766
767         [yes],
768         [
769           test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
770           CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
771         ],
772
773         [minimum],
774         [CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"],
775
776         [no],
777         [CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
778
779         [AC_MSG_ERROR([Unknown argument for --enable-debug])]
780 )
781
782 AC_SUBST(CLUTTER_DEBUG_CFLAGS)
783
784 dnl === Enable deprecation guards ==================================================
785
786 m4_define([deprecated_default],
787           [m4_if(m4_eval(clutter_minor_version % 2),
788                  [1],
789                  [no],
790                  [yes])])
791
792 AC_ARG_ENABLE([deprecated],
793               [AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
794                               [Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
795               [],
796               [enable_deprecated=deprecated_default])
797
798 AS_CASE([$enable_deprecated],
799
800         [no],
801         [
802           CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED"
803         ],
804
805         [yes],
806         [
807           CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS -DCLUTTER_DISABLE_DEPRECATION_WARNINGS"
808         ],
809
810         [AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
811 )
812
813 AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
814
815
816 dnl === Conformance test suite ================================================
817
818 AC_ARG_ENABLE([conformance],
819               [AS_HELP_STRING([--enable-conformance=@<:@no/yes@:>@],
820                               [Build conformance test suite @<:@default=yes@:>@])],
821               [],
822               [enable_conformance=yes])
823
824 AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_conformance" = "xyes"])
825
826 dnl === Profiling =============================================================
827
828 m4_define([profile_default], [no])
829 AC_ARG_ENABLE(profile,
830               AS_HELP_STRING([--enable-profile=@<:@no/yes@:>@],
831                              [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@:>@]),
832               [],
833               [enable_profile=profile_default])
834
835 AS_CASE([$enable_profile],
836
837         [yes],
838         [
839           AS_IF([test "x$GCC" = "xyes"],
840                 [
841                   PKG_CHECK_MODULES([PROFILE_DEP], [uprof-0.3])
842                   CLUTTER_PROFILE_CFLAGS="-DCLUTTER_ENABLE_PROFILE $PROFILE_DEP_CFLAGS"
843                   CLUTTER_PROFILE_LDFLAGS="$PROFILE_DEP_LIBS"
844
845                   AS_IF([test "x$enable_debug" = "xyes"], [CLUTTER_PROFILE_CFLAGS+=" -DUPROF_DEBUG"])
846                 ],
847                 [
848                   AC_MSG_ERROR([--enable-profile is currently only supported if using GCC])
849                 ])
850         ],
851
852         [no],
853         [
854           CLUTTER_PROFILE_CFLAGS=""
855           CLUTTER_PROFILE_LDFLAGS=""
856         ],
857
858         [*], [AC_MSG_ERROR([Invalid value for --enable-profile])]
859 )
860 AM_CONDITIONAL(PROFILE, test "x$enable_profile" != "xno")
861 AC_SUBST(CLUTTER_PROFILE_CFLAGS)
862 AC_SUBST(CLUTTER_PROFILE_LDFLAGS)
863
864 dnl === Coverage report =======================================================
865
866 AC_PATH_PROG([GCOV], [gcov], [enable_gcov=no])
867
868 AC_MSG_CHECKING([whether to build with gcov testing])
869
870 AC_ARG_ENABLE([gcov],
871               [AS_HELP_STRING([--enable-gcov],
872                               [Whether to enable coverage testing (requires gcc
873 and gcov)])],
874               [],
875               [enable_gcov=no])
876
877 AS_IF([test "x$enable_gcov" = "xyes" && test "x$GCC" = "xyes"],
878       [
879         AS_IF([test "x$enable_conformance" = "xno"],
880               [AC_MSG_WARN([Conformance test suite is disabled, the coverage report will be incomplete])],
881               [AC_MSG_RESULT([yes])]
882         )
883
884         GCOV_CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
885         GCOV_LDFLAGS="-lgcov"
886       ],
887       [AC_MSG_RESULT([no])]
888 )
889
890 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"])
891 AC_SUBST([GCOV_CFLAGS])
892 AC_SUBST([GCOV_LDFLAGS])
893
894 dnl === Enable strict compiler flags ==========================================
895
896 # use strict compiler flags only when building from git; the rules for
897 # distcheck will take care of turning this on when making a release
898 m4_define([maintainer_flags_default], [m4_if(m4_eval(clutter_micro_version % 2), [1], [yes], [no])])
899 AC_ARG_ENABLE([maintainer-flags],
900               [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
901                               [Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
902               [],
903               [enable_maintainer_flags=maintainer_flags_default])
904
905 MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
906                            -Wall -Wcast-align -Wuninitialized
907                            -Wno-strict-aliasing -Wempty-body -Wformat
908                            -Wformat-security -Winit-self
909                            -Wdeclaration-after-statement -Wvla
910                            -Wpointer-arith"
911
912 AS_CASE([$enable_maintainer_flags],
913         [yes],
914         [
915           AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
916         ],
917
918         [no],
919         [
920         ],
921
922         [error],
923         [
924           MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
925           AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
926         ],
927
928         [*],
929         [AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
930 )
931
932 # strip leading spaces
933 MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#*  }
934 AC_SUBST(MAINTAINER_CFLAGS)
935
936 dnl === Dependencies, compiler flags and linker libraries =====================
937 # strip leading space
938 BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
939
940 # public dependencies, will fill the Requires: field of clutter.pc
941 CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $BACKEND_PC_FILES"
942 PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
943
944 # private dependencies, will fill the Requires.private: field of clutter.pc
945 AS_IF([test "x$CLUTTER_BASE_PC_FILES_PRIVATE" = "x" && test "x$BACKEND_PC_FILES_PRIVATE" = "x"],
946       [
947         CLUTTER_REQUIRES_PRIVATE=""
948         CLUTTER_DEPS_PRIVATE_CFLAGS=""
949         CLUTTER_DEPS_PRIVATE_LIBS=""
950       ],
951       [
952         CLUTTER_REQUIRES_PRIVATE="$CLUTTER_BASE_PC_FILES_PRIVATE $BACKEND_PC_FILES_PRIVATE"
953         PKG_CHECK_MODULES(CLUTTER_DEPS_PRIVATE, [$CLUTTER_REQUIRES_PRIVATE])
954       ])
955
956 AC_SUBST(CLUTTER_REQUIRES)
957 AC_SUBST(CLUTTER_REQUIRES_PRIVATE)
958
959 CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_DEPS_PRIVATE_CFLAGS $CLUTTER_PROFILE_CFLAGS $GLIB_CFLAGS"
960 CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_DEPS_PRIVATE_LIBS $CLUTTER_PROFILE_LDFLAGS $GLIB_LIBS"
961 AC_SUBST(CLUTTER_CFLAGS)
962 AC_SUBST(CLUTTER_LIBS)
963
964
965 dnl === GObject-Introspection check ===========================================
966
967 GOBJECT_INTROSPECTION_CHECK([gi_req_version])
968
969 dnl === GTK Doc check =========================================================
970
971 GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
972
973 # we don't want to build the documentation from a Git clone unless we
974 # explicitly tell configure to do so; this allows avoiding to recurse into
975 # the documentation directory when building Clutter inside Poky for a
976 # target device that doesn't have gtk-doc installed. for reference
977 # see: http://bugzilla.openedhand.com/show_bug.cgi?id=1047
978 #
979 # we use autogen.sh as it exists only inside the Git clones, and it
980 # is not packaged into tarballs.
981 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
982
983 # prefixes for fixing gtk-doc references
984 CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
985 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
986 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
987 COGL_PREFIX="`$PKG_CONFIG --variable=prefix cogl-1.0`"
988 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
989 AC_SUBST(CAIRO_PREFIX)
990 AC_SUBST(GLIB_PREFIX)
991 AC_SUBST(PANGO_PREFIX)
992 AC_SUBST(COGL_PREFIX)
993 AC_SUBST(ATK_PREFIX)
994
995 dnl === Manual ================================================================
996
997 AC_ARG_ENABLE([docs],
998               [AS_HELP_STRING([--enable-docs=@<:@no/yes@:>@],
999                               [Build optional documentation; requires xsltproc and jw.])],
1000               [enable_docs=$enableval],
1001               [enable_docs=no])
1002
1003 enable_pdfs=no
1004 AS_IF([test "x$enable_docs" = "xyes"],
1005       [
1006         AC_PATH_PROG(JW, [jw], [no])
1007         AS_IF([test "x$JW" = "xno"],
1008               [
1009                 AC_MSG_WARN([jw not found; pdf generation has been disabled])
1010               ],
1011               [enable_pdfs=yes])
1012
1013         AC_PATH_PROG(XSLTPROC, [xsltproc], [no])
1014         AS_IF([test "x$XSLTPROC" = "xno"],
1015               [
1016                 AC_MSG_ERROR([xsltproc not found])
1017               ])
1018       ]
1019 )
1020
1021 AM_CONDITIONAL(ENABLE_DOCS, [test "x$enable_docs" = "xyes"])
1022 AM_CONDITIONAL(ENABLE_PDFS, [test "x$enable_pdfs" = "xyes"])
1023
1024 dnl === I18N ==================================================================
1025
1026 AM_GNU_GETTEXT_VERSION([0.17])
1027 AM_GNU_GETTEXT([external])
1028
1029 GETTEXT_PACKAGE="clutter-1.0"
1030 AC_SUBST(GETTEXT_PACKAGE)
1031 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
1032                    ["$GETTEXT_PACKAGE"],
1033                    [The prefix for our gettext translation domains.])
1034 AS_ALL_LINGUAS
1035
1036 dnl ===========================================================================
1037
1038 AC_CONFIG_FILES([
1039         Makefile
1040         config.h.win32
1041         README
1042
1043         build/Makefile
1044         build/autotools/Makefile
1045         build/mingw/Makefile
1046         build/win32/Makefile
1047         build/win32/vs9/Makefile
1048         build/win32/vs10/Makefile
1049
1050         clutter/Makefile
1051         clutter/clutter-config.h
1052         clutter/clutter-version.h
1053         clutter/clutter-version.h.win32
1054         clutter/clutter-$CLUTTER_API_VERSION.pc:clutter/clutter.pc.in
1055
1056         clutter/cally/cally-$CLUTTER_API_VERSION.pc:clutter/cally/cally.pc.in
1057
1058         clutter/cex100/clutter-cex100.h
1059
1060         tests/Makefile
1061         tests/accessibility/Makefile
1062         tests/conform/Makefile
1063         tests/conform/test-launcher.sh
1064         tests/data/Makefile
1065         tests/interactive/Makefile
1066         tests/interactive/wrapper.sh
1067         tests/micro-bench/Makefile
1068         tests/performance/Makefile
1069
1070         doc/Makefile
1071         doc/reference/Makefile
1072         doc/reference/clutter/Makefile
1073         doc/reference/clutter/clutter-docs.xml
1074         doc/reference/cally/Makefile
1075         doc/reference/cally/cally-docs.xml
1076         doc/common/Makefile
1077         doc/cookbook/Makefile
1078         doc/cookbook/clutter-cookbook.xml
1079         doc/cookbook/examples/Makefile
1080
1081         po/Makefile.in
1082 ])
1083
1084 AC_OUTPUT
1085
1086 dnl === Summary ===============================================================
1087
1088 echo ""
1089 echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
1090
1091 # Global flags
1092 echo ""
1093 echo " • Global:"
1094 echo "        Prefix: ${prefix}"
1095 echo "        Libdir: ${libdir}"
1096 echo "        Sysconfdir: ${sysconfdir}"
1097
1098 # Compiler/Debug related flags
1099 echo ""
1100 echo " • Compiler options:"
1101 echo "        Clutter debug level: ${enable_debug}"
1102 echo "        Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
1103 echo "        Profiling enabled: ${enable_profile}"
1104 echo "        Enable coverage tests: ${enable_gcov}"
1105 echo "        Enable deprecated symbols: ${enable_deprecated}"
1106
1107 # Documentation
1108 echo ""
1109 echo " • Documentation:"
1110 echo "        Build API Reference: ${enable_gtk_doc}"
1111 echo "        Build Additional Documentation: ${enable_docs} (Generate PDF: ${enable_pdfs})"
1112
1113 # Miscellaneous
1114 echo ""
1115 echo " • Extra:"
1116 echo "        Build introspection data: ${enable_introspection}"
1117 echo "        Build conformance test suite: ${enable_conformance}"
1118 echo "        Build X11-specific tests: ${x11_tests}"
1119
1120 # Clutter backend related flags
1121 echo ""
1122 echo " • Clutter Backends:"
1123
1124 if test "x$experimental_backend" = "xno"; then
1125 echo "        Windowing systems: ${CLUTTER_BACKENDS}"
1126 else
1127 echo "        Windowing systems: ${CLUTTER_BACKENDS} (WARNING: Experimental backends enabled)"
1128 fi
1129
1130 if test "x$experimental_input_backend" = "xno"; then
1131 echo "        Input backends: ${CLUTTER_INPUT_BACKENDS}"
1132 else
1133 echo "        Input backends: ${CLUTTER_INPUT_BACKENDS} (WARNING: Experimental backends enabled)"
1134 fi
1135
1136 if test "x$SUPPORT_X11" = "x1"; then
1137 echo ""
1138 echo "     - X11 backend options:"
1139 echo "        Enabled extensions: ${X11_EXTS}"
1140 echo "        Build X11-specific tests: ${x11_tests}"
1141 fi
1142
1143 if test "x$SUPPORT_CEX100" = "x1"; then
1144 echo ""
1145 echo "     - CEx100 backend options (WARNING: Experimental):"
1146 echo "        libGDL include prefix: ${CLUTTER_CEX100_LIBGDL_PREFIX}"
1147 fi
1148
1149 if test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"; then
1150 echo ""
1151 echo "     - Wayland compositor support enabled (WARNING: Experimental)"
1152 fi
1153
1154 echo ""
1155
1156 # General warning about experimental features
1157 if test "x$experimental_backend" = "xyes"; then
1158 echo ""
1159 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1160 echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
1161 echo ""
1162 echo "  The stability of your build might be affected by one or more"
1163 echo "  experimental backends or experimental and unsupported features"
1164 echo ""
1165 echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
1166 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1167 echo ""
1168 fi