summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-07-19 03:07:47 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-08-02 06:46:22 -0400
commit8d5e237c6086aa57b5e3445d2f72a5c7a174e413 (patch)
tree39a676449436a011dc384dca842c7ed98f71cae9 /configure.ac
parentbe8047d82fb25cfcae435af77a8d4f650682e5fa (diff)
downloadlighttpd-git-8d5e237c6086aa57b5e3445d2f72a5c7a174e413.tar.gz
[mod_deflate] Brotli support
configuration option: ./configure --with-brotli
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 12224ff6..c03dcb5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -978,6 +978,34 @@ if test "$WITH_BZIP2" != no; then
AC_SUBST([BZ_LIB])
fi
+dnl brotli
+AC_MSG_NOTICE([----------------------------------------])
+AC_MSG_CHECKING([for brotli support])
+AC_ARG_WITH([brotli],
+ [AC_HELP_STRING([--with-brotli],
+ [Enable brotli support for mod_deflate]
+ )],
+ [WITH_BROTLI=$withval],
+ [WITH_BROTLI=no]
+)
+AC_MSG_RESULT([$WITH_BROTLI])
+
+if test "$WITH_BROTLI" != no; then
+ if test "$WITH_BROTLI" != yes; then
+ BROTLI_LIB="-L$WITH_BROTLI -lbrotlienc"
+ CPPFLAGS="$CPPFLAGS -I$WITH_BROTLI"
+ else
+ PKG_CHECK_MODULES([BROTLI], [libbrotlienc], [], [
+ AC_MSG_ERROR([brotli not found, install it or build without --with-brotli])
+ ])
+ fi
+
+ AC_DEFINE([HAVE_BROTLI_ENCODE_H], [1], [brotli/encode.h])
+ AC_DEFINE([HAVE_BROTLI], [1], [libbrotlienc])
+ AC_SUBST([BROTLI_CFLAGS])
+ AC_SUBST([BROTLI_LIBS])
+fi
+
dnl Check for fam/gamin
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for FAM])
@@ -1666,6 +1694,9 @@ lighty_track_feature "compress-gzip compress-deflate" "" \
lighty_track_feature "compress-bzip2" "" \
'test "$WITH_BZIP2" != no'
+lighty_track_feature "compress-brotli" "" \
+ 'test "$WITH_BROTLI" != no'
+
lighty_track_feature "kerberos" "mod_authn_gssapi" \
'test "$WITH_KRB5" != no'