summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-10-29 19:30:45 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-29 19:30:45 -0400
commit07622251b0ed83ffe490ddf6e2db9e3e3245c553 (patch)
treef8466c9c597fd6040d21892963f4a80bb0ef1245 /configure.ac
parent7ff2a467c9fa31dd3bf98e9ff356e977c4168464 (diff)
downloadlighttpd-git-07622251b0ed83ffe490ddf6e2db9e3e3245c553.tar.gz
[build] option to use system-provided libxxhashlighttpd-1.4.56-rc6
--with-xxhash
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 68c4eb0f..44dd6e77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1181,6 +1181,34 @@ if test "$WITH_WEBDAV_LOCKS" != no; then
AC_SUBST([UUID_LIBS])
fi
+dnl xxhash
+AC_MSG_NOTICE([----------------------------------------])
+AC_MSG_CHECKING([for xxhash support])
+AC_ARG_WITH([xxhash],
+ [AC_HELP_STRING([--with-xxhash],
+ [Enable system-provided xxhash]
+ )],
+ [WITH_XXHASH=$withval],
+ [WITH_XXHASH=no]
+)
+AC_MSG_RESULT([$WITH_XXHASH])
+
+if test "$WITH_XXHASH" != no; then
+ if test "$WITH_XXHASH" != yes; then
+ XXHASH_LIBS="-L$WITH_XXHASH -lxxhash"
+ CPPFLAGS="$CPPFLAGS -I$WITH_XXHASH"
+ else
+ PKG_CHECK_MODULES([XXHASH], [libxxhash], [], [
+ AC_MSG_ERROR([xxhash not found, install it or build without --with-xxhash])
+ ])
+ fi
+
+ AC_DEFINE([HAVE_XXHASH_H], [1], [xxhash.h])
+ AC_DEFINE([HAVE_XXHASH], [1], [xxhash])
+ AC_SUBST([XXHASH_CFLAGS])
+ AC_SUBST([XXHASH_LIBS])
+fi
+
dnl Check for gdbm
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for gdbm])