summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-06-25 20:46:33 (GMT)
committerNed Deily <nad@acm.org>2014-06-25 20:46:33 (GMT)
commit68e915e641b779f2d0378d7e2957da7ae23dc4d8 (patch)
tree9c257dc2ebdde444c10f5e062ff9437520a5aee8
parentce38f24af849694fe906b551184632717bf9ccf0 (diff)
parent36820b6e084658423a038c77d6f61cc44fc7654a (diff)
downloadcpython-68e915e641b779f2d0378d7e2957da7ae23dc4d8.zip
cpython-68e915e641b779f2d0378d7e2957da7ae23dc4d8.tar.gz
cpython-68e915e641b779f2d0378d7e2957da7ae23dc4d8.tar.bz2
Issue #21811: Anticipated fixes to 3.x configure for OS X 10.10 Yosemite.
-rwxr-xr-xconfigure29
-rw-r--r--configure.ac29
2 files changed, 42 insertions, 16 deletions
diff --git a/configure b/configure
index fbd4c24..71d7b46 100755
--- a/configure
+++ b/configure
@@ -6606,10 +6606,16 @@ $as_echo "$CC" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
- cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
- if test ${cur_target} '>' 10.2 && \
- test ${cur_target} '<' 10.6
+ cur_target_major=`sw_vers -productVersion | \
+ sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
+ cur_target_minor=`sw_vers -productVersion | \
+ sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
+ cur_target="${cur_target_major}.${cur_target_minor}"
+ if test ${cur_target_major} -eq 10 && \
+ test ${cur_target_minor} -ge 3 && \
+ test ${cur_target_minor} -le 5
then
+ # OS X 10.3 through 10.5
cur_target=10.3
if test ${enable_universalsdk}
then
@@ -8595,12 +8601,14 @@ then
# Use -undefined dynamic_lookup whenever possible (10.3 and later).
# This allows an extension to be used in any Python
- if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
+ dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
+ sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
+ dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
+ sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
+ if test ${dep_target_major} -eq 10 && \
+ test ${dep_target_minor} -le 2
then
- LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
- LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
- BLDSHARED="$LDSHARED"
- else
+ # building for OS X 10.0 through 10.2
LDSHARED='$(CC) -bundle'
LDCXXSHARED='$(CXX) -bundle'
if test "$enable_framework" ; then
@@ -8614,6 +8622,11 @@ then
LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi
+ else
+ # building for OS X 10.3 and later
+ LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
+ LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
+ BLDSHARED="$LDSHARED"
fi
;;
Linux*|GNU*|QNX*)
diff --git a/configure.ac b/configure.ac
index a6f613a..3b3a734 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1327,10 +1327,16 @@ yes)
# 4. If we are running on OS X 10.2 or earlier, good luck!
AC_MSG_CHECKING(which MACOSX_DEPLOYMENT_TARGET to use)
- cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
- if test ${cur_target} '>' 10.2 && \
- test ${cur_target} '<' 10.6
+ cur_target_major=`sw_vers -productVersion | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+ cur_target_minor=`sw_vers -productVersion | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+ cur_target="${cur_target_major}.${cur_target_minor}"
+ if test ${cur_target_major} -eq 10 && \
+ test ${cur_target_minor} -ge 3 && \
+ test ${cur_target_minor} -le 5
then
+ # OS X 10.3 through 10.5
cur_target=10.3
if test ${enable_universalsdk}
then
@@ -2026,12 +2032,14 @@ then
# Use -undefined dynamic_lookup whenever possible (10.3 and later).
# This allows an extension to be used in any Python
- if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
+ dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+ dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+ if test ${dep_target_major} -eq 10 && \
+ test ${dep_target_minor} -le 2
then
- LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
- LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
- BLDSHARED="$LDSHARED"
- else
+ # building for OS X 10.0 through 10.2
LDSHARED='$(CC) -bundle'
LDCXXSHARED='$(CXX) -bundle'
if test "$enable_framework" ; then
@@ -2045,6 +2053,11 @@ then
LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi
+ else
+ # building for OS X 10.3 and later
+ LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
+ LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
+ BLDSHARED="$LDSHARED"
fi
;;
Linux*|GNU*|QNX*)