%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Installation}

This package must be installed in the `pkg' subdirectory of any of
the {\GAP} 4 root directories. We assume here that this is `/gap4/pkg'.

\begintt
cd /gap4/pkg
unzoo -x carat.zoo
\endtt

This creates a subdirectory `carat', the home directory of the present
interface package. {\CARAT} itself can be installed anywhere on your 
system. You only have to make sure {\GAP} finds the {\CARAT} binaries, 
by making a symbolic link from the `bin' subdirectory of `pkg/carat' to 
the `bin' subdirectory of {\CARAT} itself. In our example, we install 
{\CARAT} in `/gap4/pkg/carat' (the {\CARAT} tar file should already be 
there):

\begintt
cd /gap4/pkg/carat
zcat carat.1.2.tar.gz || tar xf -
ln -s carat/bin bin
cd carat
\endtt

This creates a subdirectory `/gap4/pkg/carat/carat', the {\CARAT} top level
directory. You have to edit the Makefile in that directory. In particular,
you have to set the variables TOPDIR (to `/gap4/pkg/carat/carat'), CC, and
CFLAGS (to your favourite set of compiler options). Then do 

\begintt
make
\endtt

If you build for more than one architecture, make sure to do a 
'make clean' in between.

Like any other {\GAP} 4 package, {\CARAT} is then loaded in {\GAP} with

\beginexample
gap> RequirePackage("carat");
true
\endexample

This package, together with {\CARAT} itself, takes some 60Mb of disk space,
or more, depending on the system. Some 33Mb is taken by the catalog
of Q-classes if integer matrix groups up to dimension 6. If you want
to avoid unpacking this catalog, you can create empty subdirectories

\begintt
cd /gap4/pkg/carat/carat
mkdir tables
mkdir tables/qcatalog
\endtt

before making {\CARAT}. If you want to unpack the catalog later, just
remove the empty directory `tables/qcatalog', and do

\begintt
make Qcatalog
\endtt


