[Mesa-dev] [PATCH v4 07/18] configure.ac: Move llvm-config searching outside the function

Tobias Droste tdroste at gmx.de
Sun Oct 16 00:20:44 UTC 2016


There's no harm in always searching llvm-config.
This way it's available as soon as possible for all functions.

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

diff --git a/configure.ac b/configure.ac
index 4133a72..c29604e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -885,6 +885,14 @@ if test "x$have_libelf" = xno; then
    AC_SUBST([LIBELF_CFLAGS])
 fi
 
+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
+
 llvm_add_component() {
     new_llvm_component=$1
     driver_name=$2
@@ -946,14 +954,6 @@ strip_unwanted_llvm_flags() {
 }
 
 llvm_set_environment_variables() {
-    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
         LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
         LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
-- 
2.10.1



More information about the mesa-dev mailing list