C->Haskell Installation Instructions -*-text-*- ------------------------------------ Prerequisites ~~~~~~~~~~~~~ You need a Haskell 98 compiler. Currently, this has to be GHC 6.2 upwards, which you can get from http://haskell.org/ghc Moreover, you need to have at least version 1.2 of the Haskell packaging system Cabal installed. Simple install procedure ~~~~~~~~~~~~~~~~~~~~~~~~ % tar -xzf .tar.gz # unpack the sources % cd # change to the toplevel directory % runghc Setup.hs configure # configure the build system % runghc Setup.hs build # build everything [ Become root if necessary ] % runghc 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 -C doc Currently there is no support for installing the documentation. That step has to be done manually. The generated html pages for the user guide live in: docs/user_guide/* The man page is: docs/man1/c2hs.1 Supported Systems and Porting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tested with Glasgow Haskell Compiler, Version 6.4.2, 6.6.1 and 6.8.1. In principle it should work with any 6.x version since 6.2. The actual c2hs sources might also compile with nhc98, but Cabal doesn't fully support nhc98 yet.