Installation instructions for SML/NJ
------------------------------------

This version of SML/NJ uses a "one stop shopping" installation script.
Eventually, this will be replaced with a configuration tool that will
provide more flexibility in the installation options and support for
non UNIX platforms.

Once you have retrieved the distribution files, do the following
steps:

1) create a root directory for the installation (e.g., /usr/local/sml).

2) put the compressed tar files that make up the distribution in the
   root directory.  In addition to the tar files for the various sources,
   you also need the pre-compiled binary files for the compiler.  These
   files are:

    109-bin.alpha32.tar.Z	-- for DEC Alpha processors
    109-bin.hppa.tar.Z		-- for HPPA processors
    109-bin.mipseb.tar.Z	-- for big-endian MIPS processors
    109-bin.rs6000.tar.Z	-- for IBM Power processors
    109-bin.sparc.tar.Z		-- for SPARC processors
    109-bin.x86.tar.Z		-- for Intel i386, i486 and Pentium processors.

   In addition, you need the source code for the run-time system, which is
   in the file 109-runtime.tar.Z.

3) unpack the configuration bundle in the root directory

    % cd /usr/local/sml
    % zcat 109-config.tar.Z | tar -xf -

   this will create a directory /usr/local/sml/config.

4) edit the file config/targets, commenting out any targets that
   you do not want to install.  The default is to install the following
   list (given with the corresponding distribution file):

    Target		Distribution file
    ------		-----------------
    sml-cm		109-cm.tar.Z
    smlnj-lib		109-smlnj-lib.tar.Z
    ml-yacc		109-ml-yacc.tar.Z
    ml-lex		109-ml-lex.tar.Z
    ml-burg		109-ml-burg.tar.Z
    doc			109-doc.tar.Z
 
5) run the installation script while in the root directory:

    % config/install.sh

6) if you have multiple hardware/operating system platforms sharing the
   same file system, you can repeat steps 4&5 for each platform.

The installation process creates the following directory tree rooted
at the installation directory (call it ROOT):

  ROOT/config		- the configuration tools
  ROOT/bin		- shell scripts for running sml and the tools
  ROOT/bin/.run		- contains the runtime systems
  ROOT/bin/.heap	- contains the heap images
  ROOT/lib		- SC sources files for the various libraries
  ROOT/src		- the source code; installing libraries also leaves
			  the precompiled library code in this subtree.

POTENTIAL PROBLEMS

The most likely problem is in compiling the runtime system.  You may
need to edit the architecture/operating system specific makefile.  You
can find these files in the directory "ROOT/src/runtime/objs".  They
are named mk.<arch>-<opsys> (e.g., mk.sparc-sunos, mk.mipseb-irix5).
They are currently set up to use the vendor compiler on the mips, and
alpha, and to use gcc on the sparc, rs6000 and x86.

The install shell script checks to see if your system has Korn shell
(ksh); if so, it uses that for the shell in the shell scripts (ksh is
faster than /bin/sh).  If you are installing your system on multiple
platforms, where some have ksh and some do not, then install the
system on a platform that does not have ksh first.

