\section{Requirements}

Your basic needs are a computer running Windows, Linux or MacOSX and a
supported Lisp implimentation.  Currently on Linux Maxima will build on CMUCL (18e 
recommended), GCL (2.5.0 or greater) and CLisp (2.29, 2.31 or greater - 2.30 won't work
properly).  On Windows builds have been achieved with Clisp and GCL - GCL is used
in the standard binary.  On MacOSX Maxima is compiled using OpenMCL. Note that Lisp choice 
is not an either/or situation - if you have
multiple lisp implimentations available you can build on all of them and
select at runtime which Lisp you would like to use.  While it is possible
to build your own Windows or Mac OS X binary, it is quite difficult to do
so (especially on Windows) and unless there is a real need we recommend you
use the provided binaries for those platforms.  For Windows a Wizard based install
has been created using InnoSetup which should look and feel very familiar to most
Windows users.  On MacOSX you need to use either the DarwinPorts? or Other way?
tools to download the binaries.

\section{Source Based Installation on Linux}

Note:  we assume here that your machine has development libraries and tools
installed.  If you get file/feature not found failures during configure it 
is probably because your distribution doesn't have the development libraries
and tools you need installed.

\index{Compiling!Linux}

\subsection{Configure}

(Note - this discussion assumes you are using Maxima 5.9.0 or greater to
build with.  Older versions have a terrible build system and are no longer]
supported.)

Your first task (assuming you are in the top level directory of the maxima
source file hierchy) is to determine which version(s) of Lisp you intend to
build on.  If you are building with multiple Lisps, you should specify which
one you want to be your default Lisp (the Lisp Maxima will run with if you do
not tell it otherwise.)

In the example below, options are given to enable building on all three Lisps
supported by Maxima 5.9.0.  The default Lisp of CLisp is selected.
\index{Compiling!Linux!CMUCl}\index{Compiling!Linux!GCL}\index{Compiling!Linux!Clisp}

\vspace{3ex}


\texttt{./configure --enable-gcl --enable-cmucl --enable-clisp }

\texttt{--with-default-lisp=clisp}

\vspace{3ex}


You should see some output scroll by and then a summary similar to the 
following:

\vspace{3ex}%

Summary:

clisp enabled. Executable name: "clisp"

CMUCL enabled. Executable name: "lisp"

GCL enabled. Executable name: "gcl"

default lisp: clisp

wish executable name: "wish"

\vspace{3ex}%

The wish executable is related to Tcl/Tk used for the Xmaxima gui.  If you 
encounter a case where a Lisp executable name is not found or you wish to
use a different version of a particular lisp, you can specify the location
of the executible you wish to use.  For example, if you have a different 
copy of CMUCL you wish to use with an executable name of cmulisp instead of
lisp, you can specify that with the following:


\vspace{3ex}

\texttt{./configure --enable-gcl --enable-cmucl --enable-clisp}

\texttt{--with-cmucl=/usr/local/bin/cmulisp --with-default-lisp=clisp}

\vspace{3ex}

Summary:

clisp enabled. Executable name: "clisp"

CMUCL enabled. Executable name: "\texttt{/usr/local/bin/cmulisp}"

GCL enabled. Executable name: "gcl"

default lisp: clisp

wish executable name: "wish"

\vspace{3ex}


There are other options available for configure, but these should be enough
to get you started on a standard Linux system.  If you need more options, check
the output from

\vspace{3ex}

\texttt{./configure --help}

\subsection{Make}

Once you have configured the program to your satisfaction, simply type make.
You will see a very long series of outputs as Maxima is compiled on each Lisp
platform you have selected.  This is a long process even on fairly fast 
machines.

Once this process is done, you should run make check.  This will run each build
of Maxima through a series of mathematical tests to ensure your Maxima build
succeeded.  You will see something similar to the following, depending on
which Lisp(s) you compiled with. (Plus some make
related output about checking directories for tasks which doesn't matter):

\vspace{3ex}

\texttt{make[1]: Entering directory `/home/user/maxima/tests'}

\texttt{echo "Running test suite with clisp..."; \ }

\vspace{2ex}

\texttt{/bin/sh ../maxima-local --lisp=clisp --batch-lisp=tests.lisp > tests-clisp.log <}

\texttt{ /dev/null 2>\&1; \ }

\texttt{./summarize-log tests-clisp.log}

\texttt{Running test suite with clisp...}

\vspace{2ex}

\texttt{*** Summary results for tests recorded in}

\texttt{*** log file tests-clisp.log:}

\texttt{Error summary:}

\texttt{Error(s) found in rtest15.mac: (4)}

\vspace{2ex}

\texttt{Expected failures (known bugs in this version of Maxima):}

\texttt{rtest15.mac: (4)}

\vspace{2ex}

\texttt{Timing:}

\texttt{Real time: 9.218797 sec.}

\texttt{Run time: 9.01 sec.}

\texttt{GC: 60, GC time: 0.64 sec.}

\texttt{*** end of summary for tests-clisp.log}

\vspace{2ex}

\texttt{echo "Running test suite with cmucl..."; \ }

\texttt{/bin/sh ../maxima-local --lisp=cmucl --batch-lisp=tests.lisp > tests-cmucl.log < }

\texttt{ /dev/null 2>\&1; \ }
 
\texttt{./summarize-log tests-cmucl.log}

\texttt{Running test suite with cmucl...}

\vspace{2ex}

\texttt{*** Summary results for tests recorded in}

\texttt{*** log file tests-cmucl.log:}

\texttt{Error summary:}

\texttt{Error(s) found in rtest15.mac: (4)}

\vspace{2ex}

\texttt{Expected failures (known bugs in this version of Maxima):}

\texttt{rtest15.mac: (4)}

\vspace{2ex}

\texttt{Timing:}

\texttt{;   3.91f0 seconds of real time}

\texttt{;   3.34f0 seconds of user run time}

\texttt{;   0.49f0 seconds of system run time}

\texttt{;   [Run times include 0.21f0 seconds GC run time]}

\texttt{*** end of summary for tests-cmucl.log}

\vspace{2ex}

\texttt{echo "Running test suite with gcl..."; \ }

\texttt{/bin/sh ../maxima-local --lisp=gcl --batch-lisp=tests.lisp > tests-gcl.log < /de}

\texttt{v/null 2>\&1; \ }

\texttt{./summarize-log tests-gcl.log}

\texttt{Running test suite with gcl...}

\vspace{2ex}

\texttt{*** Summary results for tests recorded in}

\texttt{*** log file tests-gcl.log:}

\texttt{Error summary:}

\texttt{Error(s) found in rtest15.mac: (4)}

\vspace{2ex}

\texttt{Expected failures (known bugs in this version of Maxima):}

\texttt{rtest15.mac: (4)}

\vspace{2ex}

\texttt{Timing:}

\texttt{real time : 8.690 secs}

\texttt{run time  : 7.160 secs}

\texttt{*** end of summary for tests-gcl.log}


\vspace{3ex}

If all these tests are passed and the number of expected
failures is the same as the number of known failures,
everything has tested out correctly and you can proceed to the
install, which is simply the standard make install.  Getting
advanced features like the Emacs modes to work may require a
little extra work - see the documentation on those specific
modes for details about making them work.

\section{Source Based Installation on Windows}

Someone want to write this one up?  I am most definitely not qualified.

\section{Source Based Installation on MacOSX}

Someone who has done it?
