Commit c21d7ced authored by Simon Marlow's avatar Simon Marlow
Browse files

--enable-src-tree-haddock and friends are no longer required

Happy, Alex and Haddock are built separately using Cabal now.
parent e2eebc0d
...@@ -245,26 +245,10 @@ dnl at least Happy version 1.14. If there's no installed Happy, we look ...@@ -245,26 +245,10 @@ dnl at least Happy version 1.14. If there's no installed Happy, we look
dnl for a happy source tree and point the build system at that instead. dnl for a happy source tree and point the build system at that instead.
dnl dnl
AC_DEFUN([FPTOOLS_HAPPY], AC_DEFUN([FPTOOLS_HAPPY],
[ [AC_PATH_PROG(HappyCmd,happy,)
if test -d $srcdir/happy; then
SrcTreeHappyCmd=$hardtop/happy/src/happy-inplace
else
SrcTreeHappyCmd=""
fi
if test x"$UseSrcTreeHappy" = xYES; then
if test x"$SrcTreeHappyCmd" != x; then
HappyCmd=$SrcTreeHappyCmd
else
AC_MSG_ERROR([--enable-src-tree-happy given, but happy not found in source tree])
fi
else
AC_PATH_PROG(HappyCmd,happy,$SrcTreeHappyCmd)
fi
AC_CACHE_CHECK([for version of happy], fptools_cv_happy_version, AC_CACHE_CHECK([for version of happy], fptools_cv_happy_version,
changequote(, )dnl changequote(, )dnl
[if test x"$HappyCmd" = x"$SrcTreeHappyCmd" -a -e $srcdir/happy/mk/version.mk; then [if test x"$HappyCmd" != x; then
fptools_cv_happy_version=`grep '^ProjectVersion[ ]*=' $srcdir/happy/mk/version.mk | sed 's/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`;
elif test x"$HappyCmd" != x; then
fptools_cv_happy_version="`$HappyCmd -v | fptools_cv_happy_version="`$HappyCmd -v |
grep 'Happy Version' | sed -e 's/Happy Version \([^ ]*\).*/\1/g'`" ; grep 'Happy Version' | sed -e 's/Happy Version \([^ ]*\).*/\1/g'`" ;
else else
...@@ -272,10 +256,8 @@ else ...@@ -272,10 +256,8 @@ else
fi; fi;
changequote([, ])dnl changequote([, ])dnl
]) ])
if test -d $srcdir/ghc -a ! -f $srcdir/ghc/compiler/parser/Parser.hs; then FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.15],
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.15],
[AC_MSG_ERROR([Happy version 1.15 or later is required to compile GHC.])])[]dnl [AC_MSG_ERROR([Happy version 1.15 or later is required to compile GHC.])])[]dnl
fi
HappyVersion=$fptools_cv_happy_version; HappyVersion=$fptools_cv_happy_version;
AC_SUBST(HappyVersion) AC_SUBST(HappyVersion)
]) ])
...@@ -285,21 +267,7 @@ dnl Check for Haddock and version. If there's no installed Haddock, we look ...@@ -285,21 +267,7 @@ dnl Check for Haddock and version. If there's no installed Haddock, we look
dnl for a haddock source tree and point the build system at that instead. dnl for a haddock source tree and point the build system at that instead.
dnl dnl
AC_DEFUN([FPTOOLS_HADDOCK], AC_DEFUN([FPTOOLS_HADDOCK],
[ [AC_PATH_PROG(HaddockCmd,haddock,)
if test -d $srcdir/haddock; then
SrcTreeHaddockCmd=$hardtop/haddock/src/haddock-inplace
else
SrcTreeHaddockCmd=""
fi
if test x"$UseSrcTreeHaddock" = xYES; then
if test x"$SrcTreeHaddockCmd" != x; then
HaddockCmd=$SrcTreeHaddockCmd
else
AC_MSG_ERROR([--enable-src-tree-haddock given, but haddock not found in source tree])
fi
else
AC_PATH_PROG(HaddockCmd,haddock,$SrcTreeHaddockCmd)
fi
dnl Darn, I forgot to make Haddock print out its version number when dnl Darn, I forgot to make Haddock print out its version number when
dnl invoked with -v. We could try generating some HTML and grepping dnl invoked with -v. We could try generating some HTML and grepping
dnl through that to find the version number, but I think we'll make dnl through that to find the version number, but I think we'll make
...@@ -313,25 +281,10 @@ dnl for a alex source tree and point the build system at that instead. ...@@ -313,25 +281,10 @@ dnl for a alex source tree and point the build system at that instead.
dnl dnl
AC_DEFUN([FPTOOLS_ALEX], AC_DEFUN([FPTOOLS_ALEX],
[ [
if test -d $srcdir/alex; then AC_PATH_PROG(AlexCmd,alex,)
SrcTreeAlexCmd=$hardtop/alex/src/alex-inplace
else
SrcTreeAlexCmd=""
fi
if test x"$UseSrcTreeAlex" = xYES; then
if test x"$SrcTreeAlexCmd" != x; then
AlexCmd=$SrcTreeAlexCmd
else
AC_MSG_ERROR([--enable-src-tree-alex given, but alex not found in source tree])
fi
else
AC_PATH_PROG(AlexCmd,alex,$SrcTreeAlexCmd)
fi
AC_CACHE_CHECK([for version of alex], fptools_cv_alex_version, AC_CACHE_CHECK([for version of alex], fptools_cv_alex_version,
changequote(, )dnl changequote(, )dnl
[if test x"$AlexCmd" = x"$SrcTreeAlexCmd"; then [if test x"$AlexCmd" != x; then
fptools_cv_alex_version=`grep '^ProjectVersion[ ]*=' $srcdir/alex/mk/version.mk | sed 's/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`;
elif test x"$AlexCmd" != x; then
fptools_cv_alex_version="`$AlexCmd -v | fptools_cv_alex_version="`$AlexCmd -v |
grep 'Alex [Vv]ersion' | sed -e 's/Alex [Vv]ersion \([0-9\.]*\).*/\1/g'`" ; grep 'Alex [Vv]ersion' | sed -e 's/Alex [Vv]ersion \([0-9\.]*\).*/\1/g'`" ;
else else
...@@ -339,10 +292,8 @@ else ...@@ -339,10 +292,8 @@ else
fi; fi;
changequote([, ])dnl changequote([, ])dnl
]) ])
if test -d $srcdir/ghc -a ! -f $srcdir/ghc/compiler/parser/Lexer.hs; then FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[2.0],
FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[2.0],
[AC_MSG_ERROR([Alex version 2.0 or later is required to compile GHC.])])[]dnl [AC_MSG_ERROR([Alex version 2.0 or later is required to compile GHC.])])[]dnl
fi
AlexVersion=$fptools_cv_alex_version; AlexVersion=$fptools_cv_alex_version;
AC_SUBST(AlexVersion) AC_SUBST(AlexVersion)
]) ])
......
...@@ -721,7 +721,7 @@ fi; ...@@ -721,7 +721,7 @@ fi;
fi; fi;
dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on
if test "$BootingFromHc" = "NO" -a "$WithGhc" = "" -a -d "$srcdir/ghc"; then if test "$BootingFromHc" = "NO" -a "$WithGhc" = "" -a -d "$srcdir/compiler"; then
AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.]) AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.])
fi; fi;
...@@ -909,51 +909,15 @@ FPTOOLS_GREENCARD(3.00) ...@@ -909,51 +909,15 @@ FPTOOLS_GREENCARD(3.00)
] ]
) )
AC_ARG_ENABLE(src-tree-happy,
[AC_HELP_STRING([--enable-src-tree-happy],
[Build and use source tree (fptools/happy) version of Happy.
[default=autodetect]])],
[ if test x"$enableval" = x"yes"; then
UseSrcTreeHappy=YES
else
UseSrcTreeHappy=NO
fi
],
[UseSrcTreeHappy=NO]
)
dnl ** check for installed happy binary + version dnl ** check for installed happy binary + version
dnl (don't do it if we're booting from .hc files though.) dnl (don't do it if we're booting from .hc files though.)
if test "$BootingFromHc" = "NO"; then if test "$BootingFromHc" = "NO"; then
FPTOOLS_HAPPY FPTOOLS_HAPPY
fi; fi;
AC_ARG_ENABLE(src-tree-haddock,
[AC_HELP_STRING([--enable-src-tree-haddock],
[Build and use source tree (fptools/haddock) version of Haddock.
[default=autodetect]])],
[ if test x"$enableval" = x"yes"; then
UseSrcTreeHaddock=YES
else
UseSrcTreeHaddock=NO
fi
],
[UseSrcTreeHaddock=NO]
)
dnl ** check for installed haddock dnl ** check for installed haddock
FPTOOLS_HADDOCK FPTOOLS_HADDOCK
AC_ARG_ENABLE(src-tree-alex,
[AC_HELP_STRING([--enable-src-tree-alex],
[Build and use source tree (fptools/alex) version of Alex.
[default=autodetect]])],
[ if test x"$enableval" = x"yes"; then
UseSrcTreeAlex=YES
else
UseSrcTreeAlex=NO
fi
],
[UseSrcTreeAlex=NO]
)
dnl ** check for installed alex binary + version dnl ** check for installed alex binary + version
dnl (don't do it if we're booting from .hc files though.) dnl (don't do it if we're booting from .hc files though.)
if test "$BootingFromHc" = "NO"; then if test "$BootingFromHc" = "NO"; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment