~ubuntu-branches/ubuntu/trusty/php-memcache/trusty

« back to all changes in this revision

Viewing changes to memcache-3.0.6/config9.m4

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2012-10-13 20:12:02 UTC
  • mfrom: (1.1.7) (2.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20121013201202-o0slp7ir75l050xr
Tags: 3.0.7-1
* Add VCS-* fields
* Imported Upstream version 3.0.7
* Drop unnecessary fix_paths_m4.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl
2
 
dnl $Id: config9.m4 310129 2011-04-11 04:44:27Z hradtke $
3
 
dnl
4
 
 
5
 
PHP_ARG_ENABLE(memcache, whether to enable memcache support,
6
 
[  --enable-memcache       Enable memcache support])
7
 
 
8
 
PHP_ARG_ENABLE(memcache-session, whether to enable memcache session handler support,
9
 
[  --disable-memcache-session       Disable memcache session handler support], yes, no)
10
 
 
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)
14
 
fi
15
 
 
16
 
if test -z "$PHP_DEBUG"; then
17
 
  AC_ARG_ENABLE(debug,
18
 
  [  --enable-debug          compile with debugging symbols],[
19
 
    PHP_DEBUG=$enableval
20
 
  ],[
21
 
    PHP_DEBUG=no
22
 
  ]) 
23
 
fi
24
 
 
25
 
if test "$PHP_MEMCACHE" != "no"; then
26
 
 
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
37
 
  else
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
47
 
  fi
48
 
 
49
 
  dnl # zlib
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])
53
 
  else
54
 
    AC_MSG_RESULT([$PHP_ZLIB_DIR])
55
 
    if test "z$PHP_LIBDIR" != "z"; then
56
 
    dnl PHP5+
57
 
      PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, MEMCACHE_SHARED_LIBADD)
58
 
    else 
59
 
    dnl PHP4
60
 
      PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, MEMCACHE_SHARED_LIBADD)
61
 
    fi
62
 
    PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
63
 
  fi
64
 
 
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],
72
 
    [
73
 
      PHP_ADD_EXTENSION_DEP(memcache, session)
74
 
    ])                                     
75
 
  else 
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)
79
 
  fi
80
 
 
81
 
dnl this is needed to build the extension with phpize and -Wall
82
 
 
83
 
  if test "$PHP_DEBUG" = "yes"; then
84
 
    CFLAGS="$CFLAGS -Wall"
85
 
  fi
86
 
 
87
 
fi