
			INSTALL for ivmaps-0.6

Instructions for building ivmaps-0.6.5 from source:

0. Compilation Environment

Tools you will need before you can build:

0.a. a Unix machine.  We've built on Linux, SunOS and Irix.  It should
build on most any Unix machine with similar config changes.

0.b. The gcc compiler.  Recently we've been building and testing with
gcc-2.7.2.1.  Both gcc-2.7.2 and gcc-2.6.3 will probably still work.
You will also need an equivalent copy of libg++.  The libg++ version
numbers stay roughly in synch with the compiler version numbers.  If
you have gcc-2.6.3 you'd want libg++-2.6.3, etc..

0.c. An installed copy of X11R4, X11R5, or X11R6 as distributed by MIT,
or equivalent (i.e., XFree86 for Linux, etc.)  If you use a vendor's X11
product, the product should be based on R4 or later and the product should
include imake and the config files. (If you're on a Sun you probably want
to avoid the OpenWindows versions.)

If imake is not in the same place as the other X11 binaries are or
anywhere else on your system, you can get the sources for imake from
the X11R5 or X11R6 distribution at several public ftp archives (such
as ftp.x.org).  

0.d. You need to obtain and build ivtools-0.6 (from
http://www.vectaport.com/ivtools/) according to its INSTALL
instructions before you can build ivmaps-0.6.  You have to build
ivtools with InstallRelative set to YES because that is all that is
supported by the ivmaps build process so far.

0.e. You need to obtain, build and install PROJ-4.3 cartographic
projection library from ftp://kai.er.usgs.gov/pub/PROJ.4/PROJ.4.3.3.tar.gz.

0.f. If you want to build the 3D elevation map viewer you will need to
obtain vtk-2.0 (home page: http://www.cs.rpi.edu/~martink/).  You will
need to obtain the Mesa 3D graphics library (home page:
http://www.ssec.wisc.edu/~brianp/Mesa.html) unless you want to use
another renderer supported by vtk.  We currently use Mesa-2.6.

1. Creating and/or editing config/site.def.$CPU:

1.a. Set your CPU environment variable to one of the supported types
(grep config/arch.def for ArchitectureName to get a complete list or
try "make CPU" in the top directory).  Use "setenv CPU arch" for csh or
"export CPU=arch" for sh/bash.  LINUX, SUN4, and SGI are known to work.

1.b. Either edit the site.def.$CPU file if it exists, or determine
which existing site.def.* is closest to your needs and copy it into
site.def.$CPU.  ***Edit the parameters in this file as needed for your
facility.*** Especially verify that any pathname definitions are
correct for your environment.  

Set InstallRelative to YES if you want installation done within the
ivmaps-0.6 directory, or NO if you want them installed in the BinDir,
LibDir, and LibDataDir as described in the installation section below.

If you're building on Solaris you can use the SUN4 config file instead
of a SUN5 one (config/site.def.SUN4).

Define ProjDir to the root of the directory where PROJ-4.3 is installed.
The default is /usr/local which is compatible with the PROJ installation
in /usr/local/lib/libproj.a and /usr/local/include/projects.h.

If you have enabled the clippoly library in ivtools-0.6 you will also need
to enable it here by defining ClipPolyDir.

If you have built the vtk library uncomment and adjust the definition
of VtkDir.  This will cause the 3D demviewer to be built.  If you are
using Mesa with vtk also define MesaDir.

1.c. You may also want to take a look at local.def and gcc.def, but you
should be able to successfully build ivmaps by only changing
parameters in your copy of site.def.$CPU.  The top of local.def
defines macro preprocessor constants that are later used to initialize
make variables.  The bottom of local.def builds up pathnames to refer
to the libraries and important directories of this package.

2. Compiling ivmaps:

2.a. cd to the ivmaps-0.6/ directory.

2.b. Compile it with a "make World" command.  It needs the following
variable definitions:

	XCONFIGDIR	The location of your X11 config files.

Sample Linux command line: 
	make World XCONFIGDIR=/usr/X11R6/lib/X11/config
Sample SunOS command line:
	make World XCONFIGDIR=/usr/local/lib/X11/config
Sample Solaris command line:
	make World XCONFIGDIR=/usr/X/lib/X11/config PWD=`pwd`
Sample Irix command line:
	make World XCONFIGDIR=/usr/lib/X11/config


This command generates Makefiles hierarchically and builds everything.

3. Testing:

Each directory under ivmaps-0.6/src that begins in lower case (except
for "scripts") contains executables for each particular viewer in
$CPU/a.out.  "cd" to each particular directory and read the README files
that go into further detail on how to use the viewers.  ivmaps-0.6/src/utils
contains sub-directories of map utility/test programs.

4. Installation:

"make install" is supported for all the libraries, map viewers and the
elevation map utilities if vtk has been configured.

When InstallRelative is NO the binaries are installed as stripped
executables in BinDir and the libraries are installed in LibDir.

When InstallRelative is YES (the default in config/site.def.$CPU), the
binaries are installed in ivmaps-0.6/bin/$CPU and the libraries are
installed in ivmaps-0.6/lib/$CPU.
