[clutter-gtk/multi-backend] Clean up the build system



commit 3883c54b195df571e84ff2f5b694480cc17af151
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Fri Sep 30 15:45:50 2011 +0100

    Clean up the build system
    
    We don't need flavours any more, given that Clutter and GTK can be
    compiled with multiple backend in the same shared library, and that
    we need to check at both compile and run-time that the correct backends
    are available.

 clutter-gtk/Makefile.am |    4 +-
 configure.ac            |   71 ++++++++++++++++++++---------------------------
 examples/Makefile.am    |   12 ++++----
 3 files changed, 38 insertions(+), 49 deletions(-)
---
diff --git a/clutter-gtk/Makefile.am b/clutter-gtk/Makefile.am
index ebc0800..9a35919 100644
--- a/clutter-gtk/Makefile.am
+++ b/clutter-gtk/Makefile.am
@@ -17,7 +17,7 @@ AM_CPPFLAGS = \
 	$(CLUTTER_GTK_DEBUG_CFLAGS) 		\
 	$(NULL)
 
-AM_CFLAGS = $(MAINTAINER_CFLAGS) $(CLUTTER_CFLAGS) $(GTK_CFLAGS)
+AM_CFLAGS = $(MAINTAINER_CFLAGS) $(CLUTTER_GTK_DEPS_CFLAGS)
 
 lib_LTLIBRARIES = libclutter-gtk- CLUTTER_GTK_API_VERSION@.la
 
@@ -45,7 +45,7 @@ source_h_private = \
 
 # please, keep the list sorted alphabetically
 libclutter_gtk_ CLUTTER_GTK_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $(source_h_private)
-libclutter_gtk_ CLUTTER_GTK_API_VERSION@_la_LIBADD  = $(CLUTTER_LIBS) $(GTK_LIBS) $(LIBM)
+libclutter_gtk_ CLUTTER_GTK_API_VERSION@_la_LIBADD  = $(CLUTTER_GTK_DEPS_LIBS) $(LIBM)
 libclutter_gtk_ CLUTTER_GTK_API_VERSION@_la_LDFLAGS = \
 	$(CLUTTER_LT_LDFLAGS) \
 	-export-symbols-regex "^gtk_clutter.*"
diff --git a/configure.ac b/configure.ac
index 30791ec..b14290c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,8 +14,8 @@ m4_define([clutter_gtk_release_status],
           [m4_if(m4_eval(clutter_gtk_micro % 2), [1],
                  [git],
                  [m4_if(m4_eval(clutter_gtk_minor % 2), [1],
-                                [snapshot],
-                                [release])])])
+                        [snapshot],
+                        [release])])])
 
 AC_PREREQ([2.63])
 
@@ -84,51 +84,39 @@ AC_SUBST(LIBM)
 
 m4_define([clutter_req_version], [1.9.1])
 m4_define([gtk_req_version], [3.2.0])
-m4_define([flavour_default], [x11])
-AC_ARG_WITH([flavour],
-            [AS_HELP_STRING([--with-flavour=@<:@x11/win32@:>@],
-                            [Select the Clutter-GTK implementation @<:@default=]flavour_default[@:>@])],
-            [],
-            [with_flavour=flavour_default])
-
-AS_CASE([$with_flavour],
-        [x11],
+
+PKG_CHECK_MODULES([CLUTTER_GTK_DEPS], [clutter-1.0 >= clutter_req_version gtk+-3.0 >= gtk_req_version])
+AC_SUBST([CLUTTER_GTK_DEPS_CFLAGS])
+AC_SUBST([CLUTTER_GTK_DEPS_LIBS])
+
+m4_define([deprecated_default],
+          [m4_if(m4_eval(clutter_gtk_minor % 2), [1],
+                 [no],
+                 [yes])])
+
+AC_ARG_ENABLE([deprecated],
+              [AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
+                              [Whether deprecated symbols should be disabled when compiling Clutter-GTK @<:@default=]deprecated_default[@:>
+ ])],
+              [],
+              [enable_deprecated=deprecated_default])
+
+AS_CASE([$enable_deprecated],
+
+        [no],
         [
-          AC_DEFINE([HAVE_CLUTTER_GTK_X11], 1, [Using the X11 flavour])
-          PKG_CHECK_MODULES(CLUTTER, clutter-x11-1.0 >= clutter_req_version)
-          PKG_CHECK_MODULES(GTK, gtk+-x11-3.0 >= gtk_req_version)
-          CLUTTER_GTK_REQUIRES="clutter-x11-1.0 gtk+-x11-3.0"
+          CLUTTER_GTK_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED -DCLUTTER_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
         ],
 
-        [win32],
+        [yes],
         [
-          AC_DEFINE([HAVE_CLUTTER_GTK_WIN32], 1, [Using the Win32 flavour])
-          PKG_CHECK_MODULES(CLUTTER, clutter-win32-1.0 >= clutter_req_version)
-          PKG_CHECK_MODULES(GTK, gtk+-win32-3.0 >= gtk_req_version)
-          CLUTTER_GTK_REQUIRES="clutter-win32-1.0 gtk+-win32-3.0"
+          CLUTTER_GTK_DEPRECATED_CFLAGS=""
         ],
 
-        [AC_MSG_ERROR([Invalid argument for --with-flavour])]
-)
-
-CLUTTER_GTK_FLAVOUR=$with_flavour
-AC_SUBST(CLUTTER_GTK_FLAVOUR)
-AC_SUBST(CLUTTER_GTK_REQUIRES)
-AC_SUBST(CLUTTER_CFLAGS)
-AC_SUBST(CLUTTER_LIBS)
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-AS_IF([test clutter_gtk_release_status = 'git'],
-      [
-        CLUTTER_GTK_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DCOGL_DISABLE_DEPRECATED -DCLUTTER_DISABLE_DEPRECATED"
-      ],
-      [
-        CLUTTER_GTK_DEPRECATED_CFLAGS=""
-      ]
+        [AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
 )
 
-AC_SUBST(CLUTTER_GTK_DEPRECATED_CFLAGS)
+AC_SUBST([CLUTTER_GTK_DEPRECATED_CFLAGS])
 
 dnl = Enable debug level ===================================================
 
@@ -160,7 +148,7 @@ AS_CASE([$enable_debug],
         [AC_MSG_ERROR([Invalid argument for --enable-debug])]
 )
 
-AC_SUBST(CLUTTER_GTK_DEBUG_CFLAGS)
+AC_SUBST([CLUTTER_GTK_DEBUG_CFLAGS])
 
 # use strict compiler flags only on development releases
 m4_define([maintainer_flags_default], [m4_if(m4_eval(clutter_gtk_minor % 2), [1], [yes], [no])])
@@ -241,10 +229,11 @@ echo ""
 echo " Clutter-GTK $CLUTTER_GTK_VERSION ($CLUTTER_GTK_RELEASE_STATUS)"
 echo ""
 echo "   Prefix: ${prefix}"
+echo "   Libdir: ${libdir}"
 echo ""
-echo "   Flavour: ${CLUTTER_GTK_FLAVOUR}"
 echo "   Debug level: ${enable_debug}"
 echo "   Documentation: ${enable_gtk_doc}"
 echo "   Compiler flags: $CFLAGS $MAINTAINER_CFLAGS"
 echo "   Introspection data: ${enable_introspection}"
+echo "   Enable deprecated symbols: ${enable_deprecated}"
 echo ""
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 29c3df8..af1b2e9 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -13,23 +13,23 @@ noinst_PROGRAMS = \
 
 INCLUDES = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/clutter-gtk
 
-AM_CFLAGS = $(MAINTAINER_CFLAGS) $(CLUTTER_CFLAGS) $(GTK_CFLAGS)
+AM_CFLAGS = $(MAINTAINER_CFLAGS) $(CLUTTER_GTK_DEPS_CFLAGS)
 
 common_deps = \
 	$(top_builddir)/clutter-gtk/libclutter-gtk- CLUTTER_GTK_API_VERSION@.la
 
 common_ldadd = \
 	$(top_builddir)/clutter-gtk/libclutter-gtk- CLUTTER_GTK_API_VERSION@.la \
-	$(CLUTTER_LIBS)	\
-	$(GTK_LIBS)
+	$(CLUTTER_GTK_DEPS_LIBS) \
+	$(LIBM)
 
 gtk_clutter_test_SOURCES = gtk-clutter-test.c
 gtk_clutter_test_DEPENDENCIES = $(common_deps)
-gtk_clutter_test_LDADD = $(common_ldadd) $(LIBM)
+gtk_clutter_test_LDADD = $(common_ldadd)
 
 gtk_clutter_test_actor_SOURCES = gtk-clutter-test-actor.c
 gtk_clutter_test_actor_DEPENDENCIES = $(common_deps)
-gtk_clutter_test_actor_LDADD = $(common_ldadd) $(LIBM)
+gtk_clutter_test_actor_LDADD = $(common_ldadd)
 
 gtk_clutter_events_SOURCES = gtk-clutter-events.c
 gtk_clutter_events_DEPENDENCIES = $(common_deps)
@@ -49,7 +49,7 @@ gtk_clutter_window_test2_LDADD = $(common_ldadd)
 
 gtk_clutter_test_scroll_SOURCES = gtk-clutter-test-scroll.c
 gtk_clutter_test_scroll_DEPENDENCIES = $(common_deps)
-gtk_clutter_test_scroll_LDADD = $(common_ldadd) $(LIBM)
+gtk_clutter_test_scroll_LDADD = $(common_ldadd)
 
 EXTRA_DIST = \
 	redhand.png



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]