From 7fcc07c89fcc7f17c4a54e23bba884c8cc0982c3 Mon Sep 17 00:00:00 2001 From: Adam Sandberg Eriksson Date: Mon, 31 Dec 2018 00:42:35 +0100 Subject: 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. --- aclocal.m4 | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'aclocal.m4') 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 -- cgit v1.2.1