zstd fixes

Change-Id: Iae2862b011e027b1e26e33ef53393e1ec90e4fde
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ
2016-10-29 21:19:35 +02:00
parent 9d14d9ac92
commit d600f01867
5 changed files with 98 additions and 12 deletions

10
configure vendored
View File

@ -4809,12 +4809,18 @@ fi
if test "$have_zstd" = "yes"; then
echo "zstd library: yes"
antispam_libs="$antispam_libs -lzstd"
defs="$defs -DHAVE_ZSTD"
if test "$(which zstd)" = ""; then echo "Error: cannot find the zstd binary"; exit 1; fi
zstd_magic=$(echo this is a test | zstd | hexdump -C | awk '/00000000/{print "ntohl(0x"$2$3$4$5 ")"}')
cat >>confdefs.h <<_ACEOF
#define HAVE_ZSTD 1
#define ZSTD_DETECTED_MAGICNUMBER $zstd_magic
_ACEOF
antispam_libs="$antispam_libs -lzstd"
fi
if test "$have_zip" = "yes"; then