This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Maria,
> To: address@hidden
> From: Maria Follette <address@hidden>
> Subject: Setting Environment Vriables for netcdf
> Organization: PSI/NRL 7183
> Keywords: 199807012232.QAA02065
In the above message, you wrote:
> I have read the INSTALL file on how to build and install netcdf-3.3.1 on
> the HP-UX B.10.20 but cannot find specifically where to set the
> following environment variables.
> CPPFLAGS=-D_HPUX_SOURCE
> CC=/bin/c89
> CFLAGS=
> FC=/usr/bin/fort77
> FFLAGS=-w
> CXX=/usr/bin/CC
>
> What is the specific file where to set these variables?
>
> Thanks!
>
> --
> Maria R. Follette
> Planning Systems Inc.
> Naval Reasearch Laboratory Code 7183
> Stennis Space Center MS
> address@hidden
Environment variables are set in your shell. In the particular case of
building the netCDF package, they should be set prior to invoking the
configure script. For example, if using an sh-derived shell, then you
might do the following:
$ CPPFLAGS=-D_HPUX_SOURCE export CPPFLAGS
$ CC=/bin/c89 export CC
$ CFLAGS= export CFLAGS
$ FC=/usr/bin/fort77 export FC
$ FFLAGS=-w FFLAGS
$ CXX=/usr/bin/CC export CXX
$ ./configure >configure.log 2>&1
or, equivalently,
$ CPPFLAGS=-D_HPUX_SOURCE CC=/bin/c89 CFLAGS= FC=/usr/bin/fort77 \
FFLAGS=-w FFLAGS CXX=/usr/bin/CC ./configure >configure.log 2>&1
Or, if using a csh-derived shell, then you might do the following:
% setenv CPPFLAGS -D_HPUX_SOURCE
% setenv CC /bin/c89
% setenv CFLAGS ''
% setenv FC /usr/bin/fort77
% setenv FFLAGS -w FFLAGS
% setenv CXX /usr/bin/CC
% ./configure >&! configure.log
See your shell's manual page for more information on environment
variables.
--------
Steve Emmerson <http://www.unidata.ucar.edu>