summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index e6dc9fe37546..500f2bdc07ce 100644
--- a/configure.in
+++ b/configure.in
@@ -4086,8 +4086,20 @@ dnl ===================================================================
AC_MSG_CHECKING([which python to use])
if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
with_system_python=yes
- AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
- PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
+
+ _python="/Library/Frameworks/Python.framework/Versions/Current/bin/python"
+ _python_version=`$_python -c "import platform; print platform.python_version();"`
+
+ if test "$_python_version" = "2.7.4" ; then
+ AC_MSG_RESULT([compiling against system python (version $_python_version)])
+
+ _python_ver=`$_python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
+
+ PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
+ else
+ AC_MSG_ERROR([Python 2.7.4 is required])
+ fi
+
PYTHON_LIBS="-framework Python"
elif test -n "$with_system_python" -o -n "$with_system_libs" && \
test "$with_system_python" != "no"; then