README.src - information about source, compilation etc.
-------------------------------------------------------

Svgalib is required for the programs to compile. The programs should
work with any reasonably recent version - 1.12 (and up) should be OK.
You can find svgalib on sunsite.unc.edu in /pub/Linux/libs/graphics.

The Independant JPEG Group's JPEG software is required for zgv to
compile. In the directory you have the JPEG software in, do a 'make
libjpeg.a', and also make sure JPEGDIR in zgv's Makefile is set to the
directory you have the JPEG software's source in. You must use version
5 of the library - version 4 is now not supported, as the library
underwent quite a rewrite between versions 4 and 5. Any versions more
recent than version 5, whenever they are released, should probably
work ok.

The README in v5 of the JPEG software says:

"The "official" archive site for this software is ftp.uu.net (Internet
address 192.48.96.9).  The most recent released version can always be found
there in directory graphics/jpeg.  This particular version will be archived
as graphics/jpeg/jpegsrc.v5.tar.gz."

...so look there for the source.

By the way, if you haven't previously compiled the JPEG software,
you'll need to copy makefile.ansi to Makefile and do some other stuff;
see their README and associated files for more info on that.

If you want PNG support, you'll need:

ftp.uu.net:/graphics/png/code/pnglib??.zip	and
ftp.uu.net:/graphics/png/code/zlib???.zip

...where the ?'s are the version number. If you don't want PNG
support, comment out the 'PNGDEF' line in the Makefile and skip ahead
to the 'When libraries are in place' heading below. In case you don't
know what the PNG format is, here's an extract from the 10th draft
specification:

> The PNG format is intended to provide a portable, legally
> unencumbered, well-compressed, well-specified standard for lossless
> bitmapped image files. 
> 
> Although the initial motivation for developing PNG was to replace GIF,
> the design provides some useful new features not available in GIF, with
> minimal cost to developers. 

The process of building the pnglib and zlib libraries goes something
like this, assuming both the zip files are in /usr/src (you need the
Info-ZIP 'unzip' program to unpack the zip files):

cd /usr/src
mkdir pnglib zlib
cd zlib;unzip -a ../zlib*.zip
make
cd ../pnglib;unzip -a ../pnglib*.zip
ln -s ../zlib/{zconf,zlib}.h .
patch </where/the/zgv/source/is/pnglib.patch
make

It's important that you apply the 'pnglib.patch' patch, as this fixes
a small but nasty bug in pnglib 0.6 and alters 'pngstub.c' to use a
more friendly way of handling errors. Also, be sure to use the '-a'
option to unzip as otherwise the text files will be left in MS-DOS
CR/LF format which will result in suitably bizarre error messages.


When libraries are in place
---------------------------

When you've done that, the easiest way to install zgv etc. is to just
do 'make install' as root. This compiles the programs, copies them to
/usr/bin, and copies the man pages to /usr/man/man1. If you want any
of these files somewhere else change the BINDIR and/or MANDIR line in
the Makefile.

Good luck!

- Russell Marks (mr216@gre.ac.uk).
