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:
authorB. Gortney <bwg@briangortney.com>2016-12-14 19:32:00 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-03-23 17:55:43 +0300
commitd5b8f833404ce81c120b14a930427a74c3cb5b26 (patch)
treeef5c9a6ae3c08be2d0c6961ceba4c8c1a54fff3a /config.m4
parent6a1685d33bbee73e703f7ad49114cb3b54ebcd49 (diff)
rebase msgpack pull request (#801) on develop branch
Diffstat (limited to 'config.m4')
-rw-r--r--[-rwxr-xr-x]config.m454
1 files changed, 50 insertions, 4 deletions
diff --git a/config.m4 b/config.m4
index 8a9072f1..e4ef9de3 100755..100644
--- a/config.m4
+++ b/config.m4
@@ -3,10 +3,10 @@ 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)
+PHP_ARG_ENABLE(redis-session, whether to disable sessions,
+[ --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)
@@ -16,6 +16,10 @@ PHP_ARG_ENABLE(redis-lzf, whether to enable lzf compression,
PHP_ARG_WITH(liblzf, use system liblzf,
[ --with-liblzf[=DIR] Use system liblzf], no, no)
+[ --enable-redis-igbinary Enable igbinary serializer support], no, no)
+
+PHP_ARG_ENABLE(redis-msgpack, whether to enable msgpack serializer support,
+[ --enable-redis-msgpack Enable msgpack serializer support], no, no)
if test "$PHP_REDIS" != "no"; then
@@ -35,7 +39,7 @@ dnl Check for igbinary
elif test -f "$phpincludedir/ext/igbinary/igbinary.h"; then
igbinary_inc_path="$phpincludedir"
else
- for i in php php4 php5 php6; do
+ for i in php php4 php5 php6 php7; do
if test -f "$prefix/include/$i/ext/igbinary/igbinary.h"; then
igbinary_inc_path="$prefix/include/$i"
fi
@@ -102,6 +106,48 @@ dnl Check for igbinary
AC_DEFINE_UNQUOTED(GIT_REVISION, ["$(git log -1 --format=%H)"], [ ])
fi
+dnl Check for msgpack
+ if test "$PHP_REDIS_MSGPACK" != "no"; then
+ AC_MSG_CHECKING([for msgpack includes])
+ msgpack_inc_path=""
+
+ if test -f "$abs_srcdir/include/php/ext/msgpack/php_msgpack.h"; then
+ msgpack_inc_path="$abs_srcdir/include/php"
+ elif test -f "$abs_srcdir/ext/msgpack/php_msgpack.h"; then
+ msgpack_inc_path="$abs_srcdir"
+ elif test -f "$phpincludedir/ext/msgpack/php_msgpack.h"; then
+ msgpack_inc_path="$phpincludedir"
+ else
+ for i in php php4 php5 php6 php7; do
+ if test -f "$prefix/include/$i/ext/msgpack/php_msgpack.h"; then
+ msgpack_inc_path="$prefix/include/$i"
+ fi
+ done
+ fi
+
+ if test "$msgpack_inc_path" = ""; then
+ AC_MSG_ERROR([Cannot find php_msgpack.h])
+ else
+ AC_MSG_RESULT([$msgpack_inc_path])
+ fi
+ fi
+
+ AC_MSG_CHECKING([for redis msgpack support])
+ if test "$PHP_REDIS_MSGPACK" != "no"; then
+ AC_MSG_RESULT([enabled])
+ AC_DEFINE(HAVE_REDIS_MSGPACK,1,[Whether redis msgpack serializer is enabled])
+ MSGPACK_INCLUDES="-I$msgpack_inc_path"
+ MSGPACK_EXT_DIR="$msgpack_inc_path/ext"
+ ifdef([PHP_ADD_EXTENSION_DEP],
+ [
+ PHP_ADD_EXTENSION_DEP(redis, msgpack)
+ ])
+ PHP_ADD_INCLUDE($MSGPACK_EXT_DIR)
+ else
+ MSGPACK_INCLUDES=""
+ AC_MSG_RESULT([disabled])
+ 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