diff --git a/configure.ac b/configure.ac index f75325d..0cabc96 100644 --- a/configure.ac +++ b/configure.ac @@ -1842,7 +1842,11 @@ 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 --libs --system-libs ${LLVM_COMPONENTS}`" + 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,