From a4c158e074f867b5de6f19000a216854d643972b Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Fri, 16 Sep 2022 11:03:51 -0600 Subject: [PATCH 1/3] Added an additional check for zstd.h in configure.ac --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 31322216ab..35b783c56b 100644 --- a/configure.ac +++ b/configure.ac @@ -718,10 +718,24 @@ AC_CHECK_LIB([zstd],[ZSTD_compress],[have_zstd=yes],[have_zstd=no]) if test "x$have_zstd" = "xyes" ; then AC_SEARCH_LIBS([ZSTD_compress],[zstd zstd.dll cygzstd.dll], [], []) AC_DEFINE([HAVE_ZSTD], [1], [if true, zstd library is available]) + fi AC_MSG_CHECKING([whether libzstd library is available]) AC_MSG_RESULT([${have_zstd}]) +## +# Ensure that the zstd.h dev files are also available. +## +if test "x$have_zstd" = "xyes" ; then + AC_CHECK_HEADERS([zstd.h], [], [nc_zstd_h_missing=yes]) + if test "x$nc_zstd_h_missing" = xyes; then + AC_MSG_WARN([zstd library detected, but zstd.h development file not found. Ensure that the zstd development files are installed in order to build zstd support.]) + AC_DEFINE([HAVE_ZSTD], [0], [if true, zstd library is available]) + have_zstd=no + fi +fi + + # See if we have libbz2 AC_CHECK_LIB([bz2],[BZ2_bzCompress],[have_bz2=yes],[have_bz2=no]) if test "x$have_bz2" = "xyes" ; then From c79c2a57873bd4fb4115572beec3abca41ffc508 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Fri, 16 Sep 2022 11:46:08 -0600 Subject: [PATCH 2/3] Clean up (on linux) an issue with uintptr_t --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 35b783c56b..77853aa596 100644 --- a/configure.ac +++ b/configure.ac @@ -1346,7 +1346,7 @@ AC_STRUCT_ST_BLKSIZE UD_CHECK_IEEE AC_CHECK_TYPES([size_t, ssize_t, schar, uchar, longlong, ushort, uint, int64, uint64, size64_t, ssize64_t, _off64_t, uint64_t, ptrdiff_t]) AC_TYPE_OFF_T -AC_TYPE_UINTPTR_T +AC_CHECK_TYPES([uintptr_t]) AC_C_CHAR_UNSIGNED AC_C_BIGENDIAN From c07fdaf9cc315cd8efe370a06d2ec35b0448e3d3 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Fri, 16 Sep 2022 12:21:06 -0600 Subject: [PATCH 3/3] Add a check for stdint.h in order to fix a weird issue where libzstd-dev, when present, was masking a missing data type declaration. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 77853aa596..def6e207cd 100644 --- a/configure.ac +++ b/configure.ac @@ -1186,7 +1186,7 @@ AC_CHECK_HEADERS([sys/param.h]) AC_CHECK_HEADERS([libgen.h]) #AC_CHECK_HEADERS([locale.h]) AC_HEADER_STDC -AC_CHECK_HEADERS([locale.h stdio.h stdarg.h fcntl.h malloc.h stdlib.h string.h strings.h unistd.h sys/stat.h getopt.h sys/time.h sys/types.h time.h dirent.h]) +AC_CHECK_HEADERS([locale.h stdio.h stdarg.h fcntl.h malloc.h stdlib.h string.h strings.h unistd.h sys/stat.h getopt.h sys/time.h sys/types.h time.h dirent.h stdint.h]) # Do sys/resource.h separately #AC_CHECK_HEADERS([sys/resource.h],[havesysresource=1],[havesysresource=0]) @@ -1346,7 +1346,7 @@ AC_STRUCT_ST_BLKSIZE UD_CHECK_IEEE AC_CHECK_TYPES([size_t, ssize_t, schar, uchar, longlong, ushort, uint, int64, uint64, size64_t, ssize64_t, _off64_t, uint64_t, ptrdiff_t]) AC_TYPE_OFF_T -AC_CHECK_TYPES([uintptr_t]) +AC_TYPE_UINTPTR_T AC_C_CHAR_UNSIGNED AC_C_BIGENDIAN