diff options
author | Tom Stellard <[email protected]> | 2012-07-17 18:32:56 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-07-23 13:25:36 +0000 |
commit | 17f6c9195f76566aa84152b05891b4cfef3fc7a8 (patch) | |
tree | 43dc9065e52597bdf3edc500101697adfad94082 | |
parent | c3bc41011f9ffe648b7dd4915c6202b776cd1ab4 (diff) |
configure.ac: Add --with-llvm-prefix option
This option allows you to specify the llvm install prefix. It is
useful for switching between different versions of LLVM.
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7b88331aeb7..055e3d4457c 100644 --- a/configure.ac +++ b/configure.ac @@ -1829,6 +1829,13 @@ AC_ARG_WITH([llvm-shared-libs], [with_llvm_shared_libs=yes], [with_llvm_shared_libs=no]) +AC_ARG_WITH([llvm-prefix], + [AS_HELP_STRING([--with-llvm-prefix], + [Prefix for LLVM installations in non-standard locations])], + [llvm_prefix="$withval"], + [llvm_prefix=""]) + + if test "x$with_gallium_drivers" = x; then enable_gallium_llvm=no fi @@ -1838,7 +1845,11 @@ if test "x$enable_gallium_llvm" = xauto; then esac fi if test "x$enable_gallium_llvm" = xyes; then - AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) + if test "x$llvm_prefix" != x; then + AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"]) + else + AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) + fi if test "x$LLVM_CONFIG" != xno; then LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'` |