[Python-checkins] cpython (2.7): Issue #21811: Anticipated fixes to 2.7 configure for OS X 10.10 Yosemite.
ned.deily
python-checkins at python.org
Wed Jun 25 22:50:15 CEST 2014
http://hg.python.org/cpython/rev/2672e30d9095
changeset: 91407:2672e30d9095
branch: 2.7
user: Ned Deily <nad at acm.org>
date: Wed Jun 25 13:48:46 2014 -0700
summary:
Issue #21811: Anticipated fixes to 2.7 configure for OS X 10.10 Yosemite.
files:
configure | 33 +++++++++++++++++++++++----------
configure.ac | 33 +++++++++++++++++++++++----------
2 files changed, 46 insertions(+), 20 deletions(-)
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -6045,8 +6045,14 @@
# Calculate the right deployment target for this build.
#
- cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
- if test ${cur_target} '>' 10.2; then
+ 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
+ then
cur_target=10.3
if test ${enable_universalsdk}; then
if test "${UNIVERSAL_ARCHS}" = "all"; then
@@ -8211,15 +8217,14 @@
# 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
- if test "${enable_universalsdk}"; then
- LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
- fi
- 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
@@ -8233,6 +8238,14 @@
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
+ if test "${enable_universalsdk}"; then
+ LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ fi
+ 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
--- a/configure.ac
+++ b/configure.ac
@@ -1149,8 +1149,14 @@
# Calculate the right deployment target for this build.
#
- cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
- if test ${cur_target} '>' 10.2; then
+ 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
+ then
cur_target=10.3
if test ${enable_universalsdk}; then
if test "${UNIVERSAL_ARCHS}" = "all"; then
@@ -1993,15 +1999,14 @@
# 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
- if test "${enable_universalsdk}"; then
- LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
- fi
- 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
@@ -2015,6 +2020,14 @@
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
+ if test "${enable_universalsdk}"; then
+ LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ fi
+ LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
+ LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
+ BLDSHARED="$LDSHARED"
fi
;;
Linux*|GNU*|QNX*)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list