Mercurial > forge
diff main/netcdf/src/configure.base @ 12698:1a348ee9a848 octave-forge
checking for netcdf4 support
author | abarth93 |
---|---|
date | Wed, 02 Dec 2015 09:22:02 +0000 |
parents | fa07b71bcbfb |
children |
line wrap: on
line diff
--- 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"