From 7601031267053971bc62cfcb683302fe67baefca Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 22 Apr 2020 10:13:26 -0700 Subject: [PATCH] configure: Use PKG_CHECK_MODULES first for libllvm. --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f5f2ea775..b9bb0fa04 100644 --- a/configure.ac +++ b/configure.ac @@ -2021,13 +2021,19 @@ AC_HELP_STRING([--with-llvm-libs=[[[DIR]]]], [Path to libllvm library directory] LLVM_LDFLAGS="-L/usr/lib/llvm-9/lib" ]) -AC_CHECK_LIB([LLVM], [LLVMBuildAnd], +PKG_CHECK_MODULES(LLVM, [LLVM], [ have_libllvm="yes" LLVM_LIBS="-lLLVM" ], [ - have_libllvm="no" - AC_MSG_WARN([Unable to find LLVM compiler infrastructure library on this system.]) + AC_CHECK_LIB([LLVM], [LLVMBuildAnd], + [ + have_libllvm="yes" + LLVM_LIBS="-lLLVM" + ], [ + have_libllvm="no" + AC_MSG_WARN([Unable to find LLVM compiler infrastructure library on this system.]) + ]) ]) AM_CONDITIONAL([LLVM], [test "x$have_libllvm" = "xyes" ])