aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-20 00:18:07 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-20 02:14:28 +0900
commitaf2c8d283665f741f82b4e16b06c520e702c012b (patch)
tree73f290976ac9b45625aeb064871e83dd89ad318e /configure.ac
parente6b72e8cae786c9752cc34541b58b5635d5c76bb (diff)
downloadruby-af2c8d283665f741f82b4e16b06c520e702c012b.tar.gz
Fixed the check for OSX version
Should compare minimum required version, and with the particular macro defined for each version. Also made the error messages consistent.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index c201a3597e..e437dbd62f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -780,11 +780,11 @@ AS_CASE(["$target_os"],
RUBY_PREPEND_OPTION(LIBS, -lobjc)
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT)
AC_MSG_CHECKING(whether Mac OS X 10.5 or later)
- AC_TRY_CPP([#include <AvailabilityMacros.h>
- #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
- #error pre OS X 10.4
- [!<===== pre OS X 10.4 =====>]
- #endif
+ AC_TRY_CPP([@%:@include <AvailabilityMacros.h>
+ @%:@if MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5
+ @%:@error pre OS X 10.5
+ [!<===== pre OS X 10.5 =====>]
+ @%:@endif
],
[macosx_10_5=yes], [macosx_10_5=no])
AC_MSG_RESULT($macosx_10_5)