configure: use default dri drivers whenever opengl and dri are enabled
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 18 Feb 2014 00:57:24 +0000 (00:57 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 21 Feb 2014 22:47:51 +0000 (22:47 +0000)
Commit ee55500c22a(configure: cleanup classic dri drivers handling)
cleaned up the logic handling autodetection of dri drivers, but missed
the case when one can explicitly disable dri, and still request opengl.

Fixes build issues for the following
./autogen.sh --disable-dri --with-gallium-drivers=swrast

While we're here, explicitly clear with_dri_drivers whenever building
without such drivers to prevent choking later on.

v2: Simplify with_dri_drivers handling.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75126
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
configure.ac

index 58ecd6cc182bbb9e472f5d6cb9e61541ade65df4..ed7f6b7fb5e6bcf171666fcf8eb946e353812c0b 100644 (file)
@@ -950,15 +950,13 @@ AC_ARG_WITH([dri-drivers],
     [with_dri_drivers="$withval"],
     [with_dri_drivers=auto])
 
-case "$with_dri_drivers" in
-no) ;;
-auto)
-    # classic DRI drivers
-    if test "x$enable_opengl" = xyes; then
+if test "x$with_dri_drivers" = xauto; then
+    if test "x$enable_opengl" = xyes -a "x$enable_dri" = xyes; then
         with_dri_drivers="yes"
+    else
+        with_dri_drivers="no"
     fi
-    ;;
-esac
+fi
 
 dnl If $with_dri_drivers is yes, drivers will be added through
 dnl platform checks. Set DEFINES and LIB_DEPS
@@ -1039,7 +1037,7 @@ AC_SUBST([GALLIUM_DRI_LIB_DEPS])
 
 DRI_DIRS=""
 dnl Duplicates in DRI_DIRS are removed by sorting it after this block
-if test -n "$with_dri_drivers"; then
+if test "x$with_dri_drivers" != xno; then
     if test "x$enable_opengl" != xyes; then
         AC_MSG_ERROR([--with-dri-drivers requires OpenGL])
     fi