Configuring nhc13


The automatic configuration and installation utility, called nhc13config, should always be used to prepare for building or installing nhc13. You can choose your own configuration options, but the default behaviour is to prepare to build the components of nhc13 under the targets directory, and to install those components under /usr/local, in the subdirectories bin (for scripts), lib/nhc13 (for executables and libraries), include/nhc13 (for interface and include files), and man/man1 for man pages.

The endian-ness of your machine is detected automatically during configuration. 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.

nhc13config 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 nhc13config 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 nhc13config, 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 version. Do not save any configuration settings.
--configonly
Set and report configuration options only. Do not prepare for building at this stage, and do not install anything. This option is very useful for testing how configuration settings operate and examining whether you have got the settings correct before proceeding.
--build
Prepare for building and later installation, but do not install files yet. This is the default behaviour if no other option from the first group is chosen. Various files and directories are created in the build tree: object and lib directories for this machine; some temporary scripts for the compiler.
--install
Install selected components now (scripts, executables, libraries, interface files, man pages, html documents etc.). This option should be used when installing from a binary package, or after building from sources. 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 nhc13config 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.

-Hnum
--heap=num
Set the default heapsize for programs compiled by nhc13. (Users can still control heapsize from the commandline, this option just configures the default.) num may be expressed as a simple integer, or with suffixes K or M, and may be followed by units B (bytes) or W (words). Suffixes are case-insensitive, e.g. -H4mb. The default setting is for 400Kb of heap. You can use this option even when installing from a binary package.
[+/-]rts
When compiling programs with nhc13, options intended for the runtime system of the compiler (such as compilation heapsize) must be enclosed within +RTS -RTS delimiters. However, depending on how it is built, the underlying compiler proper, nhc13comp, may use a different syntax for these options. Hence, we configure the nhc13 script to know which syntax to use when calling nhc13comp. The default configuration is +rts, for nhc13comp built with itself. The alternative -rts is for nhc13comp built with hbc (this is usually required for pre-built binary packages).
--javadir=dir
Look for the Java language system in the given directory (the default is /usr/local/jdk1.1.3). This option is used only by the tracer.
--hbcdir=dir
Look for the hbc/LML compiler installation in the given directory (the default is /usr/local/lib/lmlc). This option is used only by hmake when attempting to compile user programs with hbc.
--ghcdir=dir
Look for the ghc compiler installation in the given directory (the default is /usr/local/lib/ghc). This option is used only by hmake when attempting to compile user programs with ghc.
--useversion=num
Install files compiled under the given O/S version as if it were the currently-running version. If your O/S version (reported by the uname command) does not exactly match that of a binary package (e.g. you might be running Linux kernel 2.0.33 but wish to install the 2.0.29 binary package), you can use this flag to fix it up. For example: --useversion=2.0.29
--useprocessor=id
Install files compiled on the given processor as if we had one. If your processor (reported by the uname command) does not exactly match that of a binary package (e.g. you might be using a i486 chip but wish to install the i586 binary package), you can use this flag to fix it up. For example: --useprocessor=i586
--builddir=dir
Use the given base directory for intermediate object files instead of the default ./targets.
--installdir=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/nhc13 under the installation root.
--incdir=dir
Use the given directory for installing interface and include files instead of the default directory, include/nhc13 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/nhc13.

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.cs.york.ac.uk/fp/nhc13/

1998.06.22
York Functional Programming Group
Malcolm.Wallace@cs.york.ac.uk