		     C->Haskell Installation Instructions	     -*-text-*-
		     ------------------------------------

Prerequisites
~~~~~~~~~~~~~

You need a Haskell 98 compiler.  Currently, this has to be GHC 6.0 upwards,
which you can get from

  http://haskell.org/ghc

Moreover, you need to have at least version 1.0.1 of the Haskell packaging
system Cabal installed.  

IMPORTANT NOTE: GHC 6.04 includes Cabal 1.0, which is NOT sufficient.  You
  need to install 1.0.1.  (Sorry, I couldn't avoid this.)

I am developing and testing under GNU/Linux.  If you intend to install on a
Solaris or Win32 machine, please see the information under the heading
"Solaris Notes" and "Win32 Notes", respectively.


Simple install procedure
~~~~~~~~~~~~~~~~~~~~~~~~

  % gzip -cd <package>.tar.gz | tar xvf -  # unpack the sources
  % cd <package>			   # change to the toplevel directory
  % ./Setup.hs configure		   # configure the build system
  % ./Setup.hs build			   # build everything
  [ Become root if necessary ]
  % ./Setup.hs install			   # install c2hs

If you are installing from darcs, please read the corresponding section below
first.


The Nitty-Gritty
~~~~~~~~~~~~~~~~

The './Setup.hs configure' command understands the following options:

*  --prefix=PREFIX         install architecture-independent files in PREFIX
                           [ Defaults to /usr/local ]

*  --with-compiler=HC      use Haskell compiler HC

This needs to be the full path to the compiler executable.

*  --with-happy=HAPPY      ditto for parser generator Happy

*  --with-alex=ALEX        ditto for lexer generator Alex

*  --user                  allow the use of packages from user database

*  --global                only allow packages from the global database


Documentation
~~~~~~~~~~~~~
Documentation can be formatted with

  % make doc

and be installed with

  # make install-doc


Supported Systems and Porting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tested with Glasgow Haskell Compilation System, Version 6.4, but should in
principle work with any 6.x version.  The actual c2hs sources might also
compile with nhc98, but Cabal currently doesn't fully support nhc98.


Additional Instructions for Building from Darcs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are building from darcs, you have to execute

  % autoconf
  % chmod +x Setup.hs

in the toplevel directory before following the build instructions above.


Solaris Notes
~~~~~~~~~~~~~
None.


Win32 Notes
~~~~~~~~~~~
You should be right as long has you have cygwin or something similar.
