Skip to content

Commit f75d8ea

Browse files
committed
Merge branch 'make-igbinary-optional'
2 parents 5df5153 + 9138299 commit f75d8ea

23 files changed

+59
-3112
lines changed

config.m4

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ dnl Make sure that the comment is aligned:
88
PHP_ARG_ENABLE(redis-session, whether to enable sessions,
99
[ --disable-redis-session Disable session support], yes, no)
1010

11+
PHP_ARG_ENABLE(redis-igbinary, whether to enable igbinary serializer support,
12+
[ --enable-redis-igbinary Enable igbinary serializer support], no, no)
1113

1214

1315
if test "$PHP_REDIS" != "no"; then
@@ -16,6 +18,46 @@ if test "$PHP_REDIS" != "no"; then
1618
AC_DEFINE(PHP_SESSION,1,[redis sessions])
1719
fi
1820

21+
dnl Check for igbinary
22+
if test "$PHP_REDIS_IGBINARY" != "no"; then
23+
AC_MSG_CHECKING([for igbinary includes])
24+
igbinary_inc_path=""
25+
26+
if test -f "$abs_srcdir/include/php/ext/igbinary/igbinary.h"; then
27+
igbinary_inc_path="$abs_srcdir/include/php"
28+
elif test -f "$abs_srcdir/ext/igbinary/igbinary.h"; then
29+
igbinary_inc_path="$abs_srcdir"
30+
elif test -f "$phpincludedir/ext/igbinary/igbinary.h"; then
31+
igbinary_inc_path="$phpincludedir"
32+
else
33+
for i in php php4 php5 php6; do
34+
if test -f "$prefix/include/$i/ext/igbinary/igbinary.h"; then
35+
igbinary_inc_path="$prefix/include/$i"
36+
fi
37+
done
38+
fi
39+
40+
if test "$igbinary_inc_path" = ""; then
41+
AC_MSG_ERROR([Cannot find igbinary.h])
42+
else
43+
AC_MSG_RESULT([$igbinary_inc_path])
44+
fi
45+
fi
46+
47+
AC_MSG_CHECKING([for redis igbinary support])
48+
if test "$PHP_REDIS_IGBINARY" != "no"; then
49+
AC_MSG_RESULT([enabled])
50+
AC_DEFINE(HAVE_REDIS_IGBINARY,1,[Whether redis igbinary serializer is enabled])
51+
IGBINARY_INCLUDES="-I$igbinary_inc_path"
52+
ifdef([PHP_ADD_EXTENSION_DEP],
53+
[
54+
PHP_ADD_EXTENSION_DEP(redis, igbinary)
55+
])
56+
else
57+
IGBINARY_INCLUDES=""
58+
AC_MSG_RESULT([disabled])
59+
fi
60+
1961
dnl # --with-redis -> check with-path
2062
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
2163
dnl SEARCH_FOR="/include/redis.h" # you most likely want to change this
@@ -55,5 +97,5 @@ if test "$PHP_REDIS" != "no"; then
5597
dnl
5698
dnl PHP_SUBST(REDIS_SHARED_LIBADD)
5799

58-
PHP_NEW_EXTENSION(redis, redis.c library.c redis_session.c redis_array.c redis_array_impl.c igbinary/igbinary.c igbinary/hash_si.c igbinary/hash_function.c, $ext_shared)
100+
PHP_NEW_EXTENSION(redis, redis.c library.c redis_session.c redis_array.c redis_array_impl.c, $ext_shared)
59101
fi

igbinary/.gitignore

Lines changed: 0 additions & 53 deletions
This file was deleted.

igbinary/COPYING

Lines changed: 0 additions & 28 deletions
This file was deleted.

igbinary/CREDITS

Lines changed: 0 additions & 8 deletions
This file was deleted.

igbinary/ChangeLog

Lines changed: 0 additions & 10 deletions
This file was deleted.

igbinary/EXPERIMENTAL

Whitespace-only changes.

igbinary/NEWS

Lines changed: 0 additions & 8 deletions
This file was deleted.

igbinary/README

Lines changed: 0 additions & 95 deletions
This file was deleted.

igbinary/config.m4

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)