From dc688a1586d5f1c993711db4c82b418092634414 Mon Sep 17 00:00:00 2001 From: rfm Date: Sun, 14 Apr 2024 14:20:43 +0100 Subject: [PATCH] restore accidentally deleted check --- configure | 45 +++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 1 + 2 files changed, 46 insertions(+) diff --git a/configure b/configure index fe90fe854..7c10935e1 100755 --- a/configure +++ b/configure @@ -9370,6 +9370,51 @@ _ACEOF fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5 +$as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; } +if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lzstd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ZSTD_compress (); +int +main () +{ +return ZSTD_compress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_zstd_ZSTD_compress=yes +else + ac_cv_lib_zstd_ZSTD_compress=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5 +$as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; } +if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZSTD 1 +_ACEOF + + LIBS="-lzstd $LIBS" + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyn_string_append in -liberty" >&5 $as_echo_n "checking for dyn_string_append in -liberty... " >&6; } if ${ac_cv_lib_iberty_dyn_string_append+:} false; then : diff --git a/configure.ac b/configure.ac index a6086293e..2cb276188 100644 --- a/configure.ac +++ b/configure.ac @@ -2451,6 +2451,7 @@ fi AC_CHECK_HEADERS(bfd.h) AC_CHECK_LIB(intl, libintl_fprintf) +AC_CHECK_LIB(zstd, ZSTD_compress) AC_CHECK_LIB(iberty, dyn_string_append) AC_CHECK_LIB(z, gzseek) AC_CHECK_LIB(sframe, sframe_decode)