| 1 | Index: configure |
| 2 | =================================================================== |
| 3 | --- configure.orig |
| 4 | +++ configure |
| 5 | @@ -5522,8 +5522,16 @@ $as_echo "$CC" >&6; } |
| 6 | |
| 7 | # Calculate the right deployment target for this build. |
| 8 | # |
| 9 | - cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` |
| 10 | - if test ${cur_target} '>' 10.2; then |
| 11 | + cur_target_major=`sw_vers -productVersion | \ |
| 12 | + sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` |
| 13 | + cur_target_minor=`sw_vers -productVersion | \ |
| 14 | + sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` |
| 15 | + cur_target="${cur_target_major}.${cur_target_minor}" |
| 16 | + if test ${cur_target_major} -eq 10 && \ |
| 17 | + test ${cur_target_minor} -ge 3 && \ |
| 18 | + test ${cur_target_minor} -le 5 |
| 19 | + then |
| 20 | + # OS X 10.3 through 10.5 |
| 21 | cur_target=10.3 |
| 22 | if test ${enable_universalsdk}; then |
| 23 | if test "${UNIVERSAL_ARCHS}" = "all"; then |
| 24 | @@ -7585,14 +7593,14 @@ then |
| 25 | # Use -undefined dynamic_lookup whenever possible (10.3 and later). |
| 26 | # This allows an extension to be used in any Python |
| 27 | |
| 28 | - if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2 |
| 29 | + dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 30 | + sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` |
| 31 | + dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 32 | + sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` |
| 33 | + if test ${dep_target_major} -eq 10 && \ |
| 34 | + test ${dep_target_minor} -le 2 |
| 35 | then |
| 36 | - if test "${enable_universalsdk}"; then |
| 37 | - LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" |
| 38 | - fi |
| 39 | - LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup' |
| 40 | - BLDSHARED="$LDSHARED" |
| 41 | - else |
| 42 | + # building for OS X 10.0 through 10.2 |
| 43 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 44 | if test "$enable_framework" ; then |
| 45 | # Link against the framework. All externals should be defined. |
| 46 | @@ -7603,6 +7611,13 @@ then |
| 47 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 48 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
| 49 | fi |
| 50 | + else |
| 51 | + # building for OS X 10.3 and later |
| 52 | + if test "${enable_universalsdk}"; then |
| 53 | + LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" |
| 54 | + fi |
| 55 | + LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup' |
| 56 | + BLDSHARED="$LDSHARED" |
| 57 | fi |
| 58 | ;; |
| 59 | Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';; |
| 60 | Index: configure.ac |
| 61 | =================================================================== |
| 62 | --- configure.ac.orig |
| 63 | +++ configure.ac |
| 64 | @@ -1010,8 +1010,16 @@ yes) |
| 65 | |
| 66 | # Calculate the right deployment target for this build. |
| 67 | # |
| 68 | - cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'` |
| 69 | - if test ${cur_target} '>' 10.2; then |
| 70 | + cur_target_major=`sw_vers -productVersion | \ |
| 71 | + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
| 72 | + cur_target_minor=`sw_vers -productVersion | \ |
| 73 | + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` |
| 74 | + cur_target="${cur_target_major}.${cur_target_minor}" |
| 75 | + if test ${cur_target_major} -eq 10 && \ |
| 76 | + test ${cur_target_minor} -ge 3 && \ |
| 77 | + test ${cur_target_minor} -le 5 |
| 78 | + then |
| 79 | + # OS X 10.3 through 10.5 |
| 80 | cur_target=10.3 |
| 81 | if test ${enable_universalsdk}; then |
| 82 | if test "${UNIVERSAL_ARCHS}" = "all"; then |
| 83 | @@ -1792,14 +1800,14 @@ then |
| 84 | # Use -undefined dynamic_lookup whenever possible (10.3 and later). |
| 85 | # This allows an extension to be used in any Python |
| 86 | |
| 87 | - if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2 |
| 88 | + dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 89 | + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
| 90 | + dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 91 | + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` |
| 92 | + if test ${dep_target_major} -eq 10 && \ |
| 93 | + test ${dep_target_minor} -le 2 |
| 94 | then |
| 95 | - if test "${enable_universalsdk}"; then |
| 96 | - LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" |
| 97 | - fi |
| 98 | - LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup' |
| 99 | - BLDSHARED="$LDSHARED" |
| 100 | - else |
| 101 | + # building for OS X 10.0 through 10.2 |
| 102 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 103 | if test "$enable_framework" ; then |
| 104 | # Link against the framework. All externals should be defined. |
| 105 | @@ -1810,6 +1818,13 @@ then |
| 106 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 107 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
| 108 | fi |
| 109 | + else |
| 110 | + # building for OS X 10.3 and later |
| 111 | + if test "${enable_universalsdk}"; then |
| 112 | + LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" |
| 113 | + fi |
| 114 | + LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup' |
| 115 | + BLDSHARED="$LDSHARED" |
| 116 | fi |
| 117 | ;; |
| 118 | Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';; |