diff options
-rw-r--r-- | aclocal.m4 | 19 | ||||
-rw-r--r-- | configure.ac | 10 |
2 files changed, 11 insertions, 18 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) ]) diff --git a/configure.ac b/configure.ac index 5c887f61ee..f0bc4c35ee 100644 --- a/configure.ac +++ b/configure.ac @@ -131,12 +131,12 @@ if test "$WithGhc" != ""; then GhcMinVersion2=`echo "$GhcMinVersion" | sed 's/^\\(.\\)$/0\\1/'` GhcCanonVersion="$GhcMajVersion$GhcMinVersion2" - BOOTSTRAPPING_GHC_INFO_FIELD([OS_STAGE0],[target os],['unkown']) - BOOTSTRAPPING_GHC_INFO_FIELD([CC_STAGE0],[C compiler command],['$(CC)']) + BOOTSTRAPPING_GHC_INFO_FIELD([OS_STAGE0],[target os]) + BOOTSTRAPPING_GHC_INFO_FIELD([CC_STAGE0],[C compiler command]) if test "x$OS_STAGE0" != "xOSDarwin"; then - BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command],['$(AR)']) - BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags],['$(AR_OPTS)']) - BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file],['$(ArSupportsAtFile)']) + BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command]) + BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags]) + BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file]) else AR_STAGE0='$(AR)' AR_OPTS_STAGE0='$(AR_OPTS)' |