sh install_gmt.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_gmt.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_gmt.sh!
Note: GMT 4.5.8 is the latest stable version of GMT. All our development is now focused on GMT 5 and only bug fixes will be considered for GMT 4. Because GMT 5 will be a beta release we recommend you install both versions and use gmtswitch to toggle between the two as needed.
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. We know this to be the case with Linux pre-2.4 kernels when mounting NFS disks from a Sun server. If this is your case, you should turn file locking OFF, and avoid using the GMT shorthands in commands that are piped together.
Note: In either case you must fill out the directory name. If you already have netCDF then give the directory it resides in; if you need to install netCDF then give the directory you intend to install it. You can leave it blank if you have defined $NETCDFHOME to be the directory where you installed netcdf. If the 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 the installer. Finally, if you have already installed netCDF as a SHARED library it is your responsibility to make sure these libraries are in default paths or explicitly have been added to LD_LIBRARY_PATH or similar environment parameters.
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 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.
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.
Note: 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: Both are required for a complete GMT install (in order to run all the examples in the Cookbook).
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 Shewchuk's license.
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). 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.
Note: The default cc should work unless you are on a system with several C compilers. 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 gcc. If your C compiler has another name or lives in a strange directory not in your path, please select "other" and enter the value for CC below. Custom C Compiler: When producing executables: Force 32-bit (not recommended) Force 64-bit (not recommended) Use default (whatever your compiler prefers) For OS X only: Build universal binaries (OS X) Note: GMT can be built as 32-bit or 64-bit. We do not recommend that you explicitly choose 32-bit or 64-bit, as the netCDF install is not set up to honor either of these settings. 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, like OS X Snow Leopard. If universal is checked we will attempt to build universal binaries under OS X.
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 GMT4.5.8 in the current working directory where install_gmt.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 (GMT4.5.8), 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 specified above. 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 C.8 [Default].
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 GMT[45]param.txt file.