diff --git a/configure.ac b/configure.ac index a63182a08..779ef8f3c 100644 --- a/configure.ac +++ b/configure.ac @@ -1206,7 +1206,7 @@ if test "x$enable_hdf5" = xyes; then # See if hdf5 library supports Read-Only S3 (byte-range) driver AC_SEARCH_LIBS([H5Pset_fapl_ros3],[hdf5_hldll hdf5_hl], [has_ros3=yes], [has_ros3=no]) - if test "x$has_ros3" = xyes; then + if test "x$has_ros3" = xyes && test "x$enable_byterange" = xyes; then AC_DEFINE([ENABLE_HDF5_ROS3], [1], [if true, support byte-range using hdf5 virtual file driver.]) fi diff --git a/libhdf5/hdf5file.c b/libhdf5/hdf5file.c index c4f5edc99..bdb4ddcb4 100644 --- a/libhdf5/hdf5file.c +++ b/libhdf5/hdf5file.c @@ -223,9 +223,11 @@ nc4_close_netcdf4_file(NC_FILE_INFO_T *h5, int abort, NC_memio *memio) * hidden attribute. */ NC4_clear_provenance(&h5->provenance); +#if defined(ENABLE_BYTERANGE) || defined(ENABLE_HDF5_ROS3) || defined(ENABLE_S3_SDK) /* Free the http info */ ncurifree(hdf5_info->http.uri); NC_authfree(hdf5_info->http.auth); +#endif /* Close hdf file. It may not be open, since this function is also * called by NC_create() when a file opening is aborted. */ diff --git a/nczarr_test/Makefile.am b/nczarr_test/Makefile.am index 01155ff03..eba915759 100644 --- a/nczarr_test/Makefile.am +++ b/nczarr_test/Makefile.am @@ -108,40 +108,7 @@ tst_chunks.nz4 tst_chunks2.nc.nz4 \ ut_*.txt ut*.cdl tmp*.nc tmp*.cdl *.dmp test.nzf \ tst_chunks3.nc -if AX_IGNORE -if BUILD_BENCHMARKS - -BMCOMMON=bm_utils.c ut_util.c ut_test.c - -if AX_IGNORE -BENCHMARKS = bm_chunks3 bm_many_atts bm_many_objs -bm_chunks3_SOURCES = bm_chunks3.c ${BMCOMMON} -bm_many_atts_SOURCES = bm_many_atts.c ${BMCOMMON} -bm_many_objs_SOURCES = bm_many_objs.c ${BMCOMMON} -else -BENCHMARKS = bm_many_atts bm_many_objs -bm_many_atts_SOURCES = bm_many_atts.c ${BMCOMMON} -bm_many_objs_SOURCES = bm_many_objs.c ${BMCOMMON} -endif - -#PG = -pg -AM_CFLAGS += ${PG} -AM_LDFLAGS += ${PG} - -check_PROGRAMS += ${BENCHMARKS} -TESTS += run_bm_many_atts.sh -TESTS += run_bm_many_objs.sh - -EXTRA_DIST += bm_common.sh run_bm_metatest.sh run_bm_many_atts.sh run_bm_many_objs.sh - -CLEANFILES += bm_many_atts.nc4 bm_many_atts.nzf -CLEANFILES += bm_many_objs.nc4 bm_many_objs.nzf - -endif -endif - # Remove directories clean-local: rm -fr tst_chunks.nzf tst_chunks2.nzf tst_perdimspecs.nzf testmap.nzf testmapapi.nzf test.nzf - rm -fr bm_many_*.nzf