2006-05-29 04:59:36 -04:00
# clutter package version number, (as distinct from shared library version)
# An odd micro number indicates in-progress development, (eg. from CVS)
# An even micro number indicates a released version.
2006-11-20 07:02:24 -05:00
m4_define([clutter_major_version], [0])
2007-01-18 09:13:56 -05:00
m4_define([clutter_minor_version], [3])
2007-01-17 14:16:52 -05:00
m4_define([clutter_micro_version], [0])
2006-11-20 07:02:24 -05:00
m4_define([clutter_version],
[clutter_major_version.clutter_minor_version.clutter_micro_version])
m4_define([clutter_api_version],
[clutter_major_version.clutter_minor_version])
# increase the interface age for each release; if the API changes, set to 0
m4_define([clutter_interface_age], [0])
m4_define([clutter_binary_age],
[m4_eval(100 * clutter_minor_version + clutter_micro_version)])
AC_PREREQ(2.53)
2006-05-29 04:59:36 -04:00
AC_INIT([clutter],
2006-11-20 07:02:24 -05:00
[clutter_version],
2006-06-22 11:01:22 -04:00
[http://bugzilla.o-hand.com/enter_bug.cgi?product=Clutter])
2006-05-29 04:59:36 -04:00
AC_CONFIG_SRCDIR([clutter/clutter.h])
2005-04-13 15:49:56 -04:00
AM_CONFIG_HEADER([config.h])
2006-05-29 04:59:36 -04:00
AM_INIT_AUTOMAKE([1.7])
2006-11-20 07:02:24 -05:00
CLUTTER_MAJOR_VERSION=clutter_major_version
CLUTTER_MINOR_VERSION=clutter_minor_version
CLUTTER_MICRO_VERSION=clutter_micro_version
CLUTTER_VERSION=clutter_version
2007-03-23 11:20:35 -04:00
CLUTTER_API_VERSION=clutter_api_version
2006-11-20 07:02:24 -05:00
CLUTTER_MAJORMINOR=clutter_api_version
AC_SUBST(CLUTTER_MAJOR_VERSION)
AC_SUBST(CLUTTER_MINOR_VERSION)
AC_SUBST(CLUTTER_MICRO_VERSION)
AC_SUBST(CLUTTER_VERSION)
2007-03-23 11:20:35 -04:00
AC_SUBST(CLUTTER_API_VERSION)
2006-05-29 04:59:36 -04:00
AC_SUBST(CLUTTER_MAJORMINOR)
2006-11-20 07:02:24 -05:00
m4_define([lt_current],
[m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
m4_define([lt_revision], [clutter_interface_age])
m4_define([lt_age], [m4_eval(clutter_binary_age - clutter_interface_age)])
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"
AC_SUBST(CLUTTER_LT_VERSION)
AC_SUBST(CLUTTER_LT_LDFLAGS)
dnl ========================================================================
2005-04-13 15:49:56 -04:00
# Checks for programs.
AC_PROG_CC
2006-06-23 05:20:04 -04:00
AC_DISABLE_STATIC
2005-04-13 15:49:56 -04:00
AC_PROG_LIBTOOL
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
2006-05-29 04:59:36 -04:00
dnl ========================================================================
2006-09-14 13:18:54 -04:00
PKG_CHECK_MODULES(X11, x11, [have_x11=yes], [have_x11=no])
if test x$have_x11 = xno
then
AC_PATH_X
if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`
fi
if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
fi
fi
2007-03-22 14:21:59 -04:00
if $PKG_CONFIG --exists xfixes ; then
AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension)
X11_LIBS="$X11_LIBS -lXfixes"
fi
2007-03-23 11:20:35 -04:00
AC_CHECK_HEADERS([GL/gl.h GL/glx.h],,
2006-06-14 09:04:26 -04:00
[AC_MSG_ERROR([Unable to locate required GL headers])])
2006-06-06 16:40:40 -04:00
AC_CHECK_LIB(GL, glXCreateContext, HAVE_LIBGL=yes, HAVE_LIBGL=no)
2005-04-13 15:49:56 -04:00
2006-06-06 16:40:40 -04:00
if test "x$HAVE_LIBGL" = "xno"; then
AC_MSG_ERROR(libGL not found);
2005-04-13 15:49:56 -04:00
else
2006-06-06 16:40:40 -04:00
GLX_LIBS="$X11_LIBS -lGL"
2005-04-13 15:49:56 -04:00
fi
2006-06-06 16:40:40 -04:00
GLX_CFLAGS="$X11_CFLAGS"
2007-03-22 14:21:59 -04:00
clutterbackend=glx
AC_ARG_WITH([flavour],
AC_HELP_STRING([--with-flavour=@<:@glx/egl@:>@],
[Select the Clutter backend]),
clutterbackend=$with_flavour)
AC_SUBST([clutterbackend])
case $clutterbackend in
glx)
CLUTTER_FLAVOUR="glx"
AC_DEFINE([HAVE_CLUTTER_GLX], 1, [Have the GLX backend])
;;
egl)
CLUTTER_FLAVOUR="egl"
AC_DEFINE([HAVE_CLUTTER_EGL], 1, [Have the EGL backend])
;;
*) AC_MSG_ERROR([Invalid backend for Clutter: use glx or egl])
;;
esac
2007-01-23 15:29:11 -05:00
AC_SUBST(CLUTTER_FLAVOUR)
2007-03-22 14:21:59 -04:00
clutterbackendlib=libclutter-$clutterbackend-$CLUTTER_MAJORMINOR.la
AC_SUBST([clutterbackendlib])
2007-01-23 15:29:11 -05:00
2006-05-29 04:59:36 -04:00
dnl ========================================================================
2005-04-13 15:49:56 -04:00
2007-03-23 11:20:35 -04:00
pkg_modules="pangoft2 glib-2.0 >= 2.10 gobject-2.0 gthread-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0"
2006-06-06 16:40:40 -04:00
PKG_CHECK_MODULES(CLUTTER_DEPS, [$pkg_modules])
2005-04-13 15:49:56 -04:00
2006-05-29 04:59:36 -04:00
dnl ========================================================================
2005-04-13 15:49:56 -04:00
2006-05-29 04:59:36 -04:00
if test "x$GCC" = "xyes"; then
GCC_FLAGS="-g -Wall"
2005-04-13 15:49:56 -04:00
fi
2006-11-20 07:02:24 -05:00
dnl = Enable debug level ===================================================
m4_define([debug_default],
m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum]))
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
2006-11-22 15:52:27 -05:00
[turn on debugging. yes; All glib asserts, checks and runtime clutter verbose messages. minimum; Just glib cast checks and runtime clutter verbose messagaes. no; No glib asserts or checks and no runtime clutter verbose messages. @<:@default=debug_default@:>@]),
2006-11-20 07:02:24 -05:00
,
enable_debug=debug_default)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
2006-11-21 04:18:40 -05:00
CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
2006-11-20 07:02:24 -05:00
else
if test "x$enable_debug" = "xno"; then
2006-11-22 15:52:27 -05:00
CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac: Enable debug messages also when
--enable-debug is set to "minimum".
* clutter/Makefile.am:
* clutter/clutter-debug.h: Move all debugging macros inside
this private header; make all debug macros depend on the
CLUTTER_ENABLE_DEBUG compile time define, controlled by
the --enable-debug configure switch; add G_LOG_DOMAIN define.
* clutter/clutter-main.c: Clean up the debug stuff; add
command line argument parsing using GOption; the debug
messages now are triggered like this:
CLUTTER_DEBUG=section:section:... clutter-app
or like this:
clutter-app --clutter-debug=section:section:...
where "section" is one of the sections listed in clutter-main.c,
or "all", for all sections; each section is bound to a flag,
which can be used to define a domain when adding a debug note
using the CLUTTER_NOTE() macro; the old CLUTTER_DBG() macro is
just a wrapper around that, under the CLUTTER_DEBUG_MISC domain;
CLUTTER_NOTE() is used like this:
CLUTTER_NOTE (DOMAIN, log-function);
where log function is g_printerr(), g_message(), g_warning(),
g_critical() or directly g_log() - for instance:
CLUTTER_NOTE (PANGO, g_warning ("Cache miss: %d", glyph));
will print the warning only if the "pango" flag has been
set to the CLUTTER_DEBUG envvar or passed to the --clutter-debug
command line argument.
similar to CLUTTER_SHOW_FPS, there's also the --clutter-show-fps
command line switch; also, the --display and --screen command
line switches have been added: the first overrides the DISPLAY
envvar and the second controls the X screen used by Clutter to
get the root window on the display.
* clutter/clutter-main.h:
* clutter/clutter-main.c: Add extended support for GOption
in Clutter; use clutter_init_with_args() to let Clutter
parse your own command line arguments; use instead
clutter_get_option_group() to get the GOptionGroup used by
Clutter if you want to do the parsing yourself with
g_option_context_parse(). The init sequence has been verified,
updated and moved into common functions where possible.
* clutter/pango/pangoclutter-render.c:
* clutter/*.c: Include "clutter-debug.h" where needed; use
CLUTTER_NOTE() instead of CLUTTER_DBG().
* examples/super-oh.c: Use the new clutter_init_with_args()
function, and add a --num-hands command line switch to
the SuperOH example code controlling the number of hands at
runtime.
2006-11-21 16:27:53 -05:00
else # minimum
2006-11-22 15:52:27 -05:00
CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"
2006-11-20 07:02:24 -05:00
fi
fi
AC_SUBST(CLUTTER_DEBUG_CFLAGS)
2007-03-23 11:20:35 -04:00
AC_ARG_WITH(fpu,
AS_HELP_STRING([--without-fpu],
[Assume target hardware has no fpu]),
[with_fpu=$withval],
[with_fpu=yes])
2007-01-17 11:00:00 -05:00
if test "x$with_fpu" != "xyes" ; then
CLUTTER_FIXED_CFLAGS="-DCFX_NO_FPU"
fi
2006-11-20 07:02:24 -05:00
dnl = GTK Doc check ========================================================
GTK_DOC_CHECK([1.4])
2006-05-29 04:59:36 -04:00
dnl ========================================================================
2005-04-13 15:49:56 -04:00
AC_SUBST(GCC_FLAGS)
2007-01-17 11:00:00 -05:00
CLUTTER_CFLAGS="$GLX_CLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_FIXED_CFLAGS"
2006-06-06 16:40:40 -04:00
CLUTTER_LIBS="$GLX_LIBS $CLUTTER_DEPS_LIBS"
2005-04-13 15:49:56 -04:00
2006-05-29 04:59:36 -04:00
AC_SUBST(CLUTTER_CFLAGS)
AC_SUBST(CLUTTER_LIBS)
2005-04-13 15:49:56 -04:00
2006-11-20 07:02:24 -05:00
AC_CONFIG_FILES([
Makefile
clutter/pango/Makefile
clutter/Makefile
clutter/clutter-version.h
2007-03-22 14:21:59 -04:00
clutter/glx/Makefile
clutter/egl/Makefile
2006-11-20 07:02:24 -05:00
examples/Makefile
doc/Makefile
doc/reference/Makefile
doc/reference/version.xml
clutter.pc
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
2006-06-06 16:40:40 -04:00
dnl ========================================================================
echo ""
echo " Clutter $VERSION"
echo " ==================="
echo ""
echo " prefix: ${prefix}"
echo ""
2007-03-22 14:21:59 -04:00
echo " Flavour: ${clutterbackend}"
2007-03-23 11:20:35 -04:00
echo " Target library: ${clutterbackendlib}"
2006-11-20 07:02:24 -05:00
echo " Debug level: ${enable_debug}"
2006-06-06 16:40:40 -04:00
echo " Documentation: ${enable_gtk_doc}"
2007-01-17 11:00:00 -05:00
echo " FPU: ${with_fpu}"
2006-06-08 18:19:32 -04:00
echo ""