summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-10-04 20:53:22 +0000
committermichi_cc <michi_cc@openttd.org>2009-10-04 20:53:22 +0000
commit10ca710e9883661566ad436d2747044081a5bb5b (patch)
treecb5e8967408e2e909cf4116dfb5a4096ce0b3b43 /config.lib
parent6c7f8fc8b4974a4546190d5c2e9abcdfa74f9382 (diff)
downloadopenttd-10ca710e9883661566ad436d2747044081a5bb5b.tar.xz
(svn r17702) -Change: [OSX] Assure that the minimal OSX version is defined in all cases.
-Codechange: [OSX] Improve conditional defines for OS version dependant code.
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib21
1 files changed, 17 insertions, 4 deletions
diff --git a/config.lib b/config.lib
index f184b97dc..e3ef9e3cf 100644
--- a/config.lib
+++ b/config.lib
@@ -1240,8 +1240,21 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -DNO_QUICKTIME"
fi
- if [ "$cpu_type" = "64" ]; then
- CFLAGS="$CFLAGS -mmacosx-version-min=10.5"
+ if [ "$enable_universal" = "0" ] && [ $cc_version -ge 40 ]; then
+ # Only set the min version when not doing an universal build.
+ # Universal builds set the version elsewhere.
+ if [ "$cpu_type" = "64" ]; then
+ CFLAGS="$CFLAGS -mmacosx-version-min=10.5"
+ else
+ gcc_cpu=`$cc_host -dumpmachine`
+ if [ "`echo $gcc_cpu | cut -c 1-3`" = "ppc" -o "`echo $gcc_cpu | cut -c 1-7`" = "powerpc" ]; then
+ # PowerPC build can run on 10.3
+ CFLAGS="$CFLAGS -mmacosx-version-min=10.3"
+ else
+ # Intel is only available starting from 10.4
+ CFLAGS="$CFLAGS -mmacosx-version-min=10.4"
+ fi
+ fi
fi
fi
@@ -1690,8 +1703,8 @@ set_universal_binary_flags() {
fi
if [ "$with_osx_sysroot" = "3" ]; then
- CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$osx_sysroot_version.sdk -mmacosx-version-min=$osx_target_version"
- LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$osx_sysroot_version.sdk -mmacosx-version-min=$osx_target_version"
+ CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX$osx_sysroot_version.sdk"
+ LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX$osx_sysroot_version.sdk"
fi
}