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