2006-05-29 08:59:36 +00:00
|
|
|
# clutter package version number, (as distinct from shared library version)
|
2009-08-31 14:49:39 +00:00
|
|
|
# An odd micro number indicates in-progress development from Git
|
|
|
|
# An even micro number indicates a released version
|
|
|
|
#
|
|
|
|
# Making a point release:
|
|
|
|
# - increase clutter_micro_version to the next even number
|
|
|
|
# - increase clutter_interface_age to the next even number
|
|
|
|
# After the release:
|
|
|
|
# - increase clutter_micro_version to the next odd number
|
|
|
|
# - increase clutter_interface_version to the next odd number
|
2009-07-28 12:23:26 +00:00
|
|
|
m4_define([clutter_major_version], [1])
|
2015-11-02 12:42:01 +00:00
|
|
|
m4_define([clutter_minor_version], [25])
|
2016-02-18 18:51:47 +00:00
|
|
|
m4_define([clutter_micro_version], [7])
|
2006-11-20 12:02:24 +00:00
|
|
|
|
2011-02-11 15:44:03 +00:00
|
|
|
# • for stable releases: increase the interface age by 1 for each release;
|
|
|
|
# if the API changes, set to 0. interface_age and binary_age are used to
|
|
|
|
# create the soname of the shared object:
|
2009-05-25 13:04:53 +00:00
|
|
|
#
|
|
|
|
# (<minor> * 100 + <micro>) - <interface_age>
|
|
|
|
#
|
|
|
|
# this allows using the same soname for different micro-releases in case
|
|
|
|
# no API was added or deprecated. for instance:
|
|
|
|
#
|
2009-08-31 14:49:39 +00:00
|
|
|
# clutter 1.2.0 -> 100 * 2 + 0 = 200, interface age = 0 -> 200
|
|
|
|
# clutter 1.2.2 -> 100 * 2 + 2 = 202, interface age = 2 -> 200
|
|
|
|
# clutter 1.2.4 -> 100 * 2 + 4 = 204, interface age = 4 -> 200
|
2009-05-25 13:04:53 +00:00
|
|
|
# [ API addition, deprecation ]
|
2009-08-31 14:49:39 +00:00
|
|
|
# clutter 1.2.6 -> 100 * 2 + 6 = 206, interface age = 0 -> 206
|
|
|
|
# clutter 1.2.8 -> 100 * 2 + 8 = 208, interface age = 2 -> 206
|
|
|
|
# clutter 1.2.10 -> 100 * 2 + 10 = 210, interface age = 4 -> 206
|
2009-05-25 13:04:53 +00:00
|
|
|
# ...
|
2009-09-16 11:47:46 +00:00
|
|
|
#
|
2011-02-11 15:44:03 +00:00
|
|
|
# • for development releases: keep clutter_interface_age to 0
|
2015-12-17 14:14:24 +00:00
|
|
|
m4_define([clutter_interface_age], [0])
|
2011-01-11 20:29:30 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
|
2006-11-20 12:02:24 +00:00
|
|
|
|
2011-01-11 20:29:30 +00:00
|
|
|
m4_define([clutter_release_status],
|
|
|
|
[m4_if(m4_eval(clutter_micro_version % 2), [1], [git],
|
|
|
|
[m4_if(m4_eval(clutter_minor_version % 2), [1], [snapshot],
|
|
|
|
[release])])])
|
|
|
|
|
|
|
|
m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version])
|
|
|
|
|
|
|
|
# change this only when breaking the API
|
|
|
|
m4_define([clutter_api_version], [1.0])
|
|
|
|
|
2010-05-05 10:52:20 +00:00
|
|
|
AC_PREREQ([2.63])
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2007-12-19 16:16:10 +00:00
|
|
|
AC_INIT([clutter],
|
2006-11-20 12:02:24 +00:00
|
|
|
[clutter_version],
|
2011-04-12 16:32:01 +00:00
|
|
|
[http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
|
2010-05-05 10:52:20 +00:00
|
|
|
[clutter],
|
|
|
|
[http://www.clutter-project.org])
|
2009-11-18 14:21:08 +00:00
|
|
|
|
2006-05-29 08:59:36 +00:00
|
|
|
AC_CONFIG_SRCDIR([clutter/clutter.h])
|
2012-07-28 16:40:57 +00:00
|
|
|
AC_CONFIG_HEADERS([clutter/config.h])
|
2009-11-18 14:21:08 +00:00
|
|
|
AC_CONFIG_AUX_DIR([build])
|
|
|
|
AC_CONFIG_MACRO_DIR([build/autotools])
|
2005-04-13 19:49:56 +00:00
|
|
|
|
2011-06-20 12:59:14 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
|
2010-05-05 10:52:20 +00:00
|
|
|
AM_SILENT_RULES([yes])
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2010-09-03 10:09:57 +00:00
|
|
|
AC_SUBST([CLUTTER_MAJOR_VERSION], [clutter_major_version])
|
|
|
|
AC_SUBST([CLUTTER_MINOR_VERSION], [clutter_minor_version])
|
|
|
|
AC_SUBST([CLUTTER_MICRO_VERSION], [clutter_micro_version])
|
|
|
|
AC_SUBST([CLUTTER_VERSION], [clutter_version])
|
|
|
|
AC_SUBST([CLUTTER_API_VERSION], [clutter_api_version])
|
|
|
|
AC_SUBST([CLUTTER_API_VERSION_AM], [$CLUTTER_MAJOR_VERSION\_0])
|
|
|
|
AC_SUBST([CLUTTER_RELEASE_STATUS], [clutter_release_status])
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2009-09-16 11:47:46 +00:00
|
|
|
m4_define([lt_current], [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
|
2006-11-20 12:02:24 +00:00
|
|
|
m4_define([lt_revision], [clutter_interface_age])
|
2009-05-25 13:04:53 +00:00
|
|
|
m4_define([lt_age], [m4_eval(clutter_binary_age - clutter_interface_age)])
|
2006-11-20 12:02:24 +00:00
|
|
|
CLUTTER_LT_CURRENT=lt_current
|
|
|
|
CLUTTER_LT_REV=lt_revision
|
|
|
|
CLUTTER_LT_AGE=lt_age
|
2006-05-29 08:59:36 +00:00
|
|
|
CLUTTER_LT_VERSION="$CLUTTER_LT_CURRENT:$CLUTTER_LT_REV:$CLUTTER_LT_AGE"
|
|
|
|
CLUTTER_LT_LDFLAGS="-version-info $CLUTTER_LT_VERSION"
|
2011-09-21 17:05:03 +00:00
|
|
|
AC_SUBST([CLUTTER_LT_CURRENT], [lt_current])
|
|
|
|
AC_SUBST([CLUTTER_LT_REVISION], [lt_revision])
|
|
|
|
AC_SUBST([CLUTTER_LT_VERSION], [$CLUTTER_LT_VERSION])
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2011-04-04 21:33:31 +00:00
|
|
|
AC_PROG_SED
|
|
|
|
|
2011-11-02 17:30:30 +00:00
|
|
|
dnl = Preliminary platform checks =============================================
|
|
|
|
|
2011-03-22 17:10:49 +00:00
|
|
|
AC_CANONICAL_HOST
|
2011-09-21 17:05:03 +00:00
|
|
|
|
|
|
|
platform_win32=no
|
|
|
|
platform_quartz=no
|
|
|
|
platform_linux=no
|
|
|
|
|
2010-09-29 16:32:57 +00:00
|
|
|
AC_MSG_CHECKING([if building for some Win32 platform])
|
2011-03-22 17:10:49 +00:00
|
|
|
AS_CASE([$host],
|
|
|
|
[*-*-mingw*|*-*-cygwin*],
|
|
|
|
[
|
|
|
|
CLUTTER_LT_LDFLAGS="$CLUTTER_LT_LDFLAGS -no-undefined"
|
|
|
|
platform_win32=yes
|
|
|
|
],
|
|
|
|
|
2012-02-10 12:26:43 +00:00
|
|
|
[*-*-linux*],
|
2012-02-09 18:41:19 +00:00
|
|
|
[
|
|
|
|
platform_linux=yes
|
|
|
|
],
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
[]
|
2011-03-22 17:10:49 +00:00
|
|
|
)
|
2010-09-29 16:32:57 +00:00
|
|
|
AC_MSG_RESULT([$platform_win32])
|
2011-09-21 17:05:03 +00:00
|
|
|
|
2011-03-25 11:49:44 +00:00
|
|
|
AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
|
2010-09-29 16:32:57 +00:00
|
|
|
|
2011-07-13 13:20:47 +00:00
|
|
|
AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
|
|
|
|
AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
|
|
|
|
|
2012-02-09 18:41:19 +00:00
|
|
|
AM_CONDITIONAL(OS_LINUX, [test "$platform_linux" = "yes"])
|
2011-09-21 17:05:03 +00:00
|
|
|
|
2006-05-29 08:59:36 +00:00
|
|
|
AC_SUBST(CLUTTER_LT_LDFLAGS)
|
|
|
|
|
2011-11-02 17:30:30 +00:00
|
|
|
AC_CACHE_SAVE
|
|
|
|
|
|
|
|
dnl = Dependencies =========================================================
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2005-04-13 19:49:56 +00:00
|
|
|
# Checks for programs.
|
2008-11-07 19:32:28 +00:00
|
|
|
AM_PROG_CC_C_O
|
2010-03-02 13:32:46 +00:00
|
|
|
|
|
|
|
# require libtool >= 2.2
|
|
|
|
LT_PREREQ([2.2.6])
|
|
|
|
LT_INIT([disable-static])
|
2015-03-03 17:23:37 +00:00
|
|
|
LT_LIB_M
|
2010-03-01 11:12:16 +00:00
|
|
|
|
2005-04-13 19:49:56 +00:00
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
2011-02-14 16:49:01 +00:00
|
|
|
# required versions for dependencies
|
2015-06-29 19:22:36 +00:00
|
|
|
m4_define([glib_req_version], [2.44.0])
|
2015-08-21 10:57:59 +00:00
|
|
|
m4_define([cogl_req_version], [1.21.2])
|
2011-02-14 16:49:01 +00:00
|
|
|
m4_define([json_glib_req_version], [0.12.0])
|
2012-06-22 19:34:25 +00:00
|
|
|
m4_define([atk_req_version], [2.5.3])
|
2015-01-22 14:13:11 +00:00
|
|
|
m4_define([cairo_req_version], [1.14.0])
|
2012-04-11 10:56:11 +00:00
|
|
|
m4_define([pango_req_version], [1.30])
|
2013-12-03 13:41:33 +00:00
|
|
|
m4_define([gi_req_version], [1.39.0])
|
2014-03-17 23:10:41 +00:00
|
|
|
m4_define([gtk_doc_req_version], [1.20])
|
2011-02-19 09:02:51 +00:00
|
|
|
m4_define([xcomposite_req_version], [0.4])
|
2012-03-12 14:23:35 +00:00
|
|
|
m4_define([gdk_req_version], [3.3.18])
|
2015-05-22 16:33:31 +00:00
|
|
|
m4_define([libinput_req_version], [0.19.0])
|
2013-12-15 16:38:56 +00:00
|
|
|
m4_define([libudev_req_version], [136])
|
2011-02-14 16:49:01 +00:00
|
|
|
|
2011-06-20 12:56:46 +00:00
|
|
|
AC_SUBST([GLIB_REQ_VERSION], [glib_req_version])
|
|
|
|
AC_SUBST([COGL_REQ_VERSION], [cogl_req_version])
|
|
|
|
AC_SUBST([JSON_GLIB_REQ_VERSION], [json_glib_req_version])
|
|
|
|
AC_SUBST([ATK_REQ_VERSION], [atk_req_version])
|
|
|
|
AC_SUBST([CAIRO_REQ_VERSION], [cairo_req_version])
|
|
|
|
AC_SUBST([PANGO_REQ_VERSION], [pango_req_version])
|
|
|
|
AC_SUBST([GI_REQ_VERSION], [gi_req_version])
|
|
|
|
AC_SUBST([GTK_DOC_REQ_VERSION], [gtk_doc_req_version])
|
2011-02-19 09:02:51 +00:00
|
|
|
AC_SUBST([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
|
2011-10-12 07:48:56 +00:00
|
|
|
AC_SUBST([GDK_REQ_VERSION], [gdk_req_version])
|
2013-12-15 16:38:56 +00:00
|
|
|
AC_SUBST([LIBINPUT_REQ_VERSION], [libinput_req_version])
|
|
|
|
AC_SUBST([LIBUDEV_REQ_VERSION], [libudev_req_version])
|
2011-02-14 16:49:01 +00:00
|
|
|
|
2005-04-13 19:49:56 +00:00
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
2011-02-14 16:49:01 +00:00
|
|
|
AM_PATH_GLIB_2_0([glib_req_version],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([glib-2.0 is required])],
|
2015-08-11 08:14:19 +00:00
|
|
|
[gobject gio gthread gmodule-no-export])
|
2008-06-09 13:29:17 +00:00
|
|
|
|
2010-06-22 11:13:31 +00:00
|
|
|
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
|
2010-09-03 12:55:07 +00:00
|
|
|
AC_ARG_ENABLE([Bsymbolic],
|
2011-06-16 12:35:22 +00:00
|
|
|
[AS_HELP_STRING([--disable-Bsymbolic],
|
2010-09-03 12:55:07 +00:00
|
|
|
[Avoid linking with -Bsymbolic])],
|
|
|
|
[],
|
|
|
|
[
|
|
|
|
saved_LDFLAGS="${LDFLAGS}"
|
|
|
|
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
|
|
|
|
LDFLAGS=-Wl,-Bsymbolic-functions
|
|
|
|
AC_TRY_LINK([], [int main (void) { return 0; }],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
enable_Bsymbolic=yes
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
enable_Bsymbolic=no
|
|
|
|
])
|
|
|
|
LDFLAGS="${saved_LDFLAGS}"
|
|
|
|
])
|
|
|
|
|
2011-02-14 16:49:01 +00:00
|
|
|
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
|
2010-09-03 10:09:57 +00:00
|
|
|
AC_SUBST(CLUTTER_LINK_FLAGS)
|
2010-06-22 11:13:31 +00:00
|
|
|
|
2014-03-17 18:45:56 +00:00
|
|
|
# Check for the visibility flags
|
|
|
|
CLUTTER_HIDDEN_VISIBILITY_CFLAGS=""
|
|
|
|
case "$host" in
|
|
|
|
*-*-mingw*)
|
|
|
|
dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
|
|
|
|
AC_DEFINE([_CLUTTER_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
|
|
|
|
[defines how to decorate public symbols while building])
|
|
|
|
CFLAGS="${CFLAGS} -fvisibility=hidden"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
dnl on other compilers, check if we can do -fvisibility=hidden
|
|
|
|
SAVED_CFLAGS="${CFLAGS}"
|
|
|
|
CFLAGS="-fvisibility=hidden"
|
|
|
|
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
|
|
|
|
AC_TRY_COMPILE([], [int main (void) { return 0; }],
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
enable_fvisibility_hidden=yes,
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
enable_fvisibility_hidden=no)
|
|
|
|
CFLAGS="${SAVED_CFLAGS}"
|
|
|
|
|
|
|
|
AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
|
|
|
|
AC_DEFINE([_CLUTTER_EXTERN], [__attribute__((visibility("default"))) extern],
|
|
|
|
[defines how to decorate public symbols while building])
|
|
|
|
CLUTTER_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
|
|
|
|
])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(CLUTTER_HIDDEN_VISIBILITY_CFLAGS)
|
|
|
|
|
2011-11-02 17:30:30 +00:00
|
|
|
AC_CACHE_SAVE
|
2008-04-25 13:37:36 +00:00
|
|
|
|
|
|
|
dnl ========================================================================
|
2011-07-13 13:20:47 +00:00
|
|
|
|
configure.ac: don't have so many XYX_{LIBS,CFLAGS} vars
This removes EGL_{LIBS,CFLAGS}, GLX_{LIBS,CFLAGS}, OSX_{LIBS,CFLAGS},
WIN32_{LIBS,CFLAGS}, and GLES_{LIBS,CFLAGS} and instead we just append
to FLAVOUR_{LIBS,CFLAGS}.
This makes more of the file relocatable because there were previously
dependencies on the order that some variables were setup in.
2010-06-18 00:02:38 +00:00
|
|
|
FLAVOUR_LIBS=""
|
|
|
|
FLAVOUR_CFLAGS=""
|
2011-09-21 17:05:03 +00:00
|
|
|
CLUTTER_BACKENDS=""
|
2011-11-04 19:49:45 +00:00
|
|
|
CLUTTER_INPUT_BACKENDS=""
|
2011-12-06 21:53:57 +00:00
|
|
|
CLUTTER_CONFIG_DEFINES=
|
2011-10-19 14:32:41 +00:00
|
|
|
|
2009-06-09 11:43:57 +00:00
|
|
|
experimental_backend=no
|
2011-11-04 19:49:45 +00:00
|
|
|
experimental_input_backend=no
|
2008-04-15 21:18:13 +00:00
|
|
|
|
2011-02-14 16:49:01 +00:00
|
|
|
# base dependencies for core
|
2015-08-11 08:14:19 +00:00
|
|
|
CLUTTER_BASE_PC_FILES="cogl-1.0 >= $COGL_REQ_VERSION cogl-path-1.0 cairo-gobject >= $CAIRO_REQ_VERSION gio-2.0 >= glib_req_version atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION cogl-pango-1.0 json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
|
2011-02-14 16:49:01 +00:00
|
|
|
|
2012-01-12 10:10:09 +00:00
|
|
|
# private base dependencies
|
|
|
|
CLUTTER_BASE_PC_FILES_PRIVATE=""
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
# backend specific pkg-config files
|
|
|
|
BACKEND_PC_FILES=""
|
2008-04-25 13:37:36 +00:00
|
|
|
|
2012-01-12 10:10:09 +00:00
|
|
|
# private backend specific dependencies
|
|
|
|
BACKEND_PC_FILES_PRIVATE=""
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === Clutter windowing system backend ======================================
|
|
|
|
|
2011-10-12 07:48:56 +00:00
|
|
|
AC_ARG_ENABLE([x11-backend],
|
|
|
|
[AS_HELP_STRING([--enable-x11-backend=@<:@yes/no@:>@], [Enable the X11 backend (default=check)])],
|
|
|
|
[enable_x11=$enableval],
|
|
|
|
[enable_x11=check])
|
|
|
|
AC_ARG_ENABLE([win32-backend],
|
|
|
|
[AS_HELP_STRING([--enable-win32-backend=@<:@yes/no@:>@], [Enable the Windows backend (default=check)])],
|
|
|
|
[enable_win32=$enableval],
|
|
|
|
[enable_win32=check])
|
|
|
|
AC_ARG_ENABLE([quartz-backend],
|
|
|
|
[AS_HELP_STRING([--enable-quartz-backend=@<:@yes/no@:>@], [Enable the OS X backend (default=check)])],
|
|
|
|
[enable_osx=$enableval],
|
|
|
|
[enable_osx=check])
|
|
|
|
AC_ARG_ENABLE([gdk-backend],
|
|
|
|
[AS_HELP_STRING([--enable-gdk-backend=@<:@yes/no@:>@], [Enable the GDK backend (default=check)])],
|
|
|
|
[enable_gdk=$enableval],
|
|
|
|
[enable_gdk=check])
|
|
|
|
AC_ARG_ENABLE([wayland-backend],
|
2015-12-11 16:39:32 +00:00
|
|
|
[AS_HELP_STRING([--enable-wayland-backend=@<:@yes/no@:>@], [Enable the Wayland client backend (default=check)])],
|
2011-10-12 07:48:56 +00:00
|
|
|
[enable_wayland=$enableval],
|
2015-06-30 13:47:08 +00:00
|
|
|
[enable_wayland=check])
|
2011-10-12 07:48:56 +00:00
|
|
|
AC_ARG_ENABLE([egl-backend],
|
|
|
|
[AS_HELP_STRING([--enable-egl-backend=@<:@yes/no@:>@], [Enable the EGL framebuffer backend (default=no)])],
|
|
|
|
[enable_egl=$enableval],
|
2015-12-11 16:39:32 +00:00
|
|
|
[enable_egl=check])
|
2015-02-20 16:41:49 +00:00
|
|
|
AC_ARG_ENABLE([mir-backend],
|
|
|
|
[AS_HELP_STRING([--enable-mir-backend=@<:@yes/no@:>@], [Enable the Mir client backend (default=no)])],
|
|
|
|
[enable_mir=$enableval],
|
|
|
|
[enable_mir=no])
|
2011-11-04 17:44:55 +00:00
|
|
|
AC_ARG_ENABLE([cex100-backend],
|
|
|
|
[AS_HELP_STRING([--enable-cex100-backend=@<:@yes/no@:>@], [Enable the CEx100 backend (default=no)])],
|
|
|
|
[enable_cex100=$enableval],
|
|
|
|
[enable_cex100=no])
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2015-12-11 16:39:32 +00:00
|
|
|
dnl Additional input backends
|
|
|
|
AC_ARG_ENABLE([tslib-input],
|
|
|
|
[AS_HELP_STRING([--enable-tslib-input=@<:@yes/no@:>@], [Enable TSLib for input events (default=no)])],
|
|
|
|
[enable_tslib=$enableval],
|
|
|
|
[enable_tslib=no])
|
|
|
|
AC_ARG_ENABLE([evdev-input],
|
|
|
|
[AS_HELP_STRING([--enable-evdev-input=@<:@yes/no@:>@], [Enable evdev for input events (default=check)])],
|
|
|
|
[enable_evdev=$enableval],
|
|
|
|
[enable_evdev=check])
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
dnl Define default values
|
2015-12-11 16:39:32 +00:00
|
|
|
AS_IF([test "x$enable_x11" = xcheck], [
|
|
|
|
PKG_CHECK_EXISTS([x11], [enable_x11=yes], [enable_x11=no])
|
|
|
|
])
|
2010-06-17 22:23:12 +00:00
|
|
|
|
2015-12-11 16:39:32 +00:00
|
|
|
AS_IF([test "x$enable_win32" = xcheck], [
|
|
|
|
AS_IF([test "x$platform_win32" = "xyes"], [enable_win32=yes], [enable_win32=no])
|
|
|
|
])
|
2010-09-28 14:17:46 +00:00
|
|
|
|
2015-12-11 16:39:32 +00:00
|
|
|
AS_IF([test "x$enable_osx" = xcheck], [
|
|
|
|
AS_IF([test "x$platform_quartz" = "xyes"], [enable_osx=yes], [enable_osx=no])
|
|
|
|
])
|
2010-09-28 14:17:46 +00:00
|
|
|
|
2015-12-11 16:39:32 +00:00
|
|
|
AS_IF([test "x$enable_gdk" = xcheck], [
|
|
|
|
PKG_CHECK_EXISTS([gdk-3.0 >= gdk_req_version], [enable_gdk=yes], [enable_gdk=no])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_egl" = xcheck], [
|
|
|
|
PKG_CHECK_EXISTS([egl], [enable_egl=yes], [enable_egl=no])
|
|
|
|
PKG_CHECK_EXISTS([libinput], [enable_evdev=yes], [enable_evdev=no])
|
|
|
|
])
|
2010-09-28 14:17:46 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
dnl Per-backend rules
|
|
|
|
AS_IF([test "x$enable_x11" = "xyes"],
|
|
|
|
[
|
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11"
|
2011-11-04 19:49:45 +00:00
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS x11"
|
2010-09-28 14:17:46 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
SUPPORT_X11=1
|
|
|
|
SUPPORT_GLX=1
|
|
|
|
SUPPORT_COGL=1
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2012-01-12 10:17:01 +00:00
|
|
|
# we use fontconfig API and pango-ft2 when the fontconfig
|
|
|
|
# configuration changes; we don't expose any API for this
|
|
|
|
# so we add pango-ft2 to the private Requires.
|
2011-09-21 17:05:03 +00:00
|
|
|
PKG_CHECK_EXISTS([pangoft2],
|
|
|
|
[
|
|
|
|
AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
|
2012-01-12 10:17:01 +00:00
|
|
|
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE pangoft2"
|
2011-09-21 17:05:03 +00:00
|
|
|
],
|
|
|
|
[])
|
|
|
|
])
|
2010-11-04 14:38:32 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$enable_gdk" = "xyes"],
|
|
|
|
[
|
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS gdk"
|
2011-11-04 19:49:45 +00:00
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS gdk"
|
2010-08-12 13:25:17 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
SUPPORT_GDK=1
|
|
|
|
SUPPORT_COGL=1
|
2010-06-18 00:56:23 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
BACKEND_PC_FILES="$BACKEND_PC_FILES gdk-3.0"
|
|
|
|
])
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2015-06-30 13:47:08 +00:00
|
|
|
AS_IF([test "x$enable_wayland" != xno],
|
2011-09-21 17:05:03 +00:00
|
|
|
[
|
2015-06-10 12:59:18 +00:00
|
|
|
# We need to manually check for Wayland support in Cogl because
|
|
|
|
# the windowing systems are not exposed in the pkg-config file
|
|
|
|
saved_CFLAGS="${CFLAGS}"
|
2016-02-18 17:19:09 +00:00
|
|
|
CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
|
2015-06-10 12:59:18 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([for Wayland Cogl backend])
|
2016-02-18 17:19:09 +00:00
|
|
|
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
#include <cogl/cogl.h>
|
|
|
|
]],
|
|
|
|
[[
|
|
|
|
#ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
|
|
|
|
#error Cogl compiled without Wayland support
|
|
|
|
#endif
|
|
|
|
]])], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
have_cogl_wayland=yes
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
have_cogl_wayland=no
|
|
|
|
])
|
|
|
|
|
2015-06-10 12:59:18 +00:00
|
|
|
CFLAGS="${saved_CFLAGS}"
|
2015-06-30 13:47:08 +00:00
|
|
|
AS_IF([test "x$have_cogl_wayland" = xyes],
|
|
|
|
[
|
|
|
|
PKG_CHECK_EXISTS([wayland-client wayland-cursor xkbcommon gdk-pixbuf-2.0],
|
|
|
|
[
|
|
|
|
BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-cursor wayland-client xkbcommon"
|
|
|
|
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE gdk-pixbuf-2.0"
|
2015-07-08 10:05:10 +00:00
|
|
|
|
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS wayland"
|
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS wayland"
|
|
|
|
|
|
|
|
SUPPORT_WAYLAND=1
|
|
|
|
SUPPORT_COGL=1
|
2015-06-30 13:47:08 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
AS_IF([test "x$enable_wayland" = xyes],
|
|
|
|
[AC_MSG_ERROR(["*** Missing dependencies for Wayland support ***"])],
|
|
|
|
[enable_wayland=no])
|
|
|
|
])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AS_IF([test "x$enable_wayland" = xyes],
|
|
|
|
[AC_MSG_ERROR("*** Cogl is missing Wayland support ***")],
|
|
|
|
[enable_wayland=no])
|
|
|
|
])
|
2011-05-13 15:54:11 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl Note this is orthogonal to the client side support and you can
|
2012-01-03 14:00:40 +00:00
|
|
|
dnl use the Wayland compositor features with any of the clutter
|
2011-05-13 15:54:11 +00:00
|
|
|
dnl backends with corresponding Cogl support.
|
|
|
|
AC_ARG_ENABLE([wayland-compositor],
|
2012-01-03 14:00:40 +00:00
|
|
|
[AS_HELP_STRING([--enable-wayland-compositor=@<:@yes/no@:>@],
|
|
|
|
[Enable Wayland compositor features (default=no)])],
|
2011-05-13 15:54:11 +00:00
|
|
|
[],
|
|
|
|
[AS_IF([test "x$SUPPORT_EGL" = "x1"],
|
|
|
|
[enable_wayland_compositor=yes],
|
|
|
|
[enable_wayland_compositor=no])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_wayland_compositor" = "xyes"],
|
|
|
|
[
|
|
|
|
PKG_CHECK_EXISTS([wayland-server],
|
|
|
|
[BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-server"], [])
|
2013-06-27 15:42:40 +00:00
|
|
|
|
2011-05-13 15:54:11 +00:00
|
|
|
SUPPORT_WAYLAND_COMPOSITOR=1
|
2013-06-27 15:42:40 +00:00
|
|
|
SUPPORT_COGL=1
|
|
|
|
|
2011-12-06 21:53:57 +00:00
|
|
|
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
|
|
|
#define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
|
2011-05-13 15:54:11 +00:00
|
|
|
])
|
2012-01-03 14:00:40 +00:00
|
|
|
|
2011-05-13 15:54:11 +00:00
|
|
|
AM_CONDITIONAL(SUPPORT_WAYLAND_COMPOSITOR, [test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"])
|
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
AS_IF([test "x$enable_cex100" = "xyes"],
|
2011-09-21 17:05:03 +00:00
|
|
|
[
|
2011-11-04 17:44:55 +00:00
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS cex100"
|
2008-11-24 15:44:16 +00:00
|
|
|
|
2011-11-04 19:49:45 +00:00
|
|
|
experimental_backend="yes"
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2012-01-03 14:00:40 +00:00
|
|
|
SUPPORT_CEX100=1
|
2013-06-27 15:42:40 +00:00
|
|
|
SUPPORT_COGL=1
|
2010-06-18 00:13:33 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
have_gdl=no
|
|
|
|
AC_CHECK_HEADERS([libgdl.h], [have_gdl=yes])
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
AS_IF([test "x$have_gdl" = "xno"],
|
2011-09-21 17:05:03 +00:00
|
|
|
[
|
2011-11-04 17:44:55 +00:00
|
|
|
AC_CHECK_HEADERS([CE4100/libgdl.h],
|
|
|
|
[
|
|
|
|
FLAVOUR_CFLAGS="-I/usr/include/CE4100"
|
|
|
|
have_gdl=yes
|
|
|
|
CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
|
|
|
|
])
|
|
|
|
])
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
AS_IF([test "x$have_gdl" = "xno"],
|
|
|
|
[AC_MSG_ERROR([libgdl.h not found but the CEx100 backend has been explicitly enabled])])
|
2010-01-15 22:56:37 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
|
2010-06-18 00:13:33 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl"
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend])
|
|
|
|
AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
|
|
|
|
])
|
2008-11-24 15:44:16 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
AS_IF([test "x$enable_egl" = "xyes"],
|
|
|
|
[
|
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
|
2011-09-21 17:05:03 +00:00
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
SUPPORT_EGL=1
|
|
|
|
SUPPORT_COGL=1
|
2011-09-21 17:05:03 +00:00
|
|
|
|
|
|
|
FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS"
|
|
|
|
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS"
|
|
|
|
|
|
|
|
AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
|
2011-08-18 14:32:29 +00:00
|
|
|
])
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$enable_osx" = "xyes"],
|
2010-06-18 00:56:23 +00:00
|
|
|
[
|
2011-09-21 17:05:03 +00:00
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS osx"
|
2011-11-04 19:49:45 +00:00
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS osx"
|
2011-09-21 17:05:03 +00:00
|
|
|
|
|
|
|
FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
|
|
|
|
|
|
|
|
SUPPORT_OSX=1
|
2010-06-18 00:56:23 +00:00
|
|
|
])
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$enable_win32" = "xyes"],
|
2010-09-28 14:17:46 +00:00
|
|
|
[
|
2011-09-21 17:05:03 +00:00
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS win32"
|
2011-11-04 19:49:45 +00:00
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS win32"
|
2011-09-21 17:05:03 +00:00
|
|
|
|
|
|
|
FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm"
|
|
|
|
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500"
|
|
|
|
|
|
|
|
AC_CHECK_TOOL(WINDRES, [windres], [AC_MSG_ERROR([*** windres is required])])
|
|
|
|
|
|
|
|
SUPPORT_WIN32=1
|
2010-09-28 14:17:46 +00:00
|
|
|
])
|
|
|
|
|
2015-02-20 16:41:49 +00:00
|
|
|
AS_IF([test "x$enable_mir" = "xyes"],
|
|
|
|
[
|
|
|
|
CLUTTER_BACKENDS="$CLUTTER_BACKENDS mir"
|
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS mir"
|
|
|
|
|
|
|
|
SUPPORT_MIR=1
|
|
|
|
SUPPORT_COGL=1
|
|
|
|
|
2015-06-10 13:00:05 +00:00
|
|
|
# We need to manually check for Mir support in Cogl because
|
|
|
|
# the windowing systems are not exposed in the pkg-config file
|
|
|
|
saved_CFLAGS="${CFLAGS}"
|
2016-02-18 17:19:09 +00:00
|
|
|
CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
|
2015-02-20 16:41:49 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([for Mir Cogl backend])
|
|
|
|
|
2016-02-18 17:19:09 +00:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
#include <cogl/cogl.h>
|
|
|
|
]],
|
|
|
|
[[
|
|
|
|
#ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
|
|
|
|
#error Cogl compiled without Mir support
|
|
|
|
#endif
|
|
|
|
]])], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
have_cogl_mir=yes
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
have_cogl_mir=no
|
|
|
|
])
|
|
|
|
|
2015-06-10 13:00:05 +00:00
|
|
|
AS_IF([test "x$have_cogl_mir" = xno], [AC_MSG_ERROR("*** Cogl is missing Mir support.")])
|
2015-02-20 16:41:49 +00:00
|
|
|
|
|
|
|
PKG_CHECK_EXISTS([mirclient],
|
|
|
|
[BACKEND_PC_FILES="$BACKEND_PC_FILES mirclient"],
|
|
|
|
[])
|
|
|
|
])
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$CLUTTER_BACKENDS" = "x"],
|
2010-06-18 00:56:23 +00:00
|
|
|
[
|
2011-09-21 17:05:03 +00:00
|
|
|
AC_MSG_ERROR([No backend enabled. You need to enable at least one backend.])
|
2010-06-18 00:56:23 +00:00
|
|
|
])
|
|
|
|
|
2012-06-07 09:08:49 +00:00
|
|
|
AS_IF([test "x$platform_linux" = "xyes"],
|
|
|
|
[
|
|
|
|
AC_DEFINE([OS_LINUX], [1], [Define to 1 if building for Linux])
|
|
|
|
])
|
|
|
|
|
2015-12-11 16:39:32 +00:00
|
|
|
AS_IF([test "x$enable_tslib" = xyes], [
|
|
|
|
PKG_CHECK_EXISTS([tslib-1.0], [have_tslib=yes], [have_tslib=no])
|
|
|
|
AS_IF([test "x$have_tslib" = xyes], [
|
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS tslib"
|
|
|
|
experimental_input_backend="yes"
|
|
|
|
AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])
|
|
|
|
SUPPORT_TSLIB=1
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_evdev" = xyes], [
|
|
|
|
PKG_CHECK_EXISTS([libinput gudev-1.0 xkbcommon], [have_evdev=yes], [have_evdev=no])
|
|
|
|
AS_IF([test "x$have_evdev" = "xyes"], [
|
|
|
|
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
|
|
|
|
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE libudev >= $LIBUDEV_REQ_VERSION libinput >= $LIBINPUT_REQ_VERSION xkbcommon"
|
|
|
|
AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
|
|
|
|
SUPPORT_EVDEV=1
|
|
|
|
])
|
|
|
|
])
|
2011-11-04 17:44:55 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
# conditionals for use in automake files...
|
|
|
|
AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "x1"])
|
|
|
|
AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"])
|
|
|
|
AM_CONDITIONAL(SUPPORT_GDK, [test "x$SUPPORT_GDK" = "x1"])
|
|
|
|
AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"])
|
|
|
|
AM_CONDITIONAL(SUPPORT_OSX, [test "x$SUPPORT_OSX" = "x1"])
|
|
|
|
AM_CONDITIONAL(SUPPORT_WIN32, [test "x$SUPPORT_WIN32" = "x1"])
|
2012-01-03 14:00:40 +00:00
|
|
|
AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_CEX100" = "x1"])
|
2011-09-21 17:05:03 +00:00
|
|
|
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$SUPPORT_WAYLAND" = "x1"])
|
2015-02-20 16:41:49 +00:00
|
|
|
AM_CONDITIONAL(SUPPORT_MIR, [test "x$SUPPORT_MIR" = "x1"])
|
2011-09-21 17:05:03 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL(USE_COGL, [test "x$SUPPORT_COGL" = "x1"])
|
2010-06-17 23:29:12 +00:00
|
|
|
AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
|
2011-09-21 17:05:03 +00:00
|
|
|
AM_CONDITIONAL(USE_EVDEV, [test "x$have_evdev" = "xyes"])
|
|
|
|
AM_CONDITIONAL(USE_GLD, [test "x$have_gdl" = "xyes"])
|
2010-06-17 23:29:12 +00:00
|
|
|
|
2012-03-23 16:34:17 +00:00
|
|
|
AM_CONDITIONAL(NEED_XKB_UTILS, [test "x$have_evdev" = "xyes" -o "x$SUPPORT_WAYLAND" = "x1"])
|
2012-01-10 17:04:50 +00:00
|
|
|
|
2010-11-04 14:22:24 +00:00
|
|
|
dnl Instead of using AM_CFLAGS to ensure
|
|
|
|
dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter
|
|
|
|
dnl and cogl code we use a define in config.h instead. This helps ensure
|
|
|
|
dnl other tools such as glib-mkenums and gir-scanner don't end up
|
|
|
|
dnl using the define also.
|
2011-06-20 12:56:46 +00:00
|
|
|
AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
|
2010-11-04 14:22:24 +00:00
|
|
|
|
2015-12-09 14:26:28 +00:00
|
|
|
AC_ARG_WITH([default-drivers],
|
|
|
|
[AS_HELP_STRING([--with-default-drivers=DRIVER], [Comma-separated list of Cogl drivers to use])],
|
|
|
|
[clutter_drivers=$withval],
|
|
|
|
[clutter_drivers="*"])
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED([CLUTTER_DRIVERS], ["$clutter_drivers"], [List of Cogl drivers])
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
dnl strip leading spaces
|
|
|
|
CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* }
|
|
|
|
AC_SUBST(CLUTTER_BACKENDS)
|
|
|
|
|
2011-11-04 19:49:45 +00:00
|
|
|
CLUTTER_INPUT_BACKENDS=${CLUTTER_INPUT_BACKENDS#* }
|
|
|
|
AC_SUBST(CLUTTER_INPUT_BACKENDS)
|
|
|
|
|
2011-11-02 17:30:30 +00:00
|
|
|
AC_CACHE_SAVE
|
|
|
|
|
2011-01-19 14:33:27 +00:00
|
|
|
dnl === Clutter configuration =================================================
|
|
|
|
|
|
|
|
# windowing systems
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$SUPPORT_X11" = "x1"],
|
2011-01-19 14:33:27 +00:00
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-11-03 17:53:54 +00:00
|
|
|
#define CLUTTER_WINDOWING_X11 \"x11\"
|
|
|
|
#define CLUTTER_INPUT_X11 \"x11\""])
|
Add a new GDK backend
This commit introduces a new flavour for Clutter, that uses GDK
for handling all window system specific interactions (except for
creating the cogl context, as cogl does not know about GDK), including
in particular events. This is not compatible with the X11 (glx)
flavour, and this is reflected by the different soname (libclutter-gdk-1.0.so),
as all X11 specific functions and classes are not available. If you
wish to be compatible, you should check for CLUTTER_WINDOWING_X11.
Other than that, this backend should be on feature parity with X11,
including XInput 2, XSettings and EMWH (with much, much less code)
https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-08-26 01:09:18 +00:00
|
|
|
AS_IF([test "x$SUPPORT_GDK" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-11-03 17:53:54 +00:00
|
|
|
#define CLUTTER_WINDOWING_GDK \"gdk\"
|
|
|
|
#define CLUTTER_INPUT_GDK \"gdk\""])
|
2011-01-19 14:33:27 +00:00
|
|
|
AS_IF([test "x$SUPPORT_GLX" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-10-17 15:03:19 +00:00
|
|
|
#define CLUTTER_WINDOWING_GLX \"glx\""])
|
2011-01-19 14:33:27 +00:00
|
|
|
AS_IF([test "x$SUPPORT_EGL" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-10-17 15:03:19 +00:00
|
|
|
#define CLUTTER_WINDOWING_EGL \"eglnative\""])
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
|
2011-01-19 14:33:27 +00:00
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-10-17 15:03:19 +00:00
|
|
|
#define CLUTTER_WINDOWING_WAYLAND \"wayland\""])
|
2015-02-20 16:41:49 +00:00
|
|
|
AS_IF([test "x$SUPPORT_MIR" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
|
|
|
#define CLUTTER_WINDOWING_MIR \"mir\"
|
|
|
|
#define CLUTTER_INPUT_MIR \"mir\""])
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$SUPPORT_OSX" = "x1"],
|
2011-01-19 14:33:27 +00:00
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-11-03 17:53:54 +00:00
|
|
|
#define CLUTTER_WINDOWING_OSX \"osx\"
|
|
|
|
#define CLUTTER_INPUT_OSX \"osx\""])
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$SUPPORT_WIN32" = "x1"],
|
2011-01-19 14:33:27 +00:00
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-11-03 17:53:54 +00:00
|
|
|
#define CLUTTER_WINDOWING_WIN32 \"win32\"
|
|
|
|
#define CLUTTER_INPUT_WIN32 \"win32\""])
|
2012-01-03 14:00:40 +00:00
|
|
|
AS_IF([test "x$SUPPORT_CEX100" = "x1"],
|
2011-01-19 14:33:27 +00:00
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-10-17 15:03:19 +00:00
|
|
|
#define CLUTTER_WINDOWING_CEX100 \"cex100\""])
|
2011-10-03 11:25:53 +00:00
|
|
|
AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-10-17 15:03:19 +00:00
|
|
|
#define CLUTTER_INPUT_EVDEV \"evdev\""])
|
2011-10-03 11:25:53 +00:00
|
|
|
AS_IF([test "x$SUPPORT_TSLIB" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
2011-10-17 15:03:19 +00:00
|
|
|
#define CLUTTER_INPUT_TSLIB \"tslib\""])
|
2011-05-09 21:45:33 +00:00
|
|
|
AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
|
|
|
|
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
|
|
|
#define CLUTTER_INPUT_WAYLAND \"wayland\""])
|
2011-01-19 14:33:27 +00:00
|
|
|
|
2011-11-03 18:27:09 +00:00
|
|
|
# the 'null' input backend is special
|
|
|
|
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
|
|
|
|
#define CLUTTER_INPUT_NULL \"null\""
|
|
|
|
|
2011-01-19 14:33:27 +00:00
|
|
|
AC_SUBST([CLUTTER_CONFIG_DEFINES])
|
|
|
|
|
Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys
As part of an incremental process to have Cogl be a standalone project we
want to re-consider how we organise the Cogl source code.
Currently this is the structure I'm aiming for:
cogl/
cogl/
<put common source here>
winsys/
cogl-glx.c
cogl-wgl.c
driver/
gl/
gles/
os/ ?
utils/
cogl-fixed
cogl-matrix-stack?
cogl-journal?
cogl-primitives?
pango/
The new winsys component is a starting point for migrating window system
code (i.e. x11,glx,wgl,osx,egl etc) from Clutter to Cogl.
The utils/ and pango/ directories aren't added by this commit, but they are
noted because I plan to add them soon.
Overview of the planned structure:
* The winsys/ API is the API that binds OpenGL to a specific window system,
be that X11 or win32 etc. Example are glx, wgl and egl. Much of the logic
under clutter/{glx,osx,win32 etc} should migrate here.
* Note there is also the idea of a winsys-base that may represent a window
system for which there are multiple winsys APIs. An example of this is
x11, since glx and egl may both be used with x11. (currently only Clutter
has the idea of a winsys-base)
* The driver/ represents a specific varient of OpenGL. Currently we have "gl"
representing OpenGL 1.4-2.1 (mostly fixed function) and "gles" representing
GLES 1.1 (fixed funciton) and 2.0 (fully shader based)
* Everything under cogl/ should fundamentally be supporting access to the
GPU. Essentially Cogl's most basic requirement is to provide a nice GPU
Graphics API and drawing a line between this and the utility functionality
we add to support Clutter should help keep this lean and maintainable.
* Code under utils/ as suggested builds on cogl/ adding more convenient
APIs or mechanism to optimize special cases. Broadly speaking you can
compare cogl/ to OpenGL and utils/ to GLU.
* clutter/pango will be moved to clutter/cogl/pango
How some of the internal configure.ac/pkg-config terminology has changed:
backendextra -> CLUTTER_WINSYS_BASE # e.g. "x11"
backendextralib -> CLUTTER_WINSYS_BASE_LIB # e.g. "x11/libclutter-x11.la"
clutterbackend -> {CLUTTER,COGL}_WINSYS # e.g. "glx"
CLUTTER_FLAVOUR -> {CLUTTER,COGL}_WINSYS
clutterbackendlib -> CLUTTER_WINSYS_LIB
CLUTTER_COGL -> COGL_DRIVER # e.g. "gl"
Note: The CLUTTER_FLAVOUR and CLUTTER_COGL defines are kept for apps
As the first thing to take advantage of the new winsys component in Cogl;
cogl_get_proc_address() has been moved from cogl/{gl,gles}/cogl.c into
cogl/common/cogl.c and this common implementation first trys
_cogl_winsys_get_proc_address() but if that fails then it falls back to
gmodule.
2009-07-28 01:02:02 +00:00
|
|
|
dnl === Clutter substitutions kept for backwards compatibility ================
|
2011-09-21 17:05:03 +00:00
|
|
|
AC_SUBST([CLUTTER_WINSYS], [deprecated])
|
|
|
|
AC_SUBST([CLUTTER_WINSYS_BASE], [deprecated])
|
|
|
|
AC_SUBST([CLUTTER_STAGE_TYPE], [deprecated])
|
|
|
|
AC_SUBST([CLUTTER_SONAME_INFIX], [deprecated])
|
|
|
|
AC_SUBST([CLUTTER_FLAVOUR], [deprecated])
|
|
|
|
AC_SUBST([CLUTTER_COGL], [deprecated])
|
|
|
|
AC_SUBST([COGL_DRIVER], [deprecated])
|
Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys
As part of an incremental process to have Cogl be a standalone project we
want to re-consider how we organise the Cogl source code.
Currently this is the structure I'm aiming for:
cogl/
cogl/
<put common source here>
winsys/
cogl-glx.c
cogl-wgl.c
driver/
gl/
gles/
os/ ?
utils/
cogl-fixed
cogl-matrix-stack?
cogl-journal?
cogl-primitives?
pango/
The new winsys component is a starting point for migrating window system
code (i.e. x11,glx,wgl,osx,egl etc) from Clutter to Cogl.
The utils/ and pango/ directories aren't added by this commit, but they are
noted because I plan to add them soon.
Overview of the planned structure:
* The winsys/ API is the API that binds OpenGL to a specific window system,
be that X11 or win32 etc. Example are glx, wgl and egl. Much of the logic
under clutter/{glx,osx,win32 etc} should migrate here.
* Note there is also the idea of a winsys-base that may represent a window
system for which there are multiple winsys APIs. An example of this is
x11, since glx and egl may both be used with x11. (currently only Clutter
has the idea of a winsys-base)
* The driver/ represents a specific varient of OpenGL. Currently we have "gl"
representing OpenGL 1.4-2.1 (mostly fixed function) and "gles" representing
GLES 1.1 (fixed funciton) and 2.0 (fully shader based)
* Everything under cogl/ should fundamentally be supporting access to the
GPU. Essentially Cogl's most basic requirement is to provide a nice GPU
Graphics API and drawing a line between this and the utility functionality
we add to support Clutter should help keep this lean and maintainable.
* Code under utils/ as suggested builds on cogl/ adding more convenient
APIs or mechanism to optimize special cases. Broadly speaking you can
compare cogl/ to OpenGL and utils/ to GLU.
* clutter/pango will be moved to clutter/cogl/pango
How some of the internal configure.ac/pkg-config terminology has changed:
backendextra -> CLUTTER_WINSYS_BASE # e.g. "x11"
backendextralib -> CLUTTER_WINSYS_BASE_LIB # e.g. "x11/libclutter-x11.la"
clutterbackend -> {CLUTTER,COGL}_WINSYS # e.g. "glx"
CLUTTER_FLAVOUR -> {CLUTTER,COGL}_WINSYS
clutterbackendlib -> CLUTTER_WINSYS_LIB
CLUTTER_COGL -> COGL_DRIVER # e.g. "gl"
Note: The CLUTTER_FLAVOUR and CLUTTER_COGL defines are kept for apps
As the first thing to take advantage of the new winsys component in Cogl;
cogl_get_proc_address() has been moved from cogl/{gl,gles}/cogl.c into
cogl/common/cogl.c and this common implementation first trys
_cogl_winsys_get_proc_address() but if that fails then it falls back to
gmodule.
2009-07-28 01:02:02 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === X11 checks, only for X11-based backends ===============================
|
|
|
|
X11_PC_FILES=""
|
2011-11-02 17:31:29 +00:00
|
|
|
X11_EXTS=""
|
2009-05-29 13:23:16 +00:00
|
|
|
x11_tests=no
|
2008-03-25 15:42:50 +00:00
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
AS_IF([test "x$SUPPORT_X11" = "x1"],
|
2009-05-25 13:04:53 +00:00
|
|
|
[
|
|
|
|
# base X11 includes and libraries
|
|
|
|
AC_MSG_CHECKING([for X11])
|
2008-03-25 15:42:50 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
# start with pkg-config
|
|
|
|
PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
|
|
|
|
AS_IF([test "x$have_x11" = "xyes"],
|
|
|
|
[
|
|
|
|
X11_PC_FILES="x11"
|
2010-02-01 14:48:50 +00:00
|
|
|
|
|
|
|
# we actually need to ask for CFLAGS and LIBS
|
|
|
|
X11_CFLAGS=`$PKG_CONFIG --cflags $X11_PC_FILES`
|
|
|
|
X11_LIBS=`$PKG_CONFIG --libs $X11_PC_FILES`
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
# no pkg-config, let's go old school
|
|
|
|
AC_PATH_X
|
|
|
|
|
|
|
|
AS_IF([test "x$no_x" = "xyes"],
|
|
|
|
[AC_MSG_ERROR([No X11 Libraries found])],
|
|
|
|
[
|
|
|
|
AS_IF([test "x$x_includes" != "xNONE" && test -n "$x_includes"],
|
|
|
|
[X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`])
|
|
|
|
|
|
|
|
AS_IF([test "x$x_libraries" != "xNONE" && test -n "$x_libraries"],
|
|
|
|
[X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`])
|
|
|
|
|
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2009-06-06 11:34:00 +00:00
|
|
|
|
|
|
|
# XEXT (required)
|
|
|
|
AC_MSG_CHECKING([for XEXT extension])
|
|
|
|
PKG_CHECK_EXISTS([xext], [have_xext=yes], [have_xext=no])
|
|
|
|
AS_IF([test "x$have_xext" = "xyes"],
|
|
|
|
[
|
|
|
|
AC_DEFINE(HAVE_XEXT, [1], [Define to 1 if we have the XEXT X extension])
|
|
|
|
|
|
|
|
X11_LIBS="$X11_LIBS -lXext"
|
|
|
|
X11_PC_FILES="$X11_PC_FILES xext"
|
2011-11-02 17:31:29 +00:00
|
|
|
X11_EXTS="$X11_EXTS xext"
|
2009-06-06 11:34:00 +00:00
|
|
|
|
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
],
|
|
|
|
[AC_MSG_ERROR([Not found])]
|
|
|
|
)
|
2009-05-25 13:04:53 +00:00
|
|
|
|
|
|
|
# XDAMAGE (required)
|
|
|
|
AC_MSG_CHECKING([for XDAMAGE extension])
|
|
|
|
PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
|
|
|
|
AS_IF([test "x$have_xdamage" = "xyes"],
|
|
|
|
[
|
|
|
|
AC_DEFINE(HAVE_XDAMAGE, [1], [Define to 1 if we have the XDAMAGE X extension])
|
2007-03-22 18:21:59 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
X11_LIBS="$X11_LIBS -lXdamage"
|
|
|
|
X11_PC_FILES="$X11_PC_FILES xdamage"
|
2011-11-02 17:31:29 +00:00
|
|
|
X11_EXTS="$X11_EXTS xdamage"
|
2008-04-28 13:18:16 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
],
|
|
|
|
[AC_MSG_ERROR([not found])]
|
|
|
|
)
|
2008-04-28 13:18:16 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
# XCOMPOSITE (optional)
|
2011-02-19 09:02:51 +00:00
|
|
|
AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
|
|
|
|
PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
|
2009-05-25 13:04:53 +00:00
|
|
|
AS_IF([test "x$have_xcomposite" = "xyes"],
|
|
|
|
[
|
|
|
|
AC_DEFINE(HAVE_XCOMPOSITE, [1], [Define to 1 if we have the XCOMPOSITE X extension])
|
2008-04-28 13:18:16 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
X11_LIBS="$X11_LIBS -lXcomposite"
|
2011-02-19 09:02:51 +00:00
|
|
|
X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
|
2011-11-02 17:31:29 +00:00
|
|
|
X11_EXTS="$X11_EXTS xcomposite"
|
2007-10-29 16:50:34 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
],
|
2010-03-18 20:27:18 +00:00
|
|
|
[AC_MSG_ERROR([not found])]
|
2009-05-25 13:04:53 +00:00
|
|
|
)
|
|
|
|
|
2011-07-14 19:58:25 +00:00
|
|
|
# X Generic Extensions (optional)
|
|
|
|
clutter_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
|
|
|
|
|
|
|
|
clutter_save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $X11_LIBS"
|
|
|
|
|
|
|
|
have_xge=no
|
|
|
|
AC_CHECK_FUNC([XGetEventData],
|
|
|
|
[
|
2011-07-15 15:02:19 +00:00
|
|
|
AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
|
2011-07-14 19:58:25 +00:00
|
|
|
have_xge=yes
|
2011-11-02 17:31:29 +00:00
|
|
|
X11_EXTS="$X11_EXTS xge"
|
2011-07-14 19:58:25 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
CPPFLAGS="$clutter_save_CPPFLAGS"
|
|
|
|
LIBS="$clutter_save_LIBS"
|
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
# XI (optional)
|
2009-05-25 13:04:53 +00:00
|
|
|
AC_ARG_ENABLE([xinput],
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
[AS_HELP_STRING([--enable-xinput], [Use the XI X extension])],
|
|
|
|
[],
|
2011-01-17 16:42:18 +00:00
|
|
|
[enable_xinput=yes])
|
2009-05-25 13:04:53 +00:00
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
AS_IF([test "x$enable_xinput" = "xyes"],
|
|
|
|
[
|
|
|
|
PKG_CHECK_EXISTS([xi], [have_xinput=yes], [have_xinput=no])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
have_xinput=no
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_CASE([$have_xinput],
|
2009-05-25 13:04:53 +00:00
|
|
|
|
|
|
|
[yes],
|
|
|
|
[
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
AC_CHECK_HEADERS([X11/extensions/XInput2.h],
|
|
|
|
[
|
|
|
|
have_xinput2=yes
|
|
|
|
AC_DEFINE([HAVE_XINPUT_2],
|
|
|
|
[1],
|
|
|
|
[Define to 1 if XI2 is available])
|
|
|
|
])
|
|
|
|
|
2012-03-19 12:13:01 +00:00
|
|
|
clutter_save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS -lXi"
|
|
|
|
|
|
|
|
AC_CHECK_FUNC([XIAllowTouchEvents],
|
|
|
|
[
|
|
|
|
AC_CHECK_MEMBER([XIScrollClassInfo.number],
|
|
|
|
[
|
|
|
|
have_xinput_2_2=yes
|
2012-04-12 03:07:34 +00:00
|
|
|
AC_DEFINE([HAVE_XINPUT_2_2], [1], [Define to 1 if XInput 2.2 is available])
|
2012-03-19 12:13:01 +00:00
|
|
|
],
|
|
|
|
[have_xinput_2_2=no],
|
|
|
|
[[#include <X11/extensions/XInput2.h>]])])
|
|
|
|
|
|
|
|
LIBS="$clutter_save_LIBS"
|
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
X11_LIBS="$X11_LIBS $XINPUT_LIBS"
|
2009-05-25 13:04:53 +00:00
|
|
|
X11_PC_FILES="$X11_PC_FILES xi"
|
2012-03-19 12:13:01 +00:00
|
|
|
|
|
|
|
AS_IF([test "x$have_xinput_2_2" = "xyes"],
|
|
|
|
[X11_EXTS="$X11_EXTS xi2.2"],
|
|
|
|
[X11_EXTS="$X11_EXTS xi2.0"])
|
2009-05-25 13:04:53 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
[no],
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
[have_xinput2=no],
|
|
|
|
|
|
|
|
[*],
|
|
|
|
[AC_MSG_ERROR([Invalid argument for --enable-xinput])]
|
2009-05-25 13:04:53 +00:00
|
|
|
)
|
|
|
|
|
2010-06-14 16:29:21 +00:00
|
|
|
# XKB
|
|
|
|
clutter_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
|
|
|
|
|
|
|
|
clutter_save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $X11_LIBS"
|
|
|
|
|
|
|
|
have_xkb=no
|
|
|
|
AC_CHECK_FUNC([XkbQueryExtension],
|
|
|
|
[
|
|
|
|
AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
|
|
|
|
have_xkb=yes
|
2011-11-02 17:31:29 +00:00
|
|
|
|
|
|
|
X11_EXTS="$X11_EXTS xkb"
|
2010-06-14 16:29:21 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
CPPFLAGS="$clutter_save_CPPFLAGS"
|
|
|
|
LIBS="$clutter_save_LIBS"
|
|
|
|
|
2010-03-18 20:27:18 +00:00
|
|
|
x11_tests=yes
|
2009-06-05 11:46:37 +00:00
|
|
|
BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
|
configure.ac: don't have so many XYX_{LIBS,CFLAGS} vars
This removes EGL_{LIBS,CFLAGS}, GLX_{LIBS,CFLAGS}, OSX_{LIBS,CFLAGS},
WIN32_{LIBS,CFLAGS}, and GLES_{LIBS,CFLAGS} and instead we just append
to FLAVOUR_{LIBS,CFLAGS}.
This makes more of the file relocatable because there were previously
dependencies on the order that some variables were setup in.
2010-06-18 00:02:38 +00:00
|
|
|
FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
|
|
|
|
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
|
2009-05-25 13:04:53 +00:00
|
|
|
]
|
|
|
|
)
|
2007-03-22 18:21:59 +00:00
|
|
|
|
event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.
The new design for handling X11 event translation works this way:
- ClutterBackend::translate_event() has been added as the central
point used by a ClutterBackend implementation to translate a
native event into a ClutterEvent;
- ClutterEventTranslator is a private interface that should be
implemented by backend-specific objects, like stage
implementations and ClutterDeviceManager sub-classes, and
allows dealing with class-specific event translation;
- ClutterStageX11 implements EventTranslator, and deals with the
stage-relative X11 events coming from the X11 event source;
- ClutterStageGLX overrides EventTranslator, in order to
deal with the INTEL_GLX_swap_event extension, and it chains up
to the X11 default implementation;
- ClutterDeviceManagerX11 has been split into two separate classes,
one that deals with core and (optionally) XI1 events, and the
other that deals with XI2 events; the selection is done at run-time,
since the core+XI1 and XI2 mechanisms are mutually exclusive.
All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-04 12:32:04 +00:00
|
|
|
AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
|
2011-09-21 17:05:03 +00:00
|
|
|
AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"])
|
2007-01-23 20:29:11 +00:00
|
|
|
|
2011-11-02 17:31:29 +00:00
|
|
|
X11_EXTS=${X11_EXTS#* }
|
|
|
|
|
|
|
|
AC_CACHE_SAVE
|
2007-01-23 20:29:11 +00:00
|
|
|
|
2012-03-09 14:56:58 +00:00
|
|
|
dnl === Enable GDK-Pixbuf in tests ============================================
|
|
|
|
|
|
|
|
m4_define([pixbuf_default], [yes])
|
|
|
|
AC_ARG_ENABLE([gdk-pixbuf],
|
|
|
|
[AS_HELP_STRING([--enable-gdk-pixbuf=@<:@no/yes@:>@],
|
|
|
|
[Enable tests using GDK-Pixbuf @<:@default=]pixbuf_default[@:>@])],
|
|
|
|
[enable_pixbuf=$enable_val],
|
|
|
|
[enable_pixbuf=pixbuf_default])
|
|
|
|
|
|
|
|
AS_CASE([$enable_pixbuf],
|
|
|
|
|
|
|
|
[yes],
|
|
|
|
[
|
|
|
|
PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0])
|
|
|
|
AC_SUBST(GDK_PIXBUF_CFLAGS)
|
|
|
|
AC_SUBST(GDK_PIXBUF_LIBS)
|
|
|
|
pixbuf_tests=yes
|
|
|
|
],
|
|
|
|
|
|
|
|
[no],
|
|
|
|
[
|
|
|
|
pixbuf_tests=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AM_CONDITIONAL([PIXBUF_TESTS], [test "x$pixbuf_tests" = "xyes"])
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === Enable debug level ====================================================
|
2005-04-13 19:49:56 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
|
|
|
|
AC_ARG_ENABLE([debug],
|
2011-06-16 12:35:22 +00:00
|
|
|
[AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
|
2011-07-13 13:49:55 +00:00
|
|
|
[Control Clutter debugging level @<:@default=]debug_default[@:>@])],
|
2009-05-25 13:04:53 +00:00
|
|
|
[],
|
|
|
|
[enable_debug=debug_default])
|
|
|
|
|
|
|
|
AS_CASE([$enable_debug],
|
|
|
|
|
|
|
|
[yes],
|
|
|
|
[
|
|
|
|
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
2009-05-26 16:23:24 +00:00
|
|
|
CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
|
2009-05-25 13:04:53 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
[minimum],
|
2013-03-08 15:35:21 +00:00
|
|
|
[CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"],
|
2009-05-25 13:04:53 +00:00
|
|
|
|
|
|
|
[no],
|
|
|
|
[CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
|
|
|
|
|
|
|
|
[AC_MSG_ERROR([Unknown argument for --enable-debug])]
|
|
|
|
)
|
2006-11-20 12:02:24 +00:00
|
|
|
|
|
|
|
AC_SUBST(CLUTTER_DEBUG_CFLAGS)
|
|
|
|
|
2011-06-14 13:47:14 +00:00
|
|
|
dnl === Enable deprecation guards ==================================================
|
|
|
|
|
|
|
|
m4_define([deprecated_default],
|
|
|
|
[m4_if(m4_eval(clutter_minor_version % 2),
|
|
|
|
[1],
|
|
|
|
[no],
|
|
|
|
[yes])])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([deprecated],
|
|
|
|
[AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
|
2011-07-13 13:49:55 +00:00
|
|
|
[Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
|
2011-06-14 13:47:14 +00:00
|
|
|
[],
|
|
|
|
[enable_deprecated=deprecated_default])
|
|
|
|
|
|
|
|
AS_CASE([$enable_deprecated],
|
|
|
|
|
|
|
|
[no],
|
|
|
|
[
|
2011-11-03 15:32:53 +00:00
|
|
|
CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED"
|
2011-06-14 13:47:14 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
[yes],
|
|
|
|
[
|
2012-03-22 13:20:55 +00:00
|
|
|
CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS"
|
2011-06-14 13:47:14 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
[AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === Enable strict compiler flags ==========================================
|
2007-07-26 10:00:09 +00:00
|
|
|
|
2011-02-11 15:45:13 +00:00
|
|
|
# use strict compiler flags only when building from git; the rules for
|
|
|
|
# distcheck will take care of turning this on when making a release
|
|
|
|
m4_define([maintainer_flags_default], [m4_if(m4_eval(clutter_micro_version % 2), [1], [yes], [no])])
|
2007-07-26 10:00:09 +00:00
|
|
|
AC_ARG_ENABLE([maintainer-flags],
|
2011-06-16 12:35:22 +00:00
|
|
|
[AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
|
2011-07-13 13:49:55 +00:00
|
|
|
[Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
|
2009-05-25 13:04:53 +00:00
|
|
|
[],
|
|
|
|
[enable_maintainer_flags=maintainer_flags_default])
|
|
|
|
|
2011-05-09 21:45:33 +00:00
|
|
|
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
|
2012-07-29 12:53:06 +00:00
|
|
|
-Wall
|
2012-04-04 14:33:05 +00:00
|
|
|
-Wcast-align
|
2012-07-29 12:53:06 +00:00
|
|
|
-Wuninitialized
|
|
|
|
-Wno-strict-aliasing
|
2015-11-30 13:15:52 +00:00
|
|
|
-Wshadow"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([Werror],
|
|
|
|
[AS_HELP_STRING([--disable-Werror], [Removes -Werror from compiler flags])],
|
|
|
|
[],
|
|
|
|
[enable_Werror=yes])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_Werror" = xyes], [
|
|
|
|
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
|
|
|
|
-Werror=logical-op
|
|
|
|
-Werror=pointer-arith
|
|
|
|
-Werror=missing-declarations
|
|
|
|
-Werror=redundant-decls
|
|
|
|
-Werror=empty-body
|
|
|
|
-Werror=format
|
|
|
|
-Werror=format-security
|
|
|
|
-Werror=format-nonliteral
|
|
|
|
-Werror=init-self
|
|
|
|
-Werror=declaration-after-statement
|
|
|
|
-Werror=vla"
|
|
|
|
])
|
2011-02-11 15:45:13 +00:00
|
|
|
|
|
|
|
AS_CASE([$enable_maintainer_flags],
|
|
|
|
[yes],
|
|
|
|
[
|
|
|
|
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
|
|
|
|
],
|
|
|
|
|
|
|
|
[no],
|
|
|
|
[
|
|
|
|
],
|
|
|
|
|
|
|
|
[error],
|
|
|
|
[
|
|
|
|
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
|
|
|
|
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
|
|
|
|
],
|
|
|
|
|
|
|
|
[*],
|
|
|
|
[AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
|
2009-05-25 13:04:53 +00:00
|
|
|
)
|
2007-07-26 10:00:09 +00:00
|
|
|
|
2011-02-28 12:49:48 +00:00
|
|
|
# strip leading spaces
|
2011-03-22 17:18:07 +00:00
|
|
|
MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#* }
|
2009-01-23 13:09:51 +00:00
|
|
|
AC_SUBST(MAINTAINER_CFLAGS)
|
2007-07-26 10:00:09 +00:00
|
|
|
|
2009-03-17 13:07:46 +00:00
|
|
|
dnl === Dependencies, compiler flags and linker libraries =====================
|
2011-02-16 15:38:05 +00:00
|
|
|
# strip leading space
|
2011-03-24 14:13:59 +00:00
|
|
|
BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
|
2011-02-16 15:38:05 +00:00
|
|
|
|
2012-01-17 22:54:44 +00:00
|
|
|
# public dependencies, will fill the Requires: field of clutter.pc
|
2012-01-12 10:10:09 +00:00
|
|
|
CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $BACKEND_PC_FILES"
|
2009-03-17 13:07:46 +00:00
|
|
|
PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
|
|
|
|
|
2012-01-17 22:54:44 +00:00
|
|
|
# private dependencies, will fill the Requires.private: field of clutter.pc
|
|
|
|
AS_IF([test "x$CLUTTER_BASE_PC_FILES_PRIVATE" = "x" && test "x$BACKEND_PC_FILES_PRIVATE" = "x"],
|
2012-01-12 10:10:09 +00:00
|
|
|
[
|
|
|
|
CLUTTER_REQUIRES_PRIVATE=""
|
|
|
|
CLUTTER_DEPS_PRIVATE_CFLAGS=""
|
|
|
|
CLUTTER_DEPS_PRIVATE_LIBS=""
|
2012-01-17 22:54:44 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
CLUTTER_REQUIRES_PRIVATE="$CLUTTER_BASE_PC_FILES_PRIVATE $BACKEND_PC_FILES_PRIVATE"
|
|
|
|
PKG_CHECK_MODULES(CLUTTER_DEPS_PRIVATE, [$CLUTTER_REQUIRES_PRIVATE])
|
2012-01-12 10:10:09 +00:00
|
|
|
])
|
2012-01-11 12:23:46 +00:00
|
|
|
|
2012-01-17 22:54:44 +00:00
|
|
|
AC_SUBST(CLUTTER_REQUIRES)
|
2012-01-11 12:23:46 +00:00
|
|
|
AC_SUBST(CLUTTER_REQUIRES_PRIVATE)
|
|
|
|
|
2015-03-03 17:37:02 +00:00
|
|
|
CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_DEPS_PRIVATE_CFLAGS $GLIB_CFLAGS"
|
|
|
|
CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_DEPS_PRIVATE_LIBS $GLIB_LIBS"
|
2009-03-17 13:07:46 +00:00
|
|
|
AC_SUBST(CLUTTER_CFLAGS)
|
|
|
|
AC_SUBST(CLUTTER_LIBS)
|
|
|
|
|
2012-06-19 13:43:40 +00:00
|
|
|
dnl === Test coverage =========================================================
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([gcov],
|
|
|
|
[AS_HELP_STRING([--enable-gcov], [Enable gcov])],
|
|
|
|
[use_gcov=$enableval],
|
|
|
|
[use_gcov=no])
|
|
|
|
|
|
|
|
AS_IF([test "x$use_gcov" = "xyes"],
|
|
|
|
[
|
|
|
|
dnl we need gcc:
|
|
|
|
AS_IF([test "$GCC" != "yes"], [AC_MSG_ERROR([GCC is required for --enable-gcov])])
|
|
|
|
|
|
|
|
dnl Check if ccache is being used
|
|
|
|
AC_CHECK_PROG(SHTOOL, shtool, shtool)
|
|
|
|
AS_CASE([`$SHTOOL path $CC`],
|
|
|
|
[*ccache*], [gcc_ccache=yes],
|
|
|
|
[gcc_ccache=no])
|
|
|
|
|
|
|
|
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
|
|
|
|
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
|
|
|
|
fi
|
|
|
|
|
2014-04-14 13:02:05 +00:00
|
|
|
ltp_version_list="1.6 1.7 1.8 1.9 1.10"
|
2012-06-19 13:43:40 +00:00
|
|
|
AC_CHECK_PROG(LTP, lcov, lcov)
|
|
|
|
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
|
|
|
|
|
|
|
|
if test "$LTP"; then
|
|
|
|
AC_CACHE_CHECK([for ltp version], clutter_cv_ltp_version,
|
|
|
|
[
|
|
|
|
clutter_cv_ltp_version=invalid
|
|
|
|
ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
|
|
|
|
for ltp_check_version in $ltp_version_list; do
|
|
|
|
if test "$ltp_version" = "$ltp_check_version"; then
|
|
|
|
clutter_cv_ltp_version="$ltp_check_version (ok)"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
])
|
|
|
|
else
|
|
|
|
ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
|
|
|
|
AC_MSG_ERROR([$ltp_msg])
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $clutter_cv_ltp_version in
|
|
|
|
""|invalid[)]
|
|
|
|
ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
|
|
|
|
AC_MSG_ERROR([$ltp_msg])
|
|
|
|
LTP="exit 0;"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test -z "$LTP_GENHTML"; then
|
|
|
|
AC_MSG_ERROR([Could not find genhtml from the LTP package])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
|
|
|
|
|
|
|
|
dnl Remove all optimization flags from CFLAGS
|
|
|
|
changequote({,})
|
|
|
|
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
|
|
|
CLUTTER_CFLAGS=`echo "$CLUTTER_CFLAGS" | $SED -e 's/-O[0-9]*//g'`
|
|
|
|
changequote([,])
|
|
|
|
|
|
|
|
dnl Define the special gcc flags
|
|
|
|
CLUTTER_GCOV_CFLAGS="-O0 -fprofile-arcs -ftest-coverage"
|
|
|
|
CLUTTER_GCOV_LDADD="-lgcov"
|
|
|
|
|
|
|
|
AC_SUBST(CLUTTER_GCOV_CFLAGS)
|
|
|
|
AC_SUBST(CLUTTER_GCOV_LDADD)
|
|
|
|
|
|
|
|
CLUTTER_CFLAGS="$CLUTTER_CFLAGS $CLUTTER_GCOV_CFLAGS"
|
|
|
|
CLUTTER_LIBS="$CLUTTER_LIBS $CLUTTER_GCOV_LDADD"
|
|
|
|
])
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_GCOV, test "x$use_gcov" = "xyes")
|
2011-02-10 02:32:11 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === GObject-Introspection check ===========================================
|
2009-02-20 14:39:51 +00:00
|
|
|
|
2011-02-14 16:49:01 +00:00
|
|
|
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
|
2007-07-26 10:00:09 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === GTK Doc check =========================================================
|
2006-11-20 12:02:24 +00:00
|
|
|
|
2011-02-14 16:49:01 +00:00
|
|
|
GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2009-07-13 16:27:01 +00:00
|
|
|
# we don't want to build the documentation from a Git clone unless we
|
2008-07-17 12:21:01 +00:00
|
|
|
# explicitly tell configure to do so; this allows avoiding to recurse into
|
|
|
|
# the documentation directory when building Clutter inside Poky for a
|
|
|
|
# target device that doesn't have gtk-doc installed. for reference
|
|
|
|
# see: http://bugzilla.openedhand.com/show_bug.cgi?id=1047
|
|
|
|
#
|
2009-07-13 16:27:01 +00:00
|
|
|
# we use autogen.sh as it exists only inside the Git clones, and it
|
2008-07-17 12:21:01 +00:00
|
|
|
# is not packaged into tarballs.
|
2009-05-25 13:04:53 +00:00
|
|
|
AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
|
2007-05-30 23:16:58 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
# prefixes for fixing gtk-doc references
|
2009-09-09 15:15:54 +00:00
|
|
|
CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
|
2009-05-25 13:04:53 +00:00
|
|
|
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
|
|
|
|
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
|
2011-06-20 12:56:46 +00:00
|
|
|
COGL_PREFIX="`$PKG_CONFIG --variable=prefix cogl-1.0`"
|
2011-02-14 16:49:01 +00:00
|
|
|
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
|
2009-09-09 15:15:54 +00:00
|
|
|
AC_SUBST(CAIRO_PREFIX)
|
2009-05-25 13:04:53 +00:00
|
|
|
AC_SUBST(GLIB_PREFIX)
|
|
|
|
AC_SUBST(PANGO_PREFIX)
|
2011-06-20 12:56:46 +00:00
|
|
|
AC_SUBST(COGL_PREFIX)
|
2011-02-14 16:49:01 +00:00
|
|
|
AC_SUBST(ATK_PREFIX)
|
2006-05-29 08:59:36 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === Manual ================================================================
|
|
|
|
|
2009-09-03 12:04:59 +00:00
|
|
|
AC_ARG_ENABLE([docs],
|
2011-06-16 12:35:22 +00:00
|
|
|
[AS_HELP_STRING([--enable-docs=@<:@no/yes@:>@],
|
2009-09-03 12:04:59 +00:00
|
|
|
[Build optional documentation; requires xsltproc and jw.])],
|
|
|
|
[enable_docs=$enableval],
|
|
|
|
[enable_docs=no])
|
|
|
|
|
|
|
|
enable_pdfs=no
|
|
|
|
AS_IF([test "x$enable_docs" = "xyes"],
|
2009-05-25 13:04:53 +00:00
|
|
|
[
|
|
|
|
AC_PATH_PROG(JW, [jw], [no])
|
|
|
|
AS_IF([test "x$JW" = "xno"],
|
2009-09-03 12:04:59 +00:00
|
|
|
[
|
|
|
|
AC_MSG_WARN([jw not found; pdf generation has been disabled])
|
|
|
|
],
|
|
|
|
[enable_pdfs=yes])
|
2009-09-02 17:11:06 +00:00
|
|
|
|
|
|
|
AC_PATH_PROG(XSLTPROC, [xsltproc], [no])
|
|
|
|
AS_IF([test "x$XSLTPROC" = "xno"],
|
2009-09-03 12:04:59 +00:00
|
|
|
[
|
|
|
|
AC_MSG_ERROR([xsltproc not found])
|
|
|
|
])
|
2009-05-25 13:04:53 +00:00
|
|
|
]
|
|
|
|
)
|
2005-04-13 19:49:56 +00:00
|
|
|
|
2009-09-03 12:04:59 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_DOCS, [test "x$enable_docs" = "xyes"])
|
|
|
|
AM_CONDITIONAL(ENABLE_PDFS, [test "x$enable_pdfs" = "xyes"])
|
2005-04-13 19:49:56 +00:00
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === I18N ==================================================================
|
2005-04-13 19:49:56 +00:00
|
|
|
|
2010-09-09 10:58:03 +00:00
|
|
|
AM_GNU_GETTEXT_VERSION([0.17])
|
2010-09-07 22:35:06 +00:00
|
|
|
AM_GNU_GETTEXT([external])
|
|
|
|
|
2010-09-08 13:48:40 +00:00
|
|
|
GETTEXT_PACKAGE="clutter-1.0"
|
2008-06-10 16:47:38 +00:00
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
2011-02-14 16:49:01 +00:00
|
|
|
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
|
|
|
|
["$GETTEXT_PACKAGE"],
|
2008-06-10 16:47:38 +00:00
|
|
|
[The prefix for our gettext translation domains.])
|
2010-06-03 11:32:54 +00:00
|
|
|
AS_ALL_LINGUAS
|
2008-06-10 16:47:38 +00:00
|
|
|
|
2012-05-01 17:51:19 +00:00
|
|
|
dnl = Build optionals =========================================================
|
|
|
|
|
|
|
|
dnl === Conformance test suite ================================================
|
|
|
|
|
Fully rework the conformance test suite
The current conformance test suite is suboptimal in many ways.
All tests are built into the same binary, which makes adding new tests,
builting tests, and running groups of tests much more awkward than it
needs to be. The first issue, especially, raises the bar of contribution
in a significant way, while the other two take their toll on the
maintainer. All of these changes were introduced back when we had both
Clutter and Cogl tests in tree, and because we were building the test
suite for every single change; since then, Cogl moved out of tree with
all its tests, and we build the conformance test suite only when running
the `check` make target.
This admittedly large-ish commit changes the way the conformance test
suite works, taking advantage of the changes in the GTest API and test
harness.
First of all, all tests are now built separately, using their own test
suite as defined by each separate file. All tests run under the TAP
harness provided by GTest and Automake, to gather a proper report using
the Test Anything Protocol without using the `gtester` harness and the
`gtester-report` script. We also use the Makefile rules provided by GLib
to vastly simplify the build environment for the conformance test suite.
On top of the changes for the build and harness, we also provide new API
for creating and running test suites for Clutter. The API is public,
because the test suite has to use it, but it's minimal and mostly
provides convenience wrappers around GTest that make writing test units
for Clutter easier.
This commit disables all tests in the conformance test suite, as well as
moving the data files outside of the tests/data directory; the next few
commits will re-establish the conformance test suite separately so we
can check that everything works in a reliable way.
2013-12-12 14:36:16 +00:00
|
|
|
GLIB_TESTS
|
2012-05-01 17:51:19 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([examples],
|
|
|
|
[AS_HELP_STRING([--disable-examples], [Whether examples should be built])],
|
|
|
|
[],
|
|
|
|
[enable_examples=yes])
|
|
|
|
AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = "xyes"])
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
2006-11-20 12:02:24 +00:00
|
|
|
AC_CONFIG_FILES([
|
2010-09-13 10:30:30 +00:00
|
|
|
Makefile
|
2011-02-14 16:49:01 +00:00
|
|
|
README
|
|
|
|
|
2010-09-13 10:30:30 +00:00
|
|
|
build/Makefile
|
|
|
|
build/autotools/Makefile
|
|
|
|
build/mingw/Makefile
|
2011-09-16 09:15:33 +00:00
|
|
|
build/win32/Makefile
|
|
|
|
build/win32/vs9/Makefile
|
|
|
|
build/win32/vs10/Makefile
|
2010-09-13 10:30:30 +00:00
|
|
|
|
|
|
|
clutter/Makefile
|
2012-07-28 16:40:57 +00:00
|
|
|
clutter/config.h.win32
|
2011-01-19 14:33:27 +00:00
|
|
|
clutter/clutter-config.h
|
2010-09-13 10:30:30 +00:00
|
|
|
clutter/clutter-version.h
|
|
|
|
clutter/clutter-$CLUTTER_API_VERSION.pc:clutter/clutter.pc.in
|
|
|
|
|
|
|
|
clutter/cally/cally-$CLUTTER_API_VERSION.pc:clutter/cally/cally.pc.in
|
|
|
|
|
2011-11-04 17:44:55 +00:00
|
|
|
clutter/cex100/clutter-cex100.h
|
2010-09-13 10:30:30 +00:00
|
|
|
|
|
|
|
tests/Makefile
|
|
|
|
tests/accessibility/Makefile
|
|
|
|
tests/conform/Makefile
|
|
|
|
tests/interactive/Makefile
|
|
|
|
tests/interactive/wrapper.sh
|
|
|
|
tests/micro-bench/Makefile
|
2011-01-19 11:38:25 +00:00
|
|
|
tests/performance/Makefile
|
2010-09-13 10:30:30 +00:00
|
|
|
|
2012-05-01 17:30:10 +00:00
|
|
|
examples/Makefile
|
|
|
|
|
2010-09-13 10:30:30 +00:00
|
|
|
doc/Makefile
|
|
|
|
doc/reference/Makefile
|
2015-05-19 12:19:48 +00:00
|
|
|
doc/reference/clutter-docs.xml
|
2010-09-13 10:30:30 +00:00
|
|
|
doc/common/Makefile
|
|
|
|
doc/cookbook/Makefile
|
|
|
|
doc/cookbook/clutter-cookbook.xml
|
|
|
|
doc/cookbook/examples/Makefile
|
|
|
|
|
|
|
|
po/Makefile.in
|
2005-04-13 19:49:56 +00:00
|
|
|
])
|
2006-06-06 20:40:40 +00:00
|
|
|
|
2006-11-20 12:02:24 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
2009-05-25 13:04:53 +00:00
|
|
|
dnl === Summary ===============================================================
|
2006-06-06 20:40:40 +00:00
|
|
|
|
|
|
|
echo ""
|
2009-11-17 15:32:00 +00:00
|
|
|
echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
|
|
|
|
|
2009-12-01 15:17:49 +00:00
|
|
|
# Global flags
|
2006-06-06 20:40:40 +00:00
|
|
|
echo ""
|
2009-11-17 15:32:00 +00:00
|
|
|
echo " • Global:"
|
|
|
|
echo " Prefix: ${prefix}"
|
2011-10-11 15:05:24 +00:00
|
|
|
echo " Libdir: ${libdir}"
|
|
|
|
echo " Sysconfdir: ${sysconfdir}"
|
2009-11-17 15:32:00 +00:00
|
|
|
|
2009-12-01 15:17:49 +00:00
|
|
|
# Compiler/Debug related flags
|
2006-06-06 20:40:40 +00:00
|
|
|
echo ""
|
2009-11-17 15:32:00 +00:00
|
|
|
echo " • Compiler options:"
|
|
|
|
echo " Clutter debug level: ${enable_debug}"
|
2011-02-28 12:49:48 +00:00
|
|
|
echo " Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
|
2012-06-19 13:43:40 +00:00
|
|
|
echo " Enable coverage tests: ${use_gcov}"
|
2011-06-14 13:47:14 +00:00
|
|
|
echo " Enable deprecated symbols: ${enable_deprecated}"
|
2009-11-17 15:32:00 +00:00
|
|
|
|
2009-12-01 15:17:49 +00:00
|
|
|
# Documentation
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
|
|
|
echo " • Documentation:"
|
|
|
|
echo " Build API Reference: ${enable_gtk_doc}"
|
2009-12-01 15:17:49 +00:00
|
|
|
echo " Build Additional Documentation: ${enable_docs} (Generate PDF: ${enable_pdfs})"
|
2009-11-17 15:32:00 +00:00
|
|
|
|
2009-12-01 15:17:49 +00:00
|
|
|
# Miscellaneous
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
|
|
|
echo " • Extra:"
|
|
|
|
echo " Build introspection data: ${enable_introspection}"
|
Fully rework the conformance test suite
The current conformance test suite is suboptimal in many ways.
All tests are built into the same binary, which makes adding new tests,
builting tests, and running groups of tests much more awkward than it
needs to be. The first issue, especially, raises the bar of contribution
in a significant way, while the other two take their toll on the
maintainer. All of these changes were introduced back when we had both
Clutter and Cogl tests in tree, and because we were building the test
suite for every single change; since then, Cogl moved out of tree with
all its tests, and we build the conformance test suite only when running
the `check` make target.
This admittedly large-ish commit changes the way the conformance test
suite works, taking advantage of the changes in the GTest API and test
harness.
First of all, all tests are now built separately, using their own test
suite as defined by each separate file. All tests run under the TAP
harness provided by GTest and Automake, to gather a proper report using
the Test Anything Protocol without using the `gtester` harness and the
`gtester-report` script. We also use the Makefile rules provided by GLib
to vastly simplify the build environment for the conformance test suite.
On top of the changes for the build and harness, we also provide new API
for creating and running test suites for Clutter. The API is public,
because the test suite has to use it, but it's minimal and mostly
provides convenience wrappers around GTest that make writing test units
for Clutter easier.
This commit disables all tests in the conformance test suite, as well as
moving the data files outside of the tests/data directory; the next few
commits will re-establish the conformance test suite separately so we
can check that everything works in a reliable way.
2013-12-12 14:36:16 +00:00
|
|
|
if test "x$x11_tests" = "xyes"; then
|
2011-09-30 13:50:31 +00:00
|
|
|
echo " Build X11-specific tests: ${x11_tests}"
|
Fully rework the conformance test suite
The current conformance test suite is suboptimal in many ways.
All tests are built into the same binary, which makes adding new tests,
builting tests, and running groups of tests much more awkward than it
needs to be. The first issue, especially, raises the bar of contribution
in a significant way, while the other two take their toll on the
maintainer. All of these changes were introduced back when we had both
Clutter and Cogl tests in tree, and because we were building the test
suite for every single change; since then, Cogl moved out of tree with
all its tests, and we build the conformance test suite only when running
the `check` make target.
This admittedly large-ish commit changes the way the conformance test
suite works, taking advantage of the changes in the GTest API and test
harness.
First of all, all tests are now built separately, using their own test
suite as defined by each separate file. All tests run under the TAP
harness provided by GTest and Automake, to gather a proper report using
the Test Anything Protocol without using the `gtester` harness and the
`gtester-report` script. We also use the Makefile rules provided by GLib
to vastly simplify the build environment for the conformance test suite.
On top of the changes for the build and harness, we also provide new API
for creating and running test suites for Clutter. The API is public,
because the test suite has to use it, but it's minimal and mostly
provides convenience wrappers around GTest that make writing test units
for Clutter easier.
This commit disables all tests in the conformance test suite, as well as
moving the data files outside of the tests/data directory; the next few
commits will re-establish the conformance test suite separately so we
can check that everything works in a reliable way.
2013-12-12 14:36:16 +00:00
|
|
|
fi
|
|
|
|
if test "x$pixbuf_tests" = "xyes"; then
|
2012-03-09 14:56:58 +00:00
|
|
|
echo " Build tests using GDK-Pixbuf: ${pixbuf_tests}"
|
2012-05-01 17:51:19 +00:00
|
|
|
fi
|
2013-08-16 10:02:41 +00:00
|
|
|
echo " Install test suites: ${enable_installed_tests}"
|
2012-05-01 17:51:19 +00:00
|
|
|
echo " Build examples: ${enable_examples}"
|
2009-11-17 15:32:00 +00:00
|
|
|
|
2009-12-01 15:17:49 +00:00
|
|
|
# Clutter backend related flags
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
2011-09-21 17:05:03 +00:00
|
|
|
echo " • Clutter Backends:"
|
2009-11-17 15:32:00 +00:00
|
|
|
|
|
|
|
if test "x$experimental_backend" = "xno"; then
|
2011-09-21 17:05:03 +00:00
|
|
|
echo " Windowing systems: ${CLUTTER_BACKENDS}"
|
2009-11-17 15:32:00 +00:00
|
|
|
else
|
2011-09-21 17:05:03 +00:00
|
|
|
echo " Windowing systems: ${CLUTTER_BACKENDS} (WARNING: Experimental backends enabled)"
|
2008-04-25 13:37:36 +00:00
|
|
|
fi
|
2009-05-25 13:04:53 +00:00
|
|
|
|
2011-11-04 19:49:45 +00:00
|
|
|
if test "x$experimental_input_backend" = "xno"; then
|
|
|
|
echo " Input backends: ${CLUTTER_INPUT_BACKENDS}"
|
|
|
|
else
|
|
|
|
echo " Input backends: ${CLUTTER_INPUT_BACKENDS} (WARNING: Experimental backends enabled)"
|
|
|
|
fi
|
|
|
|
|
2015-12-09 14:26:28 +00:00
|
|
|
echo " Cogl drivers: $clutter_drivers"
|
|
|
|
|
2011-09-21 17:05:03 +00:00
|
|
|
if test "x$SUPPORT_X11" = "x1"; then
|
|
|
|
echo ""
|
2011-11-02 17:31:29 +00:00
|
|
|
echo " - X11 backend options:"
|
|
|
|
echo " Enabled extensions: ${X11_EXTS}"
|
2011-09-21 17:05:03 +00:00
|
|
|
fi
|
|
|
|
|
2011-11-04 19:49:45 +00:00
|
|
|
if test "x$SUPPORT_CEX100" = "x1"; then
|
2011-09-21 17:05:03 +00:00
|
|
|
echo ""
|
2012-01-03 14:00:40 +00:00
|
|
|
echo " - CEx100 backend options (WARNING: Experimental):"
|
2011-11-04 19:49:45 +00:00
|
|
|
echo " libGDL include prefix: ${CLUTTER_CEX100_LIBGDL_PREFIX}"
|
2008-04-25 13:37:36 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-03 14:00:40 +00:00
|
|
|
if test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"; then
|
|
|
|
echo ""
|
|
|
|
echo " - Wayland compositor support enabled (WARNING: Experimental)"
|
|
|
|
fi
|
2011-05-13 15:54:11 +00:00
|
|
|
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
|
|
|
|
2009-12-01 15:17:49 +00:00
|
|
|
# General warning about experimental features
|
2014-06-25 11:18:37 +00:00
|
|
|
if test "x$experimental_backend" = xyes -o "x$experimental_input_backend" = xyes; then
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
2011-11-02 17:31:29 +00:00
|
|
|
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
|
|
|
|
echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
|
|
|
echo " The stability of your build might be affected by one or more"
|
|
|
|
echo " experimental backends or experimental and unsupported features"
|
2011-11-02 17:31:29 +00:00
|
|
|
echo ""
|
|
|
|
echo "*WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*"
|
|
|
|
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
|
2009-11-17 15:32:00 +00:00
|
|
|
echo ""
|
2008-04-25 13:37:36 +00:00
|
|
|
fi
|