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
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
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], [1])
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:
19 # (<minor> * 100 + <micro>) - <interface_age>
21 # this allows using the same soname for different micro-releases in case
22 # no API was added or deprecated. for instance:
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
33 # • for development releases: keep clutter_interface_age to 0
34 m4_define([clutter_interface_age], [0])
36 m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
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],
43 m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version])
45 # change this only when breaking the API
46 m4_define([clutter_api_version], [1.0])
52 [http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
54 [http://www.clutter-project.org])
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])
61 AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
62 AM_SILENT_RULES([yes])
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])
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
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])
86 dnl = Preliminary platform checks =============================================
94 AC_MSG_CHECKING([if building for some Win32 platform])
96 [*-*-mingw*|*-*-cygwin*],
98 CLUTTER_LT_LDFLAGS="$CLUTTER_LT_LDFLAGS -no-undefined"
104 AC_MSG_RESULT([$platform_win32])
106 AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
108 AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
109 AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
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"])
115 AC_SUBST(CLUTTER_LT_LDFLAGS)
119 dnl = Dependencies =========================================================
121 # Checks for programs.
124 # require libtool >= 2.2
126 LT_INIT([disable-static])
128 # Checks for header files.
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])
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])
158 # Checks for typedefs, structures, and compiler characteristics.
159 AM_PATH_GLIB_2_0([glib_req_version],
161 [AC_MSG_ERROR([glib-2.0 is required])],
162 [gobject gthread gmodule-no-export])
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])],
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; }],
182 LDFLAGS="${saved_LDFLAGS}"
185 AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
186 AC_SUBST(CLUTTER_LINK_FLAGS)
190 dnl ========================================================================
195 CLUTTER_INPUT_BACKENDS=""
197 experimental_backend=no
198 experimental_input_backend=no
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"
203 # backend specific pkg-config files
206 dnl === Clutter windowing system backend ======================================
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],
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],
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],
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],
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],
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],
237 dnl Define default values
238 AS_IF([test "x$enable_x11" = "xcheck"],
240 AS_IF([test "x$platform_glx" = "xyes"], [enable_x11=yes], [enable_x11=no])
243 AS_IF([test "x$enable_win32" = "xcheck"],
245 AS_IF([test "x$platform_win32" = "xyes"], [enable_win32=yes], [enable_win32=no])
248 AS_IF([test "x$enable_osx" = "xcheck"],
250 AS_IF([test "x$platform_quartz" = "xyes"], [enable_osx=yes], [enable_osx=no])
253 AS_IF([test "x$enable_gdk" = "xcheck"],
255 PKG_CHECK_EXISTS([gdk-3.0 >= gdk_req_version], [enable_gdk=yes], [enable_gdk=no])
258 dnl Per-backend rules
259 AS_IF([test "x$enable_x11" = "xyes"],
261 CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11"
262 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS x11"
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"])
274 # We might fall back to DRM for sync-to-vblank on GLX
275 PKG_CHECK_EXISTS([libdrm],
277 AC_DEFINE([HAVE_DRM], [1], [Have libdrm support])
278 BACKEND_PC_FILES="$BACKEND_PC_FILES libdrm"
282 # we use fontconfig API and pango-fc when the fontconfig
283 # configuration changes
284 PKG_CHECK_EXISTS([pangoft2],
286 AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
287 BACKEND_PC_FILES="$BACKEND_PC_FILES pangoft2"
291 AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend])
294 AS_IF([test "x$enable_gdk" = "xyes"],
296 CLUTTER_BACKENDS="$CLUTTER_BACKENDS gdk"
297 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS gdk"
302 BACKEND_PC_FILES="$BACKEND_PC_FILES gdk-3.0"
303 PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
306 AS_IF([test "x$enable_wayland" = "xyes"],
308 CLUTTER_BACKENDS="$CLUTTER_BACKENDS wayland"
310 experimental_backend="yes"
315 PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
316 PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], [])
317 PKG_CHECK_EXISTS([wayland-client xkbcommon],
318 [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon"],
321 AC_DEFINE([HAVE_CLUTTER_WAYLAND], [1], [Have the Wayland backend])
324 AS_IF([test "x$enable_cex100" = "xyes"],
326 CLUTTER_BACKENDS="$CLUTTER_BACKENDS cex100"
328 experimental_backend="yes"
331 SUPPORT_EGL_PLATFORM_GDL=1
334 AC_CHECK_HEADERS([libgdl.h], [have_gdl=yes])
336 AS_IF([test "x$have_gdl" = "xno"],
338 AC_CHECK_HEADERS([CE4100/libgdl.h],
340 FLAVOUR_CFLAGS="-I/usr/include/CE4100"
342 CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
346 AS_IF([test "x$have_gdl" = "xno"],
347 [AC_MSG_ERROR([libgdl.h not found but the CEx100 backend has been explicitly enabled])])
349 AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
351 FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl"
353 AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend])
354 AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
355 AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
358 AS_IF([test "x$enable_egl" = "xyes"],
360 CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
362 experimental_backend="yes"
367 # if Mesa has support for egl, we can use it as well
368 PKG_CHECK_EXISTS([egl],
370 BACKEND_PC_FILES="$BACKEND_PC_FILES egl"
374 FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS"
375 FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS"
377 AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
379 AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
382 AS_IF([test "x$enable_osx" = "xyes"],
384 CLUTTER_BACKENDS="$CLUTTER_BACKENDS osx"
385 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS osx"
387 AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend])
389 FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
394 AS_IF([test "x$enable_win32" = "xyes"],
396 CLUTTER_BACKENDS="$CLUTTER_BACKENDS win32"
397 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS win32"
399 AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend])
401 FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm"
402 FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500"
404 AC_CHECK_TOOL(WINDRES, [windres], [AC_MSG_ERROR([*** windres is required])])
409 AS_IF([test "x$CLUTTER_BACKENDS" = "x"],
411 AC_MSG_ERROR([No backend enabled. You need to enable at least one backend.])
414 # additional input backends
416 AC_ARG_ENABLE([tslib-input],
417 [AS_HELP_STRING([--enable-tslib-input=@<:@yes/no@:>@], [Enable TSLib for input events (default=no)])],
418 [enable_tslib=$enableval],
420 AC_ARG_ENABLE([evdev-input],
421 [AS_HELP_STRING([--with-evdev=@<:@yes/no@:>@], [Enable evdev for input events (default=no)])],
422 [enable_evdev=$enableval],
425 AS_IF([test "x$enable_tslib" = "xyes"],
427 PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no])
428 AS_IF([test "x$have_tslib" = "xyes"],
430 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS tslib"
431 experimental_input_backend="yes"
432 AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])
437 AS_IF([test "x$enable_evdev" = "xyes"],
439 PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], [have_evdev=yes], [have_evdev=no])
440 AS_IF([test "x$have_evdev" = "xyes"],
442 CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
443 experimental_input_backend="yes"
444 AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
449 # conditionals for use in automake files...
450 AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "x1"])
451 AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"])
452 AM_CONDITIONAL(SUPPORT_GDK, [test "x$SUPPORT_GDK" = "x1"])
453 AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"])
454 AM_CONDITIONAL(SUPPORT_OSX, [test "x$SUPPORT_OSX" = "x1"])
455 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$SUPPORT_WIN32" = "x1"])
456 AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"])
457 AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$SUPPORT_WAYLAND" = "x1"])
458 AM_CONDITIONAL(SUPPORT_STUB, [test "x$SUPPORT_WIN32" = "x1" -o \
459 "x$SUPPORT_OSX" = "x1" -o \
460 "x$SUPPORT_WAYLAND" = "x1"])
462 AM_CONDITIONAL(USE_COGL, [test "x$SUPPORT_COGL" = "x1"])
463 AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
464 AM_CONDITIONAL(USE_EVDEV, [test "x$have_evdev" = "xyes"])
465 AM_CONDITIONAL(USE_GLD, [test "x$have_gdl" = "xyes"])
467 dnl Instead of using AM_CFLAGS to ensure
468 dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter
469 dnl and cogl code we use a define in config.h instead. This helps ensure
470 dnl other tools such as glib-mkenums and gir-scanner don't end up
471 dnl using the define also.
472 AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
474 dnl strip leading spaces
475 CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* }
476 AC_SUBST(CLUTTER_BACKENDS)
478 CLUTTER_INPUT_BACKENDS=${CLUTTER_INPUT_BACKENDS#* }
479 AC_SUBST(CLUTTER_INPUT_BACKENDS)
483 dnl === Clutter configuration =================================================
485 CLUTTER_CONFIG_DEFINES=
488 AS_IF([test "x$SUPPORT_X11" = "x1"],
489 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
490 #define CLUTTER_WINDOWING_X11 \"x11\"
491 #define CLUTTER_INPUT_X11 \"x11\""])
492 AS_IF([test "x$SUPPORT_GDK" = "x1"],
493 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
494 #define CLUTTER_WINDOWING_GDK \"gdk\"
495 #define CLUTTER_INPUT_GDK \"gdk\""])
496 AS_IF([test "x$SUPPORT_GLX" = "x1"],
497 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
498 #define CLUTTER_WINDOWING_GLX \"glx\""])
499 AS_IF([test "x$SUPPORT_EGL" = "x1"],
500 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
501 #define CLUTTER_WINDOWING_EGL \"eglnative\""])
502 AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
503 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
504 #define CLUTTER_WINDOWING_WAYLAND \"wayland\""])
505 AS_IF([test "x$SUPPORT_OSX" = "x1"],
506 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
507 #define CLUTTER_WINDOWING_OSX \"osx\"
508 #define CLUTTER_INPUT_OSX \"osx\""])
509 AS_IF([test "x$SUPPORT_WIN32" = "x1"],
510 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
511 #define CLUTTER_WINDOWING_WIN32 \"win32\"
512 #define CLUTTER_INPUT_WIN32 \"win32\""])
513 AS_IF([test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"],
514 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
515 #define CLUTTER_WINDOWING_CEX100 \"cex100\""])
516 AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
517 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
518 #define CLUTTER_INPUT_EVDEV \"evdev\""])
519 AS_IF([test "x$SUPPORT_TSLIB" = "x1"],
520 [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
521 #define CLUTTER_INPUT_TSLIB \"tslib\""])
523 # the 'null' input backend is special
524 CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
525 #define CLUTTER_INPUT_NULL \"null\""
527 AC_SUBST([CLUTTER_CONFIG_DEFINES])
529 dnl === Clutter substitutions kept for backwards compatibility ================
530 AC_SUBST([CLUTTER_WINSYS], [deprecated])
531 AC_SUBST([CLUTTER_WINSYS_BASE], [deprecated])
532 AC_SUBST([CLUTTER_STAGE_TYPE], [deprecated])
533 AC_SUBST([CLUTTER_SONAME_INFIX], [deprecated])
534 AC_SUBST([CLUTTER_FLAVOUR], [deprecated])
535 AC_SUBST([CLUTTER_COGL], [deprecated])
536 AC_SUBST([COGL_DRIVER], [deprecated])
538 dnl === Image loading backend =================================================
541 dnl === X11 checks, only for X11-based backends ===============================
546 AS_IF([test "x$SUPPORT_X11" = "x1"],
548 # base X11 includes and libraries
549 AC_MSG_CHECKING([for X11])
551 # start with pkg-config
552 PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
553 AS_IF([test "x$have_x11" = "xyes"],
557 # we actually need to ask for CFLAGS and LIBS
558 X11_CFLAGS=`$PKG_CONFIG --cflags $X11_PC_FILES`
559 X11_LIBS=`$PKG_CONFIG --libs $X11_PC_FILES`
561 AC_MSG_RESULT([found])
564 # no pkg-config, let's go old school
567 AS_IF([test "x$no_x" = "xyes"],
568 [AC_MSG_ERROR([No X11 Libraries found])],
570 AS_IF([test "x$x_includes" != "xNONE" && test -n "$x_includes"],
571 [X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`])
573 AS_IF([test "x$x_libraries" != "xNONE" && test -n "$x_libraries"],
574 [X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`])
576 AC_MSG_RESULT([found])
583 AC_MSG_CHECKING([for XEXT extension])
584 PKG_CHECK_EXISTS([xext], [have_xext=yes], [have_xext=no])
585 AS_IF([test "x$have_xext" = "xyes"],
587 AC_DEFINE(HAVE_XEXT, [1], [Define to 1 if we have the XEXT X extension])
589 X11_LIBS="$X11_LIBS -lXext"
590 X11_PC_FILES="$X11_PC_FILES xext"
591 X11_EXTS="$X11_EXTS xext"
593 AC_MSG_RESULT([found])
595 [AC_MSG_ERROR([Not found])]
599 AC_MSG_CHECKING([for XFIXES extension >= $XFIXES_REQ_VERSION])
600 PKG_CHECK_EXISTS([xfixes >= $XFIXES_REQ_VERSION], [have_xfixes=yes], [have_xfixes=no])
601 AS_IF([test "x$have_xfixes" = "xyes"],
603 AC_DEFINE(HAVE_XFIXES, [1], [Define to 1 if we have the XFIXES X extension])
605 X11_LIBS="$X11_LIBS -lXfixes"
606 X11_PC_FILES="$X11_PC_FILES xfixes >= $XFIXES_REQ_VERSION"
607 X11_EXTS="$X11_EXTS xfixes"
609 AC_MSG_RESULT([found])
611 [AC_MSG_ERROR([Not found])]
615 AC_MSG_CHECKING([for XDAMAGE extension])
616 PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
617 AS_IF([test "x$have_xdamage" = "xyes"],
619 AC_DEFINE(HAVE_XDAMAGE, [1], [Define to 1 if we have the XDAMAGE X extension])
621 X11_LIBS="$X11_LIBS -lXdamage"
622 X11_PC_FILES="$X11_PC_FILES xdamage"
623 X11_EXTS="$X11_EXTS xdamage"
625 AC_MSG_RESULT([found])
627 [AC_MSG_ERROR([not found])]
630 # XCOMPOSITE (optional)
631 AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
632 PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
633 AS_IF([test "x$have_xcomposite" = "xyes"],
635 AC_DEFINE(HAVE_XCOMPOSITE, [1], [Define to 1 if we have the XCOMPOSITE X extension])
637 X11_LIBS="$X11_LIBS -lXcomposite"
638 X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
639 X11_EXTS="$X11_EXTS xcomposite"
641 AC_MSG_RESULT([found])
643 [AC_MSG_ERROR([not found])]
646 # X Generic Extensions (optional)
647 clutter_save_CPPFLAGS="$CPPFLAGS"
648 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
650 clutter_save_LIBS="$LIBS"
651 LIBS="$LIBS $X11_LIBS"
654 AC_CHECK_FUNC([XGetEventData],
656 AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
658 X11_EXTS="$X11_EXTS xge"
661 CPPFLAGS="$clutter_save_CPPFLAGS"
662 LIBS="$clutter_save_LIBS"
665 AC_ARG_ENABLE([xinput],
666 [AS_HELP_STRING([--enable-xinput], [Use the XI X extension])],
670 AS_IF([test "x$enable_xinput" = "xyes"],
672 PKG_CHECK_EXISTS([xi], [have_xinput=yes], [have_xinput=no])
678 AS_CASE([$have_xinput],
682 AC_CHECK_HEADERS([X11/extensions/XInput2.h],
685 AC_DEFINE([HAVE_XINPUT_2],
687 [Define to 1 if XI2 is available])
691 AC_DEFINE([HAVE_XINPUT],
693 [Define to 1 if XInput is available])
696 X11_LIBS="$X11_LIBS $XINPUT_LIBS"
697 X11_PC_FILES="$X11_PC_FILES xi"
698 X11_EXTS="$X11_EXTS xi"
705 [AC_MSG_ERROR([Invalid argument for --enable-xinput])]
709 clutter_save_CPPFLAGS="$CPPFLAGS"
710 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
712 clutter_save_LIBS="$LIBS"
713 LIBS="$LIBS $X11_LIBS"
716 AC_CHECK_FUNC([XkbQueryExtension],
718 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
721 X11_EXTS="$X11_EXTS xkb"
724 CPPFLAGS="$clutter_save_CPPFLAGS"
725 LIBS="$clutter_save_LIBS"
728 BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
729 FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
730 FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
734 AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
735 AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"])
737 X11_EXTS=${X11_EXTS#* }
741 dnl === Enable debug level ====================================================
743 m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
744 AC_ARG_ENABLE([debug],
745 [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
746 [Control Clutter debugging level @<:@default=]debug_default[@:>@])],
748 [enable_debug=debug_default])
750 AS_CASE([$enable_debug],
754 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
755 CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
759 [CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"],
762 [CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
764 [AC_MSG_ERROR([Unknown argument for --enable-debug])]
767 AC_SUBST(CLUTTER_DEBUG_CFLAGS)
769 dnl === Enable deprecation guards ==================================================
771 m4_define([deprecated_default],
772 [m4_if(m4_eval(clutter_minor_version % 2),
777 AC_ARG_ENABLE([deprecated],
778 [AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
779 [Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
781 [enable_deprecated=deprecated_default])
783 AS_CASE([$enable_deprecated],
787 CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED"
792 CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS -DCLUTTER_DISABLE_DEPRECATION_WARNINGS"
795 [AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
798 AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
801 dnl === Conformance test suite ================================================
803 AC_ARG_ENABLE([conformance],
804 [AS_HELP_STRING([--enable-conformance=@<:@no/yes@:>@],
805 [Build conformance test suite @<:@default=yes@:>@])],
807 [enable_conformance=yes])
809 AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_conformance" = "xyes"])
811 dnl === Profiling =============================================================
813 m4_define([profile_default], [no])
814 AC_ARG_ENABLE(profile,
815 AS_HELP_STRING([--enable-profile=@<:@no/yes@:>@],
816 [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@:>@]),
818 [enable_profile=profile_default])
820 AS_CASE([$enable_profile],
824 AS_IF([test "x$GCC" = "xyes"],
826 PKG_CHECK_MODULES([PROFILE_DEP], [uprof-0.3])
827 CLUTTER_PROFILE_CFLAGS="-DCLUTTER_ENABLE_PROFILE $PROFILE_DEP_CFLAGS"
828 CLUTTER_PROFILE_LDFLAGS="$PROFILE_DEP_LIBS"
830 AS_IF([test "x$enable_debug" = "xyes"], [CLUTTER_PROFILE_CFLAGS+=" -DUPROF_DEBUG"])
833 AC_MSG_ERROR([--enable-profile is currently only supported if using GCC])
839 CLUTTER_PROFILE_CFLAGS=""
840 CLUTTER_PROFILE_LDFLAGS=""
843 [*], [AC_MSG_ERROR([Invalid value for --enable-profile])]
845 AM_CONDITIONAL(PROFILE, test "x$enable_profile" != "xno")
846 AC_SUBST(CLUTTER_PROFILE_CFLAGS)
847 AC_SUBST(CLUTTER_PROFILE_LDFLAGS)
849 dnl === Coverage report =======================================================
851 AC_PATH_PROG([GCOV], [gcov], [enable_gcov=no])
853 AC_MSG_CHECKING([whether to build with gcov testing])
855 AC_ARG_ENABLE([gcov],
856 [AS_HELP_STRING([--enable-gcov],
857 [Whether to enable coverage testing (requires gcc
862 AS_IF([test "x$enable_gcov" = "xyes" && test "x$GCC" = "xyes"],
864 AS_IF([test "x$enable_conformance" = "xno"],
865 [AC_MSG_WARN([Conformance test suite is disabled, the coverage report will be incomplete])],
866 [AC_MSG_RESULT([yes])]
869 GCOV_CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
870 GCOV_LDFLAGS="-lgcov"
872 [AC_MSG_RESULT([no])]
875 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"])
876 AC_SUBST([GCOV_CFLAGS])
877 AC_SUBST([GCOV_LDFLAGS])
879 dnl === Enable strict compiler flags ==========================================
881 # use strict compiler flags only when building from git; the rules for
882 # distcheck will take care of turning this on when making a release
883 m4_define([maintainer_flags_default], [m4_if(m4_eval(clutter_micro_version % 2), [1], [yes], [no])])
884 AC_ARG_ENABLE([maintainer-flags],
885 [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
886 [Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
888 [enable_maintainer_flags=maintainer_flags_default])
890 MAINTAINER_COMPILER_FLAGS="-Wall -Wshadow -Wcast-align -Wuninitialized
891 -Wno-strict-aliasing -Wempty-body -Wformat
892 -Wformat-security -Winit-self
893 -Wdeclaration-after-statement -Wvla
896 AS_CASE([$enable_maintainer_flags],
899 AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
908 MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
909 AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
913 [AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
916 # strip leading spaces
917 MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#* }
918 AC_SUBST(MAINTAINER_CFLAGS)
920 dnl === Dependencies, compiler flags and linker libraries =====================
921 # strip leading space
922 BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
924 CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $IMAGE_PC_FILES $BACKEND_PC_FILES"
925 PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
926 AC_SUBST(CLUTTER_REQUIRES)
928 CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_PROFILE_CFLAGS $GLIB_CFLAGS"
929 CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_PROFILE_LDFLAGS $GLIB_LIBS"
930 AC_SUBST(CLUTTER_CFLAGS)
931 AC_SUBST(CLUTTER_LIBS)
934 dnl === GObject-Introspection check ===========================================
936 GOBJECT_INTROSPECTION_CHECK([gi_req_version])
938 dnl === GTK Doc check =========================================================
940 GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
942 # we don't want to build the documentation from a Git clone unless we
943 # explicitly tell configure to do so; this allows avoiding to recurse into
944 # the documentation directory when building Clutter inside Poky for a
945 # target device that doesn't have gtk-doc installed. for reference
946 # see: http://bugzilla.openedhand.com/show_bug.cgi?id=1047
948 # we use autogen.sh as it exists only inside the Git clones, and it
949 # is not packaged into tarballs.
950 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
952 # prefixes for fixing gtk-doc references
953 CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
954 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
955 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
956 COGL_PREFIX="`$PKG_CONFIG --variable=prefix cogl-1.0`"
957 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
958 AC_SUBST(CAIRO_PREFIX)
959 AC_SUBST(GLIB_PREFIX)
960 AC_SUBST(PANGO_PREFIX)
961 AC_SUBST(COGL_PREFIX)
964 dnl === Manual ================================================================
966 AC_ARG_ENABLE([docs],
967 [AS_HELP_STRING([--enable-docs=@<:@no/yes@:>@],
968 [Build optional documentation; requires xsltproc and jw.])],
969 [enable_docs=$enableval],
973 AS_IF([test "x$enable_docs" = "xyes"],
975 AC_PATH_PROG(JW, [jw], [no])
976 AS_IF([test "x$JW" = "xno"],
978 AC_MSG_WARN([jw not found; pdf generation has been disabled])
982 AC_PATH_PROG(XSLTPROC, [xsltproc], [no])
983 AS_IF([test "x$XSLTPROC" = "xno"],
985 AC_MSG_ERROR([xsltproc not found])
990 AM_CONDITIONAL(ENABLE_DOCS, [test "x$enable_docs" = "xyes"])
991 AM_CONDITIONAL(ENABLE_PDFS, [test "x$enable_pdfs" = "xyes"])
993 dnl === I18N ==================================================================
995 AM_GNU_GETTEXT_VERSION([0.17])
996 AM_GNU_GETTEXT([external])
998 GETTEXT_PACKAGE="clutter-1.0"
999 AC_SUBST(GETTEXT_PACKAGE)
1000 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
1001 ["$GETTEXT_PACKAGE"],
1002 [The prefix for our gettext translation domains.])
1005 dnl ===========================================================================
1013 build/autotools/Makefile
1014 build/mingw/Makefile
1017 clutter/clutter-config.h
1018 clutter/clutter-version.h
1019 clutter/clutter-$CLUTTER_API_VERSION.pc:clutter/clutter.pc.in
1021 clutter/cally/cally-$CLUTTER_API_VERSION.pc:clutter/cally/cally.pc.in
1023 clutter/cex100/clutter-cex100.h
1026 tests/accessibility/Makefile
1027 tests/conform/Makefile
1028 tests/conform/test-launcher.sh
1030 tests/interactive/Makefile
1031 tests/interactive/wrapper.sh
1032 tests/micro-bench/Makefile
1033 tests/performance/Makefile
1036 doc/reference/Makefile
1037 doc/reference/clutter/Makefile
1038 doc/reference/clutter/clutter-docs.xml
1039 doc/reference/cally/Makefile
1040 doc/reference/cally/cally-docs.xml
1042 doc/cookbook/Makefile
1043 doc/cookbook/clutter-cookbook.xml
1044 doc/cookbook/examples/Makefile
1051 dnl === Summary ===============================================================
1054 echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
1059 echo " Prefix: ${prefix}"
1060 echo " Libdir: ${libdir}"
1061 echo " Sysconfdir: ${sysconfdir}"
1063 # Compiler/Debug related flags
1065 echo " • Compiler options:"
1066 echo " Clutter debug level: ${enable_debug}"
1067 echo " Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
1068 echo " Profiling enabled: ${enable_profile}"
1069 echo " Enable coverage tests: ${enable_gcov}"
1070 echo " Enable deprecated symbols: ${enable_deprecated}"
1074 echo " • Documentation:"
1075 echo " Build API Reference: ${enable_gtk_doc}"
1076 echo " Build Additional Documentation: ${enable_docs} (Generate PDF: ${enable_pdfs})"
1081 echo " Build introspection data: ${enable_introspection}"
1082 echo " Build conformance test suite: ${enable_conformance}"
1083 echo " Build X11-specific tests: ${x11_tests}"
1085 # Clutter backend related flags
1087 echo " • Clutter Backends:"
1089 if test "x$experimental_backend" = "xno"; then
1090 echo " Windowing systems: ${CLUTTER_BACKENDS}"
1092 echo " Windowing systems: ${CLUTTER_BACKENDS} (WARNING: Experimental backends enabled)"
1095 if test "x$experimental_input_backend" = "xno"; then
1096 echo " Input backends: ${CLUTTER_INPUT_BACKENDS}"
1098 echo " Input backends: ${CLUTTER_INPUT_BACKENDS} (WARNING: Experimental backends enabled)"
1101 if test "x$SUPPORT_X11" = "x1"; then
1103 echo " - X11 backend options:"
1104 echo " Enabled extensions: ${X11_EXTS}"
1105 echo " Build X11-specific tests: ${x11_tests}"
1108 if test "x$SUPPORT_CEX100" = "x1"; then
1110 echo " - CEx100 backend options:"
1111 echo " libGDL include prefix: ${CLUTTER_CEX100_LIBGDL_PREFIX}"
1116 # General warning about experimental features
1117 if test "x$experimental_backend" = "xyes"; then
1119 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1120 echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
1122 echo " The stability of your build might be affected by one or more"
1123 echo " experimental backends or experimental and unsupported features"
1125 echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
1126 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"