mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r16294) -Fix-ish [FS#2894]: check for a recent enough (supported) version of the XCode SDK, i.e. 2.5 or higher. Older XCode SDKs miss constants used by OpenTTD.
This commit is contained in:
parent
46928b9d72
commit
1c98cf370d
25
config.lib
25
config.lib
@ -819,6 +819,7 @@ check_params() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$os" = "OSX" ]; then
|
if [ "$os" = "OSX" ]; then
|
||||||
|
check_osx_sdk
|
||||||
# Test on G5
|
# Test on G5
|
||||||
|
|
||||||
if [ "$enable_osx_g5" != "0" ]; then
|
if [ "$enable_osx_g5" != "0" ]; then
|
||||||
@ -1629,6 +1630,30 @@ set_universal_binary_flags() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_osx_sdk() {
|
||||||
|
cat > tmp.osx.cpp << EOF
|
||||||
|
#include <AvailabilityMacros.h>
|
||||||
|
#if !defined(MAC_OS_X_VERSION_10_5)
|
||||||
|
# error "Need newer SDK"
|
||||||
|
#endif
|
||||||
|
int main() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
execute="$cxx_host $CFLAGS -E tmp.osx.cpp -o - 2>&1"
|
||||||
|
eval $execute > /dev/null
|
||||||
|
ret=$?
|
||||||
|
log 2 "executing $execute"
|
||||||
|
log 2 " exit code $ret"
|
||||||
|
rm -f tmp.osx.cpp
|
||||||
|
if [ "$ret" != "0" ]; then
|
||||||
|
log 1 "I couldn't detect any XCode >= 2.5 on your system"
|
||||||
|
log 1 "please install/upgrade your XCode"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_direct_music() {
|
check_direct_music() {
|
||||||
echo "
|
echo "
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user