6 if test -z "$NETCDF" ; then
7 for p
in /usr
/local
/netcdf
16 if test -z "$NETCDF" ; then
18 if [ `hostname | cut -c 1-2` = "bs" -o \
19 `hostname | cut -c 1-2` = "bv" -o \
20 `hostname` = "tempest" -o `hostname` = "lightning" ] ; then
21 echo 'Compiling on an NCAR system with weird paths to NetCDF'
22 echo 'Setting up a local NetCDF directory with symlinks'
23 if ( test -d .
/netcdf_links
) ; then
24 echo 'A directory ./netcdf_links already exists. Continuing.'
27 if [ -z "$OBJECT_MODE" ] ; then
31 if [ $OBJECT_MODE -ne 64 -a \
( `hostname | cut -c 1-2` = "bs" \
) ] ; then
32 ( cd .
/netcdf_links
; ln -s /usr
/local
/lib32
/r4i4 .
/lib
; \
33 ln -s /usr
/local
/include .
/include
)
35 ( cd .
/netcdf_links
; ln -s /usr
/local
/lib64
/r4i4 .
/lib
; \
36 ln -s /usr
/local
/include .
/include
)
39 NETCDF
=`pwd`/netcdf_links
45 if [ -d .
/netcdf_links
] ; then
46 echo '** There is an existing ./netcdf_links file. Should I use? [y]'
48 if [ "$resp" = "y" ] ; then
49 NETCDF
=`pwd`/netcdf_links
52 echo 'Removing existing ./netcdf_links directory'
53 /bin
/rm -fr .
/netcdf_links
56 echo '** WARNING: No path to NETCDF and environment variable NETCDF not set.'
57 echo '** would you like me to try to fix? [y]'
61 while [ -z "$bedone" ] ; do
63 if [ "$resp" = "y" -o -z "$resp" ] ; then
64 if [ -d .
/netcdf_links
] ; then
65 echo 'There is already a ./netcdf_links directory. Okay to use links'
66 echo 'in this directory for NetCDF include and lib dirs? [y]'
68 if [ "$resp" = "y" ] ; then
69 NETCDF
=`pwd`/netcdf_links
75 if [ -z "$netcdfipath" ] ; then
76 echo 'Enter full path to NetCDF include directory on your system'
78 if [ ! -d "$resp" ] ; then
79 echo "invalid path: $resp. Try again? [y]" ; continue
83 if [ -z "$netcdflpath" ] ; then
84 echo 'Enter full path to NetCDF library directory on your system'
86 if [ ! -d "$resp" ] ; then
87 echo "invalid path: $resp. Try again? [y]" ; continue
92 if [ -n "$netcdflpath" -a -n "$netcdfipath" ] ; then
93 if [ -d .
/netcdf_links
] ; then
94 echo 'Existing ./netcdf_links directory. Okay to remove. [y]'
96 if [ "$resp" = "y" ] ; then
97 /bin
/rm -fr .
/netcdf_links
102 ln -s "$netcdfipath" include
103 ln -s "$netcdflpath" lib
105 echo created new .
/netcdf_links directory
106 /bin
/ls -lF .
/netcdf_links
107 NETCDF
=`pwd`/netcdf_links
118 if [ -n "$NETCDF" ] ; then
119 echo "Will use NETCDF in dir: $NETCDF"
120 # for 3.6.2 and greater there might be a second library, libnetcdff.a . Check for this and use
122 if [ -f "$NETCDF/lib/libnetcdff.a" ] ; then
126 echo "Will configure for use without NetCDF"
129 # if the uname command exists, give it a shot and see if
130 # we can narrow the choices; otherwise, spam 'em
133 type uname
> /dev
/null
134 if [ $?
-eq 0 ] ; then
136 if [ "$os" = "AIX" -o "$os" = "IRIX" -o "$os" = "IRIX64" -o "$os" = "SunOS" -o "$os" = "HP-UX" -o "$os" = "Darwin" ] ; then
139 xxx
=`expr "$os" : '\(.........\).*'`
140 if [ "$xxx" = "CYGWIN_NT" ] ; then
143 if [ "$os" = "OSF1" -o "$os" = "Linux" -o "$os" = "UNICOS/mp" -o "$os" = "UNIX_System_V" -o "$os" = "CYGWIN_NT" ] ; then
152 # Found perl, so proceed with configuration
153 perl arch
/Config.pl
-perl=$PERL -netcdf=$NETCDF -netcdff=$NETCDFF -os=$os -mach=$mach