--- configure.orig	2006-10-18 02:03:36.000000000 +1000
+++ configure	2011-05-10 15:15:25.000000000 +1000
@@ -3907,9 +3907,16 @@
 	    ;;
 	# is there any other compiler on Darwin besides gcc?
 	Darwin*)
-	    BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+	    if [[ `/usr/bin/arch` = 'ppc' ]]
+        then
+          BASECFLAGS="$BASECFLAGS -mno-fused-madd -fno-common"
+        else
+          BASECFLAGS="$BASECFLAGS -fno-common"
+        fi
 	    if test "${enable_universalsdk}"; then
-		BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+		BASECFLAGS="__UNIVERSAL_CFLAGS__ -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+	    else
+	    BASECFLAGS="-arch __BUILD_ARCH__ ${BASECFLAGS}"
 	    fi
 
 	    ;;
@@ -10316,7 +10323,7 @@
   Darwin/[01234567].*)
     LIBTOOL_CRUFT="-framework System -lcc_dynamic"
     if test -z "${enable_universalsdk}"; then
-	    LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
+	    LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only __BUILD_ARCH__"
     fi
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -10328,7 +10335,7 @@
         else
             LIBTOOL_CRUFT=""
     fi
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only __BUILD_ARCH__'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac
@@ -10460,7 +10467,9 @@
 		if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
 		then
 			if test "${enable_universalsdk}"; then
-				LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+				LDFLAGS="__UNIVERSAL_LDFLAGS__ -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+			else
+				LDFLAGS="-arch __BUILD_ARCH__ ${LDFLAGS}"
 			fi
 			LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
 			BLDSHARED="$LDSHARED"