summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2014-01-05 21:57:37 +1100
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2014-01-05 21:57:37 +1100
commit73955b8f6175f763f86ce460e4a37a0d01afa765 (patch)
tree43df1d1d0ab5c81799a4280d66cb62908d9ac1ac /configure.ac
parente2ccb28ffa486a48bf7dce72f958e111cf0e9fd9 (diff)
downloadmod_wsgi-73955b8f6175f763f86ce460e4a37a0d01afa765.tar.gz
Recover experimental changes after abandoning prior mod_wsgi 4.0 development.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 30 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index ef5c394..a81bffa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl vim: set sw=4 expandtab :
dnl
-dnl Copyright 2007-2009 GRAHAM DUMPLETON
+dnl Copyright 2007-2014 GRAHAM DUMPLETON
dnl
dnl Licensed under the Apache License, Version 2.0 (the "License");
dnl you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@ dnl limitations under the License.
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(mod_wsgi.c)
+AC_INIT(src/server/mod_wsgi.c)
AC_ARG_ENABLE(framework, AC_HELP_STRING([--disable-framework],
[disable mod_wsgi framework link]),
@@ -39,6 +39,8 @@ fi
AC_SUBST(APXS)
+AC_CHECK_FUNCS(prctl)
+
AC_MSG_CHECKING(Apache version)
HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
HTTPD_INCLUDEDIR="`${APXS} -q INCLUDEDIR`"
@@ -75,7 +77,15 @@ AC_SUBST(PYTHON)
PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
- stdout.write((sysconfig.get_config_var("VERSION")))'`
+ stdout.write(sysconfig.get_config_var("VERSION"))'`
+
+PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \
+ from distutils import sysconfig; \
+ stdout.write(sysconfig.get_config_var("LDVERSION") or "")'`
+
+if test x"${PYTHON_LDVERSION}" = x""; then
+ PYTHON_LDVERSION=${PYTHON_VERSION}
+fi
CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
@@ -113,12 +123,28 @@ PYTHONFRAMEWORK=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'`
+if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then
+ PYTHONCFGDIR="${PYTHONCFGDIR}-${PYTHON_LDVERSION}"
+fi
+
if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \
"${ENABLE_FRAMEWORK}" != "yes"; then
LDFLAGS1="-L${PYTHONLIBDIR}"
LDFLAGS2="-L${PYTHONCFGDIR}"
- LDLIBS1="-lpython${PYTHON_VERSION}"
+ LDLIBS1="-lpython${PYTHON_LDVERSION}"
+
+ # MacOS X seems to be broken and doesn't use ABIFLAGS suffix
+ # so add a check to try and work out what we need to do.
+
+ if test -f "${PYTHONLIBDIR}/libpython${PYTHON_VERSION}.a"; then
+ LDLIBS1="-lpython${PYTHON_VERSION}"
+ fi
+
+ if test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then
+ LDLIBS1="-lpython${PYTHON_VERSION}"
+ fi
+
LDLIBS2=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
stdout.write(sysconfig.get_config_var("LIBS"))'`
@@ -169,7 +195,4 @@ AC_SUBST(LIBEXECDIR)
HTTPD_MAJOR_VERSION=`echo ${HTTPD_VERSION} | sed -e 's/\..*//'`
-rm -f Makefile.in
-ln -s posix-ap${HTTPD_MAJOR_VERSION}X.mk.in Makefile.in
-
AC_OUTPUT(Makefile)