%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%W  install.tex            GAP documentation                  Greg Gamble
%%
%H  $Id: install.tex,v 4.3 2002/02/28 17:46:27 gap Exp $
%%
%Y  Copyright (C) 2001, School of Math & Comp. Sci., St Andrews, Scotland
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Installing and Loading the Example Package}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Installing the Example Package}

To install the {\Example} package, unpack the archive file, which  should
have a name of form `example-<XXX>.zoo' for some version number <XXX>, by
typing

\){\kernttindent}unzoo -x example-<XXX>

in the `pkg' directory of your version of {\GAP}~4,  or  in  a  directory
named `pkg' (e.g.~in your home directory; see  Section~"ref:Installing  a
GAP Package in your home directory"). (The only essential difference with
installing {\Example} in a `pkg' directory different to the {\GAP}~4 home
directory is that one must start {\GAP} with  the  `-l'  switch,  e.g.~if
your private `pkg' directory is a subdirectory of `mygap'  in  your  home
directory you might type:

%begintt
\){\kernttindent}gap -l ";<myhomedir>/mygap"
%endtt

where <myhomedir> is the path  to  your  home  directory,  which  may  be
replaced by a tilde in {\GAP}~4.3 or later. The  empty  path  before  the
semicolon is  filled  in  by  the  default  path  of  the  {\GAP}~4  home
directory.)

After unpacking the archive, go to the newly created `example'  directory
and call `./configure <path>' where <path> is the path to the {\GAP} home
directory. So for example if you install the package in  the  main  `pkg'
directory call

\begintt
./configure ../..
\endtt

This will fetch the architecture type for which {\GAP} has been  compiled
last and create a `Makefile'. Now simply call

\begintt
make
\endtt

to compile the binary and to install it in the appropriate place.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Loading the Example Package}

To use the {\Example} Package you have to request it explicitly. This  is
done by calling

\beginexample
gap> RequirePackage("example");

           The Example package
               Version 1.2    
            by Werner Nickel 

     For help, type: ?Example package

true
\endexample

The `RequirePackage' command is described in Section~"ref:RequirePackage"
in the {\GAP} Reference Manual.

If {\GAP} cannot find a working binary, the call to `RequirePackage' will
still succeed but a warning is issued informing that  the  `HelloWorld()'
function will be unavailable.

\index{banner!suppression}
The banner is suppressed if the global {\GAP} variable `QUIET' is  `true'
or `BANNER' is `false' (these conditions occur if {\GAP} is invoked  with
the `-q' or `-b' command line switches, respectively).  If  you  want  to
load the {\Example} package by default, you can put the  `RequirePackage'
command into your `.gaprc' file (see Section~"ref:The .gaprc file" in the
{\GAP} Reference Manual).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%E
