configure.ac: Make --{without,with}-gallium-drivers work as expected
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 22 Jun 2011 18:35:27 +0000 (11:35 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 11 Jul 2011 22:02:16 +0000 (15:02 -0700)
This version is mostly Dan's post to the mesa-dev mailing list on
6/22/2011.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
configure.ac

index 6a5bb37e6cd0edc5af9faceff23f20208e049058..77372735c1a5d1a5c32fbbdd7e6a07fd053652d6 100644 (file)
@@ -617,6 +617,13 @@ AC_ARG_WITH([gallium-drivers],
     [with_gallium_drivers="$withval"],
     [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
 
+# Doing '--without-gallium-drivers' will set this variable to 'no'.  Clear it
+# here so that the script doesn't choke on an unknown driver name later.
+case "$with_gallium_drivers" in
+    yes) with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT" ;;
+    no) with_gallium_drivers='' ;;
+esac
+
 if test "x$enable_opengl" = xno -a \
         "x$enable_gles1" = xno -a \
         "x$enable_gles2" = xno -a \