diff --git a/configure.ac b/configure.ac index e3babd3909a..52645bb44ff 100644 --- a/configure.ac +++ b/configure.ac @@ -2646,7 +2646,7 @@ if test "x$enable_llvm" = xyes; then LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`" if test "x$enable_llvm_shared_libs" = xyes; then - if test $LLVM_VERSION_MAJOR -lt 4; then + if test $LLVM_VERSION_MAJOR -lt 4 -o "`$LLVM_CONFIG --shared-mode ${LLVM_COMPONENTS}`" = static; then dnl llvm-config may not give the right answer when llvm is a built as a dnl single shared library, so we must work the library name out for dnl ourselves.