Building GHC / Happy

Rafael Martínez Torres martinez.torres@fdi.ucm.es
Wed, 26 Jun 2002 09:51:19 +0000


This is a very useful hack to bootstrap GHC, at least for minor
versions... 


If you have the autoconf utility avalaible on your box:

-which autoconf
-type autoconf   ( under bash shell )

try as follow:

1) Remove configure file   ( rm configure) 
2)Open the file fptools/aclocal.m4

>dnl
>dnl Check for Happy and version.
>dnl
>AC_DEFUN(AC_HAPPY,
>[AC_PATH_PROG(HappyCmd,happy)
>AC_CACHE_CHECK([for version of happy], ac_cv_happy_version,
>[if test x"$HappyCmd" != x; then
>   ac_cv_happy_version="`$HappyCmd -v |
>changequote(, )dnl
>                          grep 'Happy Version' | sed -e 's/Happy Version \([^ ]*\).*/\1/g'`" ;
>changequote([, ])dnl
>else
>   ac_cv_happy_version="";
>fi;
>if expr "$ac_cv_happy_version" "<" 1.4 > /dev/null 2>&1; then
>   echo
>   echo "Happy version 1.4 or later is required to compile GHC."
>   exit 1               <====== THIS LINE ==============>   
>fi;
])


2)Delete the line "exit 1"....

3) run autoconf  ( autoconf ) under fptools


=================================


Otherwise, if you don't have autoconf avalaible, you can just edit the
configure script by hand... Search for the string
"Happy"  and delete the "exit 1" ...

================================
Once you have bootstraped ghc, you will be able to build Happy...
Mike Hogsett wrote: