It follows a brief discussion of the installation from source. There is,
however, a file INSTALL in the source distribution, which is more
frequently updated and should be consulted in any case.
The master site of C->Haskell is at http://www.cse.unsw.edu.au/~chak/haskell/c2hs/. It has all the latest information and sources. Furthermore, it explains how to get anonymous CVS access to C->Haskell's repository and may have pre-compiled binaries for easier installation.
You need a Haskell system supported by C->Haskell. Currently this is only
the Glasgow Haskell Compiler (GHC), which you can obtain from
http://haskell.org/ghc/. You need a fairly recent version of the
Haskell compiler. C->Haskell uses a compiler support library called the
Compiler Toolkit. In the main distribution, the Compiler Toolkit is
already contained in the source tar ball -- be sure to download a file named
c2hs-x.y.z.tar.gz, were
x.y.z is the version number of the package.
To build the documentation, you will also need the SGML Tools, which you find at your nearest sunsite or Linux mirror or at ftp://ftp.lip6.fr/pub/sgml-tools/. On an up-to-date Linux system, the tools are probably already installed.
The short answer is
% gzip -cd c2hs.X.Y.Z.tar.gz | tar xvf - # unpack the sources
% cd c2hs.X.Y.Z # change to the toplevel directory
% ./configure # run the `configure' script
% make # build everything
[ Become root if necessary ]
% make install # install the tool
In the INSTALL file, there are more details.
Optionally, you can build the documentation by issuing make doc.
If you are using GHC, you may want to register C->Haskell's support
libraries as a package. This can be achieved in two ways. Firstly, if you
pass the option --enable-add-package to configure, the build system
will register the package for you when you execute make install.
Alternatively, the configuration oracle c2hs-conf, which is installed as
part of the C->Haskell distribution, produces a package configuration
suitable for the package tool ghc-pkg when given the option
--package-conf. In short, you can register the libraries after
installation by invoking
c2hs-conf --package-conf | ghc-pkg --add-package