[clutter-gtk] build: win32 fixes



commit 9da7dd191dae7d1cc626ea22998145ebc2bb0722
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Fri Mar 25 17:22:56 2011 +0000

    build: win32 fixes
    
    â?¢ Use -no-undefined when building for/on win32.
    â?¢ Display a critical warning when trying to use GtkClutterActor
      on non-X11 platforms.
    â?¢ Fix up clutter-win32.h inclusion path.
    
    Based on a patch by: Fridrich Strba <fridrich strba bluewin ch>
    
    http://bugzilla.clutter-project.org/show_bug.cgi?id=2444

 clutter-gtk/gtk-clutter-actor.c |    4 ++++
 clutter-gtk/gtk-clutter-embed.c |    2 +-
 clutter-gtk/gtk-clutter-util.c  |    2 +-
 configure.ac                    |   17 +++++++++++++++--
 4 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/clutter-gtk/gtk-clutter-actor.c b/clutter-gtk/gtk-clutter-actor.c
index 3a5e5ba..3000025 100644
--- a/clutter-gtk/gtk-clutter-actor.c
+++ b/clutter-gtk/gtk-clutter-actor.c
@@ -497,6 +497,10 @@ gtk_clutter_actor_init (GtkClutterActor *self)
   clutter_actor_set_parent (priv->texture, actor);
   clutter_actor_set_name (priv->texture, "Onscreen Texture");
   clutter_actor_show (priv->texture);
+#else
+  g_critical ("Embedding GtkWidget inside ClutterActor through "
+              "GtkClutterActor does not yet work on non-X11 "
+              "platforms.");
 #endif
 
   clutter_actor_pop_internal (actor);
diff --git a/clutter-gtk/gtk-clutter-embed.c b/clutter-gtk/gtk-clutter-embed.c
index c3c9270..f98a0e7 100644
--- a/clutter-gtk/gtk-clutter-embed.c
+++ b/clutter-gtk/gtk-clutter-embed.c
@@ -52,7 +52,7 @@
 
 #elif defined(HAVE_CLUTTER_GTK_WIN32)
 
-#include <clutter/clutter-win32.h>
+#include <clutter/win32/clutter-win32.h>
 #include <gdk/gdkwin32.h>
 
 #endif /* HAVE_CLUTTER_GTK_{X11,WIN32} */
diff --git a/clutter-gtk/gtk-clutter-util.c b/clutter-gtk/gtk-clutter-util.c
index b4d7bbd..ec303ec 100644
--- a/clutter-gtk/gtk-clutter-util.c
+++ b/clutter-gtk/gtk-clutter-util.c
@@ -18,7 +18,7 @@
 
 #elif defined(HAVE_CLUTTER_GTK_WIN32)
 
-#include <clutter/clutter-win32.h>
+#include <clutter/win32/clutter-win32.h>
 #include <gdk/gdkwin32.h>
 
 #endif /* HAVE_CLUTTER_GTK_{X11,WIN32} */
diff --git a/configure.ac b/configure.ac
index cb4b607..a95cf09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,19 @@ CLUTTER_GTK_LT_AGE=lt_age
 CLUTTER_GTK_LT_VERSION="$CLUTTER_GTK_LT_CURRENT:$CLUTTER_GTK_LT_REV:$CLUTTER_GTK_LT_AGE"
 CLUTTER_GTK_LT_LDFLAGS="-version-info $CLUTTER_GTK_LT_VERSION"
 
+AC_CANONICAL_HOST
+AC_MSG_CHECKING([if building for some Win32 platform])
+AS_CASE([$host],
+        [*-*-mingw*|*-*-cygwin*],
+        [
+          CLUTTER_LT_LDFLAGS="$CLUTTER_GTK_LT_LDFLAGS -no-undefined"
+          platform_win32=yes
+        ],
+
+        [platform_win32=no]
+)
+AC_MSG_RESULT([$platform_win32])
+
 AC_SUBST(CLUTTER_GTK_LT_VERSION)
 AC_SUBST(CLUTTER_GTK_LT_LDFLAGS)
 
@@ -87,10 +100,10 @@ AS_CASE([$with_flavour],
         [win32],
         [
           AC_DEFINE([HAVE_CLUTTER_GTK_WIN32], 1, [Using the Win32 flavour])
-          PKG_CHECK_MODULES(CLUTTER, clutter-win32-1.0 >= $CLUTTER_REQUIRED)
+          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"
-        ]
+        ],
 
         [AC_MSG_ERROR([Invalid argument for --with-flavour])]
 )



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