From: Mark L. Woodward Date: Thu, 11 Oct 2001 00:36:24 +0000 (+0000) Subject: Allow msession to build without ext/session X-Git-Tag: PRE_PARAMETER_PARSING_API~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb5398c6878264bc33b0d737f196f90343c748dc;p=php Allow msession to build without ext/session --- diff --git a/ext/msession/README b/ext/msession/README index 60cea7cdfa..d089d23008 100644 --- a/ext/msession/README +++ b/ext/msession/README @@ -8,13 +8,10 @@ Requirements: Mohawk Software's Phoenix library. Mohawk Software's msession daemon. - Building: -I (regretfully) have not invested the time to make all -this stuff automatic. - In the config.m4 file you will need to specify the include and library directories for Phoenix. The setting in config.m4 is probably wrong. - +You will need phoenix installed and built to compile this +module. diff --git a/ext/msession/config.m4 b/ext/msession/config.m4 index c9953dccfb..61ebc7acd1 100644 --- a/ext/msession/config.m4 +++ b/ext/msession/config.m4 @@ -27,5 +27,9 @@ if test "$PHP_MSESSION" != "no"; then PHP_SUBST(PHOENIX_LIB) PHP_EXTENSION(msession, $ext_shared) + + if test "$enable_session" != "no"; then + AC_DEFINE(HAVE_PHP_SESSION,1,[ ]) + fi fi diff --git a/ext/msession/msession.c b/ext/msession/msession.c index d3992f0f98..c329c95ec3 100644 --- a/ext/msession/msession.c +++ b/ext/msession/msession.c @@ -42,11 +42,14 @@ char g_msession[]="Msession"; #if HAVE_MSESSION +#ifdef HAVE_PHP_SESSION PS_FUNCS(msession); ps_module ps_mod_msession = { PS_MOD(msession) }; +#endif + // #define ERR_DEBUG @@ -123,7 +126,9 @@ PHP_MINIT_FUNCTION(msession) g_conn = NULL; g_host = g_defhost; +#ifdef HAVE_PHP_SESSION php_session_register_module(&ps_mod_msession); +#endif return SUCCESS; } @@ -983,6 +988,8 @@ PHP_FUNCTION(msession_plugin) } } +#ifdef HAVE_PHP_SESSION + PS_OPEN_FUNC(msession) { ELOG( "ps_open_msession"); @@ -1031,4 +1038,5 @@ PS_GC_FUNC(msession) ELOG( "ps_gc_msession"); return SUCCESS; } +#endif /* HAVE_PHP_SESSION */ #endif /* HAVE_MSESSION */