[Mesa-dev] [PATCH] build: fix --without-glut
Ross Burton
ross.burton at intel.com
Tue Nov 13 03:02:11 PST 2012
The argument --without-glut is transformed to --with-glut=no, which the logic
wasn't handling at all so --without-glut didn't work. Rewrite the logic to
handle the case where the value passed to --with-glut is "no".
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
configure.ac | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8b2c359..fda3e60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
dnl Check for GLUT
-GLUT_CFLAGS=""
-GLUT_LIBS=-lglut
-glut_enabled=yes
+glut_enabled=no
AC_ARG_WITH([glut],
[AS_HELP_STRING([--with-glut=DIR],
[glut install directory])],
[GLUT_CFLAGS="-I$withval/include"
- GLUT_LIBS="-L$withval/lib -lglut"])
-AC_CHECK_HEADER([GL/glut.h],
- [],
- [glut_enabled=no])
-AC_CHECK_LIB([glut],
- [glutInit],
- [],
- [glut_enabled=no])
+ GLUT_LIBS="-L$withval/lib -lglut"],
+ [GLUT_CFLAGS=""
+ GLUT_LIBS="-lglut"]
+ )
+AS_IF([test "x$with_glut" != xno],
+ [AC_CHECK_HEADER([GL/glut.h],
+ [],
+ [glut_enabled=no])
+ AC_CHECK_LIB([glut],
+ [glutInit],
+ [],
+ [glut_enabled=no])
+ glut_enabled=yes
+])
dnl Check for GLEW
PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
--
1.7.10.4
More information about the mesa-dev
mailing list