sh install_gmt4.sh GMT4param.txt
Output may be redirected to a log file by appending >& install.log (if your login shell
is csh or tcsh) or appending > install.log 2>&1 (if your login shell is bash or sh).
Any problems during the install will be noted in the log. Saving the log messages
is of course optional.
Note: You do not have to use this form. install_gmt4.sh can still be run interactively as
in previous versions. However, after a successful install it will write all the parameters
to a file named by you, and this file can be used for background installs as shown above.
IMPORTANT: Move or remove old gmt-*.bz2 files from the current directory before running install_gmt4.sh!
Note: This used to be a choice that affected the compilation of GMT. However, since version 3.3.2
this selection is a run-time selection, meaning you can reverse it at any time. The present choice is
simply a convenient way to set the default units for all users of your GMT installation (see gmtdefaults
man page for how to change this choice at a later time). Individual users can always override the default
with gmtset MEASURE_UNIT cm|inch
Note: GMT-produced PostScript files will by default
use the printer configuration command setpagedevice to set image area (i.e., paper size) and
to select specific paper trays, including the manual tray (e.g., when making overhead
transparencies). Encapsulated PostScript files (EPS) are not allowed to use this command. Some older
PostScript previewers (like Sun's pageview) do not understand setpagedevice, while more up-to-date
previewers like GNU ghostview does. The parameter PAPER_MEDIA is used to choose between EPS and PS output
and this can be changed at run-time with the gmtset command. Thus, this radio button only affects the
initial default selection. Choose EPS if you do not need to worry about paper trays. Choose the default
PS if you need the extra flexibility offered. Please read the gmtdefaults man page and Appendix C
for more details.
Note: GMT passes information about previous GMT command-line options to future GMT commands via a
hidden file in the current directory (.gmtcommands4). To avoid that this file is updated by more than
one program at the time (e.g., when you connect two or more GMT commands with a pipe) we use POSIX
advisory file locking on the file. Unfortunately, some versions of the Network File System (NFS) have
not implemented file locking properly.
Although the behavior may be undefined in this case, it should be safe to activate this option.
Note: Leave empty unless netCDF is installed in a non-standard location. If netCDF is installed in the standard
library locations or if nc-config is available in the shell's command search path, the location of netCDF
is auto-detected. You can also leave the path empty if you have defined $NETCDFHOME to be the directory where
you installed netCDF. If the netCDF library and include files do not have the same parent directory, then leave
the path blank and manually set the environmental variables $NETCDF_LIB and $NETCDF_INC prior to running
Note: If selected, GMT will be able to read additional grid formats supported by GDAL, and grdimage can plot
images such as geotiffs. Specify the gdal-config script or the parent directory where both the lib and
include subdirs for GDAL can be found. If these directories do not have the same parent directory, then
leave the path blank and manually set the environmental variables $GDAL_LIB and $GDAL_INC prior to running
the installer. If the gdal-config script is installed in the shell's command search path, leave the path empty.
Note: The GSHHG package is distributed separately from GMT. If you already have installed
GSHHG once (e.g., with another GMT release such as GMT 5) then you can simply provide the directory name.
Otherwise, we will install GSHHG for you in the directory you specify or, if unspecified, in the same directory
where GMT will be installed.
Note: Download times are shorter when you pick a site that is physically closer to you. If you already
have downloaded the files and simply wants to use the script to reinstall, select the last option.
If you are behind a firewall you will need to use a passive ftp session.
Only if you have some very old ftp client, you may have to resort to active ftp
(which involves the server connecting back to the client).
Note: The only reason to uncheck this selection would be to just ftp the archive but not install it.
Note: You may want to select Shewchuk's faster triangulation routine but as it is not distributed
under the GNU Public License it is not included by default. For-profit organizations should first inspect
Note: The GMT libraries can be made static or shared. The main benefit of using shared (dynamic)
libraries is significantly reduced executable sizes (50-70% savings in disk space) and hence
faster loading times of successive executed GMT programs. The GMT install procedure knows
how to make shared libraries under Linux, FreeBSD, NetBSD, SunOS, Solaris, HPUX, OSF1, OSX,
and IRIX. For other systems capable of generating shared libraries you must manually configure
the config.mk file. If you have no preferences or no idea what to do on an unlisted system,
select the default static libraries. If you select shared, you cannot later move
the executables around without messing with environment settings like LD_LIBRARY_PATH.
Note: The default should work unless you are on a system with several C compilers or your compiler
lives in a strange directory not in your path. E.g., you may run Solaris and have purchased
Sun's compiler but have also installed GNU gcc. To ensure you get the GNU you should select
"other" and provide the path to gcc.
Custom C Compiler:
When producing executables:
Use default (whatever your compiler prefers)
Force 32-bit (not recommended)
Force 64-bit (not recommended)
Note: GMT can be built as 32-bit or 64-bit. We do not recommend that you
explicitly choose 32-bit or 64-bit. The default is
to compile without sending any 32-bit or 64-bit options to the
compiler, which generally create 32-bit versions on older systems,
and 64-bit versions on newer systems.
Note: The default make should work unless you are on a system with a weird make utility.
GNU make works best, and some Sys V makes have problems. If you have make problems,
use GNU make (assuming it is installed): Select "other" and enter the path for make below.
Custom make program:
Note: The installation will install all GMT components in several subdirectories
under one root directory. By default, GMT will be installed under gmt-4.5.17
in the current working directory where install_gmt4.sh is run.
On most Unix systems, however, the preferred location of the root directory will be
something like /usr/local or /sw, under which the installation will add
bin, lib, include, share, share/man, and share/doc/gmt, respectively.
To select another location for the root directory than the default (gmt-4.5.17),
specify it in the first box above, or enter subdirectories individually.
Only specify alternative directories if you want to place the files elsewhere.
Note that the man pages will be be placed in the sub-directories man1 and man3 of the directory
The man utility will find the GMT man pages if the chosen man directory is included in the
users' MANPATH environmental variable.
Make sure the users' search path contains the directory where you place the executables.
Finally, advise users to add a browser bookmark for the
file share/doc/gmt/html/gmt_services.html in the doc directory you chose above; that page provides links to online
GMT documentation and man pages.
Note: At run-time GMT will look in the shared data directory (specified in section C.8) to
find configuration and data files.
That directory may appear with a different name to remote users if a different mount point
is used or a symbolic link is set.
GMT can use the environment variable $GMT_SHAREDIR to point to the right place.
If users see a different location for the shared data files, specify it here.
(It will be used only to remind you at the end of the installation to set
the environment variable $GMT_SHAREDIR).
Leave blank to select the shared data directory of the data resources directory given in
Note: GMT supplements that only depend on GMT are always installed. The above packages will only be installed if you select them.
The mex package requires Matlab or Octave, while xgrid requires various X11 libraries and include files.
Note: Examples will only be run if you also ftp'ed the doc archive.
Once received, use right-click to bring up the Save Frame As... option to save the GMT4param.txt