summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorAdam Sandberg Eriksson <adam@sandbergericsson.se>2018-12-31 00:42:35 +0100
committerBen Gamari <ben@well-typed.com>2019-01-01 12:02:59 -0500
commit7fcc07c89fcc7f17c4a54e23bba884c8cc0982c3 (patch)
tree890451d7fb5d3b5f8f9be53549928106a11bb688 /aclocal.m4
parent374e44704b64afafc1179127e6c9c5bf1715ef39 (diff)
downloadhaskell-7fcc07c89fcc7f17c4a54e23bba884c8cc0982c3.tar.gz
configure: introduce HAPPY and ALEX vars and deprecate --with-ghc in favour of the GHC var
Also updates the windows gitlab ci to use the new configure variables.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m426
1 files changed, 17 insertions, 9 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 03f43d18db..a7026e217a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -902,18 +902,22 @@ AS_IF([test "$fp_num1" $2 "$fp_num2"], [$4], [$5])[]dnl
dnl
-dnl Check for Happy and version.
-dnl If there's no installed Happy, we look
-dnl for a happy source tree and point the build system at that instead.
+dnl Check for Happy and version:
+dnl
+dnl 1. Use happy specified in env var HAPPY
+dnl 2. Find happy in path
+dnl 3. Check happy version
+dnl
dnl If you increase the minimum version requirement, please also update:
dnl https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Tools
dnl
AC_DEFUN([FPTOOLS_HAPPY],
-[AC_PATH_PROG(HappyCmd,happy,)
-
+[AC_PATH_PROG(HAPPY,[happy],)
+AC_SUBST(HappyCmd,$HAPPY)
AC_CACHE_CHECK([for version of happy], fptools_cv_happy_version,
changequote(, )dnl
-[if test x"$HappyCmd" != x; then
+[
+if test x"$HappyCmd" != x; then
fptools_cv_happy_version=`"$HappyCmd" -v |
grep 'Happy Version' | sed -e 's/Happy Version \([^ ]*\).*/\1/g'` ;
else
@@ -932,13 +936,17 @@ AC_SUBST(HappyVersion)
dnl
dnl Check for Alex and version.
+dnl
+dnl 1. Use alex specified in env var ALEX
+dnl 2. Find alex in path
+dnl 3. Check alex version
+dnl
dnl If you increase the minimum version requirement, please also update:
dnl https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Tools
dnl
AC_DEFUN([FPTOOLS_ALEX],
-[
-AC_PATH_PROG(AlexCmd,alex,)
-
+[AC_PATH_PROG(ALEX,[alex],)
+AC_SUBST(AlexCmd,$ALEX)
AC_CACHE_CHECK([for version of alex], fptools_cv_alex_version,
changequote(, )dnl
[if test x"$AlexCmd" != x; then