Next you must "configure" the Gri source files. During this step, a
series of tests will be made about your operating system and your
compiler. Most of these tests need no interaction from you, but there
is one overall choice that you may wish to make: the place on your
filesystem where Gri (and many associated library and documentation
files) will reside. To get the default installation, with files
residing within the directory `/usr/local', type
at this time. If you'd rather the files go into another location, run
the `configure
' script differently, e.g. to get the Gri files to
reside within the `/opt' directory, type:
./configure --prefix=/opt
|
In response, you'll see the results of several tests of the properties
of your operating system, your C++ compiler, etc. Normally you can
ignore these results.
As an example, typing `./configure
' without a `--prefix
'
option yields the directory tree (`...
' indicates several files not
displayed in this list, for brevity). In this example,
the most up-to-date version is 2.12.26, but a previous
version 2.12.25 has also been retained. (Note that
only one copy of the documentation is retained; this is all that's
needed, since old versions are documented there as well as new
versions.)
/usr/local
|-- bin
| |-- gri -> gri-2.12.26
| |-- gri-2.12.26
| |-- gri-2.12.25
| |-- gri_merge
| `-- gri_unpage
|-- info
| |-- ...
`-- share
`-- gri
|-- 2.6.0
| |-- gri.cmd
| |-- license.txt
| |-- logo.dat
| `-- startup.msg
|-- 2.4.0
| |-- gri.cmd
| |-- license.txt
| |-- logo.dat
| `-- startup.msg
`-- doc
|-- examples
| |-- ...
`-- html
|-- ...
|-- resources
| |-- ...
`-- screenshots
|-- ...
|
Trouble-shooting 1: If the permission of the `configure' file is
wrong, you'll get an error like `Permission denied
'; if so, try
typing `sh ./configure
' to run it in the Bourne shell. If that
fails, you are going to have to do some old-fashioned work! Start by
copying the generic Makefile called `Makefile.generic' into
`Makefile', and try the following steps, perhaps editing the
`Makefile' if you run into errors.
Trouble-shooting 2: Gri uses a C++ feature called 'templates'.
Unfortunately, templates are handled in different ways by different
compilers. At least as of Spring 1997, the GNU compiler, vsn 2.7.x
(used by many Gri folks) has problems with templates. Therefore the
configure script will check to see if you are using the GNU c++
compiler, and if you are it will check whether the ("template
repository") compiler flag `-frepo
' is known on your machine. If
it is not, an alternative method of templates will be used. But if it
is, you'll be asked, for confirmation, whether you wish to use the
`-frepo
' flag. On many machines (e.g. Solaris) you should answer
`n
' to this question. The prompt will explain. Also, note that
you can avoid the prompt by running configure as either of the two
below:
./configure --enable-frepo
./configure --disable-frepo
|
(Such switches will be ignored unless you're using the GNU compiler.)
Trouble-shooting 3: If optional system libraries like the netCDF
library, if it exists, are installed in nonstandard places, you might
have to change the unix environment variable `LD_LIBRARY_PATH
'.
For example, on my machine the `netcdf
' library is not installed in
`/usr/lib', as the `configure
' script assumes, but rather in
`/usr/local/share/netcdf/lib'. Therefore I have the following line
in one of my startup files:
export LD_LIBRARY_PATH=/usr/lib:/usr/local/share/netcdf/lib
|