From 5199b9b33747ddcf787cf97d5e14b3b50a579802 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 18 Feb 2018 16:19:43 -0500 Subject: Use autoconf to check for optional zstd functionality. Fixes a bug in our zstd-static code. Bug not in any released version of Tor. --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1f43650b08..22c8a56137 100644 --- a/configure.ac +++ b/configure.ac @@ -977,6 +977,16 @@ if test "x$have_zstd" = "xyes"; then AC_DEFINE(HAVE_ZSTD,1,[Have Zstd]) TOR_ZSTD_CFLAGS="${ZSTD_CFLAGS}" TOR_ZSTD_LIBS="${ZSTD_LIBS}" + + dnl now check for zstd functions + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$LIBS $ZSTD_LIBS" + CFLAGS="$CFLAGS $ZSTD_CFLAGS" + AC_CHECK_FUNCS(ZSTD_estimateCStreamSize \ + ZSTD_estimateDCtxSize) + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" fi AC_SUBST(TOR_ZSTD_CFLAGS) AC_SUBST(TOR_ZSTD_LIBS) -- cgit v1.2.3-54-g00ecf