@@ -8,6 +8,8 @@ dnl Make sure that the comment is aligned:
8
8
PHP_ARG_ENABLE(redis-session, whether to enable sessions,
9
9
[ --disable-redis-session Disable session support] , yes, no)
10
10
11
+ PHP_ARG_ENABLE(redis-igbinary, whether to enable igbinary serializer support,
12
+ [ --enable-redis-igbinary Enable igbinary serializer support] , no, no)
11
13
12
14
13
15
if test "$PHP_REDIS" != "no"; then
@@ -16,6 +18,46 @@ if test "$PHP_REDIS" != "no"; then
16
18
AC_DEFINE ( PHP_SESSION ,1 ,[ redis sessions] )
17
19
fi
18
20
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
+
19
61
dnl # --with-redis -> check with-path
20
62
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
21
63
dnl SEARCH_FOR="/include/redis.h" # you most likely want to change this
@@ -55,5 +97,5 @@ if test "$PHP_REDIS" != "no"; then
55
97
dnl
56
98
dnl PHP_SUBST(REDIS_SHARED_LIBADD)
57
99
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)
59
101
fi
0 commit comments