# HG changeset patch # User abarth93 # Date 1449048122 0 # Node ID 1a348ee9a848946a5a096cfff0874e67d93d5a20 # Parent 79e7259c6ff1c5014e9d500acb7c0952fe33a7cd checking for netcdf4 support diff -r 79e7259c6ff1 -r 1a348ee9a848 main/netcdf/src/configure.base --- a/main/netcdf/src/configure.base Mon Nov 30 14:20:02 2015 +0000 +++ b/main/netcdf/src/configure.base Wed Dec 02 09:22:02 2015 +0000 @@ -326,8 +326,24 @@ AC_MSG_ERROR([nc-config not found], 1); fi -NETCDF_LIBS="$NETCDF_LIBS `$NC_CONFIG --libs`" -NETCDF_CFLAGS="$NETCDF_CFLAGS `$NC_CONFIG --cflags`" + +dnl The following will be either "yes" or "no" +AC_MSG_CHECKING(for netcdf4 support) +NETCDF_V4=`$NC_CONFIG --has-nc4` +if test x$NETCDF_V4 != yes; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_MSG_ERROR(netcdf4 support missing. Did you disable netcdf4 features?) +fi + +dnl other way to check this +dnl NETCDF_LIBS="$NETCDF_LIBS `$NC_CONFIG --libs`" +dnl NETCDF_CFLAGS="$NETCDF_CFLAGS `$NC_CONFIG --cflags`" +dnl CFLAGS="$NETCDF_CFLAGS $CFLAGS" +dnl CXXFLAGS="$NETCDF_CFLAGS $CXXFLAGS" +dnl LDFLAGS="$NETCDF_LIBS $LDFLAGS" +dnl AC_CHECK_LIB([netcdf], [nc_set_chunk_cache], , [AC_MSG_ERROR(nc_set_chunk_cache was not found in the netCDF library. Did you disable netcdf4 features?)]) CONFIGURE_OUTPUTS="Makeconf"