summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-21 11:03:55 -0700
committerEric Anholt <eric@anholt.net>2010-05-21 11:03:55 -0700
commitf536d3d252fc4b4c4d7cad27e1442193634a5cd3 (patch)
tree5c7c97d20bbeb294b1b91ce9354cf04ba7014c56 /configure.ac
parentb0e5d2cd8e89b5df2a72ff263a348642a13fc10f (diff)
downloadmesa-demos-f536d3d252fc4b4c4d7cad27e1442193634a5cd3.zip
mesa-demos-f536d3d252fc4b4c4d7cad27e1442193634a5cd3.tar.xz
Use the pkg-config file for libGLEW when available.
In a few versions of libGLEW when most distros have picked up the .pc file, we should nuke the fallback code.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 11 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 1f355b8..c267dd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,21 +70,17 @@ AC_CHECK_LIB([glut],
[],
[glut_enabled=no])
-dnl Check for GLEW.
-GLEW_CFLAGS=""
-GLEW_LIB=-lGLEW
-AC_ARG_WITH([glew],
- [AS_HELP_STRING([--with-glew=DIR],
- [glew install directory])],
- [GLEW_CFLAGS="-I$withval/include"
- GLEW_LIB="-L$withval/lib -lGLEW"])
-AC_CHECK_HEADER([GL/glew.h],
- [],
- AC_MSG_ERROR([GLEW required]))
-AC_CHECK_LIB([GLEW],
- [glewInit],
- [],
- AC_MSG_ERROR([GLEW required]))
+dnl Include a fallback path for GLEW for the moment while not all distros
+dnl have picked up the .pc file.
+PKG_CHECK_MODULES(GLEW, [glew], [], [
+ AC_CHECK_HEADER([GL/glew.h],
+ [],
+ AC_MSG_ERROR([GLEW required]))
+ AC_CHECK_LIB([GLEW],
+ [glewInit],
+ [],
+ AC_MSG_ERROR([GLEW required]))
+ ])
DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"