summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2014-03-20 15:47:18 +0000
committerSimon Marlow <marlowsd@gmail.com>2014-03-27 12:36:14 +0000
commit6189c7674fc5c735db1a446d0b222369a3767369 (patch)
tree2bd674daab6a9778d259fbb5d1af09a4a58237ba /aclocal.m4
parentf86825462bf1d14ea6aad1029a5ec9d7a08049df (diff)
downloadhaskell-6189c7674fc5c735db1a446d0b222369a3767369.tar.gz
--with-gcc overrides CC_STAGE0 when not cross-compiling (#8498)
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m418
1 files changed, 17 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index c2a7ba2d7f..be38031686 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -643,6 +643,10 @@ AC_ARG_WITH($2,
else
$1=$withval
fi
+
+ # Remember that we set this manually. Used to override CC_STAGE0
+ # and friends later, if we are not cross-compiling.
+ With_$2=$withval
],
[
if test "$HostOS" != "mingw32"
@@ -685,6 +689,10 @@ AC_ARG_WITH($2,
else
$1=$withval
fi
+
+ # Remember that we set this manually. Used to override CC_STAGE0
+ # and friends later, if we are not cross-compiling.
+ With_$2=$withval
],
[
if test "$HostOS" != "mingw32"
@@ -2058,7 +2066,8 @@ AC_DEFUN([FIND_GCC],[
$1="$CC"
else
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [$2], [$3])
- # From Xcode 5 on, OS X command line tools do not include gcc anymore. Use clang.
+ # From Xcode 5 on, OS X command line tools do not include gcc
+ # anymore. Use clang.
if test -z "$$1"
then
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [clang], [clang])
@@ -2071,4 +2080,11 @@ AC_DEFUN([FIND_GCC],[
AC_SUBST($1)
])
+AC_DEFUN([MAYBE_OVERRIDE_STAGE0],[
+ if test ! -z "$With_$1" -a "$CrossCompiling" != "YES"; then
+ AC_MSG_NOTICE([Not cross-compiling, so --with-$1 also sets $2])
+ $2=$With_$1
+ fi
+])
+
# LocalWords: fi