[cairo-commit] 2 commits - configure.ac src/glew

Chris Wilson ickle at kemper.freedesktop.org
Tue Jun 15 03:01:55 PDT 2010


 configure.ac    |   12 +++++++++---
 src/glew/glew.c |    4 ++++
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 25ec0c1e9b5af2ba68200b79b252de5c1b371d0a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 15 10:59:01 2010 +0100

    build: Enable system GLEW on non-UNIX platforms

diff --git a/configure.ac b/configure.ac
index fe262b2..eeb34f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,10 +335,16 @@ CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [
 	      gl_NONPKGCONFIG_LIBS="-lGL"
 	  fi])
 
+  # Disable system GLEW on UNIX since it assumes X and crashes with EGL
   have_glew="no"
-  # Disable system GLEW since it assumes X and crashes with EGL
-  #AC_CHECK_LIB(GLEW, glewInit,
-  #	       [AC_CHECK_HEADER(GL/glew.h, [have_glew="yes"], [])])
+  case "$host" in
+    *-linux*|*-*bsd*|*-solaris*)
+      ;;
+    *)
+      AC_CHECK_LIB(GLEW, glewInit,
+		   [AC_CHECK_HEADER(GL/glew.h, [have_glew="yes"], [])])
+      ;;
+  esac
   if test "x$have_glew" = "xyes"; then
     gl_NONPKGCONFIG_LIBS="-lGLEW $gl_NONPKGCONFIG_LIBS"
     use_glew="yes (system library)"
commit 52624446636bb5941ca2180afa2c0be275414cec
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 15 10:40:36 2010 +0100

    glew: Define NULL

diff --git a/src/glew/glew.c b/src/glew/glew.c
index 6ef6d22..9b86003 100644
--- a/src/glew/glew.c
+++ b/src/glew/glew.c
@@ -65,6 +65,10 @@
 #  define GLXEW_CONTEXT_ARG_DEF_LIST void
 #endif /* GLEW_MX */
 
+#ifndef NULL
+#define NULL (void *) 0
+#endif
+
 #if defined(__APPLE__)
 #include <mach-o/dyld.h>
 #include <stdlib.h>


More information about the cairo-commit mailing list