summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2011-09-27 14:42:41 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2011-09-27 15:15:05 +0100
commitc369b5bb7bfb557ce92bacc34810b8afe320cc60 (patch)
treec770b1b9e5c2aa012ded749be32a43de74eee43c /configure.ac
parent0e92eac37f76921281a62def7a4f3cbfee0470c8 (diff)
downloadclutter-gst-c369b5bb7bfb557ce92bacc34810b8afe320cc60.tar.gz
refactoring: Do not depend on any GL symbol
Since Cogl 1.8.0 we can use cogl_renderer_get_n_fragment_texture_units() to know the number of texture image units available for fragment shaders and we can thus avoid using the direct GL call glGetIntegerv and linking against libGL. This does not work on OS X though as we can't get the CoglContext out of the ClutterBackend is that case. Make sure to special case this. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=657225
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 26 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1fafe5e..0a9d840 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,10 +163,32 @@ dnl issues
dnl Why don't we "just" link against GL? check the cogl/clutter configure.ac :)
dnl Hopefully this will be enough for the time being.
-clutter_soname=`$PKG_CONFIG --variable soname_infix clutter-1.0`
-AS_CASE([$clutter_soname],
- [glx], [AC_CHECK_LIB([GL], [glGetIntegerv], [GL_LDFLAGS="-lGL"])])
-AC_SUBST([GL_LDFLAGS])
+dnl With Cogl 1.8.0 all of the above is moot because we can use
+dnl cogl_renderer_get_n_fragment_texture_units() and never depend on GL/GLES
+dnl directly. However let's not hard depend on cogl 1.8.0 just yet.
+dnl Well, obviously just a little detail remaining, it's not possible to grab
+dnl the CoglContext on OS X yet.
+
+PKG_CHECK_EXISTS([clutter-osx-1.0],
+ [
+ AC_DEFINE([HAVE_CLUTTER_OSX], [1],
+ ["Defined if building Clutter for OS X"])
+ ])
+PKG_CHECK_EXISTS([cogl-1.0 >= 1.8.0],
+ [
+ have_cogl_1_8=yes
+ AC_DEFINE([HAVE_COGL_1_8], [1],
+ ["Defined if cogl-1.0 >= 1.8.0 is available"])
+ ])
+
+AS_IF([test "x$have_cogl_1_8" != xyes],
+ [
+ clutter_soname=`$PKG_CONFIG --variable soname_infix clutter-1.0`
+ AS_CASE([$clutter_soname],
+ [glx],
+ [AC_CHECK_LIB([GL], [glGetIntegerv], [GL_LDFLAGS="-lGL"])])
+ AC_SUBST([GL_LDFLAGS])
+ ])
dnl ========================================================================