Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nc-config generated by cmake. #2825

Merged
merged 13 commits into from
Dec 12, 2023
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1160,15 +1160,16 @@ 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)
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()

Expand Down
6 changes: 6 additions & 0 deletions config.h.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libsrc/ncx.m4
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ifdef(`PNETCDF',`
`#'if HAVE_CONFIG_H
`#'include <config.h>
`#'endif')

#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion nc-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading