[Mesa-dev] [PATCH v3 16/25] configure.ac: Only set --enable_gallium_llvm if it's needed.

Tobias Droste tdroste at gmx.de
Tue Oct 11 23:02:43 UTC 2016


Additionally to checking the host, this is now actually checking if it's needed.

"--enable-gallium-llvm" is now only needed if at least one driver calls
"gallium_require_llvm()". If the flag is set to auto it will default
to no now if no driver with "gallium_require_llvm()" is included.

If gallium swrast driver is selected and LLVM is installed and
"--enable-gallium-llvm" is yes or auto, it defaults to llvmpipe,
otherwise to softpipe.

Signed-off-by: Tobias Droste <tdroste at gmx.de>
---
 configure.ac | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8cef0e1..470a4ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2304,11 +2304,6 @@ AC_ARG_ENABLE([gallium-llvm],
 if test -z "$with_gallium_drivers"; then
     enable_gallium_llvm=no
 fi
-if test "x$enable_gallium_llvm" = xauto; then
-    case "$host_cpu" in
-    i*86|x86_64|amd64) enable_gallium_llvm=yes;;
-    esac
-fi
 
 dnl Directory for XVMC libs
 AC_ARG_WITH([xvmc-libdir],
@@ -2369,6 +2364,10 @@ gallium_require_llvm() {
     case "$host" in *gnux32) return;; esac
     case "$host_cpu" in
     i*86|x86_64|amd64)
+        if test "x$enable_gallium_llvm" = xauto; then
+            enable_gallium_llvm=yes
+        fi
+
         if test "x$enable_gallium_llvm" != "xyes"; then
             AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
         fi
@@ -2523,7 +2522,7 @@ if test -n "$with_gallium_drivers"; then
             ;;
         xswrast)
             HAVE_GALLIUM_SOFTPIPE=yes
-            if test "x$MESA_LLVM" = x1; then
+            if test "x$MESA_LLVM" = x1 && (test "x$enable_gallium_llvm" = xyes || test "x$enable_gallium_llvm" = xauto); then
                 gallium_require_llvm "llvmpipe"
                 HAVE_GALLIUM_LLVMPIPE=yes
             fi
-- 
2.10.0



More information about the mesa-dev mailing list