summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2014-02-18 21:09:29 +1100
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2014-02-18 21:09:29 +1100
commited1895bbb2b15090766f54f7f75b3aa79b1dc00c (patch)
treee2301e7a3b51c0045203a3967886caa1ba7eb517 /configure.ac
parent2bd20bd6a3f91e6cca1d90c4176476ea246e5db7 (diff)
downloadmod_wsgi-ed1895bbb2b15090766f54f7f75b3aa79b1dc00c.tar.gz
Workaround for broken MacOSX apxs/libtool scripts not referring to correct Xcode compiler path.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a81bffa..5482ce3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,22 @@ if test -z "${APXS}"; then
[$PATH:/usr/local/apache/bin:/usr/sbin])
fi
+XCODE_PREFIX="/Applications/Xcode.app/Contents/Developer/Toolchains/"
+XCODE_CC="${XCODE_PREFIX}XcodeDefault.xctoolchain/usr/bin/cc"
+
+if test -x "${APXS}"; then
+ APXS_CC=`${APXS} -q CC`
+ APXS_LIBTOOL=`${APXS} -q LIBTOOL | sed -e "s/ .*$//"`
+ if [[[ ${APXS_CC} = ${XCODE_PREFIX}* ]]]; then
+ cat "${APXS_LIBTOOL}" | sed -e \
+ "s/OSX10.[[89]].xctoolchain/XcodeDefault.xctoolchain/" > ./libtool
+ cat "${APXS}" | sed -e "s%get_vars(\"CC\")%\"${XCODE_CC}\"%" \
+ -e 's%^my $libtool = .*;%my $libtool = \"./libtool\";%' > ./apxs
+ chmod +x ./apxs ./libtool
+ APXS=./apxs
+ fi
+fi
+
AC_SUBST(APXS)
AC_CHECK_FUNCS(prctl)