mutter/clutter/configure.ac

714 lines
23 KiB
Plaintext
Raw Normal View History

AC_PREREQ([2.63])
2006-05-29 04:59:36 -04:00
AC_INIT([clutter],
[0.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
[clutter],
[http://www.clutter-project.org])
2006-05-29 04:59:36 -04:00
AC_CONFIG_SRCDIR([clutter/clutter.h])
AC_CONFIG_HEADERS([clutter/clutter-build-config.h])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/autotools])
2005-04-13 15:49:56 -04:00
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
AM_SILENT_RULES([yes])
2006-05-29 04:59:36 -04:00
dnl = Check that we are configured by mutter ==============================
AC_ARG_VAR([MUTTER_VERSION])
AC_ARG_VAR([LIBMUTTER_API_VERSION])
AS_IF([test "x$MUTTER_VERSION" = "x"],
[AC_MSG_ERROR([Clutter can only be configured by mutter])],)
AC_DEFINE_UNQUOTED(MUTTER_VERSION, "$MUTTER_VERSION", [Mutter version])
2006-05-29 04:59:36 -04:00
AC_PROG_SED
dnl = Preliminary platform checks =============================================
AC_CANONICAL_HOST
AC_CACHE_SAVE
dnl = Dependencies =========================================================
2006-05-29 04:59:36 -04:00
2005-04-13 15:49:56 -04:00
# Checks for programs.
AM_PROG_CC_C_O
# require libtool >= 2.2
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
LT_LIB_M
2005-04-13 15:49:56 -04:00
# Checks for header files.
AC_HEADER_STDC
# required versions for dependencies
m4_define([glib_req_version], [2.53.2])
m4_define([cogl_req_version], [1.21.2])
m4_define([json_glib_req_version], [0.12.0])
m4_define([atk_req_version], [2.5.3])
m4_define([cairo_req_version], [1.14.0])
m4_define([pango_req_version], [1.30])
m4_define([gi_req_version], [1.39.0])
m4_define([xcomposite_req_version], [0.4])
m4_define([libinput_req_version], [1.4.0])
m4_define([libudev_req_version], [136])
m4_define([libwacom_req_version], [0.13])
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([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
AC_SUBST([LIBINPUT_REQ_VERSION], [libinput_req_version])
AC_SUBST([LIBUDEV_REQ_VERSION], [libudev_req_version])
AC_SUBST([LIBWACOM_REQ_VERSION], [libwacom_req_version])
2005-04-13 15:49:56 -04:00
# Checks for typedefs, structures, and compiler characteristics.
AM_PATH_GLIB_2_0([glib_req_version],
[],
[AC_MSG_ERROR([glib-2.0 is required])],
[gobject gio gthread gmodule-no-export])
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
AC_ARG_ENABLE([Bsymbolic],
[AS_HELP_STRING([--disable-Bsymbolic],
[Avoid linking with -Bsymbolic])],
[],
[
saved_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_TRY_LINK([], [return 0],
[
AC_MSG_RESULT([yes])
enable_Bsymbolic=yes
],
[
AC_MSG_RESULT([no])
enable_Bsymbolic=no
])
LDFLAGS="${saved_LDFLAGS}"
])
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
AC_SUBST(CLUTTER_LINK_FLAGS)
AC_CACHE_SAVE
dnl ========================================================================
FLAVOUR_LIBS=""
FLAVOUR_CFLAGS=""
CLUTTER_BACKENDS=""
CLUTTER_INPUT_BACKENDS=""
CLUTTER_CONFIG_DEFINES=
# base dependencies for core
CLUTTER_BASE_PC_FILES="cairo-gobject >= $CAIRO_REQ_VERSION gio-2.0 >= glib_req_version atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
# private base dependencies
CLUTTER_BASE_PC_FILES_PRIVATE=""
# backend specific pkg-config files
BACKEND_PC_FILES=""
# private backend specific dependencies
BACKEND_PC_FILES_PRIVATE=""
dnl === Clutter windowing system backend ======================================
2016-02-15 12:31:11 -05:00
CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11"
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS x11"
SUPPORT_X11=1
SUPPORT_GLX=1
SUPPORT_COGL=1
# 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.
PKG_CHECK_EXISTS([pangoft2],
[
AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE pangoft2"
],
[])
AC_ARG_ENABLE(
[wayland-egl-server],
[AC_HELP_STRING([--enable-wayland-egl-server=@<:@no/yes@:>@], [Enable server side wayland support @<:@default=no@:>@])],
[],
enable_wayland_egl_server=yes
)
AS_IF([test "x$enable_wayland_egl_server" = "xyes"],
[
CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
SUPPORT_EGL=1
BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-egl wayland-server"
SUPPORT_WAYLAND_COMPOSITOR=1
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
SUPPORT_EVDEV=1
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])
])
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$enable_wayland_egl_server" = "xyes"])
2016-02-15 12:31:11 -05:00
AC_DEFINE_UNQUOTED([CLUTTER_DRIVERS], ["*"], [List of Cogl drivers])
dnl strip leading spaces
CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* }
AC_SUBST(CLUTTER_BACKENDS)
CLUTTER_INPUT_BACKENDS=${CLUTTER_INPUT_BACKENDS#* }
AC_SUBST(CLUTTER_INPUT_BACKENDS)
AC_CACHE_SAVE
dnl === Clutter configuration =================================================
# windowing systems
AS_IF([test "x$SUPPORT_X11" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_X11 \"x11\"
#define CLUTTER_INPUT_X11 \"x11\""])
AS_IF([test "x$SUPPORT_GLX" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_GLX \"glx\""])
AS_IF([test "x$SUPPORT_EGL" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_EGL \"eglnative\""])
AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_INPUT_EVDEV \"evdev\""])
# the 'null' input backend is special
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_INPUT_NULL \"null\""
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-27 21:02:02 -04:00
dnl === Clutter substitutions kept for backwards compatibility ================
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-27 21:02:02 -04:00
dnl === X11 checks, only for X11-based backends ===============================
X11_PC_FILES=""
X11_EXTS=""
x11_tests=no
AS_IF([test "x$SUPPORT_X11" = "x1"],
[
# base X11 includes and libraries
AC_MSG_CHECKING([for X11])
# 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"
# 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`
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])
]
)
]
)
# 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"
X11_EXTS="$X11_EXTS xext"
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([Not found])]
)
# 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 Emmanuele Bassi <ebassi@openedhand.com> * clutter/clutter-private.h: Remove inclusion of backend-specific headers; update the main context object; add the declarations for the event queue functions. * clutter/clutter-backend.[ch]: Add the abstract ClutterBackend object, which holds backend-specific settings, the main stage, and the event queue. Every backend must implement a subclass of ClutterBackend and ClutterStage. * clutter/clutter-feature.c: Protect the GLX specific calls behing #ifdef HAVE_CLUTTER_GLX. * clutter/clutter-actor.c: * clutter/clutter-group.c: * clutter/clutter-clone-texture.c: Include GL/gl.h * clutter/clutter-event.[ch]: Update public API and implement the event queue private API; hold a reference on the event objects; move out the keysym-to-unicode table; add the new event types. * clutter/clutter-color.h: Include clutter-fixed.h * clutter/clutter-main.c: Update API; get the main stage from the backend object; process the event received from the queue; lock/unlock the main mutex if we have one; move the initialisation process sooner in the init sequence, in order to have the backend object when we check for options; call the backed vfuncs in the pre/post parse hooks. * clutter/clutter-stage.c: Make ClutterStage and abstract class, implemented by the backends. * clutter/clutter/glx/clutter-glx.h: * clutter/clutter/glx/clutter-backend-glx.[ch]: * clutter/clutter/glx/clutter-event-glx.c: * clutter/clutter/glx/clutter-stage-glx.[ch]: * clutter/clutter/glx/Makefile.am: Add the GLX backend. * clutter/clutter/egl/clutter-backend-egl.[ch]: * clutter/clutter/egl/clutter-event-egl.c: * clutter/clutter/egl/clutter-stage-egl.[ch]: * clutter/clutter/egl/Makefile.am: Add the stub for a EGL backend. * examples/*.c: Update for the new API.
2007-03-22 14:21:59 -04:00
X11_LIBS="$X11_LIBS -lXdamage"
X11_PC_FILES="$X11_PC_FILES xdamage"
X11_EXTS="$X11_EXTS xdamage"
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([not found])]
)
# XCOMPOSITE (required)
AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
AS_IF([test "x$have_xcomposite" = "xyes"],
[
X11_LIBS="$X11_LIBS -lXcomposite"
X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
X11_EXTS="$X11_EXTS xcomposite"
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([not found])]
)
# XTEST (required)
AC_MSG_CHECKING([for XTest extension])
PKG_CHECK_EXISTS([xtst], [have_xtest=yes], [have_xtest=no])
AS_IF([test "x$have_xtest" = "xyes"],
[
AC_DEFINE(HAVE_XTEST, [1], [Define to 1 if we have the XTest X extension])
X11_LIBS="$X11_LIBS -lXtst"
X11_PC_FILES="$X11_PC_FILES xtst"
X11_EXTS="$X11_EXTS xtst"
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([Not found])]
)
# 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 11:02:19 -04:00
AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
have_xge=yes
X11_EXTS="$X11_EXTS xge"
])
CPPFLAGS="$clutter_save_CPPFLAGS"
LIBS="$clutter_save_LIBS"
PKG_CHECK_EXISTS([xi], [have_xinput=yes], AC_MSG_ERROR([XI support not found]))
AC_CHECK_HEADERS([X11/extensions/XInput2.h],
[],
AC_MSG_ERROR([XI2 not found]))
AC_CHECK_FUNC([XIAllowTouchEvents],
[
AC_CHECK_MEMBER([XIScrollClassInfo.number],
[],
AC_MSG_ERROR([XIScrollClasSInfo.number member missing in XI2]),
[[#include <X11/extensions/XInput2.h>]])
])
LIBS="$clutter_save_LIBS"
X11_LIBS="$X11_LIBS $XINPUT_LIBS"
X11_PC_FILES="$X11_PC_FILES xi"
AS_IF([test "x$have_xinput_2_2" = "xyes"],
[X11_EXTS="$X11_EXTS xi2.2"],
[X11_EXTS="$X11_EXTS xi2.0"])
# XKB
clutter_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
clutter_save_LIBS="$LIBS"
LIBS="$LIBS $X11_LIBS"
AC_CHECK_FUNC([XkbQueryExtension],
[],
[AC_MSG_ERROR([XKB support not found])])
CPPFLAGS="$clutter_save_CPPFLAGS"
LIBS="$clutter_save_LIBS"
x11_tests=yes
BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
]
)
2007-03-22 Emmanuele Bassi <ebassi@openedhand.com> * clutter/clutter-private.h: Remove inclusion of backend-specific headers; update the main context object; add the declarations for the event queue functions. * clutter/clutter-backend.[ch]: Add the abstract ClutterBackend object, which holds backend-specific settings, the main stage, and the event queue. Every backend must implement a subclass of ClutterBackend and ClutterStage. * clutter/clutter-feature.c: Protect the GLX specific calls behing #ifdef HAVE_CLUTTER_GLX. * clutter/clutter-actor.c: * clutter/clutter-group.c: * clutter/clutter-clone-texture.c: Include GL/gl.h * clutter/clutter-event.[ch]: Update public API and implement the event queue private API; hold a reference on the event objects; move out the keysym-to-unicode table; add the new event types. * clutter/clutter-color.h: Include clutter-fixed.h * clutter/clutter-main.c: Update API; get the main stage from the backend object; process the event received from the queue; lock/unlock the main mutex if we have one; move the initialisation process sooner in the init sequence, in order to have the backend object when we check for options; call the backed vfuncs in the pre/post parse hooks. * clutter/clutter-stage.c: Make ClutterStage and abstract class, implemented by the backends. * clutter/clutter/glx/clutter-glx.h: * clutter/clutter/glx/clutter-backend-glx.[ch]: * clutter/clutter/glx/clutter-event-glx.c: * clutter/clutter/glx/clutter-stage-glx.[ch]: * clutter/clutter/glx/Makefile.am: Add the GLX backend. * clutter/clutter/egl/clutter-backend-egl.[ch]: * clutter/clutter/egl/clutter-event-egl.c: * clutter/clutter/egl/clutter-stage-egl.[ch]: * clutter/clutter/egl/Makefile.am: Add the stub for a EGL backend. * examples/*.c: Update for the new API.
2007-03-22 14:21:59 -04:00
AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"])
X11_EXTS=${X11_EXTS#* }
AC_CACHE_SAVE
dnl === Libwacom support for X11 ===============================================
AC_ARG_WITH(libwacom,
AC_HELP_STRING([--without-libwacom],
[disable the use of libwacom for advanced tablet management]),,
with_libwacom=auto)
have_libwacom=no
AC_MSG_CHECKING([libwacom])
if test x$with_libwacom = xno ; then
AC_MSG_RESULT([disabled])
else
if $PKG_CONFIG --exists libwacom '>=' $LIBWACOM_REQ_VERSION; then
have_libwacom=yes
AC_MSG_RESULT(yes)
PKG_CHECK_MODULES([LIBWACOM], [libwacom])
AC_SUBST(LIBWACOM_CFLAGS)
AC_SUBST(LIBWACOM_LIBS)
AC_DEFINE([HAVE_LIBWACOM], 1, [Building with libwacom for advanced tablet management])
else
AC_MSG_RESULT(no)
if test x$with_libwacom = xyes ; then
AC_MSG_ERROR([libwacom forced but not found])
fi
fi
fi
dnl === Check for GDK-Pixbuf in tests =========================================
PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0])
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
dnl === Enable debug level ====================================================
2005-04-13 15:49:56 -04:00
m4_define([debug_default], [minimum])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
[Control Clutter debugging level @<:@default=]debug_default[@:>@])],
[],
[enable_debug=debug_default])
AS_CASE([$enable_debug],
[yes],
[
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
],
[minimum],
[CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"],
[no],
[CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
[AC_MSG_ERROR([Unknown argument for --enable-debug])]
)
AC_SUBST(CLUTTER_DEBUG_CFLAGS)
dnl === Enable deprecation guards ==================================================
m4_define([deprecated_default],
[yes])
AC_ARG_ENABLE([deprecated],
[AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
[Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
[],
[enable_deprecated=deprecated_default])
AS_CASE([$enable_deprecated],
[no],
[
CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED"
],
[yes],
[
CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS"
],
[AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
)
AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
dnl === Enable strict compiler flags ==========================================
# 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], [no])
AC_ARG_ENABLE([maintainer-flags],
[AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
[Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
[],
[enable_maintainer_flags=maintainer_flags_default])
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
-Wall
2012-04-04 10:33:05 -04:00
-Wcast-align
-Wuninitialized
-Wno-strict-aliasing
-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"
])
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])]
)
# strip leading spaces
2011-03-22 13:18:07 -04:00
MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#* }
AC_SUBST(MAINTAINER_CFLAGS)
dnl === Dependencies, compiler flags and linker libraries =====================
# strip leading space
BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
# public dependencies, will fill the Requires: field of clutter.pc
CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $BACKEND_PC_FILES"
PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
# 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"],
[
CLUTTER_REQUIRES_PRIVATE=""
CLUTTER_DEPS_PRIVATE_CFLAGS=""
CLUTTER_DEPS_PRIVATE_LIBS=""
],
[
CLUTTER_REQUIRES_PRIVATE="$CLUTTER_BASE_PC_FILES_PRIVATE $BACKEND_PC_FILES_PRIVATE"
PKG_CHECK_MODULES(CLUTTER_DEPS_PRIVATE, [$CLUTTER_REQUIRES_PRIVATE])
])
AC_SUBST(CLUTTER_REQUIRES)
AC_SUBST(CLUTTER_REQUIRES_PRIVATE)
CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_DEPS_PRIVATE_CFLAGS $GLIB_CFLAGS $LIBWACOM_CFLAGS"
CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_DEPS_PRIVATE_LIBS $GLIB_LIBS $LIBWACOM_LIBS"
AC_SUBST(CLUTTER_CFLAGS)
AC_SUBST(CLUTTER_LIBS)
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
ltp_version_list="1.6 1.7 1.8 1.9 1.10"
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
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")
Adds the ability to build Cogl standalone This adds an autogen.sh, configure.ac and build/autotool files etc under clutter/cogl and makes some corresponding Makefile.am changes that make it possible to build and install Cogl as a standalone library. Some notable things about this are: A standalone installation of Cogl installs 3 pkg-config files; cogl-1.0.pc, cogl-gl-1.0.pc and cogl-2.0.pc. The second is only for compatibility with what clutter installed though I'm not sure that anything uses it so maybe we could remove it. cogl-1.0.pc is what Clutter would use if it were updated to build against a standalone cogl library. cogl-2.0.pc is what you would use if you were writing a standalone Cogl application. A standalone installation results in two libraries currently, libcogl.so and libcogl-pango.so. Notably we don't include a major number in the sonames because libcogl supports two major API versions; 1.x as used by Clutter and the experimental 2.x API for standalone applications. Parallel installation of later versions e.g. 3.x and beyond will be supportable either with new sonames or if we can maintain ABI then we'll continue to share libcogl.so. The headers are similarly not installed into a directory with a major version number since the same headers are shared to export the 1.x and 2.x APIs (The only difference is that cogl-2.0.pc ensures that -DCOGL_ENABLE_EXPERIMENTAL_2_0_API is used). Parallel installation of later versions is not precluded though since we can either continue sharing or later add a major version suffix.
2011-02-09 21:32:11 -05:00
dnl === GObject-Introspection check ===========================================
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
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 09:36:16 -05:00
GLIB_TESTS
dnl ===========================================================================
AC_CONFIG_FILES([
Makefile
build/Makefile
build/autotools/Makefile
clutter/Makefile
clutter/clutter-config.h
clutter/mutter-clutter-$LIBMUTTER_API_VERSION.pc:clutter/mutter-clutter.pc.in
tests/Makefile
tests/accessibility/Makefile
tests/conform/Makefile
tests/interactive/Makefile
tests/interactive/wrapper.sh
tests/micro-bench/Makefile
tests/performance/Makefile
2005-04-13 15:49:56 -04:00
])
AC_OUTPUT
dnl === Summary ===============================================================
echo ""
echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
# Global flags
echo ""
echo " • Global:"
echo " Prefix: ${prefix}"
echo " Libdir: ${libdir}"
echo " Sysconfdir: ${sysconfdir}"
# Compiler/Debug related flags
echo ""
echo " • Compiler options:"
echo " Clutter debug level: ${enable_debug}"
echo " Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
echo " Enable coverage tests: ${use_gcov}"
echo " Enable deprecated symbols: ${enable_deprecated}"
# Miscellaneous
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 09:36:16 -05:00
if test "x$x11_tests" = "xyes"; then
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 09:36:16 -05:00
fi
if test "x$pixbuf_tests" = "xyes"; then
echo " Build tests using GDK-Pixbuf: ${pixbuf_tests}"
fi
echo " Install test suites: ${enable_installed_tests}"
# Clutter backend related flags
echo ""
echo " • Clutter Backends:"
echo " Windowing systems: ${CLUTTER_BACKENDS}"
echo " Input backends: ${CLUTTER_INPUT_BACKENDS}"
if test "x$SUPPORT_X11" = "x1"; then
echo ""
echo " - X11 backend options:"
echo " Enabled extensions: ${X11_EXTS}"
fi
if test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"; then
echo ""
2016-02-15 12:31:11 -05:00
echo " - Wayland compositor support enabled"
fi
echo ""