From 36ba73d368fe7dc0e39b0e321e3e0774b9bb23dd Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 24 Aug 2016 11:21:17 +0200 Subject: [PATCH 1/1] Allow specifying custom llvm-config via configure --- configure | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 9bb142a..308461b 100755 --- a/configure +++ b/configure @@ -3,22 +3,26 @@ cd $(dirname $0) TOP=$PWD -if [ -x llvm/configure ]; then - echo "Will build llvm and clang from sources" - ln -sf ../../clang llvm/tools/clang - mkdir -p llvm/_build - ( - cd llvm/_build - ../configure --prefix=$TOP/_install --enable-optimized - ) - LLVM_CONFIG=$TOP/_install/bin/llvm-config +if test -z "$LLVM_CONFIG"; then + if [ -x llvm/configure ]; then + echo "Will build llvm and clang from sources" + ln -sf ../../clang llvm/tools/clang + mkdir -p llvm/_build + ( + cd llvm/_build + ../configure --prefix=$TOP/_install --enable-optimized + ) + LLVM_CONFIG=$TOP/_install/bin/llvm-config + else + echo "Using system-wide llvm and clang" + LLVM_CONFIG=llvm-config + fi else - echo "Using system-wide llvm and clang" - LLVM_CONFIG=llvm-config + echo "Using custom llvm-config: $LLVM_CONFIG" fi cat < $TOP/Makefile.config LLVM_CONFIG := $LLVM_CONFIG EOF -echo "Now run make to compile everything" +echo "Now run 'make' to compile everything" -- 2.39.2