- [with_dri_drivers=yes])
-if test "x$with_dri_drivers" = x; then
- with_dri_drivers=no
-fi
-
-dnl If $with_dri_drivers is yes, directories will be added through
-dnl platform checks
-DRI_DIRS=""
-case "$with_dri_drivers" in
-no) ;;
-yes)
- # classic DRI drivers
- if test "x$enable_opengl" = xyes; then
- DRI_DIRS="yes"
- fi
- ;;
-*)
- # verify the requested driver directories exist
- dri_drivers=`IFS=', '; echo $with_dri_drivers`
- for driver in $dri_drivers; do
- test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
- AC_MSG_ERROR([DRI driver directory '$driver' does not exist])
- done
- DRI_DIRS="$dri_drivers"
- if test -n "$DRI_DIRS" -a "x$enable_opengl" != xyes; then
- AC_MSG_ERROR([--with-dri-drivers requires OpenGL])
+ [with_dri_drivers=auto])
+
+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"