--- configure.old 2016-08-01 06:11:48.000000000 +0200 +++ configure 2016-08-01 06:17:25.000000000 +0200 @@ -5791,8 +5791,16 @@ $as_echo "$CC" >&6; } # 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 && \ + test ${cur_target_minor} -le 5 + then + # OS X 10.3 through 10.5 cur_target=10.3 if test ${enable_universalsdk}; then if test "${UNIVERSAL_ARCHS}" = "all"; then @@ -7785,15 +7793,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 - 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 @@ -7807,6 +7814,14 @@ 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 + 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*) --- configure.ac.old 2014-10-12 08:52:04.000000000 +0200 +++ configure.ac 2016-08-01 06:17:25.000000000 +0200 @@ -1099,8 +1099,16 @@ yes) # 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 && \ + test ${cur_target_minor} -le 5 + then + # OS X 10.3 through 10.5 cur_target=10.3 if test ${enable_universalsdk}; then if test "${UNIVERSAL_ARCHS}" = "all"; then @@ -1806,15 +1814,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 - 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 @@ -1828,6 +1835,14 @@ 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 + 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*)