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
         sun386   (Sun386i)
         i386     (any other 386 machine, e.g. Linux boxes)
         i486     (any other 486 machine)
         mips
         atari    (ATARI ST microcomputers)
         amiga    (Amiga 500/1000/2000 microcomputers)
         dos      (PC or compatible running DOS)
         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. Configure and build the readline library:

         cd readline

   If you have GNU configure, then type

         configure HOST

   where HOST identifies your machine and OS. Else
   make a symbolic link for sysdep.h and edit Makefile by hand. Then

         cd ..

         make libreadline.a

   (If that doesn't work because your C compiler is too pedantic about
   non-ANSI C source, you may try to call it in non-ANSI mode: insert a line
   like "CC = cc" or "CC = gcc -traditional" in readline/Makefile, then
         cd readline ; make ; cd ..
   should work.)

6. 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.

7. Type

         make

   to build CLISP.
   You may alternatively do this in six steps:
         make init                prepares all symbolic links and utilities
         make allc                makes all *.c files
         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 fifth 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.

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

         make test

   Check whether CLISP passes the test suite:

         make testsuite

9. 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.

10. The last thing to do:

         cd ..


Authors:
--------

        Bruno Haible                    Michael Stoll
        Augartenstrae 40               Gallierweg 39
    D - W 7500 Karlsruhe 1          D - W 5300 Bonn 1
        Germany                         Germany

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

