| 1 | Index: configure.in |
| 2 | =================================================================== |
| 3 | --- configure.in (revision 74593) |
| 4 | +++ configure.in (working copy) |
| 5 | @@ -1533,7 +1533,7 @@ |
| 6 | if test "${enable_universalsdk}"; then |
| 7 | : |
| 8 | else |
| 9 | - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" |
| 10 | + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" |
| 11 | fi |
| 12 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 13 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
| 14 | @@ -1545,7 +1545,46 @@ |
| 15 | else |
| 16 | LIBTOOL_CRUFT="" |
| 17 | fi |
| 18 | - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" |
| 19 | + AC_TRY_RUN([[ |
| 20 | + #include <unistd.h> |
| 21 | + int main(int argc, char*argv[]) |
| 22 | + { |
| 23 | + if (sizeof(long) == 4) { |
| 24 | + return 0; |
| 25 | + } else { |
| 26 | + return 1; |
| 27 | + } |
| 28 | + ]], ac_osx_32bit=yes, |
| 29 | + ac_osx_32bit=no, |
| 30 | + ac_osx_32bit=no) |
| 31 | + |
| 32 | + if test "${ac_osx_32bit}" = "yes"; then |
| 33 | + case `arch` in |
| 34 | + i386) |
| 35 | + DEFAULT_ARCH="i386" |
| 36 | + ;; |
| 37 | + ppc) |
| 38 | + DEFAULT_ARCH="ppc" |
| 39 | + ;; |
| 40 | + *) |
| 41 | + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) |
| 42 | + ;; |
| 43 | + esac |
| 44 | + else |
| 45 | + case `arch` in |
| 46 | + i386) |
| 47 | + DEFAULT_ARCH="x86_64" |
| 48 | + ;; |
| 49 | + ppc) |
| 50 | + DEFAULT_ARCH="ppc64" |
| 51 | + ;; |
| 52 | + *) |
| 53 | + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) |
| 54 | + ;; |
| 55 | + esac |
| 56 | + fi |
| 57 | + |
| 58 | + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${DEFAULT_ARCH}" |
| 59 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 60 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
| 61 | esac |