xref: /PHP-5.3/ext/session/config.m4 (revision 7b4cbadf)
1dnl
2dnl $Id$
3dnl
4
5PHP_ARG_ENABLE(session, whether to enable PHP sessions,
6[  --disable-session       Disable session support], yes)
7
8PHP_ARG_WITH(mm,for mm support,
9[  --with-mm[=DIR]           SESSION: Include mm support for session storage], no, no)
10
11if test "$PHP_SESSION" != "no"; then
12  PHP_PWRITE_TEST
13  PHP_PREAD_TEST
14  PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, $ext_shared)
15  PHP_ADD_EXTENSION_DEP(session, hash, true)
16  PHP_ADD_EXTENSION_DEP(session, spl)
17  PHP_SUBST(SESSION_SHARED_LIBADD)
18  PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
19  AC_DEFINE(HAVE_PHP_SESSION,1,[ ])
20fi
21
22if test "$PHP_MM" != "no"; then
23  for i in $PHP_MM /usr/local /usr; do
24    test -f "$i/include/mm.h" && MM_DIR=$i && break
25  done
26
27  if test -z "$MM_DIR" ; then
28    AC_MSG_ERROR(cannot find mm library)
29  fi
30
31  PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/$PHP_LIBDIR, SESSION_SHARED_LIBADD)
32  PHP_ADD_INCLUDE($MM_DIR/include)
33  PHP_INSTALL_HEADERS([ext/session/mod_mm.h])
34  AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm])
35fi
36