summaryrefslogtreecommitdiff
path: root/config/python.m4
diff options
context:
space:
mode:
authorTom Lane2014-05-30 22:18:11 +0000
committerTom Lane2014-05-30 22:19:06 +0000
commit20561acf93d32b7d7fdd59d054344b2e341d6aa0 (patch)
tree0e0abfdeda5d3bf4247416850a179c46b0628033 /config/python.m4
parent512f3b03e3cddf7dc1901c0e062500133e534c1d (diff)
On OS X, link libpython normally, ignoring the "framework" framework.
As of Xcode 5.0, Apple isn't including the Python framework as part of the SDK-level files, which means that linking to it might fail depending on whether Xcode thinks you've selected a specific SDK version. According to their Tech Note 2328, they've basically deprecated the framework method of linking to libpython and are telling people to link to the shared library normally. (I'm pretty sure this is in direct contradiction to the advice they were giving a few years ago, but whatever.) Testing says that this approach works fine at least as far back as OS X 10.4.11, so let's just rip out the framework special case entirely. We do still need a special case to decide that OS X provides a shared library at all, unfortunately (I wonder why the distutils check doesn't work ...). But this is still less of a special case than before, so it's fine. Back-patch to all supported branches, since we'll doubtless be hearing about this more as more people update to recent Xcode.
Diffstat (limited to 'config/python.m4')
-rw-r--r--config/python.m411
1 files changed, 2 insertions, 9 deletions
diff --git a/config/python.m4 b/config/python.m4
index 5cb285489b1..7012c536d79 100644
--- a/config/python.m4
+++ b/config/python.m4
@@ -68,14 +68,9 @@ python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(N
python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
-python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
-if test -n "$python_framework"; then
- python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
- python_libspec="-F${python_frameworkprefix} -framework $python_framework"
- python_enable_shared=1
-elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
+if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
then
# New way: use the official shared library
ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
@@ -91,9 +86,7 @@ else
python_libspec="-L${python_libdir} -lpython${python_ldversion}"
fi
-if test -z "$python_framework"; then
- python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
-fi
+python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
AC_MSG_RESULT([${python_libspec} ${python_additional_libs}])