Modified nc-config to reflect value of --has-f03 when netcdf-fortran is found, and also added '--enable-logging' to determine if netcdf-c was built with logging enabled.

This commit is contained in:
Ward Fisher 2016-02-29 11:22:10 -07:00
parent d813448e2b
commit e4ee2add6b
2 changed files with 18 additions and 14 deletions

View File

@ -1208,6 +1208,7 @@ AC_SUBST(HAS_NC4,[$enable_netcdf_4])
AC_SUBST(HAS_HDF4,[$enable_hdf4])
AC_SUBST(HAS_PNETCDF,[$enable_pnetcdf])
AC_SUBST(HAS_HDF5,[$enable_netcdf_4])
AC_SUBST(HAS_LOGGING, [$enable_logging])
AC_SUBST(HAS_SZLIB,[$nc_has_szlib])
AC_SUBST(HAS_PARALLEL,[$enable_parallel])
AC_SUBST(HAS_PARALLEL4,[$enable_parallel4])

View File

@ -9,34 +9,33 @@ exec_prefix=${prefix}
includedir=${prefix}/include
cc="@CC@"
cflags=" -I${includedir} @CPPFLAGS@"
cflags=" -I${includedir} @CPPFLAGS@"
has_dap="@HAS_DAP@"
has_nc2="@HAS_NC2@"
has_nc4="@HAS_NC4@"
has_hdf4="@HAS_HDF4@"
has_pnetcdf="@HAS_PNETCDF@"
has_hdf5="@HAS_HDF5@"
has_logging="@HAS_LOGGING@"
version="@PACKAGE_NAME@ @PACKAGE_VERSION@"
has_f90="no"
has_f03="no"
if type -p nf-config > /dev/null 2>&1; then
fc=`nf-config --fc`
fflags=`nf-config --fflags`
flibs=`nf-config --flibs`
has_f90=`nf-config --has-f90`
has_f03=`nf-config --has-f03`
fi
has_cxx="no"
has_cxx4="no"
if type -p ncxx4-config > /dev/null 2>&1; then
cxx4=`ncxx4-config --cxx`
# cxxflags=`ncxx4-config --cxxflags`
# cxxlibs=`ncxx4-config --cxxlibs`
has_cxx4="yes"
elif type -p ncxx-config > /dev/null 2>&1; then
cxx=`ncxx-config --cxx`
# cxxflags=`ncxx-config --cxxflags`
# cxxlibs=`ncxx-config --cxxlibs`
has_cxx="yes"
fi
@ -56,6 +55,7 @@ Available values for OPTION include:
--has-nc4 whether NetCDF-4/HDF-5 is enabled in this build
--has-hdf5 whether HDF5 is used in build (always the same as --has-nc4)
--has-hdf4 whether HDF4 was used in build
--has-logging whether logging is enabled with --enable-logging.
--has-pnetcdf whether parallel-netcdf (a.k.a. pnetcdf) was used in build
--libs library linking information for netcdf
--prefix Install prefix
@ -84,7 +84,7 @@ if type -p nf-config > /dev/null 2>&1; then
--fflags flags needed to compile a Fortran program
--flibs libraries needed to link a Fortran program
--has-f90 whether Fortran 90 API is installed
--has-f03 whether Fortran 03 API is installed (implies F90).
EOF
fi
exit $1
@ -101,6 +101,7 @@ all()
echo
echo " --has-c++ -> $has_cxx"
echo " --cxx -> $cxx"
# echo " --cxxflags -> $cxxflags"
# echo " --cxxlibs -> $cxxlibs"
echo " --has-c++4 -> $has_cxx4"
@ -110,12 +111,14 @@ all()
echo " --fflags -> $fflags"
echo " --flibs -> $flibs"
echo " --has-f90 -> $has_f90"
echo " --has-f03 -> $has_f03"
echo
echo " --has-dap -> $has_dap"
echo " --has-nc2 -> $has_nc2"
echo " --has-nc4 -> $has_nc4"
echo " --has-hdf5 -> $has_hdf5"
echo " --has-hdf4 -> $has_hdf4"
echo " --has-logging-> $has_logging"
echo " --has-pnetcdf-> $has_pnetcdf"
echo
echo " --prefix -> $prefix"
@ -175,6 +178,10 @@ while test $# -gt 0; do
echo $has_hdf4
;;
--has-logging)
echo $has_logging
;;
--has-pnetcdf)
echo $has_pnetcdf
;;
@ -211,14 +218,6 @@ while test $# -gt 0; do
echo $cxx4
;;
# --cxxflags)
# echo $cxxflags
# ;;
#
# --cxxlibs)
# echo $cxxlibs
# ;;
--fc)
echo $fc
;;
@ -235,6 +234,10 @@ while test $# -gt 0; do
echo $has_f90
;;
--has-f03)
echo $has_f03
;;
*)
echo "unknown option: $1"
usage