diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-13 23:16:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-13 23:16:57 +0100 |
commit | 9ad26f74b0059645d865a20c387fa4bd460cabc8 (patch) | |
tree | 23ca1c9ad78ba0fd6dd694b2d68ddd243879b703 | |
parent | 71c3b2888cc81e6d55782388d14bb8d806e77d07 (diff) |
[configure] Fallback to detect OpenGL headers
When not using mesa, we can not rely on a pkgconfig file, so just rely on
the presence of the OpenGL headers instead.
-rw-r--r-- | configure.ac | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 18f0d406..8b1da1fb 100644 --- a/configure.ac +++ b/configure.ac @@ -242,8 +242,13 @@ CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [ dnl =========================================================================== CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [ gl_REQUIRES="gl" - PKG_CHECK_MODULES(gl, $gl_REQUIRES, , [AC_MSG_RESULT(no) - use_gl="no (requires gl.pc)"]) + PKG_CHECK_MODULES(gl, $gl_REQUIRES,, [ + dnl Fallback to searching for headers + AC_CHECK_HEADER(GL/gl.h,, [use_gl="no (gl.pc nor OpenGL headers not found)"]) + if test "x$use_gl" = "xyes"; then + gl_NONPKGCONFIG_CFLAGS= + gl_NONPKGCONFIG_LIBS="-lGL" + fi]) AC_CHECK_LIB(GLEW, glewInit, [ AC_CHECK_HEADER(GL/glew.h, [], [ @@ -252,7 +257,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [ ], [ use_gl="no (requires glew http://glew.sourceforge.net/)" ]) - gl_NONPKGCONFIG_LIBS="-lGLEW" + gl_NONPKGCONFIG_LIBS="-lGLEW $gl_NONPKGCONFIG_LIBS" need_glx_functions=yes need_eagle_functions=yes ]) |