Skip to content

Commit d85bb6f

Browse files
The big change for this commit is complete the
disengagement of enable-netcdf4 from enable-hdf5. That is, with the advent of nczarr, it is possible to turn off hdf5 but still need netcdf-4 enabled because nczarr uses libsrc4, but not libhdf5. This change involves a bunch of things: 1. Modify configure.ac and CMakelist to make enable_hdf5 control if hdf5 support is provided. For back compatibility, disable-netcdf4 is treated as disable-hdf5. But internally, netcdf4 support is controlled only by the enabling of formats that require it. 2. In support of #1, modify .travis.yml to use enable/disable-hdf5 instead of enable/disable-netcdf4. 3. test_common.in is modified to track selected features, including enable-hdf5 and enable-s3-tests. This is used in selected tests that mix netcdf-3 and netcdf4 tests. 4. The conflation of USE_HDF5 and USE_NETCDF4 is common in code, tests, and build files, so all of those had to be weeded out. 5. It turns out that some of the NC4_dim functions really are HDF5 specific, but are not treated as such. So they are moved from nc4dim.c to hdf5dim.c or hdf5dispatch.c 6. Some generic functions in libhdf5 can be (and were) moved to libsrc4.
1 parent 8b487ba commit d85bb6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+322
-389
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ services:
1212
env:
1313
matrix:
1414
# Ubuntu
15-
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-fsigned-char' AC_COPTS='--disable-netcdf-4 --disable-hdf4 --disable-dap-remote-tests --enable-cdf5 --enable-byterange' COPTS='-DENABLE_NETCDF_4=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE -DENABLE_BYTERANGE=TRUE' USECP=FALSE CURHOST=docker-gcc-x64-signed TESTFILTER=FALSE
15+
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-fsigned-char' AC_COPTS='--disable-hdf5 --disable-hdf4 --disable-dap-remote-tests --enable-cdf5 --enable-byterange' COPTS='-DENABLE_HDF5=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE -DENABLE_BYTERANGE=TRUE' USECP=FALSE CURHOST=docker-gcc-x64-signed TESTFILTER=FALSE
1616

17-
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-fsigned-char' AC_COPTS='--disable-netcdf-4 --disable-hdf4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' USECP=FALSE CURHOST=docker-gcc-x86-signed TESTFILTER=FALSE
17+
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-fsigned-char' AC_COPTS='--disable-hdf5 --disable-hdf4 --disable-dap-remote-tests' COPTS='-DENABLE_HDF5=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' USECP=FALSE CURHOST=docker-gcc-x86-signed TESTFILTER=FALSE
1818

19-
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-funsigned-char' AC_COPTS='--disable-netcdf-4 --disable-hdf4 --disable-dap-remote-tests --enable-cdf5' COPTS='-DENABLE_NETCDF_4=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' USECP=FALSE CURHOST=docker-gcc-x64-unsigned TESTFILTER=FALSE
19+
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-funsigned-char' AC_COPTS='--disable-hdf5 --disable-hdf4 --disable-dap-remote-tests --enable-cdf5' COPTS='-DENABLE_HDF5=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' USECP=FALSE CURHOST=docker-gcc-x64-unsigned TESTFILTER=FALSE
2020

21-
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-funsigned-char' AC_COPTS='--disable-netcdf-4 --disable-hdf4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' USECP=FALSE CURHOST=docker-gcc-x86-unsigned TESTFILTER=FALSE
21+
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-funsigned-char' AC_COPTS='--disable-hdf5 --disable-hdf4 --disable-dap-remote-tests' COPTS='-DENABLE_HDF5=OFF -DENABLE_HDF4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' USECP=FALSE CURHOST=docker-gcc-x86-unsigned TESTFILTER=FALSE
2222

2323
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc CFLAGS='-fsigned-char' AC_COPTS='--disable-dap-remote-tests --enable-cdf5' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' USECP=FALSE CURHOST=docker-gcc-x64-signed TESTFILTER=TRUE
2424

CMakeLists.txt

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,17 @@ ENDIF()
440440
# Format Option checks
441441
################################
442442

443+
# We need to now treat enable-netcdf4 and enable-hdf5 as separate,
444+
# but for back compatability, we need to treat enable-netcdf4
445+
# as equivalent to enable-hdf5.
446+
# We detect this using these rules:
447+
# 1. if ENABLE_HDF5 is off then disable hdf5
448+
# 2. if ENABLE_NETCDF4 is off then disable hdf5
449+
# 3. else enable hdf5
443450
OPTION(ENABLE_NETCDF_4 "Use HDF5." ON)
444451
OPTION(ENABLE_NETCDF4 "Use HDF5." ON)
445452
OPTION(ENABLE_HDF5 "Use HDF5." ON)
446-
IF(NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
453+
IF(NOT ENABLE_HDF5 OR NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
447454
SET(ENABLE_HDF5 OFF CACHE BOOL "Use HDF5" FORCE)
448455
ENDIF()
449456
OPTION(ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF)
@@ -591,9 +598,7 @@ ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
591598
# *
592599
##
593600
SET(USE_HDF5 ${ENABLE_HDF5})
594-
IF(USE_HDF5 OR ENABLE_NETCDF_4)
595-
SET(USE_HDF5 ON)
596-
SET(USE_NETCDF4 ON)
601+
IF(USE_HDF5)
597602
##
598603
# Accommodate developers who have hdf5 libraries and
599604
# headers on their system, but do not have a the hdf
@@ -801,8 +806,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
801806
#option to include HDF5 High Level header file (hdf5_hl.h) in case we are not doing a make install
802807
INCLUDE_DIRECTORIES(${HDF5_HL_INCLUDE_DIR})
803808

804-
805-
ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
809+
ENDIF(USE_HDF5)
806810

807811
# See if we have libcurl
808812
FIND_PACKAGE(CURL)
@@ -864,11 +868,9 @@ IF(ENABLE_DAP)
864868
SET(USE_DAP ON CACHE BOOL "")
865869
SET(ENABLE_DAP2 ON CACHE BOOL "")
866870

867-
IF(ENABLE_NETCDF_4)
871+
IF(ENABLE_HDF5)
868872
SET(ENABLE_DAP4 ON CACHE BOOL "")
869-
ELSE(ENABLE_NETCDF_4)
870-
SET(ENABLE_DAP4 OFF CACHE BOOL "")
871-
ENDIF(ENABLE_NETCDF_4)
873+
ENDIF(ENABLE_HDF5)
872874

873875
ELSE()
874876
SET(ENABLE_DAP2 OFF)
@@ -1072,15 +1074,15 @@ IF(ENABLE_LARGE_FILE_SUPPORT)
10721074
ENDIF()
10731075
ENDIF()
10741076

1075-
OPTION(ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if netCDF-4 is not Enabled" OFF)
1076-
IF(NOT ENABLE_NETCDF_4 AND ENABLE_EXAMPLE_TESTS)
1077+
OPTION(ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if HDF5 is not Enabled" OFF)
1078+
IF(NOT ENABLE_HDF5 AND ENABLE_EXAMPLE_TESTS)
10771079
SET(ENABLE_EXAMPLE_TESTS OFF)
10781080
ENDIF()
10791081

10801082
# Enable Parallel IO with netCDF-4/HDF5 files using HDF5 parallel I/O.
10811083
SET(STATUS_PARALLEL "OFF")
10821084
OPTION(ENABLE_PARALLEL4 "Build netCDF-4 with parallel IO" "${HDF5_PARALLEL}")
1083-
IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
1085+
IF(ENABLE_PARALLEL4 AND ENABLE_HDF5)
10841086
IF(NOT HDF5_PARALLEL)
10851087
SET(USE_PARALLEL OFF CACHE BOOL "")
10861088
MESSAGE(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.")
@@ -1221,9 +1223,9 @@ IF (ENABLE_PARALLEL_TESTS AND NOT USE_PARALLEL)
12211223
ENDIF()
12221224

12231225
# Enable special filter test; experimental when using cmake.
1224-
OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_NETCDF_4})
1225-
IF(ENABLE_FILTER_TESTING AND NOT ENABLE_NETCDF_4)
1226-
MESSAGE(WARNING "ENABLE_FILTER_TESTING requires netCDF-4. Disabling.")
1226+
OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_HDF5})
1227+
IF(ENABLE_FILTER_TESTING AND NOT ENABLE_HDF5)
1228+
MESSAGE(WARNING "ENABLE_FILTER_TESTING requires HDF5. Disabling.")
12271229
SET(ENABLE_FILTER_TESTING OFF)
12281230
ENDIF()
12291231
IF(NOT BUILD_SHARED_LIBS)
@@ -1859,7 +1861,7 @@ IF(ENABLE_TESTS)
18591861
ADD_SUBDIRECTORY(nctest)
18601862
ENDIF()
18611863
ADD_SUBDIRECTORY(nc_test)
1862-
IF(USE_NETCDF4)
1864+
IF(USE_HDF5)
18631865
INCLUDE_DIRECTORIES(h5_test)
18641866
ADD_SUBDIRECTORY(nc_test4)
18651867
IF(BUILD_BENCHMARKS)
@@ -2034,7 +2036,7 @@ is_enabled(BUILD_SHARED_LIBS enable_shared)
20342036
is_enabled(ENABLE_V2_API HAS_NC2)
20352037
is_enabled(ENABLE_NETCDF_4 HAS_NC4)
20362038
is_enabled(ENABLE_HDF4 HAS_HDF4)
2037-
is_enabled(ENABLE_NETCDF_4 HAS_HDF5)
2039+
is_enabled(USE_HDF5 HAS_HDF5)
20382040
is_enabled(USE_SZIP HAS_SZIP)
20392041
is_enabled(USE_SZIP HAS_SZIP_WRITE)
20402042
is_enabled(STATUS_PNETCDF HAS_PNETCDF)
@@ -2053,6 +2055,7 @@ is_enabled(ENABLE_ERANGE_FILL HAS_ERANGE_FILL)
20532055
is_enabled(HAVE_H5Z_SZIP HAS_SZLIB)
20542056
is_enabled(HDF5_HAS_PAR_FILTERS HAS_PAR_FILTERS)
20552057
is_enabled(ENABLE_NCZARR HAS_NCZARR)
2058+
is_enabled(ENABLE_S3_TESTS DO_S3_TESTS)
20562059

20572060
# Generate file from template.
20582061
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ endif
5353
if USE_HDF5
5454
H5_TEST_DIR = h5_test
5555
LIBHDF5 = libhdf5
56-
if USE_NETCDF4
56+
if USE_HDF5
5757
NC_TEST4 = nc_test4
5858
endif
5959
endif

configure.ac

Lines changed: 24 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ AC_CONFIG_SRCDIR([include/netcdf.h])
7676

7777
AC_MSG_NOTICE([checking supported formats])
7878

79-
# An explicit setting of netcdf-4 | netcdf4 is treated as if it was enable-hdf5
79+
# An explicit disable of netcdf-4 | netcdf4 is treated as if it was disable-hdf5
8080
AC_MSG_CHECKING([whether we should build with netcdf4 (alias for HDF5)])
8181
AC_ARG_ENABLE([netcdf4], [AS_HELP_STRING([--disable-netcdf4],
8282
[(synonym for --enable-hdf5)])])
@@ -87,6 +87,7 @@ AC_ARG_ENABLE([netcdf-4], [AS_HELP_STRING([--disable-netcdf-4],
8787
[(synonym for --disable-netcdf4)])])
8888
test "x$enable_netcdf_4" = xno || enable_netcdf_4=yes
8989
AC_MSG_RESULT([$enable_netcdf_4])
90+
# Propagate the alias
9091
if test "x$enable_netcdf_4" = xno ; then enable_netcdf4=no; fi
9192
if test "x$enable_netcdf4" = xno ; then enable_netcdf_4=no; fi
9293

@@ -96,7 +97,7 @@ AC_ARG_ENABLE([hdf5], [AS_HELP_STRING([--disable-hdf5],
9697
[do not build with HDF5])])
9798
test "x$enable_hdf5" = xno || enable_hdf5=yes
9899
if test "x$enable_netcdf4" = xno ; then enable_hdf5=no ; fi
99-
# netcdf4 is synonym for setting hdf5
100+
# disable-netcdf4 is synonym for disable-hdf5
100101
AC_MSG_RESULT([$enable_hdf5])
101102

102103
# Check whether we want to enable CDF5 support.
@@ -623,8 +624,8 @@ AC_ARG_ENABLE([benchmarks],
623624
are timed. We use these tests to check netCDF performance.])])
624625
test "x$enable_benchmarks" = xyes || enable_benchmarks=no
625626
AC_MSG_RESULT($enable_benchmarks)
626-
if test "x$enable_netcdf4" = xno -a "x$enable_benchmarks" = xyes; then
627-
AC_MSG_ERROR([Can't use benchmarks if netCDF-4 is disabled.])
627+
if test "x$enable_HDF5" = xno -a "x$enable_benchmarks" = xyes; then
628+
AC_MSG_ERROR([Can't use benchmarks if HDF5 is disabled.])
628629
fi
629630
AM_CONDITIONAL(BUILD_BENCHMARKS, [test x$enable_benchmarks = xyes])
630631

@@ -1102,10 +1103,10 @@ AC_CHECK_SIZEOF(ssize_t)
11021103
$SLEEPCMD
11031104
AC_CHECK_SIZEOF([void*])
11041105

1105-
if test "x$enable_netcdf_4" = xyes || test "x$enable_dap" = xyes; then
1106+
if test "x$enable_hdf5" = xyes || test "x$enable_dap" = xyes; then
11061107
AC_SEARCH_LIBS([deflate], [zlibwapi zlibstat zlib zlib1 z], [], [
11071108
AC_MSG_ERROR([Can't find or link to the z library. Turn off netCDF-4 and \
1108-
DAP clients with --disable-netcdf-4 --disable-dap, or see config.log for errors.])])
1109+
DAP clients with --disable-hdf5 --disable-dap, or see config.log for errors.])])
11091110
AC_SEARCH_LIBS([dlopen], [dl dld], [], [])
11101111
fi
11111112

@@ -1130,9 +1131,9 @@ if test "x$enable_hdf5" = xyes; then
11301131
# Check for the main hdf5 and hdf5_hl library.
11311132

11321133
AC_SEARCH_LIBS([H5Fflush], [hdf5dll hdf5], [],
1133-
[AC_MSG_ERROR([Can't find or link to the hdf5 library. Use --disable-netcdf-4, or see config.log for errors.])])
1134+
[AC_MSG_ERROR([Can't find or link to the hdf5 library. Use --disable-hdf5, or see config.log for errors.])])
11341135
AC_SEARCH_LIBS([H5DSis_scale], [hdf5_hldll hdf5_hl], [],
1135-
[AC_MSG_ERROR([Can't find or link to the hdf5 high-level. Use --disable-netcdf-4, or see config.log for errors.])])
1136+
[AC_MSG_ERROR([Can't find or link to the hdf5 high-level. Use --disable-hdf5, or see config.log for errors.])])
11361137

11371138
AC_CHECK_HEADERS([hdf5.h], [], [AC_MSG_ERROR([Compiling a test with HDF5 failed. Either hdf5.h cannot be found, or config.log should be checked for other reason.])])
11381139

@@ -1472,48 +1473,6 @@ AC_ARG_ENABLE([filter-testing],
14721473
test "x$enable_filter_testing" = xno || enable_filter_testing=yes
14731474
AC_MSG_RESULT($enable_filter_testing)
14741475

1475-
# Control client filters
1476-
AC_MSG_CHECKING([whether client filters should be enabled])
1477-
AC_ARG_ENABLE([client-filters],
1478-
[AS_HELP_STRING([--enable-clientfilters],
1479-
[Enable client side filters; default off])])
1480-
test "x$enable_client_filters" = xyes || enable_client_filters=no
1481-
AC_MSG_RESULT($enable_client_filters)
1482-
1483-
if test "x$enable_netcdf_4" = xno ; then
1484-
AC_MSG_WARN([netCDF-4 disabled => --disable-filter-testing && --disable-client-filters])
1485-
enable_filter_testing=no
1486-
enable_client_filters=no
1487-
fi
1488-
1489-
if test "x$enable_hdf5" = xno ; then
1490-
AC_MSG_WARN([HDF5 disabled => --disable-filter-testing])
1491-
enable_filter_testing=no
1492-
fi
1493-
1494-
if test "x$enable_shared" = xno ; then
1495-
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
1496-
enable_filter_testing=no
1497-
fi
1498-
AM_CONDITIONAL(ENABLE_CLIENT_FILTERS, [test x$enable_client_filters = xyes])
1499-
1500-
if test "x$enable_netcdf_4" = xno ; then
1501-
AC_MSG_WARN([netCDF-4 disabled => --disable-filter-testing && --disable-client-filters])
1502-
enable_filter_testing=no
1503-
enable_client_filters=no
1504-
fi
1505-
1506-
if test "x$enable_hdf5" = xno ; then
1507-
AC_MSG_WARN([HDF5 disabled => --disable-filter-testing])
1508-
enable_filter_testing=no
1509-
fi
1510-
1511-
if test "x$enable_shared" = xno ; then
1512-
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
1513-
enable_filter_testing=no
1514-
fi
1515-
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])
1516-
15171476
# Enable client side filter registration
15181477
AC_MSG_CHECKING([If client-side filters are enabled (default off)])
15191478
AC_ARG_ENABLE([clientside-filters],
@@ -1526,7 +1485,20 @@ AC_MSG_RESULT($enable_clientside_filters)
15261485
if test "x$enable_clientside_filters" = xyes ; then
15271486
AC_DEFINE([ENABLE_CLIENTSIDE_FILTERS], [1], [if true, enable client-side filters])
15281487
fi
1488+
1489+
if test "x$enable_hdf5" = xno ; then
1490+
AC_MSG_WARN([HDF5 disabled => --disable-filter-testing && --disable-client-filters])
1491+
enable_filter_testing=no
1492+
enable_clientside_filters=no
1493+
fi
1494+
15291495
AM_CONDITIONAL(ENABLE_CLIENTSIDE_FILTERS, [test x$enable_clientside_filters = xyes])
1496+
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])
1497+
1498+
if test "x$enable_shared" = xno ; then
1499+
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
1500+
enable_filter_testing=no
1501+
fi
15301502

15311503
AC_SUBST(NC_LIBS,[$NC_LIBS])
15321504
AC_SUBST(HAS_DAP,[$enable_dap])
@@ -1551,6 +1523,7 @@ AC_SUBST(HAS_BYTERANGE,[$enable_byterange])
15511523
AC_SUBST(RELAX_COORD_BOUND,[yes])
15521524
AC_SUBST([HAS_PAR_FILTERS], [$hdf5_supports_par_filters])
15531525
AC_SUBST(HAS_NCZARR,[$enable_nczarr])
1526+
AC_SUBST(DO_S3_TESTS,[$enable_s3_tests])
15541527

15551528
# Include some specifics for netcdf on windows.
15561529
#AH_VERBATIM([_WIN32_STRICMP],
@@ -1607,7 +1580,7 @@ AC_SUBST([NC_VERSION]) NC_VERSION=$VERSION
16071580
AX_SET_META([NC_HAS_NC2],[$nc_build_v2],[yes])
16081581
AX_SET_META([NC_HAS_NC4],[$enable_netcdf_4],[yes])
16091582
AX_SET_META([NC_HAS_HDF4],[$enable_hdf4],[yes])
1610-
AX_SET_META([NC_HAS_HDF5],[$enable_netcdf_4],[yes])
1583+
AX_SET_META([NC_HAS_HDF5],[$enable_hdf5],[yes])
16111584
AX_SET_META([NC_HAS_SZIP],[$ac_cv_func_H5Z_SZIP],[yes])
16121585
AX_SET_META([NC_HAS_DAP2],[$enable_dap],[yes])
16131586
AX_SET_META([NC_HAS_DAP4],[$enable_dap4],[yes])

include/hdf5dispatch.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ extern "C" {
5353
NC4_HDF5_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
5454
float preemption);
5555

56+
EXTERNL int
57+
HDF5_def_dim(int ncid, const char *name, size_t len, int *idp);
58+
59+
EXTERNL int
60+
HDF5_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
61+
62+
EXTERNL int
63+
HDF5_rename_dim(int ncid, int dimid, const char *name);
64+
5665
#if defined(__cplusplus)
5766
}
5867
#endif

include/nc4dispatch.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,12 @@ extern "C" {
6363

6464
/* Begin _dim */
6565

66-
EXTERNL int
67-
NC4_def_dim(int ncid, const char *name, size_t len, int *idp);
68-
6966
EXTERNL int
7067
NC4_inq_dimid(int ncid, const char *name, int *idp);
7168

72-
EXTERNL int
73-
NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
74-
7569
EXTERNL int
7670
NC4_inq_unlimdim(int ncid, int *unlimdimidp);
7771

78-
EXTERNL int
79-
NC4_rename_dim(int ncid, int dimid, const char *name);
80-
8172
/* End _dim */
8273
/* Begin _att */
8374

include/nc_logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void nc_log_hdf5(void);
5151

5252
#define BAIL_QUIET BAIL
5353

54-
#ifdef USE_NETCDF_4
54+
#ifdef USE_NETCDF4
5555
#ifndef ENABLE_SET_LOG_LEVEL
5656
/* Define away any calls to nc_set_log_level(), if its not enabled. */
5757
#define nc_set_log_level(e)

include/ncdispatch.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@
5555
#define T_uint NC_UINT
5656
#define T_longlong NC_INT64
5757
#define T_ulonglong NC_UINT64
58-
#ifdef USE_NETCDF4
5958
#define T_string NC_STRING
60-
#endif
6159

6260
/* Synthetic type to handle special memtypes */
6361
#define T_uchar NC_UBYTE

libdap2/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ set(man_MANS netcdf.3)
2020

2121
set(ARGS_MANPAGE -DAPI=C)
2222

23-
IF (USE_NETCDF4)
23+
IF (USE_HDF5)
2424
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
25-
ENDIF(USE_NETCDF4)
25+
ENDIF(USE_HDF5)
2626

2727
IF (BUILD_DAP)
2828
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)

libdap2/Makefile.am

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ HDRS= nccommon.h constraints.h ncd2dispatch.h dapincludes.h \
2424
dapodom.h getvara.h dapnc.h daputil.h dapdebug.h dapdump.h \
2525
dceconstraints.h dcetab.h dceparselex.h
2626

27-
if USE_NETCDF4
28-
#SRC += cdf4.c constraints4.c ncd4dispatch.c ncdap4.c getvara4.c
29-
#HDRS +=constraints4.h ncd4dispatch.h ncdap4.h
30-
endif
31-
3227
if ENABLE_DAP
3328

3429
if USE_NETCDF4

0 commit comments

Comments
 (0)