Hat Logo

Configuring hat


The automatic configuration and installation utility, called configure, should always be used to prepare for building and installing hat. Unlike many configuration utilities, this one can be run safely at any time to change any options - it will never leave your system in an inconsistent state.

You can choose your own configuration options, but the default behaviour is to prepare to build the components of hat under the targets directory, and to install those components under /usr/local, in the subdirectories bin (for scripts), lib/hat (for executables and libraries), include/hat (for Hat interface files), and man/man1 for man pages.

Your machine/operating-system is detected and used during building and installation to ensure that object files and executables from different architectures do not interfere with each other. We search for an existing installation of a Haskell compiler, and hmake, and configure the build system to use them. We also guess which compiler you will use to build hat - in order of preference: ghc, then nhc98.

A note about C compilers: If you do not have gcc as the name of your C compiler (e.g. on MacOS X ≤10.2 , gcc is called cc), then you need to set the CC environment variable with the real name of the compiler at configuration time. For instance:

    CC=cc  ./configure --buildwith=...

configure has many options to override the default build and installation behaviours. The options fall into three categories, but they may appear in any order on the command-line. The first group of options controls what task configure will do. You can only choose one of these - if you choose more than one, only the final one will take effect. The other two groups of options are cached and re-used in later invocations of configure, but you can always override them on the current commandline.

-h
--help
Give a brief explanation of all the options. Do not save any configuration settings.
-v
--version
Report package versions. Do not save any configuration settings.
--config
Set and report configuration options. [This is the default behaviour if no other option from the first group is chosen.]
--install
Install selected components now (scripts, executables, libraries, interface files, man pages, html documents etc.). This option should not normally be used - use make install instead. However for information, it copies the selected components to their final directory locations (you must have permission to write into those directories). Don't forget, if you have previously run configure with any options set, the previous settings will be cached and used for this install - but you can override them now on the commandline if you wish.

The second and third group of options control the configuration process and are entirely orthogonal to each other. The second group configures some general settings.

--buildwith=comp
Build hat using the named compiler (to override the config script's guess). Possible values are ghc or nhc98.
--buildopts=opts
Give opts to the build compiler (for instance, to force ghc to do optimisation you might add -O).
--builddir=dir
Use the given base directory for intermediate object files instead of the default ./targets. This is useful if you have disk quotas and need to put object files on a separate temporary disk.
--installdir=rootdir
--prefix=rootdir
Use the given directory as the installation root instead of the default /usr/local.
--bindir=dir
Use the given directory for installing scripts instead of the default directory, bin under the installation root.
--libdir=dir
Use the given directory for installing executables and libraries instead of the default directory, lib/hat under the installation root.
--incdir=dir
Use the given directory for installing interface and include files instead of the default directory, include/hat under the installation root.
--mandir=dir
Use the given directory for installing manual pages instead of the default directory, man/man1 under the installation root.
--docdir=dir
Use the given directory for installing the html documentation instead of the default directory, /usr/doc/hat.

Finally, the third group of options allows you to select which components of the package you wish to install. They can be useful when installing the same software for many architectures on a heterogeneous network, if you don't want to continually re-install shared components such as man pages. As another example, you may want to update just the scripts from a new beta release, without re-installing the executables.

[+/-]lib
Do (or don't) install the executables and library files (default is +).
[+/-]inc
Do (or don't) install the include and interface files (default is +).
[+/-]bin
Do (or don't) install the scripts (default is +).
[+/-]man
Do (or don't) install the man pages (default is +).
[+/-]docs
Do (or don't) install the html documents (default is -).

The latest updates to these pages are available on the WWW from http://www.haskell.org/hat/
http://www.cs.york.ac.uk/fp/hat/

This page last modified: 15th August 2002
York Functional Programming Group