summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham.Dumpleton <devnull@localhost>2007-12-22 03:51:22 +0000
committerGraham.Dumpleton <devnull@localhost>2007-12-22 03:51:22 +0000
commit2903249edd9d7429cd2c49f1bfdbfdb3a9e1a193 (patch)
treea063effbc0a2f8bdb19f7869310ddd3b0bae07b9
parent36c9cec33d490903aac20565c5624d0e51fac119 (diff)
downloadmod_wsgi-2903249edd9d7429cd2c49f1bfdbfdb3a9e1a193.tar.gz
Disable WSGIHandlerScript for now. Add --disable-embedded option to configure
so that the feature can be disabled at compile time.
-rwxr-xr-xconfigure21
-rw-r--r--configure.ac13
-rw-r--r--mod_wsgi.c12
3 files changed, 43 insertions, 3 deletions
diff --git a/configure b/configure
index b68e407..596f718 100755
--- a/configure
+++ b/configure
@@ -1192,6 +1192,11 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-embedded disable mod_wsgi embedded mode
+
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
@@ -1618,6 +1623,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Check whether --enable-embedded was given.
+if test "${enable_embedded+set}" = set; then
+ enableval=$enable_embedded; ENABLE_EMBEDDED=$enableval
+else
+ ENABLE_EMBEDDED=yes
+fi
+
+
# Check whether --with-apxs was given.
if test "${with_apxs+set}" = set; then
@@ -1753,7 +1766,13 @@ CPPFLAGS2=`${PYTHON} -c 'from distutils import sysconfig; \
print " ".join(filter(lambda x: x.startswith("-D"), \
sysconfig.get_config_var("CFLAGS").split()))'`
-CPPFLAGS="${CPPFLAGS1} ${CPPFLAGS2}"
+if test "${ENABLE_EMBEDDED}" != "yes"; then
+CPPFLAGS3="-DMOD_WSGI_DISABLE_EMBEDDED"
+else
+CPPFLAGS3=""
+fi
+
+CPPFLAGS="${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3}"
diff --git a/configure.ac b/configure.ac
index c1c5468..fe6b385 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,6 +18,11 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(mod_wsgi.c)
+AC_ARG_ENABLE(embedded, AC_HELP_STRING([--disable-embedded],
+ [disable mod_wsgi embedded mode]),
+ [ENABLE_EMBEDDED=$enableval],
+ [ENABLE_EMBEDDED=yes])
+
AC_ARG_WITH(apxs, AC_HELP_STRING([--with-apxs=NAME],
[name of the apxs executable [[apxs]]]),
[APXS="$with_apxs"])
@@ -55,7 +60,13 @@ CPPFLAGS2=`${PYTHON} -c 'from distutils import sysconfig; \
print " ".join(filter(lambda x: x.startswith("-D"), \
sysconfig.get_config_var("CFLAGS").split()))'`
-CPPFLAGS="${CPPFLAGS1} ${CPPFLAGS2}"
+if test "${ENABLE_EMBEDDED}" != "yes"; then
+CPPFLAGS3="-DMOD_WSGI_DISABLE_EMBEDDED"
+else
+CPPFLAGS3=""
+fi
+
+CPPFLAGS="${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3}"
AC_SUBST(CPPFLAGS)
diff --git a/mod_wsgi.c b/mod_wsgi.c
index e312b85..f967a24 100644
--- a/mod_wsgi.c
+++ b/mod_wsgi.c
@@ -217,7 +217,7 @@ static apr_status_t apr_os_pipe_put_ex(apr_file_t **file,
#define MOD_WSGI_MAJORVERSION_NUMBER 1
#define MOD_WSGI_MINORVERSION_NUMBER 0
-#define MOD_WSGI_VERSION_STRING "2.0c4"
+#define MOD_WSGI_VERSION_STRING "2.0c5-TRUNK"
#if AP_SERVER_MAJORVERSION_NUMBER < 2
module MODULE_VAR_EXPORT wsgi_module;
@@ -6479,6 +6479,12 @@ static int wsgi_hook_handler(request_rec *r)
return status;
#endif
+#if defined(MOD_WSGI_DISABLE_EMBEDDED)
+ wsgi_log_script_error(r, "Embedded mode of mod_wsgi disabled at compile "
+ "time", r->filename);
+ return HTTP_INTERNAL_SERVER_ERROR;
+#endif
+
return wsgi_execute_script(r);
}
@@ -6573,8 +6579,10 @@ static const command_rec wsgi_commands[] =
RSRC_CONF, RAW_ARGS, "Location of WSGI import script." },
{ "WSGIDispatchScript", wsgi_set_dispatch_script, NULL,
ACCESS_CONF|RSRC_CONF, RAW_ARGS, "Location of WSGI dispatch script." },
+#if 0
{ "WSGIHandlerScript", wsgi_set_handler_script, NULL,
ACCESS_CONF|RSRC_CONF, TAKE1, "Location of WSGI handler script." },
+#endif
{ "WSGIApacheExtensions", wsgi_set_apache_extensions, NULL,
ACCESS_CONF|RSRC_CONF, TAKE1, "Enable/Disable Apache extensions." },
@@ -10906,8 +10914,10 @@ static const command_rec wsgi_commands[] =
NULL, RSRC_CONF, "Location of WSGI import script."),
AP_INIT_RAW_ARGS("WSGIDispatchScript", wsgi_set_dispatch_script,
NULL, ACCESS_CONF|RSRC_CONF, "Location of WSGI dispatch script."),
+#if 0
AP_INIT_TAKE1("WSGIHandlerScript", wsgi_set_handler_script,
NULL, ACCESS_CONF|RSRC_CONF, "Location of WSGI handler script."),
+#endif
AP_INIT_TAKE1("WSGIApacheExtensions", wsgi_set_apache_extensions,
NULL, ACCESS_CONF|RSRC_CONF, "Enable/Disable Apache extensions."),