2006-05-29 04:59:36 -04:00
# clutter package version number, (as distinct from shared library version)
2009-08-31 10:49:39 -04: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 08:23:26 -04:00
m4_define([clutter_major_version], [1])
2011-09-19 15:04:11 -04:00
m4_define([clutter_minor_version], [9])
m4_define([clutter_micro_version], [1])
2006-11-20 07:02:24 -05:00
2011-02-11 10:44:03 -05: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 09:04:53 -04: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 10:49:39 -04: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 09:04:53 -04:00
# [ API addition, deprecation ]
2009-08-31 10:49:39 -04: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 09:04:53 -04:00
# ...
2009-09-16 07:47:46 -04:00
#
2011-02-11 10:44:03 -05:00
# • for development releases: keep clutter_interface_age to 0
2011-02-28 06:24:14 -05:00
m4_define([clutter_interface_age], [0])
2011-01-11 15:29:30 -05:00
2009-05-25 09:04:53 -04:00
m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
2006-11-20 07:02:24 -05:00
2011-01-11 15:29:30 -05: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 06:52:20 -04:00
AC_PREREQ([2.63])
2006-05-29 04:59:36 -04:00
2007-12-19 11:16:10 -05:00
AC_INIT([clutter],
2006-11-20 07:02:24 -05:00
[clutter_version],
2011-04-12 12:32:01 -04:00
[http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
2010-05-05 06:52:20 -04:00
[clutter],
[http://www.clutter-project.org])
2009-11-18 09:21:08 -05:00
2006-05-29 04:59:36 -04:00
AC_CONFIG_SRCDIR([clutter/clutter.h])
2009-11-18 09:21:08 -05:00
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/autotools])
2005-04-13 15:49:56 -04:00
2011-06-20 08:59:14 -04:00
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
2010-05-05 06:52:20 -04:00
AM_SILENT_RULES([yes])
2006-05-29 04:59:36 -04:00
2010-09-03 06:09:57 -04: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 04:59:36 -04:00
2009-09-16 07:47:46 -04:00
m4_define([lt_current], [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
2006-11-20 07:02:24 -05:00
m4_define([lt_revision], [clutter_interface_age])
2009-05-25 09:04:53 -04:00
m4_define([lt_age], [m4_eval(clutter_binary_age - clutter_interface_age)])
2006-11-20 07:02:24 -05:00
CLUTTER_LT_CURRENT=lt_current
CLUTTER_LT_REV=lt_revision
CLUTTER_LT_AGE=lt_age
2006-05-29 04:59:36 -04:00
CLUTTER_LT_VERSION="$CLUTTER_LT_CURRENT:$CLUTTER_LT_REV:$CLUTTER_LT_AGE"
CLUTTER_LT_LDFLAGS="-version-info $CLUTTER_LT_VERSION"
2011-04-04 17:33:31 -04:00
AC_PROG_SED
2011-03-22 13:10:49 -04:00
AC_CANONICAL_HOST
2010-09-29 12:32:57 -04:00
AC_MSG_CHECKING([if building for some Win32 platform])
2011-03-22 13:10:49 -04:00
AS_CASE([$host],
[*-*-mingw*|*-*-cygwin*],
[
CLUTTER_LT_LDFLAGS="$CLUTTER_LT_LDFLAGS -no-undefined"
platform_win32=yes
],
[platform_win32=no]
)
2010-09-29 12:32:57 -04:00
AC_MSG_RESULT([$platform_win32])
2011-03-25 07:49:44 -04:00
AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
2010-09-29 12:32:57 -04:00
2011-07-13 09:20:47 -04:00
AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
2006-05-29 04:59:36 -04:00
AC_SUBST(CLUTTER_LT_VERSION)
AC_SUBST(CLUTTER_LT_LDFLAGS)
dnl ========================================================================
2005-04-13 15:49:56 -04:00
# Checks for programs.
2008-11-07 14:32:28 -05:00
AM_PROG_CC_C_O
2010-03-02 08:32:46 -05:00
# require libtool >= 2.2
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
2010-03-01 06:12:16 -05:00
2005-04-13 15:49:56 -04:00
# Checks for header files.
AC_HEADER_STDC
2011-02-14 11:49:01 -05:00
# required versions for dependencies
2011-09-27 09:21:41 -04:00
m4_define([glib_req_version], [2.31.0])
2011-09-19 15:02:17 -04:00
m4_define([cogl_req_version], [1.8.0])
2011-02-14 11:49:01 -05:00
m4_define([json_glib_req_version], [0.12.0])
2011-08-10 07:02:26 -04:00
m4_define([atk_req_version], [2.1.5])
2011-02-14 11:49:01 -05:00
m4_define([cairo_req_version], [1.10])
m4_define([pango_req_version], [1.20])
m4_define([gi_req_version], [0.9.5])
m4_define([uprof_req_version], [0.3])
m4_define([gtk_doc_req_version], [1.13])
2011-02-19 04:02:51 -05:00
m4_define([xfixes_req_version], [3])
m4_define([xcomposite_req_version], [0.4])
2011-02-14 11:49:01 -05:00
2011-06-20 08:56:46 -04: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([UPROF_REQ_VERSION], [uprof_req_version])
AC_SUBST([GTK_DOC_REQ_VERSION], [gtk_doc_req_version])
AC_SUBST([XFIXES_REQ_VERSION], [xfixes_req_version])
2011-02-19 04:02:51 -05:00
AC_SUBST([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
2011-02-14 11:49:01 -05:00
2005-04-13 15:49:56 -04:00
# Checks for typedefs, structures, and compiler characteristics.
2011-02-14 11:49:01 -05:00
AM_PATH_GLIB_2_0([glib_req_version],
[],
[AC_MSG_ERROR([glib-2.0 is required])],
2010-05-18 08:55:18 -04:00
[gobject gthread gmodule-no-export])
2008-06-09 09:29:17 -04:00
2010-06-22 07:13:31 -04:00
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
2010-09-03 08:55:07 -04:00
AC_ARG_ENABLE([Bsymbolic],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--disable-Bsymbolic],
2010-09-03 08:55:07 -04: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 11:49:01 -05:00
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
2010-09-03 06:09:57 -04:00
AC_SUBST(CLUTTER_LINK_FLAGS)
2010-06-22 07:13:31 -04:00
2008-04-25 09:37:36 -04:00
dnl ========================================================================
2009-05-25 09:04:53 -04:00
# defaults
2011-07-13 09:20:47 -04:00
AS_IF([test "x$platform_win32" = "xyes"], [CLUTTER_FLAVOUR=win32],
[test "x$platform_quartz" = "xyes"], [CLUTTER_FLAVOUR=osx],
[CLUTTER_FLAVOUR=glx])
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-17 20:02:38 -04:00
FLAVOUR_LIBS=""
FLAVOUR_CFLAGS=""
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
CLUTTER_WINSYS_BASE=
CLUTTER_WINSYS_BASE_LIB=
2010-06-17 20:13:33 -04:00
CLUTTER_WINSYS=
2008-05-29 05:28:24 -04:00
glesversion=1.1
2009-05-25 09:04:53 -04:00
use_gles2_wrapper=no
2009-06-09 07:43:57 -04:00
experimental_backend=no
experimental_image=no
2008-04-15 17:18:13 -04:00
2009-05-25 09:04:53 -04:00
AC_ARG_WITH([flavour],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--with-flavour=@<:@glx/opengl-egl-xlib/wayland/eglx/eglnative/osx/win32/cex100@:>@],
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
[Select the Clutter window system backend])],
2010-06-17 20:13:33 -04:00
[CLUTTER_FLAVOUR=$with_flavour])
2008-04-15 17:18:13 -04:00
2009-05-25 09:04:53 -04:00
AC_ARG_WITH([gles],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--with-gles=@<:@1.1/2.0@:>@],
2009-05-25 09:04:53 -04:00
[Select Clutter GLES version (for EGL backends)])],
[glesversion=$with_gles])
2008-04-25 09:37:36 -04:00
2011-02-14 11:49:01 -05:00
# base dependencies for core
2011-05-06 12:21:00 -04:00
CLUTTER_BASE_PC_FILES="cogl-1.0 >= $COGL_REQ_VERSION cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION cogl-pango-1.0 json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
2011-02-14 11:49:01 -05:00
2009-05-25 09:04:53 -04:00
# backend specific pkg-config files
BACKEND_PC_FILES=""
2008-04-25 09:37:36 -04:00
2009-05-25 09:04:53 -04:00
dnl === Clutter windowing system backend ======================================
2010-06-17 20:13:33 -04:00
AS_CASE([$CLUTTER_FLAVOUR],
2009-05-25 09:04:53 -04:00
[glx],
[
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_GLX"
2009-10-13 10:27:06 -04:00
2010-06-17 20:56:23 -04:00
SUPPORT_X11=1
SUPPORT_XLIB=1
SUPPORT_GLX=1
2009-05-25 09:04:53 -04:00
2011-05-08 19:27:10 -04:00
CLUTTER_WINSYS=cogl
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
CLUTTER_WINSYS_BASE=x11
CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
2010-06-17 20:25:46 -04:00
CLUTTER_SONAME_INFIX=glx
2009-05-25 09:04:53 -04:00
# Mesa 7.3 added a GL pkg-config file, finally
2010-06-18 08:59:00 -04:00
PKG_CHECK_EXISTS([gl],
[BACKEND_PC_FILES="$BACKEND_PC_FILES gl"],
# if a pkg-config file isn't found just add -lGL
# and hope for the best.
[FLAVOUR_LIBS="$FLAVOUR_LIBS -lGL"])
2010-08-09 06:29:03 -04:00
# We might fall back to DRM for sync-to-vblank on GLX
PKG_CHECK_EXISTS([libdrm],
[
AC_DEFINE([HAVE_DRM], [1], [Have libdrm support])
BACKEND_PC_FILES="$BACKEND_PC_FILES libdrm"
],
[])
2009-05-25 09:04:53 -04:00
],
2010-06-17 18:23:12 -04:00
[opengl-egl-xlib],
[
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
2010-08-12 09:25:17 -04:00
CLUTTER_EGL_BACKEND="generic"
2010-06-17 18:23:12 -04:00
SUPPORT_X11=1
SUPPORT_XLIB=1
SUPPORT_EGL=1
SUPPORT_EGL_PLATFORM_POWERVR_X11=1
2011-05-08 19:27:10 -04:00
CLUTTER_WINSYS=cogl
2010-06-17 18:23:12 -04:00
CLUTTER_WINSYS_BASE=x11
CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
# I think this winsys can be API and ABI compatible with the
# glx flavour so we can also be cheeky and use the same soname
CLUTTER_SONAME_INFIX=glx
PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], [])
],
2010-09-28 10:17:46 -04:00
[wayland],
[
experimental_backend="yes"
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_WAYLAND"
SUPPORT_WAYLAND=1
CLUTTER_WINSYS=wayland
CLUTTER_SONAME_INFIX=wayland
PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], [])
PKG_CHECK_EXISTS([wayland-client xkbcommon],
[BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon"], [])
],
2009-05-25 09:04:53 -04:00
[eglx],
[
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
2010-08-12 09:25:17 -04:00
CLUTTER_EGL_BACKEND="generic"
2009-05-25 09:04:53 -04:00
2010-06-17 20:56:23 -04:00
SUPPORT_X11=1
SUPPORT_XLIB=1
SUPPORT_EGL=1
SUPPORT_EGL_PLATFORM_POWERVR_X11=1
2010-06-17 20:02:38 -04:00
2011-05-08 19:27:10 -04:00
CLUTTER_WINSYS=cogl
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
CLUTTER_WINSYS_BASE=x11
CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
2010-06-17 20:25:46 -04:00
CLUTTER_SONAME_INFIX=eglx
2009-05-25 09:04:53 -04:00
],
[eglnative],
[
2010-10-14 11:48:00 -04:00
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
2010-10-14 10:33:17 -04:00
CLUTTER_EGL_BACKEND="generic"
2010-06-17 20:56:23 -04:00
SUPPORT_EGL=1
SUPPORT_EGL_PLATFORM_POWERVR_NULL=1
2009-05-25 09:04:53 -04:00
PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no])
AS_IF([test "x$have_tslib" = "xyes"],
[AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])]
)
2010-11-19 14:31:51 -05:00
# evdev
PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon],
[have_evdev=yes], [have_evdev=no])
AS_IF([test "x$have_evdev" = "xyes"],
[AC_DEFINE([HAVE_EVDEV], 1,
[Have evdev support for input handling])]
)
# Make sure we don't enable tslib and evdev at the same time, we
# don't support multiple event backends yet.
AS_IF([test "x$have_tslib" = "xyes" -a "x$have_evdev" = "xyes"],
2011-06-20 08:56:46 -04:00
[AC_MSG_ERROR([Cannot enable both tslib and evdev events])])
2010-11-19 14:31:51 -05:00
FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS"
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS"
2010-06-17 20:13:33 -04:00
2011-05-08 19:27:10 -04:00
CLUTTER_WINSYS=cogl
2010-06-17 20:25:46 -04:00
CLUTTER_SONAME_INFIX=eglnative
2009-05-25 09:04:53 -04:00
],
2010-08-12 09:25:17 -04:00
[cex100],
[
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
2010-10-14 10:33:17 -04:00
CLUTTER_EGL_BACKEND="cex100"
2010-08-12 09:25:17 -04:00
SUPPORT_EGL=1
2011-03-04 07:50:39 -05:00
SUPPORT_EGL_PLATFORM_GDL=1
2010-08-12 09:25:17 -04:00
# The cex100 is a small specialization of the EGL backend
2011-05-08 19:27:10 -04:00
CLUTTER_WINSYS=cogl
2010-08-12 09:25:17 -04:00
CLUTTER_SONAME_INFIX=cex100
found_gdl=no
2010-09-07 11:17:51 -04:00
AC_CHECK_HEADERS([libgdl.h], [found_gdl=yes])
AS_IF([test "x$found_gdl" = "xno"],
[AC_CHECK_HEADERS([CE4100/libgdl.h],
[
FLAVOUR_CFLAGS="-I/usr/include/CE4100"
found_gdl=yes
CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
])
])
2010-08-28 05:43:39 -04:00
AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
2010-08-12 09:25:17 -04:00
2010-09-07 11:17:51 -04:00
AS_IF([test x"$found_gdl" = "xno"], [AC_MSG_ERROR([libgdl.h not found])])
2010-08-12 09:25:17 -04:00
2010-11-04 10:38:32 -04:00
# evdev
PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon],
[have_evdev=yes], [have_evdev=no])
AS_IF([test "x$have_evdev" = "xyes"],
[AC_DEFINE([HAVE_EVDEV], 1,
[Have evdev support for input handling])]
)
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $EVDEV_CFLAGS"
FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl $EVDEV_LIBS"
2010-08-12 09:25:17 -04:00
],
2009-05-25 09:04:53 -04:00
[osx],
[
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_OSX"
2010-06-17 20:56:23 -04:00
2009-05-25 09:04:53 -04:00
AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend])
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-17 20:02:38 -04:00
FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
2010-06-17 20:13:33 -04:00
CLUTTER_WINSYS=osx
2010-06-17 20:25:46 -04:00
CLUTTER_SONAME_INFIX=osx
2009-05-25 09:04:53 -04:00
],
[win32],
[
CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_WIN32"
AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend])
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-17 20:02:38 -04:00
FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm"
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500"
2010-01-15 17:56:37 -05:00
AC_CHECK_TOOL(WINDRES, windres, no)
if test "$WINDRES" = no; then
AC_MSG_ERROR([*** windres is required])
fi
2010-06-17 20:13:33 -04:00
CLUTTER_WINSYS=win32
2010-06-17 20:25:46 -04:00
CLUTTER_SONAME_INFIX=win32
2009-05-25 09:04:53 -04:00
],
2011-08-18 10:32:29 -04:00
[AC_MSG_ERROR([Invalid backend for Clutter])]
2009-05-25 09:04:53 -04:00
)
2008-11-24 10:44:16 -05:00
2011-08-18 10:32:29 -04:00
AS_IF([test "x$SUPPORT_X11" = "x1"],
[
# we use fontconfig API and pango-fc when the fontconfig
# configuration changes
PKG_CHECK_EXISTS([pangoft2],
[
AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
BACKEND_PC_FILES="$BACKEND_PC_FILES pangoft2"
],
[])
])
2010-06-17 20:56:23 -04:00
AS_IF([test "x$SUPPORT_GLX" = "x1"],
[
AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend])
AC_CHECK_HEADERS([GL/glx.h],
[],
[AC_MSG_ERROR([Unable to locate required GLX headers])])
AC_CHECK_LIB(GL, [glXCreateContext],
[HAVE_LIBGLX=yes],
[AC_MSG_ERROR([Required GLX library not found])])
])
2010-09-28 10:17:46 -04:00
AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
[
AC_DEFINE([HAVE_CLUTTER_WAYLAND], [1], [Have the Wayland backend])
])
2010-06-17 20:56:23 -04:00
AS_IF([test "x$SUPPORT_EGL" = "x1"],
[
AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
])
2010-08-12 09:25:17 -04:00
AS_IF([test "x$CLUTTER_EGL_BACKEND" = "xgeneric"],
AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend]))
AS_IF([test "x$CLUTTER_EGL_BACKEND" = "xcex100"],
AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend]))
2009-10-08 07:08:21 -04:00
# winsys conditionals for use in automake files...
2010-06-17 20:56:23 -04:00
AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "x1"])
AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"])
AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "x1"])
AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"])
2009-10-08 07:08:21 -04:00
AM_CONDITIONAL(SUPPORT_OSX, [test "x$CLUTTER_WINSYS" = "xosx"])
AM_CONDITIONAL(SUPPORT_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"])
2011-03-04 07:50:39 -05:00
AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"])
2010-09-28 10:17:46 -04:00
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$CLUTTER_WINSYS" = "xwayland"])
2011-04-18 12:17:21 -04:00
AM_CONDITIONAL(SUPPORT_STUB, [test "x$CLUTTER_WINSYS" = "xwin32" -o \
2011-06-20 08:56:46 -04:00
"x$CLUTTER_WINSYS" = "xosx" -o \
"x$CLUTTER_WINSYS" = "xwayland"])
2010-01-15 17:56:37 -05:00
2010-06-17 19:29:12 -04:00
AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
2010-11-04 10:38:32 -04:00
AM_CONDITIONAL(SUPPORT_EVDEV, [test "x$have_evdev" = "xyes"])
2010-06-17 19:29:12 -04:00
2010-11-04 10:22:24 -04: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 08:56:46 -04:00
AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
2010-11-04 10:22:24 -04:00
2011-01-19 09:33:27 -05:00
dnl === Clutter configuration =================================================
CLUTTER_CONFIG_DEFINES=
# windowing systems
AS_IF([test "x$SUPPORT_XLIB" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_X11 1"])
AS_IF([test "x$SUPPORT_GLX" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_GLX 1"])
AS_IF([test "x$SUPPORT_EGL" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_EGL 1"])
2011-02-11 11:53:28 -05:00
AS_IF([test "x$CLUTTER_WINSYS" = "xwayland"],
2011-01-19 09:33:27 -05:00
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_WAYLAND 1"])
2011-02-11 11:53:28 -05:00
AS_IF([test "x$CLUTTER_WINSYS" = "xosx"],
2011-01-19 09:33:27 -05:00
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_OSX 1"])
2011-02-11 11:53:28 -05:00
AS_IF([test "x$CLUTTER_WINSYS" = "xwin32"],
2011-01-19 09:33:27 -05:00
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_WIN32 1"])
2011-03-04 07:50:39 -05:00
AS_IF([test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"],
2011-01-19 09:33:27 -05:00
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_CEX100 1"])
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 =================================================
# Eventually the idea of a winsys should be hidden from Clutter and moved
# into Cogl, but for now we have CLUTTER_WINSYS...
AC_SUBST([CLUTTER_WINSYS])
# The same goes for the winsys-base...
AC_SUBST([CLUTTER_WINSYS_BASE])
AC_SUBST([CLUTTER_WINSYS_BASE_LIB])
2009-05-25 09:04:53 -04:00
AC_SUBST(CLUTTER_STAGE_TYPE)
2010-06-17 20:25:46 -04:00
AC_SUBST(CLUTTER_SONAME_INFIX)
2007-07-06 09:56:01 -04:00
2010-06-17 20:25:46 -04:00
CLUTTER_WINSYS_LIB=libclutter-$CLUTTER_SONAME_INFIX-$CLUTTER_API_VERSION.la
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
AC_SUBST([CLUTTER_WINSYS_LIB])
dnl === Clutter substitutions kept for backwards compatibility ================
AC_SUBST([CLUTTER_FLAVOUR])
2011-05-05 15:56:44 -04:00
CLUTTER_COGL=undefined
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
AC_SUBST([CLUTTER_COGL])
2009-05-25 09:04:53 -04:00
dnl === Image loading backend =================================================
IMAGE_PC_FILES=""
2008-04-25 09:37:36 -04:00
2009-05-25 09:04:53 -04:00
dnl === X11 checks, only for X11-based backends ===============================
X11_PC_FILES=""
2009-05-29 09:23:16 -04:00
x11_tests=no
2008-03-25 11:42:50 -04:00
2010-06-17 20:56:23 -04:00
AS_IF([test "x$SUPPORT_XLIB" = "x1"],
2009-05-25 09:04:53 -04:00
[
# base X11 includes and libraries
AC_MSG_CHECKING([for X11])
2008-03-25 11:42:50 -04:00
2009-05-25 09:04:53 -04: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 09:48:50 -05: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 09:04:53 -04: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 07:34:00 -04: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"
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([Not found])]
)
2009-05-25 09:04:53 -04:00
# XFIXES (required)
2011-02-19 04:02:51 -05:00
AC_MSG_CHECKING([for XFIXES extension >= $XFIXES_REQ_VERSION])
PKG_CHECK_EXISTS([xfixes >= $XFIXES_REQ_VERSION], [have_xfixes=yes], [have_xfixes=no])
2009-05-25 09:04:53 -04:00
AS_IF([test "x$have_xfixes" = "xyes"],
[
AC_DEFINE(HAVE_XFIXES, [1], [Define to 1 if we have the XFIXES X extension])
X11_LIBS="$X11_LIBS -lXfixes"
2011-02-19 04:02:51 -05:00
X11_PC_FILES="$X11_PC_FILES xfixes >= $XFIXES_REQ_VERSION"
2008-03-25 11:42:50 -04:00
2009-05-25 09:04:53 -04:00
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([Not found])]
)
2007-03-27 17:09:11 -04:00
2009-05-25 09:04:53 -04: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 14:21:59 -04:00
2009-05-25 09:04:53 -04:00
X11_LIBS="$X11_LIBS -lXdamage"
X11_PC_FILES="$X11_PC_FILES xdamage"
2008-04-28 09:18:16 -04:00
2009-05-25 09:04:53 -04:00
AC_MSG_RESULT([found])
],
[AC_MSG_ERROR([not found])]
)
2008-04-28 09:18:16 -04:00
2009-05-25 09:04:53 -04:00
# XCOMPOSITE (optional)
2011-02-19 04:02:51 -05: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 09:04:53 -04: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 09:18:16 -04:00
2009-05-25 09:04:53 -04:00
X11_LIBS="$X11_LIBS -lXcomposite"
2011-02-19 04:02:51 -05:00
X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
2007-10-29 12:50:34 -04:00
2009-05-25 09:04:53 -04:00
AC_MSG_RESULT([found])
],
2010-03-18 16:27:18 -04:00
[AC_MSG_ERROR([not found])]
2009-05-25 09:04:53 -04:00
)
2011-07-14 15:58:25 -04: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 11:02:19 -04:00
AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
2011-07-14 15:58:25 -04:00
have_xge=yes
])
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 07:32:04 -05:00
# XI (optional)
2009-05-25 09:04:53 -04: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 07:32:04 -05:00
[AS_HELP_STRING([--enable-xinput], [Use the XI X extension])],
[],
2011-01-17 11:42:18 -05:00
[enable_xinput=yes])
2009-05-25 09:04:53 -04: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 07:32:04 -05: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 09:04:53 -04: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 07:32:04 -05:00
AC_CHECK_HEADERS([X11/extensions/XInput2.h],
[
have_xinput2=yes
AC_DEFINE([HAVE_XINPUT_2],
[1],
[Define to 1 if XI2 is available])
],
[
have_xinput2=no
AC_DEFINE([HAVE_XINPUT],
[1],
[Define to 1 if XInput is available])
])
X11_LIBS="$X11_LIBS $XINPUT_LIBS"
2009-05-25 09:04:53 -04:00
X11_PC_FILES="$X11_PC_FILES xi"
],
[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 07:32:04 -05:00
[have_xinput2=no],
[*],
[AC_MSG_ERROR([Invalid argument for --enable-xinput])]
2009-05-25 09:04:53 -04:00
)
2010-06-14 12:29:21 -04: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
])
CPPFLAGS="$clutter_save_CPPFLAGS"
LIBS="$clutter_save_LIBS"
2010-03-18 16:27:18 -04:00
x11_tests=yes
2009-06-05 07:46:37 -04: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-17 20:02:38 -04:00
FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
2009-05-25 09:04:53 -04:00
]
)
2007-03-22 14:21:59 -04: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 07:32:04 -05:00
AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
2009-05-29 09:23:16 -04:00
AM_CONDITIONAL(X11_TESTS, [test "x$x11_tests" = "xyes"])
2007-01-23 15:29:11 -05:00
2009-05-25 09:04:53 -04:00
dnl === Enable debug level ====================================================
2005-04-13 15:49:56 -04:00
2009-05-25 09:04:53 -04:00
m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
AC_ARG_ENABLE([debug],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
2011-07-13 09:49:55 -04:00
[Control Clutter debugging level @<:@default=]debug_default[@:>@])],
2009-05-25 09:04:53 -04:00
[],
[enable_debug=debug_default])
AS_CASE([$enable_debug],
[yes],
[
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
2009-05-26 12:23:24 -04:00
CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
2009-05-25 09:04:53 -04:00
],
[minimum],
2009-05-26 12:23:24 -04:00
[CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"],
2009-05-25 09:04:53 -04: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 07:02:24 -05:00
AC_SUBST(CLUTTER_DEBUG_CFLAGS)
2011-06-14 09:47:14 -04: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 09:49:55 -04:00
[Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
2011-06-14 09:47:14 -04:00
[],
[enable_deprecated=deprecated_default])
AS_CASE([$enable_deprecated],
[no],
[
CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED -DCLUTTER_DISABLE_DEPRECATED"
],
[yes],
[
CLUTTER_DEPRECATED_CFLAGS=""
],
[AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
)
AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
2010-01-29 04:26:47 -05:00
dnl === Conformance test suite ================================================
AC_ARG_ENABLE([conformance],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--enable-conformance=@<:@no/yes@:>@],
2010-01-29 04:26:47 -05:00
[Build conformance test suite @<:@default=yes@:>@])],
[],
[enable_conformance=yes])
AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_conformance" = "xyes"])
dnl === Profiling =============================================================
2009-03-17 09:07:46 -04:00
m4_define([profile_default], [no])
AC_ARG_ENABLE(profile,
2011-06-16 08:35:22 -04:00
AS_HELP_STRING([--enable-profile=@<:@no/yes@:>@],
2009-03-17 09:07:46 -04:00
[Turn on profiling support. yes; All profiling probe points are compiled in and may be runtime enabled. no; No profiling support will built into clutter. @<:@default=no@:>@]),
2010-01-29 04:29:37 -05:00
[],
2009-03-17 09:07:46 -04:00
[enable_profile=profile_default])
AS_CASE([$enable_profile],
2010-01-29 04:29:37 -05:00
[yes],
[
AS_IF([test "x$GCC" = "xyes"],
[
2010-06-21 10:36:46 -04:00
PKG_CHECK_MODULES([PROFILE_DEP], [uprof-0.3])
2011-05-05 15:56:44 -04:00
CLUTTER_PROFILE_CFLAGS="-DCLUTTER_ENABLE_PROFILE $PROFILE_DEP_CFLAGS"
2010-11-07 10:27:17 -05:00
CLUTTER_PROFILE_LDFLAGS="$PROFILE_DEP_LIBS"
2010-01-29 04:29:37 -05:00
AS_IF([test "x$enable_debug" = "xyes"], [CLUTTER_PROFILE_CFLAGS+=" -DUPROF_DEBUG"])
],
[
AC_MSG_ERROR([--enable-profile is currently only supported if using GCC])
])
],
[no],
[
CLUTTER_PROFILE_CFLAGS=""
CLUTTER_PROFILE_LDFLAGS=""
],
[*], [AC_MSG_ERROR([Invalid value for --enable-profile])]
2009-03-17 09:07:46 -04:00
)
AM_CONDITIONAL(PROFILE, test "x$enable_profile" != "xno")
AC_SUBST(CLUTTER_PROFILE_CFLAGS)
AC_SUBST(CLUTTER_PROFILE_LDFLAGS)
2010-01-04 09:53:03 -05:00
dnl === Coverage report =======================================================
AC_PATH_PROG([GCOV], [gcov], [enable_gcov=no])
AC_MSG_CHECKING([whether to build with gcov testing])
AC_ARG_ENABLE([gcov],
[AS_HELP_STRING([--enable-gcov],
2010-02-17 12:40:57 -05:00
[Whether to enable coverage testing (requires gcc
2010-01-04 09:53:03 -05:00
and gcov)])],
[],
[enable_gcov=no])
AS_IF([test "x$enable_gcov" = "xyes" && test "x$GCC" = "xyes"],
[
2010-01-29 04:29:53 -05:00
AS_IF([test "x$enable_conformance" = "xno"],
[AC_MSG_WARN([Conformance test suite is disabled, the coverage report will be incomplete])],
[AC_MSG_RESULT([yes])]
)
2010-01-04 09:53:03 -05:00
GCOV_CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
GCOV_LDFLAGS="-lgcov"
2010-01-29 04:29:53 -05:00
],
[AC_MSG_RESULT([no])]
2010-01-04 09:53:03 -05:00
)
AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"])
AC_SUBST([GCOV_CFLAGS])
AC_SUBST([GCOV_LDFLAGS])
2009-05-25 09:04:53 -04:00
dnl === Enable strict compiler flags ==========================================
2007-07-26 06:00:09 -04:00
2011-02-11 10:45:13 -05: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 06:00:09 -04:00
AC_ARG_ENABLE([maintainer-flags],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
2011-07-13 09:49:55 -04:00
[Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
2009-05-25 09:04:53 -04:00
[],
[enable_maintainer_flags=maintainer_flags_default])
2011-02-11 10:45:13 -05:00
MAINTAINER_COMPILER_FLAGS="-Wall -Wshadow -Wcast-align -Wuninitialized
-Wno-strict-aliasing -Wempty-body -Wformat
-Wformat-security -Winit-self
2011-02-15 07:36:58 -05:00
-Wdeclaration-after-statement -Wvla
-Wpointer-arith"
2011-02-11 10:45:13 -05: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 09:04:53 -04:00
)
2007-07-26 06:00:09 -04:00
2011-02-28 07:49:48 -05:00
# strip leading spaces
2011-03-22 13:18:07 -04:00
MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#* }
2009-01-23 08:09:51 -05:00
AC_SUBST(MAINTAINER_CFLAGS)
2007-07-26 06:00:09 -04:00
2009-03-17 09:07:46 -04:00
dnl === Dependencies, compiler flags and linker libraries =====================
2011-02-16 10:38:05 -05:00
# strip leading space
2011-03-24 10:13:59 -04:00
BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
2011-02-16 10:38:05 -05:00
2011-02-14 11:49:01 -05:00
CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $IMAGE_PC_FILES $BACKEND_PC_FILES"
2009-03-17 09:07:46 -04:00
PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
AC_SUBST(CLUTTER_REQUIRES)
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-17 20:02:38 -04:00
CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_PROFILE_CFLAGS $GLIB_CFLAGS"
CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_PROFILE_LDFLAGS $GLIB_LIBS"
2009-03-17 09:07:46 -04:00
AC_SUBST(CLUTTER_CFLAGS)
AC_SUBST(CLUTTER_LIBS)
2011-02-09 21:32:11 -05:00
2009-05-25 09:04:53 -04:00
dnl === GObject-Introspection check ===========================================
2009-02-20 09:39:51 -05:00
2011-02-14 11:49:01 -05:00
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
2007-07-26 06:00:09 -04:00
2009-05-25 09:04:53 -04:00
dnl === GTK Doc check =========================================================
2006-11-20 07:02:24 -05:00
2011-02-14 11:49:01 -05:00
GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
2006-05-29 04:59:36 -04:00
2009-07-13 12:27:01 -04:00
# we don't want to build the documentation from a Git clone unless we
2008-07-17 08:21:01 -04: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 12:27:01 -04:00
# we use autogen.sh as it exists only inside the Git clones, and it
2008-07-17 08:21:01 -04:00
# is not packaged into tarballs.
2009-05-25 09:04:53 -04:00
AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
2007-05-30 19:16:58 -04:00
2009-05-25 09:04:53 -04:00
# prefixes for fixing gtk-doc references
2009-09-09 11:15:54 -04:00
CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
2009-05-25 09:04:53 -04:00
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
2011-06-20 08:56:46 -04:00
COGL_PREFIX="`$PKG_CONFIG --variable=prefix cogl-1.0`"
2011-02-14 11:49:01 -05:00
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
2009-09-09 11:15:54 -04:00
AC_SUBST(CAIRO_PREFIX)
2009-05-25 09:04:53 -04:00
AC_SUBST(GLIB_PREFIX)
AC_SUBST(PANGO_PREFIX)
2011-06-20 08:56:46 -04:00
AC_SUBST(COGL_PREFIX)
2011-02-14 11:49:01 -05:00
AC_SUBST(ATK_PREFIX)
2006-05-29 04:59:36 -04:00
2009-05-25 09:04:53 -04:00
dnl === Manual ================================================================
2009-09-03 08:04:59 -04:00
AC_ARG_ENABLE([docs],
2011-06-16 08:35:22 -04:00
[AS_HELP_STRING([--enable-docs=@<:@no/yes@:>@],
2009-09-03 08:04:59 -04: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 09:04:53 -04:00
[
AC_PATH_PROG(JW, [jw], [no])
AS_IF([test "x$JW" = "xno"],
2009-09-03 08:04:59 -04:00
[
AC_MSG_WARN([jw not found; pdf generation has been disabled])
],
[enable_pdfs=yes])
2009-09-02 13:11:06 -04:00
AC_PATH_PROG(XSLTPROC, [xsltproc], [no])
AS_IF([test "x$XSLTPROC" = "xno"],
2009-09-03 08:04:59 -04:00
[
AC_MSG_ERROR([xsltproc not found])
])
2009-05-25 09:04:53 -04:00
]
)
2005-04-13 15:49:56 -04:00
2009-09-03 08:04:59 -04:00
AM_CONDITIONAL(ENABLE_DOCS, [test "x$enable_docs" = "xyes"])
AM_CONDITIONAL(ENABLE_PDFS, [test "x$enable_pdfs" = "xyes"])
2005-04-13 15:49:56 -04:00
2009-05-25 09:04:53 -04:00
dnl === I18N ==================================================================
2005-04-13 15:49:56 -04:00
2010-09-09 06:58:03 -04:00
AM_GNU_GETTEXT_VERSION([0.17])
2010-09-07 18:35:06 -04:00
AM_GNU_GETTEXT([external])
2010-09-08 09:48:40 -04:00
GETTEXT_PACKAGE="clutter-1.0"
2008-06-10 12:47:38 -04:00
AC_SUBST(GETTEXT_PACKAGE)
2011-02-14 11:49:01 -05:00
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
["$GETTEXT_PACKAGE"],
2008-06-10 12:47:38 -04:00
[The prefix for our gettext translation domains.])
2010-06-03 07:32:54 -04:00
AS_ALL_LINGUAS
2008-06-10 12:47:38 -04:00
2009-05-25 09:04:53 -04:00
dnl ===========================================================================
2006-11-20 07:02:24 -05:00
AC_CONFIG_FILES([
2010-09-13 06:30:30 -04:00
Makefile
2011-02-14 11:49:01 -05:00
README
2010-09-13 06:30:30 -04:00
build/Makefile
build/autotools/Makefile
build/mingw/Makefile
clutter/Makefile
2011-01-19 09:33:27 -05:00
clutter/clutter-config.h
2010-09-13 06:30:30 -04: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-05-08 19:27:10 -04:00
clutter/cogl/clutter-cex100.h
2010-09-13 06:30:30 -04:00
tests/Makefile
tests/accessibility/Makefile
tests/conform/Makefile
tests/conform/test-launcher.sh
tests/data/Makefile
tests/interactive/Makefile
tests/interactive/wrapper.sh
tests/micro-bench/Makefile
2011-01-19 06:38:25 -05:00
tests/performance/Makefile
2010-09-13 06:30:30 -04:00
doc/Makefile
doc/reference/Makefile
doc/reference/clutter/Makefile
doc/reference/clutter/clutter-docs.xml
doc/reference/cally/Makefile
doc/reference/cally/cally-docs.xml
doc/common/Makefile
doc/cookbook/Makefile
doc/cookbook/clutter-cookbook.xml
doc/cookbook/examples/Makefile
po/Makefile.in
2005-04-13 15:49:56 -04:00
])
2006-06-06 16:40:40 -04:00
2006-11-20 07:02:24 -05:00
AC_OUTPUT
2009-05-25 09:04:53 -04:00
dnl === Summary ===============================================================
2006-06-06 16:40:40 -04:00
echo ""
2009-11-17 10:32:00 -05:00
echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
2009-12-01 10:17:49 -05:00
# Global flags
2006-06-06 16:40:40 -04:00
echo ""
2009-11-17 10:32:00 -05:00
echo " • Global:"
echo " Prefix: ${prefix}"
2011-10-11 11:05:24 -04:00
echo " Libdir: ${libdir}"
echo " Sysconfdir: ${sysconfdir}"
2011-05-05 15:56:44 -04:00
echo " Flavour: ${CLUTTER_WINSYS}"
2009-11-17 10:32:00 -05:00
echo " Target library: ${CLUTTER_WINSYS_LIB}"
2009-12-01 10:17:49 -05:00
# Compiler/Debug related flags
2006-06-06 16:40:40 -04:00
echo ""
2009-11-17 10:32:00 -05:00
echo " • Compiler options:"
echo " Clutter debug level: ${enable_debug}"
2011-02-28 07:49:48 -05:00
echo " Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
2009-03-17 09:07:46 -04:00
echo " Profiling enabled: ${enable_profile}"
2010-01-04 09:53:03 -05:00
echo " Enable coverage tests: ${enable_gcov}"
2011-06-14 09:47:14 -04:00
echo " Enable deprecated symbols: ${enable_deprecated}"
2009-11-17 10:32:00 -05:00
2009-12-01 10:17:49 -05:00
# Documentation
2009-11-17 10:32:00 -05:00
echo ""
echo " • Documentation:"
echo " Build API Reference: ${enable_gtk_doc}"
2009-12-01 10:17:49 -05:00
echo " Build Additional Documentation: ${enable_docs} (Generate PDF: ${enable_pdfs})"
2009-11-17 10:32:00 -05:00
2009-12-01 10:17:49 -05:00
# Miscellaneous
2009-11-17 10:32:00 -05:00
echo ""
echo " • Extra:"
echo " Build introspection data: ${enable_introspection}"
2010-01-29 04:26:47 -05:00
echo " Build conformance test suite: ${enable_conformance}"
2009-11-17 10:32:00 -05:00
2009-12-01 10:17:49 -05:00
# Clutter backend related flags
2009-11-17 10:32:00 -05:00
echo ""
echo " • Clutter Backend:"
if test "x$experimental_backend" = "xno"; then
echo " Windowing system: ${CLUTTER_WINSYS}"
else
echo " Windowing system: ${CLUTTER_WINSYS} (WARNING: Experimental)"
2008-04-25 09:37:36 -04:00
fi
2009-05-25 09:04:53 -04:00
2010-06-17 20:56:23 -04:00
if test "x$SUPPORT_XLIB" = "x1"; then
2010-10-19 05:48:39 -04:00
echo " Enable XComposite: ${have_xcomposite}"
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 07:32:04 -05:00
echo " Enable XInput: ${have_xinput}"
2011-07-14 15:58:25 -04:00
echo " Enable Xge: ${have_xge}"
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 07:32:04 -05:00
echo " Enable XI2: ${have_xinput2}"
2010-06-14 12:29:21 -04:00
echo " Enable XKB: ${have_xkb}"
2009-11-17 10:32:00 -05:00
echo " Enable X11 tests: ${x11_tests}"
2008-04-25 09:37:36 -04:00
fi
2009-11-17 10:32:00 -05:00
echo ""
2009-12-01 10:17:49 -05:00
# General warning about experimental features
2009-11-17 10:32:00 -05:00
if test "x$experimental_backend" = "xyes" ||
2010-09-22 07:56:33 -04:00
test "x$experimental_image" = "xyes"
then
2009-11-17 10:32:00 -05:00
echo ""
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
echo " *WARNING*"
echo ""
echo " The stability of your build might be affected by one or more"
echo " experimental backends or experimental and unsupported features"
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
echo ""
2008-04-25 09:37:36 -04:00
fi