]> granicus.if.org Git - php/commitdiff
Allow msession to build without ext/session
authorMark L. Woodward <mlwmohawk@php.net>
Thu, 11 Oct 2001 00:36:24 +0000 (00:36 +0000)
committerMark L. Woodward <mlwmohawk@php.net>
Thu, 11 Oct 2001 00:36:24 +0000 (00:36 +0000)
ext/msession/README
ext/msession/config.m4
ext/msession/msession.c

index 60cea7cdfaa1b66be18d1ebbc895d0974891d0b5..d089d23008bf1b4a519af900ee971fa38b4dc11a 100644 (file)
@@ -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.
index c9953dccfb4b755ba04b4b7f862f95a7a8833323..61ebc7acd13fd7fb01c74d6b850e2e387ac0604c 100644 (file)
@@ -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
 
index d3992f0f987bf6840188ddd041696853afdb6854..c329c95ec3a0280e0a3ea6310752c43a0927496c 100644 (file)
@@ -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 */