diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-02-18 16:19:43 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-02-18 16:19:43 -0500 |
commit | 5199b9b33747ddcf787cf97d5e14b3b50a579802 (patch) | |
tree | 8ad43e8da0a27e8473f233595fbe876084d7e52e /configure.ac | |
parent | e0427b6bf6bd9ea4c77a2225c0063ebb5938e280 (diff) | |
download | tor-5199b9b33747ddcf787cf97d5e14b3b50a579802.tar.gz tor-5199b9b33747ddcf787cf97d5e14b3b50a579802.zip |
Use autoconf to check for optional zstd functionality.
Fixes a bug in our zstd-static code. Bug not in any released
version of Tor.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
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) |