Next: , Previous: Building on 64 Bit Platforms, Up: Building and Installing NetCDF on Unix Systems


3.4 Running the configure Script

To create the Makefiles needed to build netCDF, you must run the provided configure script. Go to the top-level netCDF src/ directory.

Decide where you want to install this package. Use this for the "–prefix=" argument to the configure script below. The default installation prefix is "..", which will install the package's files in ../bin, ../lib, and ../man relative to the netCDF src/ directory.

Execute the configure script:

         ./configure --prefix=whatever_you_decided

The "–prefix=..." specification is optional; if omitted, ".." designating the parent directory will be used as a default. There are other options for the configure script. The most useful ones are listed below. Use the –help option to get the full list.

--prefix
Specify the directory under which netCDF will be installed. Directories lib and bin will be created, as well as some others. The default value for prefix is one directory up from the src directory, where the build takes place.
--disable-flag-setting
By default the configure script changes some compiler flags to allow netCDF to build on your platform. If you wish to specify compiler flags which conflict with the ones added by the configure script, then use this option to instruct configure not to attempt to set any compiler flags. It is then the responsibility of the user to correctly set CPPFLAGS, CFLAGS, etc. (Note that this flag does not affect some setting of flags by configure for GNU platforms; it just turns off any special netCDF flags.
--enable-64bit
Compile for 64-bit platform on Sun, AIX, HPUX, or Irix. (Has no effect on other platforms). Since this works by setting some compiler flags, this option is incompatible with –disable-flag-setting.

The configure script will examine your computer system – checking for attributes that are relevant to building the netCDF package. It will print to standard output the checks that it makes and the results that it finds.

The configure script will also create the file "config.log", which will contain error messages from the utilities that the configure script uses in examining the attributes of your system. Because such an examination can result in errors, it is expected that "config.log" will contain error messages. Therefore, such messages do not necessarily indicate a problem (a better indicator would be failure of the subsequent "make"). One exception, however, is an error message in "config.log" that indicates that a compiler could not be started. This indicates a severe problem in your compilation environment – one that you must fix.