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