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"*) ;; *"Mach-O"*" object"*) ;; *) continue ;; esac ;; esac echo "$o" done } #make clean distclean && ./configure 'CC=gcc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' CPP=cpp 'CXX=g++ -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'CXXCPP=g++ -E' --prefix=/opt/local --host=x86_64-apple-darwin --build=`sh build-aux/config.guess` --disable-nls && make && { [ -d .arch_x86_64 ] || mkdir .arch_x86_64 && tar cf - `listup_binaries` | (cd .arch_x86_64 && tar xf -) } && make clean distclean && ./configure 'CC=gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' CPP=cpp 'CXX=g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'CXXCPP=g++ -E' --prefix=/opt/local --host=i386-apple-darwin --build=`sh build-aux/config.guess` --disable-nls && make && { [ -d .arch_i386 ] || mkdir .arch_i386 && tar cf - `listup_binaries` | (cd .arch_i386 && tar xf -) } && make clean distclean && ./configure 'CC=gcc -arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' CPP=cpp 'CXX=g++ -arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'CXXCPP=g++ -E' --prefix=/opt/local --host=ppc64-apple-darwin --build=`sh build-aux/config.guess` --disable-nls && make && { [ -d .arch_ppc64 ] || mkdir .arch_ppc64 && tar cf - `listup_binaries` | (cd .arch_ppc64 && tar xf -) } && make clean distclean && ./configure 'CC=gcc -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' CPP=cpp 'CXX=g++ -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4' 'CXXCPP=g++ -E' --prefix=/opt/local --host=ppc-apple-darwin --build=`sh build-aux/config.guess` --disable-nls && 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 }