[Mesa-dev] [PATCH demos] configure.ac: Fix default behavior of AC_ARG_WITH(glut) if glut isn't available

Andreas Boll andreas.boll.dev at gmail.com
Thu Dec 10 07:32:26 PST 2015

Fixes a regression introduced in

It wrongly sets glut_enabled=yes if glut isn't available and neither
option --with-glut nor --without-glut was given.

The default behavior in that case should be if glut is available then
enable glut else it should disable glut.

To fix this the default value of glut_enabled is set back to yes and in
case --without-glut was given glut_enabled is set to no.

Cc: Ross Burton <ross.burton at intel.com>
Signed-off-by: Andreas Boll <andreas.boll.dev at gmail.com>
 configure.ac | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0525b09..ddc68b5 100644
--- a/configure.ac
+++ b/configure.ac
 dnl Check for GLUT
 			[glut install directory])],
@@ -83,9 +83,8 @@ AS_IF([test "x$with_glut" != xno],
-                    [glut_enabled=no])
-       glut_enabled=yes
+                    [glut_enabled=no])],
+      [glut_enabled=no])
 dnl Check for FreeGLUT 2.6 or later

More information about the mesa-dev mailing list