mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +08:00
Merge branch 'master' into ejh_fix_memtest
This commit is contained in:
commit
0eb57ff25e
@ -1632,6 +1632,7 @@ ENDIF(USE_PNETCDF)
|
||||
|
||||
IF(USE_HDF5)
|
||||
add_subdirectory(libsrc4)
|
||||
add_subdirectory(libhdf5)
|
||||
ENDIF(USE_HDF5)
|
||||
|
||||
IF(USE_HDF4)
|
||||
|
@ -7,9 +7,6 @@
|
||||
|
||||
# Ed Hartnett, Ward Fisher
|
||||
|
||||
|
||||
|
||||
|
||||
# This directory stores libtool macros, put there by aclocal.
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@ -45,6 +42,7 @@ endif
|
||||
if USE_NETCDF4
|
||||
H5_TEST_DIR = h5_test
|
||||
LIBSRC4_DIR = libsrc4
|
||||
LIBHDF5 = libhdf5
|
||||
NC_TEST4 = nc_test4
|
||||
endif
|
||||
|
||||
@ -86,8 +84,9 @@ endif
|
||||
# and run. ncgen must come before ncdump, because their tests
|
||||
# depend on it.
|
||||
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc $(LIBSRC4_DIR) \
|
||||
$(LIBSRCP) $(LIBHDF4) $(OCLIB) $(DAP2) ${DAP4} liblib $(NCGEN3) \
|
||||
$(NCGEN) $(NCDUMP) ${PLUGIN_DIR} $(TESTDIRS) docs $(EXAMPLES)
|
||||
$(LIBSRCP) $(LIBHDF4) $(LIBHDF5) $(OCLIB) $(DAP2) ${DAP4} liblib \
|
||||
$(NCGEN3) $(NCGEN) $(NCDUMP) ${PLUGIN_DIR} $(TESTDIRS) docs \
|
||||
$(EXAMPLES)
|
||||
|
||||
# Remove these generated files, for a distclean.
|
||||
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings \
|
||||
|
11
configure.ac
11
configure.ac
@ -180,6 +180,7 @@ AC_MSG_CHECKING([whether we should build netCDF-4])
|
||||
AC_ARG_ENABLE([netcdf-4], [AS_HELP_STRING([--disable-netcdf-4],
|
||||
[do not build with netcdf-4 (else HDF5 and zlib required)])])
|
||||
test "x$enable_netcdf_4" = xno || enable_netcdf_4=yes
|
||||
enable_hdf5=enable_netcdf_4
|
||||
|
||||
# Synonym
|
||||
AC_ARG_ENABLE([netcdf4], [AS_HELP_STRING([--disable-netcdf4],
|
||||
@ -909,6 +910,7 @@ AC_CHECK_LIB([m], [floor], [],
|
||||
|
||||
if test "x$enable_netcdf_4" = xyes; then
|
||||
|
||||
AC_DEFINE([USE_HDF5], [1], [if true, use HDF5])
|
||||
AC_DEFINE([USE_NETCDF4], [1], [if true, build netCDF-4])
|
||||
AC_DEFINE([H5_USE_16_API], [1], [use HDF5 1.6 API])
|
||||
|
||||
@ -1202,6 +1204,7 @@ AM_CONDITIONAL(USE_PNETCDF_DIR, [test ! "x$PNETCDFDIR" = x])
|
||||
AM_CONDITIONAL(USE_LOGGING, [test "x$enable_logging" = xyes])
|
||||
AM_CONDITIONAL(CROSS_COMPILING, [test "x$cross_compiling" = xyes])
|
||||
AM_CONDITIONAL(USE_NETCDF4, [test x$enable_netcdf_4 = xyes])
|
||||
AM_CONDITIONAL(USE_HDF5, [test x$enable_hdf5 = xyes])
|
||||
AM_CONDITIONAL(USE_HDF4, [test x$enable_hdf4 = xyes])
|
||||
AM_CONDITIONAL(USE_HDF4_FILE_TESTS, [test x$enable_hdf4_file_tests = xyes])
|
||||
AM_CONDITIONAL(USE_RENAMEV3, [test x$enable_netcdf_4 = xyes -o x$enable_dap = xyes])
|
||||
@ -1335,6 +1338,7 @@ AC_SUBST(HAS_NC2,[$nc_build_v2])
|
||||
AC_SUBST(HAS_NC4,[$enable_netcdf_4])
|
||||
AC_SUBST(HAS_CDF5,[$enable_cdf5])
|
||||
AC_SUBST(HAS_HDF4,[$enable_hdf4])
|
||||
AC_SUBST(HAS_HDF5,[$enable_hdf5])
|
||||
AC_SUBST(HAS_PNETCDF,[$enable_pnetcdf])
|
||||
AC_SUBST(HAS_HDF5,[$enable_netcdf_4])
|
||||
AC_SUBST(HAS_LOGGING, [$enable_logging])
|
||||
@ -1440,14 +1444,15 @@ AC_MSG_NOTICE([generating header files and makefiles])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
nc-config
|
||||
netcdf.pc
|
||||
libnetcdf.settings
|
||||
postinstall.sh
|
||||
include/netcdf_meta.h
|
||||
libnetcdf.settings
|
||||
postinstall.sh
|
||||
include/netcdf_meta.h
|
||||
include/Makefile
|
||||
h5_test/Makefile
|
||||
hdf4_test/Makefile
|
||||
libsrc/Makefile
|
||||
libsrc4/Makefile
|
||||
libhdf5/Makefile
|
||||
libsrcp/Makefile
|
||||
ncdump/Makefile
|
||||
ncgen3/Makefile
|
||||
|
18
libhdf5/CMakeLists.txt
Normal file
18
libhdf5/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
||||
## This is a CMake file, part of Unidata's netCDF package.
|
||||
# Copyright 2018, see the COPYRIGHT file for more information.
|
||||
#
|
||||
# This builds the HDF5 dispatch layer.
|
||||
#
|
||||
# Ed Hartnett
|
||||
|
||||
# The source files for the HDF5 dispatch layer.
|
||||
SET(libnchdf5_SOURCES nc4hdf.c nc4info.c hdf5file.c)
|
||||
# SET(libnchdf5_SOURCES hdf5file.c nc4hdf.c hdf5attr.c hdf5dispatch.c
|
||||
# hdf5var.c hdf5type.c hdf5internal.c hdf5dim.c hdf5grp.c nc4info.c)
|
||||
|
||||
# Build the HDF4 dispatch layer as a library that will be included in
|
||||
# the netCDF library.
|
||||
add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES})
|
||||
|
||||
# Remember to package this file for CMake builds.
|
||||
ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt)
|
27
libhdf5/Makefile.am
Normal file
27
libhdf5/Makefile.am
Normal file
@ -0,0 +1,27 @@
|
||||
# This is part of Unidata's netCDF package. Copyright 2018, see the
|
||||
# COPYRIGHT file for more information.
|
||||
|
||||
# Build the HDF5 dispatch layer.
|
||||
|
||||
# Ed Hartnett
|
||||
|
||||
# Get AM_CPPFLAGS.
|
||||
include $(top_srcdir)/lib_flags.am
|
||||
libnetcdf4_la_CPPFLAGS = ${AM_CPPFLAGS}
|
||||
|
||||
# This is our output. The HDF5 convenience library.
|
||||
noinst_LTLIBRARIES = libnchdf5.la
|
||||
|
||||
# The source files.
|
||||
libnchdf5_la_SOURCES = nc4hdf.c nc4info.c hdf5file.c
|
||||
# libnchdf5_la_SOURCES = nc4hdf.c nc4info.c hdf5file.c hdf5attr.c \
|
||||
# hdf5dispatch.c hdf5var.c hdf5type.c hdf5internal.c hdf5dim.c \
|
||||
# hdf5grp.c
|
||||
|
||||
# Package this for cmake build.
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -7,6 +7,8 @@ SET(liblib_LIBS dispatch netcdf3)
|
||||
|
||||
IF(USE_HDF5 OR USE_NETCDF4)
|
||||
SET(liblib_LIBS ${liblib_LIBS} netcdf4)
|
||||
SET(liblib_LIBS ${liblib_LIBS} netcdfhdf5)
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF(USE_PNETCDF)
|
||||
|
@ -40,11 +40,17 @@ AM_CPPFLAGS += -I${top_srcdir}/libsrcp
|
||||
libnetcdf_la_LIBADD += ${top_builddir}/libsrcp/libnetcdfp.la
|
||||
endif # USE_PNETCDF
|
||||
|
||||
# + hdf5
|
||||
if USE_NETCDF4
|
||||
AM_CPPFLAGS += -I${top_srcdir}/libhdf5
|
||||
libnetcdf_la_LIBADD += ${top_builddir}/libhdf5/libnchdf5.la
|
||||
endif # USE_NETCDF4
|
||||
|
||||
# + hdf4
|
||||
if USE_HDF4
|
||||
AM_CPPFLAGS += -I${top_srcdir}/libhdf4
|
||||
libnetcdf_la_LIBADD += ${top_builddir}/libhdf4/libnchdf4.la
|
||||
endif # USE_PNETCDF
|
||||
endif # USE_HDF4
|
||||
|
||||
# + dap
|
||||
if ENABLE_DAP
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Process these files with m4.
|
||||
|
||||
SET(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4file.c nc4grp.c nc4type.c nc4var.c ncfunc.c nc4internal.c nc4hdf.c nc4info.c ncindex.c nc4mem.c nc4memcb.c )
|
||||
SET(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4grp.c nc4type.c nc4var.c ncfunc.c nc4internal.c ncindex.c nc4mem.c nc4memcb.c )
|
||||
|
||||
IF(LOGGING)
|
||||
SET(libsrc4_SOURCES ${libsrc4_SOURCES} error4.c)
|
||||
|
@ -10,9 +10,9 @@ libnetcdf4_la_CPPFLAGS = ${AM_CPPFLAGS}
|
||||
|
||||
# This is our output. The netCDF-4 convenience library.
|
||||
noinst_LTLIBRARIES = libnetcdf4.la
|
||||
libnetcdf4_la_SOURCES = nc4dispatch.c nc4attr.c nc4dim.c nc4file.c \
|
||||
nc4grp.c nc4hdf.c nc4internal.c nc4type.c nc4var.c ncfunc.c error4.c \
|
||||
nc4info.c nc4printer.c ncindex.c nc4mem.c nc4memcb.c
|
||||
libnetcdf4_la_SOURCES = nc4dispatch.c nc4attr.c nc4dim.c nc4grp.c \
|
||||
nc4internal.c nc4type.c nc4var.c ncfunc.c error4.c nc4printer.c \
|
||||
ncindex.c nc4mem.c nc4memcb.c
|
||||
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user