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

Author: Chia-I Wu <o...@lunarg.com>
Date:   Sat Jul  2 09:49:17 2011 +0900

autoconf: swrast does not require libdrm

This fixes

  $ ./configure --disable-driglx-direct \
                --with-dri-drivers=swrast \
                --with-gallium-drivers=

---

 configure.ac |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6568472..5a54370 100644
--- a/configure.ac
+++ b/configure.ac
@@ -819,11 +819,10 @@ if test "x$enable_dri" = xyes; then
         AC_MSG_ERROR([Can't use static libraries for DRI drivers])
     fi
 
-    if test "x$have_libdrm" != xyes; then
-        AC_MSG_ERROR([DRI drivers require libdrm >= $LIBDRM_REQUIRED])
+    # not a hard requirement as swrast does not depend on it
+    if test "x$have_libdrm" = xyes; then
+        DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
     fi
-
-    DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
 fi
 
 dnl
@@ -1206,6 +1205,13 @@ if test "x$enable_dri" = xyes; then
             [AC_MSG_ERROR([Expat required for DRI.])])
     fi
 
+    # libdrm is required for all except swrast
+    if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
+        if test "x$have_libdrm" != xyes; then
+            AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
+        fi
+    fi
+
     # put all the necessary libs together, including possibly libdricore
     DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm 
-lpthread $DLOPEN_LIBS"
 fi
@@ -1793,6 +1799,9 @@ dnl Gallium helper functions
 dnl
 gallium_check_st() {
     if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes; then
+         if test "x$have_libdrm" != xyes; then
+            AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
+         fi
          GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1"
     fi
     if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to