Installation on Unix:
---------------------

1. (Optional)
   Convert the sources to your local character set.
   They are distributed in ISO Latin-1 character set.
   See file unix/CONVERT for more information.

2. (Optional)
   Choose which C compiler to use for building CLISP.
   This is normally not necessary; if GNU C is available under the
   name "gcc", it will be used.

   For example, if you were wanting to use gcc in traditional mode, then
   type, if you are using csh:

         setenv CC "gcc -traditional"

   or if you are using bash or ksh:

         export CC="gcc -traditional"

   or if you are using sh:

         CC="gcc -traditional"
         export CC

3. Choose the name of a directory in which to build CLISP.
   (This allows you to build CLISP with different compilers on the same
   machine or for different architectures in the same filesystem, sharing
   the same source.)
   For example, depending on the chosen compiler, let's use with-gcc-trad.
   Then execute

         ./target with-gcc-trad

   This will prepare a directory with-gcc-trad/ and figure out many
   system and compiler dependent parameters needed by CLISP.

   (Note: Some `make's - for example the HP-UX make - have problems
   with symbolic links. You may avoid these by calling

         ./target

   without argument. Then CLISP will be built in the src/ directory
   itself.)

4. Go to this directory

         cd with-gcc-trad

   and build the makefile that controls compilation:

         ./makemake > makefile

   If you wish to compile the sources such that you may debug them,
   then type instead:

         ./makemake debug > makefile

   (You may also specify the target architecture and the compiler type
   explicitly. The syntax is
         ./makemake TARGET COMPILER [debug] > makefile
   where TARGET is one of
         sun3
         sun4
         i386     (any other 386 machine, e.g. Linux boxes or Sun386i)
         i486     (any other 486 machine)
         mips
         atari    (ATARI ST microcomputers)
         amiga    (Amiga 500/1000/2000 microcomputers)
         dos      (PC or compatible running DOS, using EMX)
         dosdjgpp (PC or compatible running DOS, using DJGPP)
         os2      (PC or compatible running OS/2 2.0)
   and COMPILER is one of
         gcc      (GNU C under the name gcc)
         ansi     (any other ANSI compliant cc)
         cc       (non-ANSI cc)
         oldcc    (old and primitive non-ANSI cc)
   You shouldn't need this syntax, however.)

5. Type

         make config.lsp

   and edit the contents of config.lsp appropriately for your site,
   especially the definitions of short-site-name and long-site-name.

   You may also choose to build the german version of CLISP by adding
   -DDEUTSCH to the line defining CFLAGS in the makefile.

   On Linux (0.99.11 or newer) or SunOS 4, you may also choose to enable
   support for immutable objects (checking that program text and quoted
   constants loaded from files are never destructively modified) by
   adding -DIMMUTABLE to the line defining CFLAGS in the makefile.

6. Type

         make

   to build CLISP.
   You may alternatively do this in seven steps:
         make init                prepares all symbolic links and utilities
         make allc                makes all *.c files
         make libreadline.a       makes the readline library
         make lisp.run            makes the executable
         make interpreted.mem     a memory image with everything uncompiled
         make compiled.mem        makes all *.fas files and
                                  a memory image with everything compiled
         make manual              makes the documentation
   The sixth step is the most time consuming: it takes an hour on a Sun4 and
   may take several hours on a slower machine.

   If something goes wrong, check and optionally modify the contents of
   the file unixconf.h and retry this step.

7. (Optionally)
   Two more tests for CLISP. Let the compiler (now compiled!) recompile itself:

         make test

   Check whether CLISP passes the test suite:

         make testsuite

8. Edit the `prefix' variable in the makefile, then type

         make install

   If `prefix' is /usr/local, then this will install the CLISP binaries
   into /usr/local/bin and /usr/local/lib (creating a directory
   /usr/local/lib/lisp) and the manual page into /usr/local/man/man1.
   You may need superuser privileges for this step when installing into
   public directories.

9. The last thing to do:

         cd ..


Authors:
--------

        Bruno Haible                    Michael Stoll
        Augartenstrae 40               Gallierweg 39
    D - 76137 Karlsruhe             D - 53117 Bonn
        Germany                         Germany

Email: haible@ma2s2.mathematik.uni-karlsruhe.de

