Alessio Treglia wrote:
Yes, please apologize for my oversight.

Could you refresh your patch and adapt to the changes introduced by my
latest upload?
I mean: could you strip off all the generated stuff? (Makefile.in,
configure, etc)
Updated patch is attatched.
Description: fix build on architectures where clutter uses opengl es
 note: autotools stuff must be regenerated after applying this patch
Author: Peter Green <plugw...@p10link.net>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

Index: toonloop-2.1.18/configure.ac
===================================================================
--- toonloop-2.1.18.orig/configure.ac	2012-02-09 00:08:30.000000000 +0000
+++ toonloop-2.1.18/configure.ac	2012-02-09 00:20:32.000000000 +0000
@@ -157,6 +157,35 @@
 AC_DEFINE_UNQUOTED([DATADIR], "${DATADIR}", "Data dir")
 AC_DEFINE_UNQUOTED([PIXMAPS_DIR], "${PIXMAPS_DIR}", "Pixmaps dir")
 
+#test to see whether clutter is build against opengl or opengl es
+AC_LANG(C++)
+AC_MSG_CHECKING([if we can include GL/glx.h and clutter/clutter.h together])
+#setup CXXFLAGS for clutter/opengl compatibility test
+export CXXFLAGS=$CLUTTER_CFLAGS
+AC_COMPILE_IFELSE(  
+  [AC_LANG_PROGRAM([[#include <GL/glx.h>
+  #include <clutter/clutter.h>]],[[]])],
+  [
+    AC_MSG_RESULT([yes])
+    AC_SUBST(CUSTOM_CFLAGS,"-dUSE_GLES2")
+  ],[
+    AC_MSG_RESULT([no])
+    AC_MSG_CHECKING([if we can include GLES2/gl2.h and clutter/clutter.h together])
+    AC_COMPILE_IFELSE(  
+      [AC_LANG_PROGRAM([[#include <GLES2/gl2.h>
+      #include <clutter/clutter.h>]],[[]])],
+      [
+        AC_MSG_RESULT([yes])
+        AC_SUBST(CUSTOM_CFLAGS,"-DUSE_GLES2")
+      ],[
+        AC_MSG_RESULT([no])
+        AC_MSG_ERROR(cannot find a clutter compatible opengl header)
+  ]
+)
+  ]
+)
+
+#this doesn't appear to actually get used....
 AC_SUBST(CXXFLAGS, " -O2 -Wall -Wextra -Werror -Wno-unused-result -Wfatal-errors") 
 AC_CONFIG_FILES([
     Makefile
Index: toonloop-2.1.18/src/gui.h
===================================================================
--- toonloop-2.1.18.orig/src/gui.h	2011-11-07 10:19:55.000000000 +0000
+++ toonloop-2.1.18/src/gui.h	2012-02-09 00:16:47.000000000 +0000
@@ -21,7 +21,12 @@
 #ifndef __GUI_H__
 #define __GUI_H__
 
-#include <GL/glx.h>
+#ifdef USE_GLES2
+  #include <GLES2/gl2.h>
+#else
+  #include <GL/glx.h>
+#endif
+
 #include <clutter/clutter.h>
 #include <tr1/memory> // for shared_ptr
 #include <vector>
Index: toonloop-2.1.18/src/Makefile.am
===================================================================
--- toonloop-2.1.18.orig/src/Makefile.am	2011-11-07 10:19:55.000000000 +0000
+++ toonloop-2.1.18/src/Makefile.am	2012-02-09 00:16:47.000000000 +0000
@@ -86,7 +86,8 @@
 	$(RAW1394_CFLAGS) \
 	$(AVC1394_CFLAGS) \
 	$(STK_CXXFLAGS) \
-	$(LIBXML_XFLAGS)
+	$(LIBXML_XFLAGS) \
+	$(CUSTOM_CFLAGS)
  
 toonloop_LDADD = \
 	$(BOOST_FILESYSTEM_LIB) \

Reply via email to