summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-13 23:12:34 +0000
committerrubidium <rubidium@openttd.org>2009-07-13 23:12:34 +0000
commit0e1dc88b9bb40c226f7f2e71200401fa42fc1cc3 (patch)
tree4003d2e48692c97518987619f2bedaabc20ef7b4
parentf7c47110122c1e9a346d444d4c71c2cc5f43f10b (diff)
downloadopenttd-0e1dc88b9bb40c226f7f2e71200401fa42fc1cc3.tar.xz
(svn r16824) -Fix [FS#2989] (r16294): Mac OS X 10.4 with Xcode 2.5 wouldn't be detected as having Xcode 2.5 or newer. Based on a patch by ln.
-rw-r--r--config.lib16
1 files changed, 7 insertions, 9 deletions
diff --git a/config.lib b/config.lib
index f16ecd71e..54bac073b 100644
--- a/config.lib
+++ b/config.lib
@@ -1651,24 +1651,22 @@ set_universal_binary_flags() {
}
check_osx_sdk() {
-cat > tmp.osx.cpp << EOF
-#include <AvailabilityMacros.h>
-#if !defined(MAC_OS_X_VERSION_10_5)
-# error "Need newer SDK"
-#endif
+cat > tmp.osx.mm << EOF
+#include <Cocoa/Cocoa.h>
int main() {
+ kCGBitmapByteOrder32Host;
return 0;
}
EOF
- execute="$cxx_host $CFLAGS -E tmp.osx.cpp -o - 2>&1"
+ execute="$cxx_host $CFLAGS tmp.osx.mm -framework Cocoa -o tmp.osx 2>&1"
eval $execute > /dev/null
ret=$?
log 2 "executing $execute"
log 2 " exit code $ret"
- rm -f tmp.osx.cpp
+ rm -f tmp.osx.mm tmp.osx
if [ "$ret" != "0" ]; then
- log 1 "I couldn't detect any XCode >= 2.5 on your system"
- log 1 "please install/upgrade your XCode"
+ log 1 "Your system SDK is probably too old"
+ log 1 "Please install/upgrade your Xcode to >= 2.5"
exit 1
fi