834 |
if test "x$LINK" = x ; then |
if test "x$LINK" = x ; then |
835 |
LINK=$FC |
LINK=$FC |
836 |
fi |
fi |
|
if test "x$CPP" = x ; then |
|
|
CPP="cpp" |
|
|
fi |
|
837 |
if test "x$MAKE" = x ; then |
if test "x$MAKE" = x ; then |
838 |
MAKE="make" |
MAKE="make" |
839 |
fi |
fi |
840 |
|
if test "x$CPP" = x ; then |
841 |
|
CPP=cpp |
842 |
|
fi |
843 |
|
#EH3 === UGLY === |
844 |
|
# The following an ugly little hack to check for $CPP in /lib/ and it |
845 |
|
# should eventually be replaced with a more general function that |
846 |
|
# searches a combo of the user's path and a list of "usual suspects" |
847 |
|
# to find the correct location for binaries such as $CPP. |
848 |
|
for i in " " "/lib/" ; do |
849 |
|
echo "#define A a" | $i$CPP > test_cpp 2>&1 && CPP=$i$CPP |
850 |
|
done |
851 |
|
#EH3 === UGLY === |
852 |
echo "#define A a" | $CPP > test_cpp 2>&1 |
echo "#define A a" | $CPP > test_cpp 2>&1 |
853 |
RETVAL=$? |
RETVAL=$? |
854 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
982 |
TOOLSDIR="$ROOTDIR/tools" |
TOOLSDIR="$ROOTDIR/tools" |
983 |
fi |
fi |
984 |
if test ! -d ${TOOLSDIR} ; then |
if test ! -d ${TOOLSDIR} ; then |
985 |
echo "Error: the specified $TOOLSDIR (\"$TOOLSDIR\") does not exist!" |
echo "Error: the specified TOOLSDIR (\"$TOOLSDIR\") does not exist!" |
986 |
exit 1 |
exit 1 |
987 |
fi |
fi |
988 |
if test "x$S64" = x ; then |
if test "x$S64" = x ; then |
1003 |
rm -f make_eesupp.errors |
rm -f make_eesupp.errors |
1004 |
else |
else |
1005 |
echo "Error: problem encountered while building source files in eesupp:" |
echo "Error: problem encountered while building source files in eesupp:" |
1006 |
cat make_eesupp.errors |
cat make_eesupp.errors 1>&2 |
1007 |
exit 1 |
exit 1 |
1008 |
fi |
fi |
1009 |
fi |
fi |
1017 |
rm -f make_exch2.errors |
rm -f make_exch2.errors |
1018 |
else |
else |
1019 |
echo "Error: problem encountered while building source files in exch2:" |
echo "Error: problem encountered while building source files in exch2:" |
1020 |
cat make_exch2.errors |
cat make_exch2.errors 1>&2 |
1021 |
exit 1 |
exit 1 |
1022 |
fi |
fi |
1023 |
fi |
fi |
1205 |
fi |
fi |
1206 |
done |
done |
1207 |
|
|
1208 |
# Check for ability to build and use NetCDF |
# Build MNC templates and check for ability to build and use NetCDF |
1209 |
echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1 |
echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1 |
1210 |
RETVAL=$? |
RETVAL=$? |
1211 |
if test "x$RETVAL" = x0 -a "x$HAVE_NETCDF" != xt ; then |
if test "x$RETVAL" = x0 ; then |
1212 |
cat <<EOF |
( cd $ROOTDIR"/pkg/mnc" && $MAKE templates ) > make_mnc.errors 2>&1 |
1213 |
|
RETVAL=$? |
1214 |
|
if test "x${RETVAL}" = x0 ; then |
1215 |
|
rm -f make_mnc.errors |
1216 |
|
else |
1217 |
|
echo "Error: problem encountered while building source files in pkg/mnc:" |
1218 |
|
cat make_mnc.errors 1>&2 |
1219 |
|
exit 1 |
1220 |
|
fi |
1221 |
|
if test "x$HAVE_NETCDF" != xt ; then |
1222 |
|
cat <<EOF |
1223 |
|
|
1224 |
WARNING: the "mnc" package has been enabled but tests failed to |
WARNING: the "mnc" package has been enabled but tests failed to |
1225 |
compile and/or execute NetCDF applications. Please check that: |
compile and/or execute NetCDF applications. Please check that: |
1229 |
NetCDF library to link against. |
NetCDF library to link against. |
1230 |
|
|
1231 |
EOF |
EOF |
1232 |
|
fi |
1233 |
fi |
fi |
1234 |
|
|
1235 |
# Create a list of #define and #undef to enable/disable packages |
# Create a list of #define and #undef to enable/disable packages |