From: Michal Sojka Date: Wed, 24 Aug 2016 09:21:17 +0000 (+0200) Subject: Allow specifying custom llvm-config via configure X-Git-Url: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git/commitdiff_plain/36ba73d368fe7dc0e39b0e321e3e0774b9bb23dd Allow specifying custom llvm-config via configure --- 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"