diff options
author | Tristan Gingold | 2015-12-20 07:48:23 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-12-20 07:48:23 +0100 |
commit | d3623693949f9bcfe7917f9d059e839a95843519 (patch) | |
tree | 44041c421de8926478ba29eb220d506f54a63462 /configure | |
parent | fcced7f98966aa90d6b000f61a075f22638d4a83 (diff) | |
download | ghdl-d3623693949f9bcfe7917f9d059e839a95843519.tar.gz ghdl-d3623693949f9bcfe7917f9d059e839a95843519.tar.bz2 ghdl-d3623693949f9bcfe7917f9d059e839a95843519.zip |
configure: add --with-llvm-config
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -13,14 +13,14 @@ libdirsuffix=lib/ghdl libdirreverse=../.. gcc_src_dir= gcc_version=unknown -llvm_prefix= +llvm_config= backtrace_lib= build= show_help=no progname=$0 -subst_vars="CC GNATMAKE CFLAGS LDFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_prefix backtrace_lib" +subst_vars="CC GNATMAKE CFLAGS LDFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config backtrace_lib" # Find srcdir srcdir=`dirname $progname` @@ -68,7 +68,10 @@ for opt do --prefix=*) prefix="$optarg";; --srcdir=*) srcdir="$optarg";; --with-gcc=*) gcc_src_dir="$optarg"; backend=gcc;; - --with-llvm=*) llvm_prefix="$optarg"; backend=llvm;; + --with-llvm=*) echo "--with-llvm is deprecated, use --with-llvm-config"; + llvm_config="$optarg/bin/llvm-config"; backend=llvm;; + --with-llvm-config) llvm_config="llvm-config"; backend=llvm;; + --with-llvm-config=*) llvm_config="$optarg"; backend=llvm;; --with-backtrace-lib=*) backtrace_lib="$optarg";; -h|-help|--help) show_help=yes;; *) echo "$0: unknown option $opt; try $0 --help" @@ -83,13 +86,12 @@ cat <<EOF Usage: configure [options] Options [defaults in brackets]: - --prefix=PREFIX install in PREFIX [$prefix] - --srcdir=SRCDIR source code path [$srcdir] - --with-gcc=DIR use gcc backend from DIR (needs gcc $gcc_version) - --with-llvm=DIR use llvm installed in DIR (needs llvm $llvm_version) - --with-backtrace-lib=LIB.a - link with libbacktrace LIB.a to display a backtrace on - errors (only for llvm). + --prefix=PREFIX install in PREFIX [$prefix] + --srcdir=SRCDIR source code path [$srcdir] + --with-gcc=DIR use gcc backend from DIR (needs gcc $gcc_version) + --with-llvm-config=PATH use llvm from PATH (needs llvm $llvm_version) + --with-backtrace-lib=LIB.a link with libbacktrace LIB.a to display a + backtrace on errors (only for llvm). EOF exit 0 fi @@ -142,14 +144,13 @@ fi # For llvm backend, check llvm-config if test $backend = llvm; then - llvm_cmd="$llvm_prefix/bin/llvm-config --version" - llvm_ver=`$llvm_cmd 2>/dev/null` + llvm_ver=`"$llvm_config" --version 2>/dev/null` if [ $? != 0 ]; then - echo "cannot run $llvm_cmd" + echo "cannot run $llvm_config" exit 1 fi if ! check_version $llvm_version $llvm_ver; then - echo "Mismatch llvm version $llvm_ver from $llvm_prefix" + echo "Mismatch llvm version $llvm_ver from $llvm_config" echo "Need llvm version $llvm_version" exit 1 fi |