Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2020-06-08 00:09:30 +0300
committerGitHub <noreply@github.com>2020-06-08 00:09:30 +0300
commit04def9fbe2194b3b711362de57260a6cd5216e69 (patch)
tree35ef5d8eaa6e50f360ad63a5f444e4b64782a30f /config.m4
parent5ca4141c72e23816f146b49877a6a4b8098b34c6 (diff)
Rebased LZ4 PR (#1781)
LZ4 compression by @iliaal
Diffstat (limited to 'config.m4')
-rw-r--r--config.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/config.m4 b/config.m4
index 2bd148d1..30449300 100644
--- a/config.m4
+++ b/config.m4
@@ -29,6 +29,12 @@ PHP_ARG_ENABLE(redis-zstd, whether to enable Zstd compression,
PHP_ARG_WITH(libzstd, use system libsztd,
[ --with-libzstd[=DIR] Use system libzstd], yes, no)
+PHP_ARG_ENABLE(redis-lz4, whether to enable lz4 compression,
+[ --enable-redis-lz4 Enable lz4 compression support], no, no)
+
+PHP_ARG_WITH(liblz4, use system liblz4,
+[ --with-liblz4[=DIR] Use system liblz4], no, no)
+
if test "$PHP_REDIS" != "no"; then
if test "$PHP_REDIS_SESSION" != "no"; then
@@ -194,6 +200,31 @@ if test "$PHP_REDIS" != "no"; then
fi
fi
+ if test "$PHP_REDIS_LZ4" != "no"; then
+ AC_DEFINE(HAVE_REDIS_LZ4, 1, [ ])
+ AC_MSG_CHECKING(for liblz4 files in default path)
+ for i in $PHP_LIBLZ4 /usr/local /usr; do
+ if test -r $i/include/lz4.h; then
+ AC_MSG_RESULT(found in $i)
+ LIBLZ4_DIR=$i
+ break
+ fi
+ done
+ if test -z "$LIBLZ4_DIR"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([Please reinstall the liblz4 distribution])
+ fi
+ PHP_CHECK_LIBRARY(lz4, LZ4_compress,
+ [
+ PHP_ADD_LIBRARY_WITH_PATH(zstd, $LIBLZ4_DIR/$PHP_LIBDIR, REDIS_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR([could not find usable liblz4])
+ ], [
+ -L$LIBLZ4_DIR/$PHP_LIBDIR
+ ])
+ PHP_SUBST(REDIS_SHARED_LIBADD)
+ fi
+
if test "$PHP_REDIS_ZSTD" != "no"; then
AC_DEFINE(HAVE_REDIS_ZSTD, 1, [ ])
if test "$PHP_LIBZSTD" != "no"; then