diff options
author | Devang Patel <dpatel@apple.com> | 2007-12-04 22:54:47 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-12-04 22:54:47 +0000 |
commit | 5d28b888b9f1d681723126f9dc834c793335dc57 (patch) | |
tree | 66531970185fce1a2769bf310ebe8525fa76121c /autoconf | |
parent | 663775299889de76a7d67e52482c2ee352cd5123 (diff) |
Add --with-llvmgcc= and --with-llvmgxx= configure options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 713d278a7f..aa98000417 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -421,6 +421,28 @@ case "$withval" in *) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;; esac +dnl Allow a specific llvm-gcc compiler to be used with this LLVM config. +AC_ARG_WITH(llvmgcc, + AS_HELP_STRING([--with-llvmgcc], + [Specify location of llvm-gcc driver (default searches PATH)]), + LLVMGCC=$with_llvmgcc + WITH_LLVMGCCDIR="",) + +dnl Allow a specific llvm-g++ compiler to be used with this LLVM config. +AC_ARG_WITH(llvmgxx, + AS_HELP_STRING([--with-llvmgxx], + [Specify location of llvm-g++ driver (default searches PATH)]), + LLVMGXX=$with_llvmgxx + WITH_LLVMGCCDIR="",) + +if test -n "$LLVMGCC" && test -z "$LLVMGXX"; then + AC_MSG_ERROR([Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used]); +fi + +if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then + AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); +fi + dnl Specify extra build options AC_ARG_WITH(extra-options, AS_HELP_STRING([--with-extra-options], @@ -589,8 +611,12 @@ if test "$WITH_LLVMGCCDIR" = "default" ; then AC_PATH_PROG(LLVMGCC, $LLVMGCC, []) AC_PATH_PROG(LLVMGXX, $LLVMGXX, []) else - LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" - LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" + if test -z "$LLVMGCC"; then + LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" + fi + if test -z "$LLVMGXX"; then + LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" + fi AC_SUBST(LLVMGCC,$LLVMGCC) AC_SUBST(LLVMGXX,$LLVMGXX) fi |