	    ---------------------------------------------
	    CafeOBJ Interpreter Installation Instructions
	    ---------------------------------------------

============
Prerequisite
============
   CafeOBJ interpreter is built on Common Lisp, thus you need
some Common Lisp system to install CafeOBJ. CafeOBJ can be 
built on the following platforms:

  (1) SBCL version 1.1.7 (or later)     http://www.sbcl.org/
  (2) Allegro CL version 8.0 (or later) http://franz.com/
  (3) CLISP version 2.4.9 (or later)    http://www.clisp.org/

At least one of these needs to be installed in the users' PATH.

Considerations concering redestribution
---------------------------------------
Building the CafeOBJ interpreter with SBCL allows for 
redistribution without the need for SBCL being installed,
as the dump itself can be executed.

This is also possible with Allegro CL, but needs a specific
license obtainable from Franz.

With CLISP the interpreter has to be installed at the target
system.


========
BUILDING
========

Building is done in the usual way with running the following commands
in the source directory:

	./configure <arguments>
	make
	(sudo) make install

See below for possible configuration.

======================
1) configure arguments
======================

a) Selection of a lisp platform
-------------------------------

Selection of the Common Lisp platform to build the CafeOBJ interpreter
is done with the configure option
	--with-lisp
as in
	./configure --with-lisp="platform"[,"platform"]

You can specify a list of interpreters to be used to build CafeOBJ.
The wrapper provides the command line option --engine to select one
of the underlying interpreters.

"platform" should be one of the followings, and should provide
the following command line program name

     configure argument     program name        
	sbcl                   sbcl        -- SBCL
	acl                    alisp       -- Allegro CL
        clisp                  clisp       -- CLISP

You must have one of these command in your PATH environment.

-with-lisp="platform" can be omitted, in this case it selects the
first interpreter found by testing in the following order:
	acl, sbcl, clisp

Finally, one can use
	-with-lisp=all
which builds for all found Common Lisp platforms.

In case your interpreter is named different than the above, you
can override it with
	--with-sbcl=<sbcl-name>
	--with-acl=<acl-name>
	--with-clisp=<clisp-name>

Using the cafeobj command line argument
	--engine <engine>
one can select the engine at run time. By default the one first listed
in the configure call will be used.


b) Installation location
------------------------

Be default CafeOBJ is installed in GNU standard compliant directories,
that is
       $prefix/bin/    -- cafeobj - a shell script that invokes the
                          necessary programs to start the CafeOBJ interpreter.
      
       $prefix/lib/cafeobj-N.M/
                       -- dump files for the various lisp platforms
      
       $prefix/share/cafeobj-N.M/lib/
                       -- standard libraries, if you made cafeobj with
                          PigNose, fopl.mod will be put here.

       $prefix/share/cafeobj-N.M/prelude/
                       -- cafeobj standard prelude files.
 
       $prefix/share/doc/cafeobj/
                       -- documentation and example files

$prefix is by default /usr/local, but can be selected with
	--prefix=<PATH>
during the configure run.


There is also
	--enable-traditional-layout
which selects traditional layout of the files, which is
       $prefix/bin/    -- cafeobj - a shell script that invokes the
                          necessary programs to start the CafeOBJ interpreter.
      
       $prefix/cafeobj-N.M/bin/    
                       -- necessary programs to start the CafeOBJ interpreter.
			  and the dump files for the various lisp platforms
      
       $prefix/cafeobj-N.M/lib/
                       -- standard libraries, if you made cafeobj with
                          PigNose, fopl.mod will be put here.

       $prefix/cafeobj-N.M/prelude/
                       -- cafeobj standard prelude files.
 
       $prefix/cafeobj-N.M/doc/
                       -- documentation and example files



===========================
2) Building the interpreter
===========================

Try building the CafeOBJ by invoking

	make

This will make the needed CafeOBJ binaries within the
sub directories. If something fails for your system, and you want to
submit a bug report, you may wish to include your "config.status"
file, your host type, operating system and information about the
used Common Lisp interpreter including version number, make output,
and anything else you think will be helpful. 

=======================
3) Installing the files
=======================

Invoke

	make install

or, if you don't have permissions, maybe

	sudo make install

This will install CafeOBJ interpreter (cafeobj).


Staged installes are supported in two ways:
	make install DESTDIR=<path>
prefix all installations with $DESTDIR.

	make install prefix=<path>
will override the prefix set during initial configuration. Be warned
that in this case the cafeobj script might not find the dumps.


===========
4) Clean up
===========

(optional)

By invoking 

	make clean

generated files are removed, but configuration remains as is. If you
want to go back to a clean state  of pre-configuration, use

	make distclean


===========================
RANDOM NOTEX FOR DEVELOPERS
===========================

build system
------------
configure checks for each lisp interpretor on existence, and
exports `<NAME>_interp', `<NAME>_dump', and the list of requested 
in `lisp'.

configure generates the following files:
	Makefile		<- Makefile.in
	make-cafeobj.lisp	<- make-cafeobj.lisp.in
	xbin/cafeobj.in		<- xbin/cafeobj.in.in
	doc/Makefile.in		<- doc/Makefile
After that, xbin/cafeobj is created from the Makefile by a sed command.

other lisp interpreters
-----------------------
Although by default only acl, sbcl, clisp is checked and build for,
the following lisp implementations can also be used, but are
currently not supported. Builds will fail.
     configure argument     program name        
	cmu                    lisp        -- CMU-CL
	gcl                    gcl         -- GNU Common Lisp
        ccl                    ccl         -- openmcl
        ccl64                  ccl64       -- openmcl 64 bit

adding a lisp interpreter
-------------------------
Adding a new interpreter requires (at least) changes to the following
files (more or less symmetric to all the others):
- configure.ac
- Makefile.in
- xbin/cafeobj.in.in
- make-cafeobj.lisp.in

building for windows
--------------------
If Wine is installed, and within wine sbcl is installed, one can create
a dump for Windows with
	./configure --enable-windows
	make

  

-- EOF
