diff options
author | Graham.Dumpleton <devnull@localhost> | 2009-09-25 01:24:07 +0000 |
---|---|---|
committer | Graham.Dumpleton <devnull@localhost> | 2009-09-25 01:24:07 +0000 |
commit | 1ae2ee915619eab495f0cc2482d63b28bf5942af (patch) | |
tree | d4c63e79a67c6dc4b43136c833bc95ad153232be /configure.ac | |
parent | e62d67f85454d6febcd1445c69162121c040fa7c (diff) | |
download | mod_wsgi-1ae2ee915619eab495f0cc2482d63b28bf5942af.tar.gz |
Don't try and auto guess whether should link with framework or library when
Python framework present on MacOS X as which one works properly seems to be
unreliable. Always use framework if present and if people have issues because
of broken MacPorts Python installations, they can specify --disable-framework
option to 'configure' script instead.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac index 9db0d1a..d6b1264 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(framework, AC_HELP_STRING([--disable-framework], + [disable mod_wsgi framework link]), + [ENABLE_FRAMEWORK=$enableval], + [ENABLE_FRAMEWORK=yes]) + AC_ARG_ENABLE(embedded, AC_HELP_STRING([--disable-embedded], [disable mod_wsgi embedded mode]), [ENABLE_EMBEDDED=$enableval], @@ -119,7 +124,8 @@ PYTHONFRAMEWORK=`${PYTHON} -c 'from sys import stdout; \ from distutils import sysconfig; \ stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'` -if test "${PYTHONFRAMEWORKDIR}" = "no-framework"; then +if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \ + "${ENABLE_FRAMEWORK}" != "yes"; then LDFLAGS1="-L${PYTHONLIBDIR}" LDFLAGS2="-L${PYTHONCFGDIR}" @@ -131,33 +137,18 @@ if test "${PYTHONFRAMEWORKDIR}" = "no-framework"; then from distutils import sysconfig; \ stdout.write(sysconfig.get_config_var("SYSLIBS"))'` else - if test "${PYTHON_VERSION}" != "2.3" && \ - test "${PYTHON_VERSION}" != "2.4" && \ - test "${PYTHON_VERSION}" != "2.5" && \ - test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then - LDFLAGS2="-L${PYTHONCFGDIR}" - - LDLIBS1="-lpython${PYTHON_VERSION}" - LDLIBS2=`${PYTHON} -c 'from sys import stdout; \ - from distutils import sysconfig; \ - stdout.write(sysconfig.get_config_var("LIBS"))'` - LDLIBS3=`${PYTHON} -c 'from sys import stdout; \ - from distutils import sysconfig; \ - stdout.write(sysconfig.get_config_var("SYSLIBS"))'` - else - LDFLAGS1="-Wl,-F${PYTHONFRAMEWORKPREFIX} -framework ${PYTHONFRAMEWORK}" - - VERSION="${PYTHON_VERSION}" - STRING="${PYTHONFRAMEWORKDIR}/Versions/${VERSION}/${PYTHONFRAMEWORK}" - LDFLAGS2=`${PYTHON} -c "from sys import stdout; \ - from distutils import sysconfig; \ - stdout.write(sysconfig.get_config_var( - \"LINKFORSHARED\").replace(\"${STRING}\", ''))"` - - LDLIBS1=`${PYTHON} -c 'from sys import stdout; \ - from distutils import sysconfig; \ - stdout.write(sysconfig.get_config_var("LIBS"))'` - fi + LDFLAGS1="-Wl,-F${PYTHONFRAMEWORKPREFIX} -framework ${PYTHONFRAMEWORK}" + + VERSION="${PYTHON_VERSION}" + STRING="${PYTHONFRAMEWORKDIR}/Versions/${VERSION}/${PYTHONFRAMEWORK}" + LDFLAGS2=`${PYTHON} -c "from sys import stdout; \ + from distutils import sysconfig; \ + stdout.write(sysconfig.get_config_var( + \"LINKFORSHARED\").replace(\"${STRING}\", ''))"` + + LDLIBS1=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ + stdout.write(sysconfig.get_config_var("LIBS"))'` fi CFLAGS="" |