summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-04-23 20:40:43 +0100
committerIan Lynagh <igloo@earth.li>2011-04-23 20:40:43 +0100
commitb8c25820084a46b1239ad7d87bee6391dd5c1017 (patch)
treebf541bac4775ebf92675aa0ee89efcbf0421bbdc /aclocal.m4
parent70b4e94b9423904e817c88e5b55732f7f3df9fbc (diff)
downloadhaskell-b8c25820084a46b1239ad7d87bee6391dd5c1017.tar.gz
Get CC_STAGE0 from the bootstrapping compiler
Rather than using the compiler that configure detects, we use the "GCC command" field from the --info output of the bootstrapping compiler (provided it is >= 7.1).
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index c7002b171f..4b750ef3f2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1494,6 +1494,21 @@ case "$1" in
esac
])
+# BOOTSTRAPPING_GHC_INFO_FIELD
+# --------------------------------
+# If the bootstrapping compiler is >= 7.1, then set the variable
+# $1 to the value of the ghc --info field $2. Otherwise, set it to
+# $3.
+AC_DEFUN([BOOTSTRAPPING_GHC_INFO_FIELD],[
+if test $GhcCanonVersion -ge 701
+then
+ $1=`"$WithGhc" --info | grep "^ ,(\"$2\"," | sed -e 's/.*","//' -e 's/")$//'`
+else
+ $1=$3
+fi
+AC_SUBST($1)
+])
+
# LIBRARY_VERSION(lib)
# --------------------------------
# Gets the version number of a library.