[Scummvm-git-logs] scummvm master -> 281b187de4de2b780b80a283ea933b0b9741d15a
sev-
sev at scummvm.org
Sun Nov 15 14:50:45 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
281b187de4 CONFIGURE: Make Mac version check cross-compilation-friendly
Commit: 281b187de4de2b780b80a283ea933b0b9741d15a
https://github.com/scummvm/scummvm/commit/281b187de4de2b780b80a283ea933b0b9741d15a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-11-15T15:49:21+01:00
Commit Message:
CONFIGURE: Make Mac version check cross-compilation-friendly
We cannot execute the resulting binary, thus buildbot was not picking up
the version. Now we transfer version number into string at compile
time and search for it in the binary.
Changed paths:
configure
diff --git a/configure b/configure
index 80429fc862..997bee82fd 100755
--- a/configure
+++ b/configure
@@ -2908,11 +2908,20 @@ case $_host_os in
echocheck "macOS deployement target"
cat > $TMPC << EOF
#include "AvailabilityMacros.h"
-#include <stdio.h>
-int main(int argc, char *argv[]) { printf("%d\n", MAC_OS_X_VERSION_MIN_REQUIRED); return 0; }
+
+#define _DIGIT(x) #x
+#define DIGIT(x) _DIGIT(x)
+
+const char version[] = "Version:" DIGIT(MAC_OS_X_VERSION_MIN_REQUIRED);
+const char *_version() { char *s = (char *)version; return s; }
+
+int main(int argc, char *argv[]) { _version(); return 0; }
EOF
cc_check_no_clean
- _macos_min_version=`$TMPO$HOSTEXEEXT 2>/dev/null`
+ if $_strings $TMPO$HOSTEXEEXT | grep Version: >/dev/null; then
+ _macos_min_version=`$_strings $TMPO$HOSTEXEEXT | grep Version:`
+ _macos_min_version="${_macos_min_version/Version:/}"
+ fi
cc_check_clean
# Also get a dot version of the min version
More information about the Scummvm-git-logs
mailing list