$Id: INSTALL,v 1.13 1995/05/26 09:30:26 coleman Exp coleman $

Configuring Zsh
---------------
Check the file MACHINES in the subdirectory Etc to see the architectures
that zsh is known to compile on, as well as any special instructions
for your particular architecture.  Most will not require any special
instructions.

To configure zsh, from the top level directory, do the command:
    ./configure                 # check below for possible options

Configure accepts several options (explained below).  To display
currently available options, do the command:
    ./configure --help

By default, configure will use the "gcc" compiler if found.  If you
wish to use a different compiler, or need to add unusual options for
compiling or linking that the "configure" script does not know about,
you can give "configure" initial values for variables by setting them in
the environment.  Using a Bourne-compatible shell (such as sh,ksh,zsh),
you can do that on the command line like this:
    CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure

Or on systems that have the "env" program, you can do it like this:
    env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure

Configure will probe your system and create a "config.h" header
file and various Makefiles.  Look over the #define's in config.h.
In particular, you should examine the user configuration section and
the values (determined by configure) of HOSTTYPE, OSTYPE, MACHTYPE, and
VENDOR to make sure they are correct.

Compiling Zsh
-------------
After configuring, to build zsh, do:
    make

Installing Zsh
--------------
If no make/compilation errors occur, then to install the zsh binary, do
the command:
    make install.bin

Any previous copy of zsh will be renamed "zsh.old"
                   
To install the zsh man page, do the command:
    make install.man

To install the zsh info files, do the command:
    make install.info

Or alternatively, you can install all the above with the command:
    make install

"make install.info" will only move the info files into the info directory.
You will have to edit the topmost node of the info tree "dir" manually
in order to have the zsh info files available to your info reader.

Building Zsh On Additional Architectures
----------------------------------------
To build zsh on additional architectures, you can do a "make distclean".
This should restore the zsh source distribution back to its original
state.  You can then configure zsh as above on other architectures in
which you wish to build zsh.  Or alternatively, you can use a different
build directory for each architecture.

Using A Different Build Directory
---------------------------------
You can compile the zsh in a different directory from the one containing
the source code.  Doing so allows you to compile it on more than one
architecture at the same time.  To do this, you must use a version of
"make" that supports the "VPATH" variable, such as GNU "make".  "cd" to
the directory where you want the object files and executables to go and
run the "configure" script.  "configure" automatically checks for the
source code in the directory that "configure" is in.  For example,

    cd /usr/local/work
    /usr/local/src/zsh-2.7/configure
    make

Memory Routines
-------------------------
Included in this release are alternate malloc and associated functions
which reduce memory usage on some systems. To use these, add the following
options to "configure",

 --enable-zsh-mem           # use zsh's memory allocators
 --enable-zsh-mem-debug     # debug zsh's memory allocators
 --enable-zsh-mem-warning   # turn on warnings of memory allocation errors
 --enable-zsh-secure-free   # turn on memory checking of free()

You should check Etc/MACHINES to find recommendations about using these
on certain architectures.

Options For Configure
---------------------
The "configure" program accepts the following options.  To get the
complete list of configure options, run "./configure --help".

Configuration:
  --cache-file=FILE      # cache test results in FILE
  --help                 # print a help message
  --version              # print the version of autoconf that create configure
  --quiet, --silent      # do not print `checking...' messages
  --no-create            # do not create output files

Directory and file name:
  --prefix=PREFIX        # install host independent files in PREFIX [/usr/local]
  --exec-prefix=PREFIX   # install host dependent files in PREFIX [same as prefix]
  --srcdir=DIR           # find the sources in DIR [configure dir or ..]

Features:
  --enable-FEATURE       # enable use of this feature
  --disable-FEATURE      # disable use of this feature

     The FEATURES currently supported are:
     zsh-mem             # use zsh's memory allocators
     zsh-mem-debug       # debug zsh's memory allocators
     zsh-mem-warning     # turn on warnings of memory allocation errors
     zsh-secure-free     # turn on memory checking of free()

