Index: build-scripts/fatbuild.sh =================================================================== --- build-scripts/fatbuild.sh (revision 5180) +++ build-scripts/fatbuild.sh (working copy) @@ -41,7 +41,17 @@ -Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk" else # 10.2 or 10.3 SDK + GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1" + # This is for Xcode 2.x (Tiger) + if [ ! -d "$GCCUSRPATH" ]; then + GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1" + fi + if [ ! -d "$GCCUSRPATH" ]; then + echo "Couldn't find any GCC usr path" + exit 1 + fi + # PowerPC configure flags (10.3 runtime compatibility) # We dynamically load X11, so using the system X11 headers is fine. CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ @@ -54,12 +64,12 @@ CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \ -nostdinc \ -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ --I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \ +-I$GCCUSRPATH/include \ -isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include" # PowerPC linker flags LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc -mmacosx-version-min=10.3 \ --L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \ +-L$GCCUSRPATH \ -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ -Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk" @@ -75,6 +85,10 @@ if [ ! -d "$GCCUSRPATH" ]; then GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1" fi +# This is for Xcode 2.x (Tiger) +if [ ! -d "$GCCUSRPATH" ]; then + GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1" +fi if [ ! -d "$GCCUSRPATH" ]; then echo "Couldn't find any GCC usr path" @@ -239,7 +253,6 @@ cd build target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'` (lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` && - ln -sf $target $output/libSDL-1.2.0.dylib && ln -sf $target $output/libSDL.dylib && lipo -create -o $output/libSDL.a */build/.libs/libSDL.a && cp $native_path/build/.libs/libSDL.la $output &&