[Haskell-cafe] Creating a Haskell section in Autoconf Macro Archive
simons at cryp.to
Fri Aug 12 06:17:46 EDT 2005
I've been maintaining the site <http://autoconf-archive.cryp.to/>
for a while now, and I can't help but notice that there is no
Haskell section. I know that GHC comes with a lot of useful
Haskell-related Autoconf macros, so does Darcs, and so do a lot
of other projects too. Thus, I was wondering whether the
respective macro authors would be willing to submit their macros
to the archive for distribution, so that other software
developers around the world can find them, and re-use them.
To have a macro added to the archive, all you need to do is to
e-mail it to me in the proper mark-up format, so that the
software which generates the archive can extract the necessary
meta information and documentation.
I'll use one of David Roundy's macros as an example to show what
that looks like. Hope you don't mind, David. ;-) Here it is:
| dnl @synopsis AX_TRY_COMPILE_GHC(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
| dnl AX_TRY_COMPILE_GHC tries to compile and link the given
| dnl program using $GHC for the compiler, and $GHCFLAGS as
| dnl flags passed to the compiler.
| dnl @category Haskell
| dnl @author David Roundy <droundy at abridgegame.org>
| dnl @version 2005-08-12
| dnl @license AllPermissive
| cat << \EOF > conftest.hs
| -- [#]line __oline__ "configure"
| rm -f Main.hi Main.o
| if AC_TRY_COMMAND($GHC $GHCFLAGS -o conftest conftest.hs) && test -s conftest
| dnl Don't remove the temporary files here, so they can be examined.
| ifelse([$2], , :, [$2])
| echo "configure: failed program was:" >&AC_FD_CC
| cat conftest.hs >&AC_FD_CC
| echo "end of failed program." >&AC_FD_CC
| ifelse([$3], , , [ rm -f Main.hi Main.o
One of the more interesting keywords is @license, obviously. The
license recommended by the Free Software Foundation for Autoconf
macros is the all-permissive license, which reads like this:
| Copying and distribution of this file, with or without
| modification, are permitted in any medium without royalty
| provided the copyright notice and this notice are preserved.
Other valid choices are "GPL2", "GPLWithACException", and "BSD".
A more thorough description of the keywords is available on the
More information about the Haskell-Cafe