summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-01-12 18:29:20 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-01-12 18:29:20 -0500
commit9211fb3d8680beccb7d3463c093d3f80112b9cd0 (patch)
treebfa2049dafe51b1007d91de3e41c6215e9640bfa /configure.ac
parentef28cce5e5ae306342fb9be9657b38e4c41393c6 (diff)
downloadlighttpd-git-9211fb3d8680beccb7d3463c093d3f80112b9cd0.tar.gz
[mod_deflate] support Accept-Encoding: zstd
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c234af9c..325a1b4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -962,6 +962,37 @@ if test "$WITH_ZLIB" != no; then
AC_SUBST([Z_LIB])
fi
+dnl zstd
+AC_MSG_NOTICE([----------------------------------------])
+AC_MSG_CHECKING([for zstd support])
+AC_ARG_WITH([zstd],
+ [AS_HELP_STRING([--with-zstd],
+ [Enable zstd support for mod_deflate]
+ )],
+ [WITH_ZSTD=$withval],
+ [WITH_ZSTD=no]
+)
+AC_MSG_RESULT([$WITH_ZSTD])
+
+if test "$WITH_ZSTD" != no; then
+ if test "$WITH_ZSTD" != yes; then
+ ZSTD_LIB="-L$WITH_ZSTD -lzstd"
+ CPPFLAGS="$CPPFLAGS -I$WITH_ZSTD"
+ else
+ AC_CHECK_HEADERS([zstd.h], [],
+ [AC_MSG_ERROR([zstd headers not found, install them or build without --with-zstd])]
+ )
+ AC_CHECK_LIB([zstd], [ZSTD_versionNumber],
+ [ZSTD_LIB=-lzstd],
+ [AC_MSG_ERROR([zstd library not found, install it or build without --with-zstd])]
+ )
+ fi
+
+ AC_DEFINE([HAVE_ZSTD], [1], [libzstd])
+ AC_DEFINE([HAVE_ZSTD_H], [1])
+ AC_SUBST([ZSTD_LIB])
+fi
+
dnl bzip2
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for bzip2 support])