configure.ac: Don't search llvm-config if it's known
authorTobias Droste <tdroste@gmx.de>
Sat, 19 Nov 2016 01:38:53 +0000 (02:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 5 Dec 2016 14:43:46 +0000 (14:43 +0000)
This way LLVM_CONFIG can bet set from an env variable if it's outside
the $llvm_prefix.

This is not a must, but it helps testing.

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
configure.ac

index f62bc61e50255ab94357dc7787d67ef9a5cfba70..fbe6fda013896cf69ff2af4c992c8ba11f644087 100644 (file)
@@ -2166,10 +2166,12 @@ if test "x$enable_gallium_llvm" = xauto; then
     esac
 fi
 if test "x$enable_gallium_llvm" = xyes || test "x$HAVE_RADEON_VULKAN" = xyes; then
-    if test -n "$llvm_prefix"; then
-        AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
-    else
-        AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
+    if test -z "$LLVM_CONFIG"; then
+        if test -n "$llvm_prefix"; then
+            AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
+        else
+            AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
+        fi
     fi
 
     if test "x$LLVM_CONFIG" != xno; then