diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-06-04 07:45:13 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-06-04 07:57:00 -0400 |
commit | 67a6fd3bf551d93132d2105c8b6aad578b800c20 (patch) | |
tree | 4886088db06242ab4a67305de1144fc4353ff50c /configure.ac | |
parent | f6669bdea0f987e18bee61c57bc339e82eb99670 (diff) | |
download | mesa-demos-67a6fd3bf551d93132d2105c8b6aad578b800c20.zip mesa-demos-67a6fd3bf551d93132d2105c8b6aad578b800c20.tar.xz |
configure.ac: Provide a fallback for GL implementations with no .pc file
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8a32b70..055530f 100644 --- a/configure.ac +++ b/configure.ac @@ -49,9 +49,20 @@ m4_ifndef([PKG_PROG_PKG_CONFIG], ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])]) PKG_PROG_PKG_CONFIG() -dnl Get the pkg-config definitions for libGL. Probably want a fallback for -dnl non-pkgconfig here. -PKG_CHECK_MODULES(DEMO, [gl]) +dnl Get the pkg-config definitions for libGL. We include a fallback +dnl path for GL implementation that don't provide a .pc file +PKG_CHECK_MODULES(GL, [gl], [], [ + AC_CHECK_HEADER([GL/gl.h], + [], + AC_MSG_ERROR([GL not found])) + AC_CHECK_LIB([GL], + [glBegin], + [GL_LIBS=-lGL], + AC_MSG_ERROR([GL required])) + ]) + +DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS" +DEMO_LIBS="$DEMO_LIBS $GL_LIBS" dnl Check for GLUT GLUT_CFLAGS="" |