diff options
author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2014-02-18 21:09:29 +1100 |
---|---|---|
committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2014-02-18 21:09:29 +1100 |
commit | ed1895bbb2b15090766f54f7f75b3aa79b1dc00c (patch) | |
tree | e2301e7a3b51c0045203a3967886caa1ba7eb517 /configure.ac | |
parent | 2bd20bd6a3f91e6cca1d90c4176476ea246e5db7 (diff) | |
download | mod_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.ac | 16 |
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) |