summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-08-20 13:42:34 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-08-20 13:42:34 +0000
commitefc0f420bad7df729c0f0222641d820ca0cfaa2a (patch)
tree532610a879ce51d2bc1c1f9d2ad92da7f30c9a00 /configure.ac
parentff29c975891fda4c79fda76f9d01872566f33a2e (diff)
downloadhaskell-efc0f420bad7df729c0f0222641d820ca0cfaa2a.tar.gz
Restore the GHC version check
I'm not sure what happened here, but the ordering of tests was messed up, with the result that the GHC version check was being omitted.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac71
1 files changed, 35 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 331e3b991d..14d8710c07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,22 @@ AC_ARG_WITH([ghc],
fi
WithGhc="$GHC"])
+dnl ** Booting from .hc files?
+dnl --------------------------------------------------------------
+AC_ARG_ENABLE(hc-boot,
+[AC_HELP_STRING([--enable-hc-boot],
+[Boot the Glasgow Haskell Compiler from intermediate .hc files.
+ (This option is mostly of interest to porters.) [default=no]])],
+[ if test x"$enableval" = x"yes"; then
+ BootingFromHc=YES
+ else
+ BootingFromHc=NO
+ fi
+],
+[BootingFromHc=NO]
+)
+AC_SUBST(BootingFromHc)
+
dnl ** Booting from unregisterised .hc files?
dnl --------------------------------------------------------------
AC_ARG_ENABLE(hc-boot-unregisterised,
@@ -112,26 +128,6 @@ AC_MSG_ERROR([--enable-hc-boot-unregisterised requires --enable-hc-boot.])
fi;
fi;
-dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on
-if test "$BootingFromHc" = "NO" -a -d "$srcdir/compiler"; then
- if test "$WithGhc" = ""; then
- AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.])
- fi
- FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[6.8],
- [AC_MSG_ERROR([GHC version 6.8 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;
-
AC_ARG_ENABLE(bootstrap-with-devel-snapshot,
[AC_HELP_STRING([--enable-bootstrap-with-devel-snapshot],
[Allow bootstrapping using a development snapshot of GHC. This is not guaranteed to work.])],
@@ -156,6 +152,25 @@ if test "$WithGhc" != ""; then
AC_SUBST(ghc_ge_609)dnl
fi
+dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on
+if test "$BootingFromHc" = "NO" -a -d "$srcdir/compiler"; then
+ if test "$WithGhc" = ""; then
+ AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.])
+ fi
+ FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[6.8],
+ [AC_MSG_ERROR([GHC version 6.8 or later is required to compile GHC.])])dnl
+
+ if test `expr $GhcMinVersion % 2` = "1"; then
+ 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;
+
# GHC is passed to Cabal, so we need a native path
if test "${WithGhc}" != ""
then
@@ -400,22 +415,6 @@ AC_ARG_WITH(ld,
[FP_PROG_LD()]
)
-dnl ** Booting from .hc files?
-dnl --------------------------------------------------------------
-AC_ARG_ENABLE(hc-boot,
-[AC_HELP_STRING([--enable-hc-boot],
-[Boot the Glasgow Haskell Compiler from intermediate .hc files.
- (This option is mostly of interest to porters.) [default=no]])],
-[ if test x"$enableval" = x"yes"; then
- BootingFromHc=YES
- else
- BootingFromHc=NO
- fi
-],
-[BootingFromHc=NO]
-)
-AC_SUBST(BootingFromHc)
-
# This uses GHC, so put it after the "GHC is required" check above:
FP_FIND_ROOT