diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index c21ac3b22b..a5cb830e9e 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -397,6 +397,8 @@ set(USE_SZIP ${HAVE_SZ}) set_std_filter(Blosc) if(Zstd_FOUND) set_std_filter(Zstd) +else() + set(NETCDF_ENABLE_FILTER_ZSTD OFF) endif() if(Bz2_FOUND) set_std_filter(Bz2) diff --git a/configure.ac b/configure.ac index fb6642281d..d5dddd3071 100644 --- a/configure.ac +++ b/configure.ac @@ -2038,7 +2038,7 @@ else NC_LIBS="$with_netcdf_c_lib" fi if test "x$enable_shared" != xyes; then - NC_LIBS="$LDFLAGS $NC_LIBS $LIBS" + NC_LIBS="$LDFLAGS $NC_LIBS" fi case "x$target_os" in diff --git a/include/netcdf.h b/include/netcdf.h index 1718ccdfab..234a7e4ce4 100644 --- a/include/netcdf.h +++ b/include/netcdf.h @@ -231,7 +231,7 @@ Use this in mode flags for both nc_create() and nc_open(). */ #define NC_FORMATX_DAP4 (6) #define NC_FORMATX_UDF0 (8) #define NC_FORMATX_UDF1 (9) -#define NC_FORMATX_NCZARR (10) +#define NC_FORMATX_NCZARR (10) /**< Added in version 4.8.0 */ #define NC_FORMATX_UNDEFINED (0) /* To avoid breaking compatibility (such as in the python library), @@ -247,6 +247,7 @@ Use this in mode flags for both nc_create() and nc_open(). */ #define NC_FORMAT_DAP2 NC_FORMATX_DAP2 /**< \deprecated As of 4.4.0, use NC_FORMATX_DAP2 */ #define NC_FORMAT_DAP4 NC_FORMATX_DAP4 /**< \deprecated As of 4.4.0, use NC_FORMATX_DAP4 */ #define NC_FORMAT_UNDEFINED NC_FORMATX_UNDEFINED /**< \deprecated As of 4.4.0, use NC_FORMATX_UNDEFINED */ +#define NC_FORMATX_ZARR NC_FORMATX_NCZARR /**< \deprecated as of 4.8.0, use NC_FORMATX_NCZARR */ /**@}*/ diff --git a/nc-config.cmake.in b/nc-config.cmake.in index 121f996f02..27e99dbc40 100644 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -14,7 +14,8 @@ cc="@CMAKE_C_COMPILER@" cflags="-I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" libs="-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ @NC_LIBS@" libsprivate="@LIBS@" -HAS_STATIC="" +HAS_STATIC="FALSE" +PRINTLIBS="FALSE" has_dap2="@NETCDF_ENABLE_DAP2@" if [ -z $has_dap2 -o "$has_dap2" = "OFF" ]; then @@ -228,6 +229,9 @@ fi for i in "$@"; do case $i in + --libs) + PRINTLIBS="TRUE" + ;; --static) HAS_STATIC="TRUE" ;; @@ -349,7 +353,7 @@ while test $# -gt 0; do --libs) if [ "x$HAS_STATIC" = "xTRUE" ]; then - echo $libs $libsprivate + echo $LDFLAGS $libs $libsprivate else echo $libs fi @@ -369,7 +373,9 @@ while test $# -gt 0; do ;; --static) - + if [ "x$PRINTLIBS" != "xTRUE" ]; then + echo $LDFLAGS $libs $libsprivate + fi ;; --prefix) diff --git a/nc-config.in b/nc-config.in index 99e1d47a9c..85ce7254e6 100644 --- a/nc-config.in +++ b/nc-config.in @@ -38,8 +38,8 @@ has_multifilters="yes" has_quantize="@HAS_QUANTIZE@" has_stdfilters="@STD_FILTERS@" version="@PACKAGE_NAME@ @PACKAGE_VERSION@" -HAS_STATIC="" - +HAS_STATIC="FALSE" +PRINTLIBS="FALSE" usage() { cat <