config.m4 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. PHP_ARG_ENABLE([session],
  2. [whether to enable PHP sessions],
  3. [AS_HELP_STRING([--disable-session],
  4. [Disable session support])],
  5. [yes])
  6. PHP_ARG_WITH([mm],
  7. [for mm support],
  8. [AS_HELP_STRING([[--with-mm[=DIR]]],
  9. [SESSION: Include mm support for session storage])],
  10. [no],
  11. [no])
  12. if test "$PHP_SESSION" != "no"; then
  13. PHP_PWRITE_TEST
  14. PHP_PREAD_TEST
  15. 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)
  16. PHP_ADD_EXTENSION_DEP(session, hash, true)
  17. PHP_ADD_EXTENSION_DEP(session, spl)
  18. PHP_SUBST(SESSION_SHARED_LIBADD)
  19. PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
  20. AC_DEFINE(HAVE_PHP_SESSION,1,[ ])
  21. fi
  22. if 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. if test -z "$MM_DIR" ; then
  27. AC_MSG_ERROR(cannot find mm library)
  28. fi
  29. if test "$PHP_THREAD_SAFETY" = "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-zts)
  32. fi
  33. PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/$PHP_LIBDIR, SESSION_SHARED_LIBADD)
  34. PHP_ADD_INCLUDE($MM_DIR/include)
  35. PHP_INSTALL_HEADERS([ext/session/mod_mm.h])
  36. AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm])
  37. fi