Mesa (master): Revert "configure.ac: remove deprecated --with-driver="

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Jan 4 23:53:18 PST 2012


Module: Mesa
Branch: master
Commit: 9d21b5dd265959b28ab1e4103fb381074ec51a08
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d21b5dd265959b28ab1e4103fb381074ec51a08

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Jan  4 23:49:18 2012 -0800

Revert "configure.ac: remove deprecated --with-driver="

This reverts commit 5a478976ae0bb12dd712648d5a9b988dd29c97ef.

It broke the build.  DRI drivers were no longer being installed by
`make install` (and probably not being built at all).  It appears to be
due to a few small, subtle mistakes, and the fix isn't clear enough to
simply commit without going through review.  In the meantime, revert it.

---

 configure.ac |   77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8f481a0..9cf3fdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -723,6 +723,83 @@ if test "x$enable_shared_glapi" = xyes; then
 fi
 AC_SUBST([SHARED_GLAPI])
 
+dnl
+dnl Driver configuration. Options are xlib, dri and osmesa right now.
+dnl More later: fbdev, ...
+dnl
+default_driver="xlib"
+
+case "$host_os" in
+linux*)
+    case "$host_cpu" in
+    i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
+    esac
+    ;;
+*freebsd* | dragonfly* | *netbsd*)
+    case "$host_cpu" in
+    i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
+    esac
+    ;;
+esac
+
+if test "x$enable_opengl" = xno; then
+    default_driver="no"
+fi
+
+AC_ARG_WITH([driver],
+    [AS_HELP_STRING([--with-driver=DRIVER], [DEPRECATED])],
+    [mesa_driver="$withval"],
+    [mesa_driver=auto])
+dnl Check for valid option
+case "x$mesa_driver" in
+xxlib|xdri|xosmesa|xno)
+    if test "x$enable_dri" != xauto -o \
+            "x$enable_glx" != xauto -o \
+            "x$enable_osmesa" != xauto -o \
+            "x$enable_xlib_glx" != xauto; then
+        AC_MSG_ERROR([--with-driver=$mesa_driver is deprecated])
+    fi
+    ;;
+xauto)
+    mesa_driver="$default_driver"
+    ;;
+*)
+    AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option])
+    ;;
+esac
+
+# map $mesa_driver to APIs
+if test "x$enable_dri" = xauto; then
+    case "x$mesa_driver" in
+    xdri) enable_dri=yes ;;
+    *)    enable_dri=no ;;
+    esac
+fi
+
+if test "x$enable_glx" = xauto; then
+    case "x$mesa_driver" in
+    xdri|xxlib) enable_glx=yes ;;
+    *)          enable_glx=no ;;
+    esac
+fi
+
+if test "x$enable_osmesa" = xauto; then
+    case "x$mesa_driver" in
+    xxlib|xosmesa) enable_osmesa=yes ;;
+    *)             enable_osmesa=no ;;
+    esac
+fi
+
+if test "x$enable_xlib_glx" = xauto; then
+    case "x$mesa_driver" in
+    xxlib) enable_xlib_glx=yes ;;
+    *)     enable_xlib_glx=no ;;
+    esac
+fi
+
+if test "x$enable_glx" = xno; then
+    enable_xlib_glx=no
+fi
 
 dnl
 dnl Driver specific build directories



More information about the mesa-commit mailing list