diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-07 22:29:06 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-07 22:29:06 +0100 |
commit | d8589f94e3fff3d6a319d619cf45cdec94f8d70c (patch) | |
tree | 1d96142a47cb89bcdb7118309202dd229ac4cefa | |
parent | 6ec2f8f6c09e583129d6d3e6d0e97b3167307b17 (diff) |
-rw-r--r-- | configure.in | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 25f1c17..e5dcaba 100644 --- a/configure.in +++ b/configure.in @@ -118,6 +118,17 @@ AM_CONDITIONAL(OS_WIN32, [test $native_win32 = yes]) AC_SUBST(LIBM) +have_gl=yes +gl_REQUIRES="gl" +PKG_CHECK_MODULES(gl, $gl_REQUIRES,, [ + dnl Fallback to searching for headers + AC_CHECK_HEADER(GL/gl.h,, [have_gl="no (gl.pc nor OpenGL headers not found)"]) + if test "x$have_gl" = "xyes"; then + gl_CFLAGS= + gl_LIBS="-lGL" + fi]) + + dnl =========================================================================== AC_ARG_ENABLE(glx, @@ -130,13 +141,13 @@ if test "x$use_glx" = "xyes"; then AC_PATH_XTRA if test "x$have_x" = "xyes"; then - GLX_LIBS="$X_LIBS -lX11 -lGL" - GLX_CFLAGS="$X_CFLAGS" + GLX_LIBS="$X_LIBS -lX11 $gl_LIBS" + GLX_CFLAGS="$X_CFLAGS $gl_CFLAGS" save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $GLX_CFLAGS" - LIBS="$LIBS $GLX_LIBS" + CFLAGS="$CFLAGS $GLX_CFLAGS $gl_CFLAGS" + LIBS="$LIBS $GLX_LIBS $gl_LIBS" AC_MSG_CHECKING([for XTHREADS in Xlib]) AC_RUN_IFELSE( @@ -223,8 +234,8 @@ AC_ARG_ENABLE(egl, [use_egl=$enableval], [use_egl=no]) if test "x$use_egl" = "xyes"; then - EGL_LIBS="-lGL -lEGL" - EGL_CFLAGS="$EGL_CFLAGS" + EGL_LIBS="-$gl_LIBS -lEGL" + EGL_CFLAGS="$gl_CFLAGS $EGL_CFLAGS" save_libs="$LIBS" LIBS="-lpthread" |