listup_binaries(){ find . -type f | while read o; do case "$o" in ./.arch_ppc/*|./.arch_ppc64/*|./.arch_i386/*|./.arch_x86_64/*) continue ;; *) t="`file -b \"$o\"`" case "$t" in *"Mach-O"*" executable"*) ;; *"current ar archive"*|*"ar archive random library"*) ;; *"Mach-O"*" dynamically linked shared library"*) ;; *) continue ;; esac ;; esac echo "$o" done } ./configure 'CPPFLAGS=-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'LDFLAGS=-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' --host=x86_64-apple-darwin --build=`sh config.guess` --prefix=/opt/local && make && { [ -d .arch_x86_64 ] || mkdir .arch_x86_64 && tar cf - `listup_binaries` | (cd .arch_x86_64 && tar xf -) && make clean distclean } && ./configure 'CPPFLAGS=-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'LDFLAGS=-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' --host=i386-apple-darwin --build=`sh config.guess` --prefix=/opt/local && make && { [ -d .arch_i386 ] || mkdir .arch_i386 && tar cf - `listup_binaries` | (cd .arch_i386 && tar xf -) && make clean distclean } && ./configure 'CPPFLAGS=-arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'LDFLAGS=-arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' --host=ppc64-apple-darwin --build=`sh config.guess` --prefix=/opt/local && make && { [ -d .arch_ppc64 ] || mkdir .arch_ppc64 && tar cf - `listup_binaries` | (cd .arch_ppc64 && tar xf -) && make clean distclean } && ./configure 'CPPFLAGS=-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'LDFLAGS=-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' --host=ppc-apple-darwin --build=`sh config.guess` --prefix=/opt/local && make && { [ -d .arch_ppc ] || mkdir .arch_ppc && tar cf - `listup_binaries` | (cd .arch_ppc && tar xf -) && listup_binaries | while read o; do echo lipo -create -output "$o" -arch ppc .arch_ppc/"$o" -arch ppc64 .arch_ppc64/"$o" -arch i386 .arch_i386/"$o" -arch x86_64 .arch_x86_64/"$o" lipo -create -output "$o" -arch ppc .arch_ppc/"$o" -arch ppc64 .arch_ppc64/"$o" -arch i386 .arch_i386/"$o" -arch x86_64 .arch_x86_64/"$o" && touch -r .arch_ppc/"$o" "$o" done }