summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-05-13 10:39:05 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-05-13 10:39:05 +0000
commit436e13f5661e1a42c3ce51c0712e93280c90b213 (patch)
tree8f724a493f4c42b7c2c6e23aacf89307f1ff43b8 /configure.ac
parent24d49415d2833a1338dfb5fd8c5c1c84df6c282b (diff)
downloadhaskell-436e13f5661e1a42c3ce51c0712e93280c90b213.tar.gz
rejig ghc version test; fail if GHC version can't be determined
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 13 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 57d3d31cb9..cea9bc4460 100644
--- a/configure.ac
+++ b/configure.ac
@@ -685,15 +685,8 @@ AC_ARG_ENABLE(bootstrap-with-devel-snapshot,
if test "$WithGhc" != ""; then
FPTOOLS_GHC_VERSION([GhcVersion], [GhcMajVersion], [GhcMinVersion], [GhcPatchLevel])dnl
- if test `expr $GhcMinVersion % 2` = "1"; then
- echo $EnableBootstrapWithDevelSnaphost
- if test "$EnableBootstrapWithDevelSnaphost" = "NO"; then
- AC_MSG_ERROR([
- $WithGhc is a development snapshot of GHC, version $GhcVersion.
- Bootstrapping using this version of GHC is not supported, and may not
- work. Use --enable-bootstrap-with-devel-snapshot to try it anyway,
- or --with-ghc to specify a different GHC to use.])
- fi
+ if test "$GhcMajVersion" = "unknown" -o "$GhcMinVersion" = "unknown"; then
+ AC_MSG_ERROR([Cannot determine the version of $WithGhc. Is it really GHC?])
fi
AC_SUBST(GhcVersion)dnl
@@ -825,6 +818,17 @@ if test "$BootingFromHc" = "NO" -a -d "$srcdir/compiler"; then
fi
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[6.6],
[AC_MSG_ERROR([GHC version 6.6 or later is required to compile GHC.])])dnl
+
+ if test `expr $GhcMinVersion % 2` = "1"; then
+ echo $EnableBootstrapWithDevelSnaphost
+ if test "$EnableBootstrapWithDevelSnaphost" = "NO"; then
+ AC_MSG_ERROR([
+ $WithGhc is a development snapshot of GHC, version $GhcVersion.
+ Bootstrapping using this version of GHC is not supported, and may not
+ work. Use --enable-bootstrap-with-devel-snapshot to try it anyway,
+ or --with-ghc to specify a different GHC to use.])
+ fi
+ fi
fi;
# This uses GHC, so put it after the "GHC is required" check above: