\title{Appendix A : Installation Guide for the UNIX Versions}

1) To print the users' manual, type ``make manual'' in the main directory
   or ``make'' in the tex subdirectory.
   This will create a file users.dvi containing the manual and a table of
   contents, and a separate index.dvi containing the index. You must
   then send the two .dvi files to your favorite printer in the usual way.
\smallskip
2) To compile the library and the calculator (gp).

\indent
   a) Choose the Makefile appropriate to your system. Choose Makefile.sun3 if
      your machine is 68020/68030/68040 based. In that case, you must also
      choose which assembly file to use (see 8) below).
      Choose Makefile.sun4 if your machine is Sparc based.
      For any other machine, use Makefile.port. On DECstations, for example, a
      few extra modifications are necessary.

\indent
   b) If you have the GNU gcc compiler installed (we recommend that you do), 
      then replace in the Makefile CC=cc by CC=gcc, add the flag -g in the 
      CFLAGS if you know how to use dbx or gdb and want to debug PARI yourself,
      and add the flag -traditional in the compilation options of plot.o.

\indent
   c) If you are not running under suntools or X11, change in the Makefile
      plot.sun to plot.null. If you are using the X11 window system, 
      change plot.sun (or plot.null in the port version) to plot.X.
      Some slight modifications may have to be made so that the compiler knows
      where to access the X11 libraries.

\indent
   d) If you have the GNU readline library installed (distributed with gdb),
      replace gp.c by gpreadline.c, i.e. mv gp.c gpold.c; mv gpreadline.c gp.c.
      Then in the Makefile add -lreadline -ltermcap to the list of libraries
      in the compilation line for gp.
      Note: if you are compiling with sunview (-lsuntool -lsunwindow -lpixrect)
      you will have an error message about a redefined function {\tt rl\_copy}.
      Since the sun source code is not available, the way out is to recompile
      the GNU readline library by changing in the file readline.c
      {\tt rl\_copy} to some weird name, say {\tt rl\_copy\_kludge}.
      The use of the readline and history library (suggested to me by E. Roeder)
      is not yet documented but is similar to emacs commands. However note that
      it is incompatible with SUN commandtools (but not with shelltools).

\indent
   e) Then simply type ``make'' in the distribution directory. Be sure to 
      ``make clean'' before changing to another architecture using the same
      file system. Note that the non 68020 versions are slower, especially
      the ``port'' version.

\indent
   f) To test the executable, run gp on the file {\tt testin} as follows:
      {\tt gp$<$testin$>$fileout \&}. Then do a {\tt diff} with the file 
      {\tt testout}. If any
      difference occurs other than the heading (version number and type),
      this means something is wrong. Most probably with your installation
      procedure, but it may be a bug in the system, in which case we would
      appreciate a report. Note that testin is not a severe test and is
      quite fast (a few minutes), but does check at least one instance of
      every function.

\smallskip
3) To install the PARI library so that it can be easily used from a user
   program, create the directory /usr/include/pari-include, and type
   "make install". This puts the executable gp in /usr/local/bin, the library 
   in the directory /usr/local/lib, and the necessary include files in 
   /usr/include/pari-include. If these directories do not suit your
   installation, change the LIBDIR or the INCLUDEDIR in the Makefile. 
\smallskip
4) Once installed, to link to the PARI library just add -lpari in your
   link command. A sample makefile (Makesimple) is given for gp itself.
   All modifications made to the Makefile should of course be made on the
   Makesimple file.
\smallskip
5) If you want to use gp under gnuemacs (see section 3.10 of the users' manual)
   change the pathnames in the file pari.el to suit your installation, and read
   the file pari.txt.
\smallskip
6) If you want to get rid of your .o files and the created binaries in the
   working directory, type ``make clean''.
\smallskip
7) For the example of section 4.3 of the user's manual, type make
   in the directory example.
\smallskip
8) The syntax used by the SUN 3 assembler is not standard. On the MacII 
   distribution, the correct Mac assembler syntax is given. In the present
   distribution, in addition to mp.s which has the SUN 3 syntax, two files
   called mp.news and mp.ami are included so as to help people having machines
   with a 680x0 processor ($x>=2$) but a more standard syntax.

   This may not correspond to the actual syntax used, but may be closer than 
   mp.s.
   In principle, apart from whitespace and the different syntax, the semantics
   of the two files should be identical. In case of conflict, correct 
   mp.news or mp.ami (i.e. NEVER touch mp.s).

   The file mp.news has been successfully tested on a Sony NEWS, and the file
   mp.ami on a Commodore amiga 2500 running Lattice C 5.10.
\smallskip
9) Send bugs, comments, etc\dots to:\smallskip
\centerline{ pari@mizar.greco-prog.fr }
\smallskip
10) Good luck!   



\vfill\eject
