Automake/Autoconf
Alastair Reid
alastair@reid-consulting-uk.ltd.uk
Wed, 21 May 2003 22:57:35 +0100
On Wednesday 21 May 2003 10:04 pm, Alain Cremieux wrote:
> I would like to know if there exists some kind of template / sample to
> create a 'configure.in' for a Haskell library ?
One approach is to start with a tried and tested configure.in and cut out the
bits you don't need. Good examples to start from would be the ghc configure
script (fptools/configure.in plus fptools/aclocal.m4) or the Hugs configure
script (hugs98/src/unix/configure.in plus hugs98/src/unix/aclocal.m4).
I think a better approach is to start with a tried and tested configure.in and
keep the bits you don't need. It sounds odd to include all kinds of tests
you don't need but it makes it much easier to maintain because, for the most
part, you just have to copy over any updates from the master copy.
I am successfully using the latter approach to develop some (hopefully
reusable) library infrastructure out of the GHC infrastructure (i.e., both
the configure scripts and the makefiles). Thanks to Simon Marlow's help and
willingness to make some changes to the ghc scripts, this is going pretty
well at the moment. I have to do a bit more tweaking of the infrastructure
and some more testing before I commit all my changes but I could give you
what I have so far. [I also have to tweak the ghc infrastructure to support
building with nhc and with Hugs. I haven't started on that yet.]
--
Alastair Reid