config.m4 1.3 KB

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