Sven Moritz Hallberg pesco@gmx.de
22 Aug 2002 23:38:58 +0200

Content-Type: text/plain
Content-Transfer-Encoding: 7bit

One more thing:

The GHC source distribution contains the Happy-generated parsers. This
means that to build from a source tarball, Happy is not required.
Unfortunately the configure script checks for it and aborts if it's not

To counter the problem in the Gentoo ebuilds, I apply the attached patch
to the source. I think it would be a good idea to incorporate this or
something similar (ideally, configure should be able to detect the
prebuilt-parsers and skip the check).

Thanks for your time,
Sven Moritz

PS: The patch command should be
  patch -d /path/to/ghc-5.04/ -p 1 < without-happy-patch

Content-Disposition: inline; filename=without-happy-patch.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; charset=ISO-8859-1

diff -Nu ghc-5.02.3/configure.in ghc-5.02.3-patched/configure.in
--- ghc-5.02.3/configure.in	Mon Aug 20 15:15:04 2001
+++ ghc-5.02.3-patched/configure.in	Wed May 22 22:31:02 2002
@@ -478,6 +478,16 @@
 test -n "$with_glut_xlib" && CPPFLAGS=3D"$CPPFLAGS -DGLUT_XLIB_IMPLEMENTAT=
+dnl ** Disable the check for Happy (for source builds)
+dnl --------------------------------------------------------------
+[  --without-happy
+        Don't check for the Happy parser generator, assuming the
+        parsers are already built.
+        If you don't have Happy, use this for building from a source
+        distribution (it contains the parsers pre-built).
 dnl --------------------------------------------------------------
@@ -613,8 +623,9 @@
 dnl ** check for installed happy binary + version
 dnl    (don't do it if we're booting from .hc files though.)
-if test "$BootingFromHc" =3D "NO"; then
+dnl    (also don't if --without-happy was given.)
+if test "$BootingFromHc" =3D "NO" && test x$with_happy !=3D xno; then
 dnl --------------------------------------------------
Common subdirectories: ghc-5.02.3/distrib and ghc-5.02.3-patched/distrib
Common subdirectories: ghc-5.02.3/docs and ghc-5.02.3-patched/docs
Common subdirectories: ghc-5.02.3/ghc and ghc-5.02.3-patched/ghc
Common subdirectories: ghc-5.02.3/glafp-utils and ghc-5.02.3-patched/glafp-=
Common subdirectories: ghc-5.02.3/hslibs and ghc-5.02.3-patched/hslibs
Common subdirectories: ghc-5.02.3/mk and ghc-5.02.3-patched/mk