diff --git a/configure.ac b/configure.ac index f75325d..d816211 100644 --- a/configure.ac +++ b/configure.ac @@ -1842,7 +1842,12 @@ dnl in LLVM_LIBS. if test "x$MESA_LLVM" != x0; then - LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`" + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5 ; then + LLVM_LIBS="`$LLVM_CONFIG --system-libs --libs ${LLVM_COMPONENTS} |tr "\n" " "`" + dnl Because my llvm-config adds a new line... + else + LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`" + fi if test "x$with_llvm_shared_libs" = xyes; then dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,