Prerequisites							     -*-text-*-
~~~~~~~~~~~~~

You need a Haskell 98 compiler.  Currently, this has to be GHC 4.08 upwards or
NHC98 1.0.  To get a Haskell compiler check

  http://haskell.org/

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
  % ./configure				   # run the `configure' script
  % make				   # build everything
  [ Become root if necessary ]
  % make install			   # install all compilers

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

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

The 'configure' script can be given a number of options to enable
and disable various features. For a complete list, type:

  ./configure --help

A few of the more important ones:

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

*  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                           [ Defaults to the value given to --prefix ]

*  --enable-prof           enable profiling support

*  --enable-add-package    resgister any generated libraries as a package with
			   the Haskell compiler (currently, a GHC only feature)

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

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

*  --with-hcflags=HCFLAGS  specify flags for the Haskell compiler

*  --with-ghc-native	   use GHC native code generator (if available)

This option works for hardware for which GHC supports native code generation.

*  --with-efence           link with efence malloc debugger

This option is only meant for debugging.  It reduces the efficiency of the
generated code substantially.


Documentation of the Compiler Toolkit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A slightly outdated description of the Compiler Toolkit and the build process
is contained in `doc/base/base.tex'.


Supported Systems and Porting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Glasgow Haskell Compilation System, Version 4.08 upwards

All (compilation) system-dependent code is contained in `base/sysdep/', ie, by
porting the `SysDep' module, other systems should also work.  In case of
problems, contact <chak@cse.unsw.edu.au>.

Restrictions
~~~~~~~~~~~~
Currently, none.

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

  % autoreconf

in the toplevel hipar/ directory before following with the instructions
above.

Solaris Notes
~~~~~~~~~~~~~
* The standard Solaris `grep' does not understand the `-e' option; please use
  `/usr/xpg4/bin/grep'.

* gmake 3.77 does not work properly; please use 3.78.1 or higher.

Win32 Notes
~~~~~~~~~~~
The building process uses a tool called `lndir' to construct a build tree from
the source tree.  Unfortunately, there a different versions of this tool,
which work in slightly different ways.  It seems that the version of `lndir'
that is available from the X11-for-Cygwin site works best.
