The general documentation is in book/pari.inf, as well as in the supplied
.tex and .1 files.

As usual, the subdirectories should go into a directory mentioned in the
following environment variables:

 book			BOOKSHELF
 dll			LIBPATH
 bin			PATH
 help			HELP

If you want manpages, then

 man			MANPATH

If you are going to compile extensions with gcc, then:

 include		C_INCLUDE_PATH
 lib			LIBRARY_PATH

Some samples from ./misc and ./examples may be installed in your HOME
directory.  If you want to install Galois theory data (you need to
download it from PARI site), put the directory in PARI_DATA_DIR variable.

GPRC is another variable looked at by GP/PARI (see the docs).  GNUPLOT
variable may be used as a directory to find the executable for PM display
driver (see below).  If you want X11 display, get gplt_x11.exe from gnuplot
distributions.

The gphelp program (used for help) uses some other environment variables.
It needs to find the .tex.gz files (in ./lib/pari directory).  You can either
edit the "$miscdir =" line in gphelp.cmd, or set GPHELP_DOCDIR environment
variable.  Having TMPDIR set would not hurt either.  ;-)  If you do not have
gzip.exe installed, gphelp needs to be able to find un-gzip-ed .tex files.

If you do not have GPHELP variable set with the path to gphelp.cmd,
GP/PARI shows messages saying that the extended help is not available.
You can safely ignore them.  If you want GP/PARI to show that the help is
available, you need to set GPHELP, add -detex to the name of file to get
help messages going to the screen, instead of being xdvi'ed:

  set GPHELP=f:\emx.add\bin\gphelp.cmd -detex

If you want to use IBM-book instead, use

  set GPHELP=f:\emx.add\bin\viewpari.cmd

(with a correct directory).  viewpari may be not as smart as gphelp: e.g.,
it ignores al hints from GP/PARI.

Help and extended help are available at any time on F1 and Shift-F1 keys.
Control-F1 and Shift-F1 show the current state of ReadLine customization.

And of course, you need to have EMX runtime installed!

Very quick start:
~~~~~~~~~~~~~~~~
Start gp, type (you may omit the comments!  Sometimes you may press TAB
to complete long words!):

  default(colors, b)		\\ assume dark background, set "bold" colors
  #				\\ Enable timer
  \o3				\\ Prettiest output
  \ps 5				\\ Keep very few series terms
  sin(x+y)
  \q				\\ Exit

Now run

  view pari

You may go up to different lines and get short/long help by F1 and Shift-F1.

Random rambling:
~~~~~~~~~~~~~~~

a) to get extended help going, set environment variable GPHELP_DOCDIR to the
   directory which has .tex.gz files (and make sure you have gzip.exe
   and perl.exe installed); perl is also required for \o3 output;

b) I made the data directory customizable via environment GP_DATA_DIR.
   Currently used only with Galois groups of high order;

c) If the provided gnupmdrv.exe conflicts with one you need for gnuplot,
   do not put the gnupmdrv.exe of gp on path, but run gp.exe as

    env GNUPLOT=I:\gp\bin gp

   here I assume that I:\gp\bin contains the version of gnupmdrv.exe
   needed for gp.  You may also want to prepend some directory to HELP
   to show correct info on pressing F1.

HOW I BUILT IT:
~~~~~~~~~~~~~~

After you have all the needed DLLs and libraries, the trickiest part is to
obtain the required version of gnuplot.  While GP/PARI will not work with the
newer version of gnuplot, the newer versions provide more functionality,
such as mouse in the PM output etc.  I think I built it with the version
on the edge, which gives a lot of functionality, but is not blown together
as the newer gnuplots are.

I used gnuplot-3.7.0.9, applied pm3d-patch from gp37pl08e-pm3d, and
some random patches of mine done around the time of these releases.
I hope to make the patches available on my site too.  This version of
gnuplot is slightly *beyond* the simple compatibility boundary, in
fact I needed to add one extra gnuplot object file, color.o, to make
things link.

By some strange reason, it was ok with -Zaout, but with -Zomf it would
not link...  I needed to shorten color.c file a lot to get things running.

The compile-time options were

 -O3 -DGCC_INLINE -fomit-frame-pointer -Zmt -Zomf -malign-loops=2 -malign-jumps=2 -malign-functions=2

linking done with -s -Zstack 8192.  Readline, PNG and Z are linked dynamically.
This is done with the ordinary gcc 2.8.2, and the speed is within circa 15%
of the best pentium-optimized compile in the table of benchmarks.

I also applied some patches: allow backslashes and ":" with \r and friends,
avoid messages from old gzip's (in gphelp), allow default(color, "boldfg")
allow paging inside Shift-F1, context-sensitive Shift-F1 help on defaults
and \commands, allow dynamic linkup with the Gnuplot drawing engine, 
build DLL, enable install(), and allow environment variable GP_DATA_DIR
for data files.

Most of these patches are sent to PARI community, the rest will be sent
shortly.

Ilya Zakharevich
