Index: configure.in =================================================================== --- configure.in (revision 74593) +++ configure.in (working copy) @@ -1533,7 +1533,7 @@ if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -1545,7 +1545,46 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + AC_TRY_RUN([[ + #include + int main(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 1; + } + ]], ac_osx_32bit=yes, + ac_osx_32bit=no, + ac_osx_32bit=no) + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + DEFAULT_ARCH="i386" + ;; + ppc) + DEFAULT_ARCH="ppc" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + else + case `arch` in + i386) + DEFAULT_ARCH="x86_64" + ;; + ppc) + DEFAULT_ARCH="ppc64" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac