[nhc-bugs] confhc does not recognize ghc 5.*

Simon Marlow simonmar@microsoft.com
Mon, 29 Oct 2001 13:49:45 -0000

> Here is the essential part of the patch:
> -     GHCDIR=3D`grep '^libdir' ${whichGHC} | head -1 | sed=20
> 's/^libdir=3D.\(.*\)./\1/'`
> +     GHCDIR=3D`grep '^TOPDIROPT' ${whichGHC} | head -1 | sed=20
> 's/^TOPDIROPT=3D"*-B\([^";]*\).*/\1/'`
> However, this does not work on my (Slackware Linux) machine.  In the
> driver script for ghc-5.02, I see the following two lines:
>     libdir=3D'/usr/malcolm/local/lib/ghc-5.02'
>     TOPDIROPT=3D"-B$libdir";
> which means that the original confhc gives the correct path
> (/usr/malcolm/local/lib/ghc-5.02), but the patched confhc gives an
> incorrect path symbol ($libdir).
> Can someone at ghc central confirm whether this part of the ghc-5.02
> driver script differs, depending on package and platform?  And if so,
> what is the best way to detect which variation applies?

It differs depending on whether you installed GHC from a binary
distribution, via make install, or from an RPM.

I've just added the --print-libdir option to GHC, and I'll try to sneak
it into 5.02.1.