summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-11-13 22:30:42 +0000
committerIan Lynagh <ian@well-typed.com>2012-11-13 22:30:42 +0000
commite605c3e8c1b1a643a7c11e7aa2a7f639dd890cfe (patch)
tree5373c839f585ad47ff8b43e961c1f171510e5357 /aclocal.m4
parentea301fa1787761291cf0a0a9e02b9ac8f2c7b18e (diff)
downloadhaskell-e605c3e8c1b1a643a7c11e7aa2a7f639dd890cfe.tar.gz
Simplify BOOTSTRAPPING_GHC_INFO_FIELD
All supported bootstrapping compilers now have --info output, so we can use that unconditionally.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m419
1 files changed, 6 insertions, 13 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 9adad1ee23..90879945e8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1857,21 +1857,14 @@ case "$1" in
# 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.
+# Set the variable $1 to the value of the ghc --info field $2.
AC_DEFUN([BOOTSTRAPPING_GHC_INFO_FIELD],[
-if test $GhcCanonVersion -ge 701
+$1=`"$WithGhc" --info | grep "^ ,(\"$2\"," | sed -e 's/.*","//' -e 's/")$//'`
+tmp=${$1#\$topdir/}
+if test "${$1}" != "$tmp"
then
- $1=`"$WithGhc" --info | grep "^ ,(\"$2\"," | sed -e 's/.*","//' -e 's/")$//'`
- tmp=${$1#\$topdir/}
- if test "${$1}" != "$tmp"
- then
- topdir=`"$WithGhc" --print-libdir | sed 's#\\\\#/#g'`
- $1="$topdir/$tmp"
- fi
-else
- $1=$3
+ topdir=`"$WithGhc" --print-libdir | sed 's#\\\\#/#g'`
+ $1="$topdir/$tmp"
fi
AC_SUBST($1)
])