Skip to content
Newer
Older
100644 94 lines (79 sloc) 2.91 KB
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
1 dnl
2 dnl $ Id: $
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
3 dnl vim:se ts=2 sw=2 et:
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
4
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
5 PHP_ARG_ENABLE(memcached, whether to enable memcached support,
6 [ --enable-memcached Enable memcached support])
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
7
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
8 PHP_ARG_WITH(libmemcached-dir, for libmemcached,
9 [ --with-libmemcached-dir[=DIR] Set the path to libmemcached install prefix.], yes)
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
10
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
11 if test -z "$PHP_ZLIB_DIR"; then
12 PHP_ARG_WITH(zlib-dir, for ZLIB,
13 [ --with-zlib-dir[=DIR] Set the path to ZLIB install prefix.], no)
14 fi
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
15
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
16 if test -z "$PHP_DEBUG"; then
17 AC_ARG_ENABLE(debug,
18 [ --enable-debug compile with debugging symbols],[
19 PHP_DEBUG=$enableval
20 ],[ PHP_DEBUG=no
21 ])
22 fi
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
23
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
24 if test "$PHP_MEMCACHED" != "no"; then
25
26 dnl # zlib
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"
34 else
35 AC_MSG_ERROR([Can't find ZLIB headers under "$PHP_ZLIB_DIR"])
36 fi
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
37 else
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
38 for i in /usr/local /usr; do
39 if test -f "$i/include/zlib/zlib.h"; then
40 PHP_ZLIB_DIR="$i"
41 PHP_ZLIB_INCDIR="$i/include/zlib"
42 elif test -f "$i/include/zlib.h"; then
43 PHP_ZLIB_DIR="$i"
44 PHP_ZLIB_INCDIR="$i/include"
45 fi
46 done
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
47 fi
48
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
49 AC_MSG_CHECKING([for zlib location])
50 if test "$PHP_ZLIB_DIR" = "no"; then
51 AC_MSG_ERROR([memcached support requires ZLIB. Use --with-zlib-dir=<DIR> to specify the prefix where ZLIB headers and library are located])
52 else
53 AC_MSG_RESULT([$PHP_ZLIB_DIR])
54 PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, MEMCACHE_SHARED_LIBADD)
55 PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
56 fi
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
57
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
58 if test "$PHP_LIBMEMCACHED_DIR" != "no" && test "$PHP_LIBMEMCACHED_DIR" != "yes"; then
59 if test -r "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"; then
60 PHP_LIBMEMCACHED_DIR="$PHP_LIBMEMCACHED_DIR"
61 else
62 AC_MSG_ERROR([Can't find libmemcached headers under "$PHP_LIBMEMCACHED_DIR"])
63 fi
64 else
65 for i in /usr /usr/local; do
66 if test -r "$i/include/libmemcached/memcached.h"; then
67 PHP_LIBMEMCACHED_DIR=$i
68 break
69 fi
70 done
71 fi
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
72
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
73 AC_MSG_CHECKING([for libmemcached location])
74 if test "$PHP_LIBMEMCACHED_DIR" = "no"; then
75 AC_MSG_ERROR([memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located])
76 else
77 AC_MSG_RESULT([$PHP_LIBMEMCACHED_DIR])
78 PHP_LIBMEMCACHED_INCDIR="$PHP_LIBMEMCACHED_DIR/include"
79 PHP_ADD_INCLUDE($PHP_LIBMEMCACHED_INCDIR)
80 PHP_ADD_LIBRARY_WITH_PATH(memcached, $PHP_LIBMEMCACHED_DIR/lib, MEMCACHED_SHARED_LIBADD)
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
81
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
82 PHP_SUBST(MEMCACHED_SHARED_LIBADD)
bd36747 Implement exception class.
Andrei Zmievski authored Dec 22, 2008
83 PHP_NEW_EXTENSION(memcached, php_memcached.c , $ext_shared)
84
85 ifdef([PHP_ADD_EXTENSION_DEP],
86 [
87 PHP_ADD_EXTENSION_DEP(pdo, spl, true)
88 ])
89
b24b82e Clean up scaffolding.
Andrei Zmievski authored Dec 14, 2008
90 fi
79db1e4 First import
Andrei Zmievski authored Dec 14, 2008
91
92 fi
93
Something went wrong with that request. Please try again.