--without-happy

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


--=-0tCOp176+Bi1y+nYevzb
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
found.

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


--=-0tCOp176+Bi1y+nYevzb
Content-Description: 
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=
ION=3D$with_glut_xlib"
=20
=20
+dnl ** Disable the check for Happy (for source builds)
+dnl --------------------------------------------------------------
+AC_ARG_WITH(happy,
+[  --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).
+])
+
=20
=20
 dnl --------------------------------------------------------------
@@ -613,8 +623,9 @@
=20
 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
-FPTOOLS_HAPPY
+dnl    (also don't if --without-happy was given.)
+if test "$BootingFromHc" =3D "NO" && test x$with_happy !=3D xno; then
+  FPTOOLS_HAPPY
 fi;
=20
 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-=
utils
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

--=-0tCOp176+Bi1y+nYevzb--