Skip to content
This repository
Newer
Older
100755 101 lines (86 sloc) 3.259 kb
637b1c40 » Nicolas Favre-Felix
2009-11-13 Initial commit
1 dnl $Id$
2 dnl config.m4 for extension redis
3
4 PHP_ARG_ENABLE(redis, whether to enable redis support,
5 dnl Make sure that the comment is aligned:
6 [ --enable-redis Enable redis support])
7
73d99c3e »
2011-06-25 Added configure flag to disable sessions.
8 PHP_ARG_ENABLE(redis-session, whether to enable sessions,
9 [ --disable-redis-session Disable session support], yes, no)
10
34de3722 »
2012-09-02 Remove igbinary from config.m4
11 PHP_ARG_ENABLE(redis-igbinary, whether to enable igbinary serializer support,
12 [ --enable-redis-igbinary Enable igbinary serializer support], no, no)
73d99c3e »
2011-06-25 Added configure flag to disable sessions.
13
14
637b1c40 » Nicolas Favre-Felix
2009-11-13 Initial commit
15 if test "$PHP_REDIS" != "no"; then
16
73d99c3e »
2011-06-25 Added configure flag to disable sessions.
17 if test "$PHP_REDIS_SESSION" != "no"; then
18 AC_DEFINE(PHP_SESSION,1,[redis sessions])
19 fi
20
34de3722 »
2012-09-02 Remove igbinary from config.m4
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
637b1c40 » Nicolas Favre-Felix
2009-11-13 Initial commit
61 dnl # --with-redis -> check with-path
62 dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
63 dnl SEARCH_FOR="/include/redis.h" # you most likely want to change this
64 dnl if test -r $PHP_REDIS/$SEARCH_FOR; then # path given as parameter
65 dnl REDIS_DIR=$PHP_REDIS
66 dnl else # search default path list
67 dnl AC_MSG_CHECKING([for redis files in default path])
68 dnl for i in $SEARCH_PATH ; do
69 dnl if test -r $i/$SEARCH_FOR; then
70 dnl REDIS_DIR=$i
71 dnl AC_MSG_RESULT(found in $i)
72 dnl fi
73 dnl done
74 dnl fi
75 dnl
76 dnl if test -z "$REDIS_DIR"; then
77 dnl AC_MSG_RESULT([not found])
78 dnl AC_MSG_ERROR([Please reinstall the redis distribution])
79 dnl fi
80
81 dnl # --with-redis -> add include path
82 dnl PHP_ADD_INCLUDE($REDIS_DIR/include)
83
84 dnl # --with-redis -> check for lib and symbol presence
85 dnl LIBNAME=redis # you may want to change this
86 dnl LIBSYMBOL=redis # you most likely want to change this
87
88 dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
89 dnl [
90 dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $REDIS_DIR/lib, REDIS_SHARED_LIBADD)
91 dnl AC_DEFINE(HAVE_REDISLIB,1,[ ])
92 dnl ],[
93 dnl AC_MSG_ERROR([wrong redis lib version or lib not found])
94 dnl ],[
95 dnl -L$REDIS_DIR/lib -lm -ldl
96 dnl ])
97 dnl
98 dnl PHP_SUBST(REDIS_SHARED_LIBADD)
99
34de3722 »
2012-09-02 Remove igbinary from config.m4
100 PHP_NEW_EXTENSION(redis, redis.c library.c redis_session.c redis_array.c redis_array_impl.c, $ext_shared)
4963a9aa »
2010-12-02 New feature: PHP session handler.
101 fi
Something went wrong with that request. Please try again.