diff options
author | David Terei <davidterei@gmail.com> | 2012-01-10 11:58:59 -0800 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2012-01-10 11:58:59 -0800 |
commit | e6bfc5962e7d889a9cafcf1829c5177206ccabfd (patch) | |
tree | c886beb9012a009829707fd3e13467e872704336 /aclocal.m4 | |
parent | 4a0eb925b4e5cfc917365521caee1d9041fb2d98 (diff) | |
download | haskell-e6bfc5962e7d889a9cafcf1829c5177206ccabfd.tar.gz |
Enable llvm tool paths to be set with ./configure
Patch from Karel Gardas!
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 421da0ed12..c54918e4ae 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -370,6 +370,18 @@ AC_DEFUN([FP_SETTINGS], SettingsDllWrapCommand="/bin/false" SettingsWindresCommand="/bin/false" SettingsTouchCommand='touch' + if test -z "$LlcCmd" + then + SettingsLlcCommand="llc" + else + SettingsLlcCommand="$LlcCmd" + fi + if test -z "$OptCmd" + then + SettingsOptCommand="opt" + else + SettingsOptCommand="$OptCmd" + fi fi AC_SUBST(SettingsCCompilerCommand) AC_SUBST(SettingsCCompilerFlags) @@ -377,6 +389,8 @@ AC_DEFUN([FP_SETTINGS], AC_SUBST(SettingsDllWrapCommand) AC_SUBST(SettingsWindresCommand) AC_SUBST(SettingsTouchCommand) + AC_SUBST(SettingsLlcCommand) + AC_SUBST(SettingsOptCommand) ]) @@ -538,6 +552,35 @@ AC_ARG_WITH($2, ]) # FP_ARG_WITH_PATH_GNU_PROG +# FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL +# -------------------- +# XXX +# +# $1 = the variable to set +# $2 = the command to look for +# +AC_DEFUN([FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL], +[ +AC_ARG_WITH($2, +[AC_HELP_STRING([--with-$2=ARG], + [Use ARG as the path to $2 [default=autodetect]])], +[ + if test "$HostOS" = "mingw32" + then + AC_MSG_WARN([Request to use $withval will be ignored]) + else + $1=$withval + fi +], +[ + if test "$HostOS" != "mingw32" + then + AC_PATH_PROG([$1], [$2]) + fi +] +) +]) # FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL + # FP_PROG_CONTEXT_DIFF # -------------------- # Figure out how to do context diffs. Sets the output variable ContextDiffCmd. |