diff --git a/nc-config.in b/nc-config.in index 4c68da202..aeeceff3d 100644 --- a/nc-config.in +++ b/nc-config.in @@ -3,8 +3,6 @@ # This forms the basis for the nc-config utility, which tells you # various things about the netCDF installation. This code was # contributed by netCDF user Arlindo DaSilva. Thanks Arlindo! -# -# $Id: nc-config.in,v 1.17 2010/03/24 15:20:37 dmh Exp $ prefix=@prefix@ exec_prefix=${prefix} @@ -12,24 +10,31 @@ libdir=${exec_prefix}/lib includedir=${prefix}/include cc="@CC@" -cxx="@CXX@" -fc="@FC@" cflags=" -I${includedir} @CPPFLAGS@" -fflags="@FFLAGS@ @MOD_FLAG@${includedir}" libs="-L${libdir} @NC_LIBS@" -flibs="-L${libdir} @NC_FLIBS@" 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_f77="@HAS_F77@" -has_f90="@HAS_F90@" -has_cxx="@HAS_CXX@" has_szlib="@HAS_SZLIB@" version="@PACKAGE_NAME@ @PACKAGE_VERSION@" +if type -p nf-config; then + fc=`nf-config --fc` + fflags=`nf-config --fflags` + flibs=`nf-config --flibs` + has_f77=`nf-config --has_f77` + has_f90=`nf-config --has_f90` +fi + +if type -p ncxx-config; then + cxx=`ncxx-config --cxx` + has_cxx=`ncxx-config --has_cxx` +fi + + usage() { cat <