diff --git a/CMakeLists.txt b/CMakeLists.txt index 189f6d87c2..c666b42114 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1160,7 +1160,8 @@ set_std_filter(Szip) SET(HAVE_SZ ${Szip_FOUND}) set_std_filter(Blosc) IF(Zstd_FOUND) -set_std_filter(Zstd) + set_std_filter(Zstd) + SET(HAVE_ZSTD ON) ENDIF() IF(Bz2_FOUND) set_std_filter(Bz2) @@ -1168,7 +1169,7 @@ ELSE() # The reason we use a local version is to support a more comples test case MESSAGE("libbz2 not found using built-in version") SET(HAVE_LOCAL_BZ2 ON) - SET(HAVE_BZ2 ON) + SET(HAVE_BZ2 ON CACHE BOOL "") set(STD_FILTERS "${STD_FILTERS} bz2") ENDIF() diff --git a/config.h.cmake.in b/config.h.cmake.in index 233c2f1e27..f10a3a91a5 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -118,6 +118,12 @@ are set when opening a binary file on Windows. */ /* if true, build byte-range Client */ #cmakedefine ENABLE_BYTERANGE 1 +/* if true, enable ERANGE fill */ +#cmakedefine ENABLE_ERANGE_FILL 1 +#ifdef ENABLE_ERANGE_FILL +#define ERANGE_FILL 1 +#endif + /* if true, use hdf5 S3 virtual file reader */ #cmakedefine ENABLE_HDF5_ROS3 1 diff --git a/libsrc/ncx.m4 b/libsrc/ncx.m4 index a9fb11f41b..176ca27cc2 100644 --- a/libsrc/ncx.m4 +++ b/libsrc/ncx.m4 @@ -39,7 +39,7 @@ ifdef(`PNETCDF',` `#'if HAVE_CONFIG_H `#'include `#'endif') - +#include #include #include #include diff --git a/nc-config.cmake.in b/nc-config.cmake.in index 8588665d20..15ea967d4c 100644 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -118,7 +118,7 @@ fi has_multifilters="yes" -has_zstd="@HAS_ZSTD" +has_zstd="@HAVE_ZSTD@" if [ -z "$has_zstd" -o "$has_zstd" = "OFF" -o "$has_zstd" = "FALSE" ]; then has_zstd="no" else