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:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2017-05-03 15:54:28 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2017-10-17 17:08:42 +0300
commit8cb2d5bd94a17c046a50cd4b626d6cae1c41e0f6 (patch)
treedc59913e8c3686321da6c743db4af578846db0ea /config.m4
parentb9ca16cc5ba42d74d4e4bceb5806efb376841f29 (diff)
Issue #1048
This commit is adding support of data compression. LZF was choosen because it small and fast and Redis server uses it. Since [pecl package](https://pecl.php.net/package/lzf) doesn't provide lzf.h file after installing, LZF library was added as submodule. Another algorythms may be easely added by analogy with serializers. TODO: unit-tests for different data types.
Diffstat (limited to 'config.m4')
-rwxr-xr-xconfig.m417
1 files changed, 13 insertions, 4 deletions
diff --git a/config.m4 b/config.m4
index 3a80badf..93d57322 100755
--- a/config.m4
+++ b/config.m4
@@ -3,14 +3,16 @@ dnl config.m4 for extension redis
PHP_ARG_ENABLE(redis, whether to enable redis support,
dnl Make sure that the comment is aligned:
-[ --enable-redis Enable redis support])
+[ --enable-redis Enable redis support])
PHP_ARG_ENABLE(redis-session, whether to enable sessions,
-[ --disable-redis-session Disable session support], yes, no)
+[ --disable-redis-session Disable session support], yes, no)
PHP_ARG_ENABLE(redis-igbinary, whether to enable igbinary serializer support,
-[ --enable-redis-igbinary Enable igbinary serializer support], no, no)
+[ --enable-redis-igbinary Enable igbinary serializer support], no, no)
+PHP_ARG_ENABLE(redis-lzf, whether to enable lzf compression,
+[ --enable-redis-lzf Enable lzf compression support], no, no)
if test "$PHP_REDIS" != "no"; then
@@ -60,6 +62,13 @@ dnl Check for igbinary
AC_MSG_RESULT([disabled])
fi
+ if test "$PHP_REDIS_LZF" != "no"; then
+ PHP_ADD_INCLUDE(liblzf)
+ PHP_ADD_BUILD_DIR(liblzf)
+ lzf_sources="liblzf/lzf_c.c liblzf/lzf_d.c"
+ AC_DEFINE(HAVE_REDIS_LZF, 1, [ ])
+ fi
+
dnl # --with-redis -> check with-path
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
dnl SEARCH_FOR="/include/redis.h" # you most likely want to change this
@@ -99,5 +108,5 @@ dnl Check for igbinary
dnl
dnl PHP_SUBST(REDIS_SHARED_LIBADD)
- PHP_NEW_EXTENSION(redis, redis.c redis_commands.c library.c redis_session.c redis_array.c redis_array_impl.c redis_cluster.c cluster_library.c, $ext_shared)
+ PHP_NEW_EXTENSION(redis, redis.c redis_commands.c library.c redis_session.c redis_array.c redis_array_impl.c redis_cluster.c cluster_library.c $lzf_sources, $ext_shared)
fi