2
dnl $Id: config9.m4 310129 2011-04-11 04:44:27Z hradtke $
5
PHP_ARG_ENABLE(memcache, whether to enable memcache support,
6
[ --enable-memcache Enable memcache support])
8
PHP_ARG_ENABLE(memcache-session, whether to enable memcache session handler support,
9
[ --disable-memcache-session Disable memcache session handler support], yes, no)
11
if test -z "$PHP_ZLIB_DIR"; then
12
PHP_ARG_WITH(zlib-dir, for the location of ZLIB,
13
[ --with-zlib-dir[=DIR] memcache: Set the path to ZLIB install prefix.], no, no)
16
if test -z "$PHP_DEBUG"; then
18
[ --enable-debug compile with debugging symbols],[
25
if test "$PHP_MEMCACHE" != "no"; then
27
if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
28
if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
29
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
30
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
31
elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
32
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
33
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
35
AC_MSG_ERROR([Can't find ZLIB headers under "$PHP_ZLIB_DIR"])
38
for i in /usr/local /usr; do
39
if test -f "$i/include/zlib/zlib.h"; then
41
PHP_ZLIB_INCDIR="$i/include/zlib"
42
elif test -f "$i/include/zlib.h"; then
44
PHP_ZLIB_INCDIR="$i/include"
50
AC_MSG_CHECKING([for the location of zlib])
51
if test "$PHP_ZLIB_DIR" = "no"; then
52
AC_MSG_ERROR([memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located])
54
AC_MSG_RESULT([$PHP_ZLIB_DIR])
55
if test "z$PHP_LIBDIR" != "z"; then
57
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, MEMCACHE_SHARED_LIBADD)
60
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, MEMCACHE_SHARED_LIBADD)
62
PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
65
AC_MSG_CHECKING([for memcache session support])
66
if test "$PHP_MEMCACHE_SESSION" != "no"; then
67
AC_MSG_RESULT([enabled])
68
AC_DEFINE(HAVE_MEMCACHE_SESSION,1,[Whether memcache session handler is enabled])
69
AC_DEFINE(HAVE_MEMCACHE,1,[Whether you want memcache support])
70
PHP_NEW_EXTENSION(memcache, memcache.c memcache_pool.c memcache_queue.c memcache_ascii_protocol.c memcache_binary_protocol.c memcache_standard_hash.c memcache_consistent_hash.c memcache_session.c, $ext_shared,,)
71
ifdef([PHP_ADD_EXTENSION_DEP],
73
PHP_ADD_EXTENSION_DEP(memcache, session)
76
AC_MSG_RESULT([disabled])
77
AC_DEFINE(HAVE_MEMCACHE,1,[Whether you want memcache support])
78
PHP_NEW_EXTENSION(memcache, memcache.c memcache_pool.c memcache_queue.c memcache_ascii_protocol.c memcache_binary_protocol.c memcache_standard_hash.c memcache_consistent_hash.c, $ext_shared)
81
dnl this is needed to build the extension with phpize and -Wall
83
if test "$PHP_DEBUG" = "yes"; then
84
CFLAGS="$CFLAGS -Wall"