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