diff options
author | Tom Stellard <[email protected]> | 2013-01-25 12:46:55 -0500 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-01-25 22:05:00 +0000 |
commit | 7a850c58511f2e8367f3829ac6c3229c320cd91e (patch) | |
tree | 0dbc1309c1940cebae2e27d6b7ccb93dacb03563 | |
parent | 264e6dad28e64755dc1580abdbb4e339c3439883 (diff) |
configure.ac: Don't set LLVM_LIBS when llvm is disabled
-rw-r--r-- | configure.ac | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index ccf95c544b4..9cc5c4ae5d1 100644 --- a/configure.ac +++ b/configure.ac @@ -1898,21 +1898,23 @@ dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but dnl this was causing the same libraries to be appear multiple times dnl in LLVM_LIBS. -LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`" +if test "x$MESA_LLVM" != x0; then -if test "x$with_llvm_shared_libs" = xyes; then - dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, - LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` - AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,) + LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`" - if test "x$llvm_have_one_so" = xyes; then - dnl LLVM was built using auto*, so there is only one shared object. - LLVM_LIBS="-l$LLVM_SO_NAME" - else - dnl If LLVM was built with CMake, there will be one shared object per - dnl component. - AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",, - AC_MSG_ERROR([Could not find llvm shared libraries: + if test "x$with_llvm_shared_libs" = xyes; then + dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, + LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` + AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,) + + if test "x$llvm_have_one_so" = xyes; then + dnl LLVM was built using auto*, so there is only one shared object. + LLVM_LIBS="-l$LLVM_SO_NAME" + else + dnl If LLVM was built with CMake, there will be one shared object per + dnl component. + AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",, + AC_MSG_ERROR([Could not find llvm shared libraries: Please make sure you have built llvm with the --enable-shared option and that your llvm libraries are installed in $LLVM_LIBDIR If you have installed your llvm libraries to a different directory you @@ -1925,9 +1927,10 @@ if test "x$with_llvm_shared_libs" = xyes; then use llvm static libraries then remove these options from your configure invocation and reconfigure.])) - dnl We don't need to update LLVM_LIBS in this case because the LLVM - dnl install uses a shared object for each compoenent and we have - dnl already added all of these objects to LLVM_LIBS. + dnl We don't need to update LLVM_LIBS in this case because the LLVM + dnl install uses a shared object for each compoenent and we have + dnl already added all of these objects to LLVM_LIBS. + fi fi fi |