Skip to content

Commit

Permalink
The big change for this commit is complete the
Browse files Browse the repository at this point in the history
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 Unidata#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.
  • Loading branch information
DennisHeimbigner committed Aug 12, 2020
1 parent 8b487ba commit d85bb6f
Show file tree
Hide file tree
Showing 61 changed files with 322 additions and 389 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ services:
env:
matrix:
# Ubuntu
- 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
- 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

- 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
- 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

- 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
- 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

- 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
- 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

- 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

Expand Down
39 changes: 21 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,17 @@ ENDIF()
# Format Option checks
################################

# We need to now treat enable-netcdf4 and enable-hdf5 as separate,
# but for back compatability, we need to treat enable-netcdf4
# as equivalent to enable-hdf5.
# We detect this using these rules:
# 1. if ENABLE_HDF5 is off then disable hdf5
# 2. if ENABLE_NETCDF4 is off then disable hdf5
# 3. else enable hdf5
OPTION(ENABLE_NETCDF_4 "Use HDF5." ON)
OPTION(ENABLE_NETCDF4 "Use HDF5." ON)
OPTION(ENABLE_HDF5 "Use HDF5." ON)
IF(NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
IF(NOT ENABLE_HDF5 OR NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
SET(ENABLE_HDF5 OFF CACHE BOOL "Use HDF5" FORCE)
ENDIF()
OPTION(ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF)
Expand Down Expand Up @@ -591,9 +598,7 @@ ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
# *
##
SET(USE_HDF5 ${ENABLE_HDF5})
IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(USE_HDF5 ON)
SET(USE_NETCDF4 ON)
IF(USE_HDF5)
##
# Accommodate developers who have hdf5 libraries and
# headers on their system, but do not have a the hdf
Expand Down Expand Up @@ -801,8 +806,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
#option to include HDF5 High Level header file (hdf5_hl.h) in case we are not doing a make install
INCLUDE_DIRECTORIES(${HDF5_HL_INCLUDE_DIR})


ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
ENDIF(USE_HDF5)

# See if we have libcurl
FIND_PACKAGE(CURL)
Expand Down Expand Up @@ -864,11 +868,9 @@ IF(ENABLE_DAP)
SET(USE_DAP ON CACHE BOOL "")
SET(ENABLE_DAP2 ON CACHE BOOL "")

IF(ENABLE_NETCDF_4)
IF(ENABLE_HDF5)
SET(ENABLE_DAP4 ON CACHE BOOL "")
ELSE(ENABLE_NETCDF_4)
SET(ENABLE_DAP4 OFF CACHE BOOL "")
ENDIF(ENABLE_NETCDF_4)
ENDIF(ENABLE_HDF5)

ELSE()
SET(ENABLE_DAP2 OFF)
Expand Down Expand Up @@ -1072,15 +1074,15 @@ IF(ENABLE_LARGE_FILE_SUPPORT)
ENDIF()
ENDIF()

OPTION(ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if netCDF-4 is not Enabled" OFF)
IF(NOT ENABLE_NETCDF_4 AND ENABLE_EXAMPLE_TESTS)
OPTION(ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if HDF5 is not Enabled" OFF)
IF(NOT ENABLE_HDF5 AND ENABLE_EXAMPLE_TESTS)
SET(ENABLE_EXAMPLE_TESTS OFF)
ENDIF()

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

# Enable special filter test; experimental when using cmake.
OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_NETCDF_4})
IF(ENABLE_FILTER_TESTING AND NOT ENABLE_NETCDF_4)
MESSAGE(WARNING "ENABLE_FILTER_TESTING requires netCDF-4. Disabling.")
OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_HDF5})
IF(ENABLE_FILTER_TESTING AND NOT ENABLE_HDF5)
MESSAGE(WARNING "ENABLE_FILTER_TESTING requires HDF5. Disabling.")
SET(ENABLE_FILTER_TESTING OFF)
ENDIF()
IF(NOT BUILD_SHARED_LIBS)
Expand Down Expand Up @@ -1859,7 +1861,7 @@ IF(ENABLE_TESTS)
ADD_SUBDIRECTORY(nctest)
ENDIF()
ADD_SUBDIRECTORY(nc_test)
IF(USE_NETCDF4)
IF(USE_HDF5)
INCLUDE_DIRECTORIES(h5_test)
ADD_SUBDIRECTORY(nc_test4)
IF(BUILD_BENCHMARKS)
Expand Down Expand Up @@ -2034,7 +2036,7 @@ is_enabled(BUILD_SHARED_LIBS enable_shared)
is_enabled(ENABLE_V2_API HAS_NC2)
is_enabled(ENABLE_NETCDF_4 HAS_NC4)
is_enabled(ENABLE_HDF4 HAS_HDF4)
is_enabled(ENABLE_NETCDF_4 HAS_HDF5)
is_enabled(USE_HDF5 HAS_HDF5)
is_enabled(USE_SZIP HAS_SZIP)
is_enabled(USE_SZIP HAS_SZIP_WRITE)
is_enabled(STATUS_PNETCDF HAS_PNETCDF)
Expand All @@ -2053,6 +2055,7 @@ is_enabled(ENABLE_ERANGE_FILL HAS_ERANGE_FILL)
is_enabled(HAVE_H5Z_SZIP HAS_SZLIB)
is_enabled(HDF5_HAS_PAR_FILTERS HAS_PAR_FILTERS)
is_enabled(ENABLE_NCZARR HAS_NCZARR)
is_enabled(ENABLE_S3_TESTS DO_S3_TESTS)

# Generate file from template.
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ endif
if USE_HDF5
H5_TEST_DIR = h5_test
LIBHDF5 = libhdf5
if USE_NETCDF4
if USE_HDF5
NC_TEST4 = nc_test4
endif
endif
Expand Down
75 changes: 24 additions & 51 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ AC_CONFIG_SRCDIR([include/netcdf.h])

AC_MSG_NOTICE([checking supported formats])

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

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

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

Expand Down Expand Up @@ -1102,10 +1103,10 @@ AC_CHECK_SIZEOF(ssize_t)
$SLEEPCMD
AC_CHECK_SIZEOF([void*])

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

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

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

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.])])

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

# Control client filters
AC_MSG_CHECKING([whether client filters should be enabled])
AC_ARG_ENABLE([client-filters],
[AS_HELP_STRING([--enable-clientfilters],
[Enable client side filters; default off])])
test "x$enable_client_filters" = xyes || enable_client_filters=no
AC_MSG_RESULT($enable_client_filters)

if test "x$enable_netcdf_4" = xno ; then
AC_MSG_WARN([netCDF-4 disabled => --disable-filter-testing && --disable-client-filters])
enable_filter_testing=no
enable_client_filters=no
fi

if test "x$enable_hdf5" = xno ; then
AC_MSG_WARN([HDF5 disabled => --disable-filter-testing])
enable_filter_testing=no
fi

if test "x$enable_shared" = xno ; then
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
enable_filter_testing=no
fi
AM_CONDITIONAL(ENABLE_CLIENT_FILTERS, [test x$enable_client_filters = xyes])

if test "x$enable_netcdf_4" = xno ; then
AC_MSG_WARN([netCDF-4 disabled => --disable-filter-testing && --disable-client-filters])
enable_filter_testing=no
enable_client_filters=no
fi

if test "x$enable_hdf5" = xno ; then
AC_MSG_WARN([HDF5 disabled => --disable-filter-testing])
enable_filter_testing=no
fi

if test "x$enable_shared" = xno ; then
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
enable_filter_testing=no
fi
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])

# Enable client side filter registration
AC_MSG_CHECKING([If client-side filters are enabled (default off)])
AC_ARG_ENABLE([clientside-filters],
Expand All @@ -1526,7 +1485,20 @@ AC_MSG_RESULT($enable_clientside_filters)
if test "x$enable_clientside_filters" = xyes ; then
AC_DEFINE([ENABLE_CLIENTSIDE_FILTERS], [1], [if true, enable client-side filters])
fi

if test "x$enable_hdf5" = xno ; then
AC_MSG_WARN([HDF5 disabled => --disable-filter-testing && --disable-client-filters])
enable_filter_testing=no
enable_clientside_filters=no
fi

AM_CONDITIONAL(ENABLE_CLIENTSIDE_FILTERS, [test x$enable_clientside_filters = xyes])
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])

if test "x$enable_shared" = xno ; then
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
enable_filter_testing=no
fi

AC_SUBST(NC_LIBS,[$NC_LIBS])
AC_SUBST(HAS_DAP,[$enable_dap])
Expand All @@ -1551,6 +1523,7 @@ AC_SUBST(HAS_BYTERANGE,[$enable_byterange])
AC_SUBST(RELAX_COORD_BOUND,[yes])
AC_SUBST([HAS_PAR_FILTERS], [$hdf5_supports_par_filters])
AC_SUBST(HAS_NCZARR,[$enable_nczarr])
AC_SUBST(DO_S3_TESTS,[$enable_s3_tests])

# Include some specifics for netcdf on windows.
#AH_VERBATIM([_WIN32_STRICMP],
Expand Down Expand Up @@ -1607,7 +1580,7 @@ AC_SUBST([NC_VERSION]) NC_VERSION=$VERSION
AX_SET_META([NC_HAS_NC2],[$nc_build_v2],[yes])
AX_SET_META([NC_HAS_NC4],[$enable_netcdf_4],[yes])
AX_SET_META([NC_HAS_HDF4],[$enable_hdf4],[yes])
AX_SET_META([NC_HAS_HDF5],[$enable_netcdf_4],[yes])
AX_SET_META([NC_HAS_HDF5],[$enable_hdf5],[yes])
AX_SET_META([NC_HAS_SZIP],[$ac_cv_func_H5Z_SZIP],[yes])
AX_SET_META([NC_HAS_DAP2],[$enable_dap],[yes])
AX_SET_META([NC_HAS_DAP4],[$enable_dap4],[yes])
Expand Down
9 changes: 9 additions & 0 deletions include/hdf5dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ extern "C" {
NC4_HDF5_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
float preemption);

EXTERNL int
HDF5_def_dim(int ncid, const char *name, size_t len, int *idp);

EXTERNL int
HDF5_inq_dim(int ncid, int dimid, char *name, size_t *lenp);

EXTERNL int
HDF5_rename_dim(int ncid, int dimid, const char *name);

#if defined(__cplusplus)
}
#endif
Expand Down
9 changes: 0 additions & 9 deletions include/nc4dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,12 @@ extern "C" {

/* Begin _dim */

EXTERNL int
NC4_def_dim(int ncid, const char *name, size_t len, int *idp);

EXTERNL int
NC4_inq_dimid(int ncid, const char *name, int *idp);

EXTERNL int
NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp);

EXTERNL int
NC4_inq_unlimdim(int ncid, int *unlimdimidp);

EXTERNL int
NC4_rename_dim(int ncid, int dimid, const char *name);

/* End _dim */
/* Begin _att */

Expand Down
2 changes: 1 addition & 1 deletion include/nc_logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void nc_log_hdf5(void);

#define BAIL_QUIET BAIL

#ifdef USE_NETCDF_4
#ifdef USE_NETCDF4
#ifndef ENABLE_SET_LOG_LEVEL
/* Define away any calls to nc_set_log_level(), if its not enabled. */
#define nc_set_log_level(e)
Expand Down
2 changes: 0 additions & 2 deletions include/ncdispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
#define T_uint NC_UINT
#define T_longlong NC_INT64
#define T_ulonglong NC_UINT64
#ifdef USE_NETCDF4
#define T_string NC_STRING
#endif

/* Synthetic type to handle special memtypes */
#define T_uchar NC_UBYTE
Expand Down
4 changes: 2 additions & 2 deletions libdap2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ set(man_MANS netcdf.3)

set(ARGS_MANPAGE -DAPI=C)

IF (USE_NETCDF4)
IF (USE_HDF5)
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
ENDIF(USE_NETCDF4)
ENDIF(USE_HDF5)

IF (BUILD_DAP)
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
Expand Down
5 changes: 0 additions & 5 deletions libdap2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ HDRS= nccommon.h constraints.h ncd2dispatch.h dapincludes.h \
dapodom.h getvara.h dapnc.h daputil.h dapdebug.h dapdump.h \
dceconstraints.h dcetab.h dceparselex.h

if USE_NETCDF4
#SRC += cdf4.c constraints4.c ncd4dispatch.c ncdap4.c getvara4.c
#HDRS +=constraints4.h ncd4dispatch.h ncdap4.h
endif

if ENABLE_DAP

if USE_NETCDF4
Expand Down
4 changes: 2 additions & 2 deletions libdap4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ set(man_MANS netcdf.3)

set(ARGS_MANPAGE -DAPI=C)

IF (USE_NETCDF4)
IF (USE_HDf5)
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
ENDIF(USE_NETCDF4)
ENDIF(USE_HDF5)

IF (BUILD_DAP)
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
Expand Down
3 changes: 2 additions & 1 deletion libhdf4/hdf4dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <stdlib.h>
#include "hdf4dispatch.h"
#include "nc4dispatch.h"
#include "hdf5dispatch.h"

/* This is the dispatch object that holds pointers to all the
* functions that make up the HDF4 dispatch interface. */
Expand All @@ -37,7 +38,7 @@ static const NC_Dispatch HDF4_dispatcher = {

NC_RO_def_dim,
NC4_inq_dimid,
NC4_inq_dim,
HDF5_inq_dim,
NC4_inq_unlimdim,
NC_RO_rename_dim,

Expand Down
Loading

0 comments on commit d85bb6f

Please sign in to comment.