diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-14 09:19:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-14 09:26:02 +0100 |
commit | 6d4f3c40eff7d070b1c9759038444928c6754efe (patch) | |
tree | 80b9f7889b2d2e384e73ef970a5f90417f0341e7 /configure.ac | |
parent | 9ad26f74b0059645d865a20c387fa4bd460cabc8 (diff) |
Add a private copy of GLEW
This appears to be the simplest mechanism to build libglew at the moment -
should a system copy be unavailable. Fortunately libglew is now distributed
under a permissive licence.
If you want to pass 'make -C src check' you have to use the system copy,
or spend quite a bit of time cairo-fying libglew.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 8b1da1fb..ba4a49d3 100644 --- a/configure.ac +++ b/configure.ac @@ -250,14 +250,17 @@ CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [ gl_NONPKGCONFIG_LIBS="-lGL" fi]) - AC_CHECK_LIB(GLEW, glewInit, [ - AC_CHECK_HEADER(GL/glew.h, [], [ - use_gl="no (requires glew http://glew.sourceforge.net/)" - ]) - ], [ - use_gl="no (requires glew http://glew.sourceforge.net/)" - ]) - gl_NONPKGCONFIG_LIBS="-lGLEW $gl_NONPKGCONFIG_LIBS" + have_glew="no" + AC_CHECK_LIB(GLEW, glewInit, + [AC_CHECK_HEADER(GL/glew.h, [have_glew="yes"], [])]) + if test "x$have_glew" = "xyes"; then + gl_NONPKGCONFIG_LIBS="-lGLEW $gl_NONPKGCONFIG_LIBS" + use_glew="system library" + else + CAIRO_ENABLE_FUNCTIONS(glew, GLEW, always) + use_glew="private copy" + CAIRO_CFLAGS="$CAIRO_CFLAGS -I\$(top_srcdir)/src/glew" + fi need_glx_functions=yes need_eagle_functions=yes ]) |