diff options
author | Graham.Dumpleton <devnull@localhost> | 2009-08-12 05:30:57 +0000 |
---|---|---|
committer | Graham.Dumpleton <devnull@localhost> | 2009-08-12 05:30:57 +0000 |
commit | d8abbced282085e7d0469d441e3a7f8b3757596e (patch) | |
tree | f7d4a94508861d281b80a2c5326b8f0d54ea6f1d | |
parent | eb5a49cb83d9f4f41c550f68d73fc72b29c84c11 (diff) | |
download | mod_wsgi-d8abbced282085e7d0469d441e3a7f8b3757596e.tar.gz |
Require configure option to enable Python 3.X support. For Windows, will need
to manually modify makefile to provide require preprocessor define to enable
it.
-rwxr-xr-x | configure | 17 | ||||
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | mod_wsgi.c | 6 |
3 files changed, 34 insertions, 2 deletions
@@ -1196,6 +1196,7 @@ 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 + --enable-py3k enable mod_wsgi Python 3.X support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1631,6 +1632,14 @@ else fi +# Check whether --enable-py3k was given. +if test "${enable_py3k+set}" = set; then + enableval=$enable_py3k; ENABLE_PY3K=$enableval +else + ENABLE_PY3K=no +fi + + # Check whether --with-apxs was given. if test "${with_apxs+set}" = set; then @@ -1793,7 +1802,13 @@ else CPPFLAGS3="" fi -CPPFLAGS="${CPPFLAGS} ${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3}" +if test "${ENABLE_PY3K}" = "yes"; then +CPPFLAGS4="-DMOD_WSGI_ENABLE_PY3K" +else +CPPFLAGS4="" +fi + +CPPFLAGS="${CPPFLAGS} ${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3} ${CPPFLAGS4}" diff --git a/configure.ac b/configure.ac index ebac745..9db0d1a 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,11 @@ AC_ARG_ENABLE(embedded, AC_HELP_STRING([--disable-embedded], [ENABLE_EMBEDDED=$enableval], [ENABLE_EMBEDDED=yes]) +AC_ARG_ENABLE(py3k, AC_HELP_STRING([--enable-py3k], + [enable mod_wsgi Python 3.X support]), + [ENABLE_PY3K=$enableval], + [ENABLE_PY3K=no]) + AC_ARG_WITH(apxs, AC_HELP_STRING([--with-apxs=NAME], [name of the apxs executable [[apxs]]]), [APXS="$with_apxs"]) @@ -87,7 +92,13 @@ else CPPFLAGS3="" fi -CPPFLAGS="${CPPFLAGS} ${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3}" +if test "${ENABLE_PY3K}" = "yes"; then +CPPFLAGS4="-DMOD_WSGI_ENABLE_PY3K" +else +CPPFLAGS4="" +fi + +CPPFLAGS="${CPPFLAGS} ${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3} ${CPPFLAGS4}" AC_SUBST(CPPFLAGS) @@ -133,6 +133,12 @@ typedef regmatch_t ap_regmatch_t; #error Sorry, mod_wsgi requires at least Python 2.3.0. #endif +#if !defined(MOD_WSGI_ENABLE_PY3K) +#if PY_VERSION_HEX >= 0x03000000 +#error Sorry, there is no WSGI specification for Python 3.X as yet. +#endif +#endif + #if !defined(WITH_THREAD) #error Sorry, mod_wsgi requires that Python supporting thread. #endif |