diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-01-05 10:16:05 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-01-05 10:16:05 +0900 |
commit | 449ef72cb97ae57e57c523d2252528f8eb7b9d3e (patch) | |
tree | 5e14b451b5ea01fe8bdb591ece6aff45f739d006 /configure.ac | |
parent | 7a3322a0fd660d676f1918bd7c4a37676b44e1c2 (diff) | |
download | ruby-449ef72cb97ae57e57c523d2252528f8eb7b9d3e.tar.gz |
configure.ac: Stop auto-detection of __ANDROID_API__ when cross-compiling
A patch from Tee KOBAYASHI <xtkoba+ruby@gmail.com>. [Bug #17491]
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index c143c23d3a..e1e59f06fc 100644 --- a/configure.ac +++ b/configure.ac @@ -457,11 +457,13 @@ AC_TRY_COMPILE([ [ AC_MSG_RESULT(yes) target_os=${target_os}-android - AC_MSG_CHECKING([for Android API version]) - # hacky workaround: https://github.com/termux/termux-packages/issues/6176 - rb_android_api=`getprop ro.build.version.sdk` - AC_MSG_RESULT($rb_android_api) - RUBY_APPEND_OPTIONS(CPPFLAGS, -D__ANDROID_API__=$rb_android_api -Wno-macro-redefined) + AS_IF([test "x$cross_compiling" = xno], [ + AC_MSG_CHECKING([for Android API version]) + # hacky workaround: https://github.com/termux/termux-packages/issues/6176 + rb_android_api=`getprop ro.build.version.sdk` + AC_MSG_RESULT($rb_android_api) + RUBY_APPEND_OPTIONS(CPPFLAGS, -D__ANDROID_API__=$rb_android_api -Wno-macro-redefined) + ]) ]) AC_SUBST(RM, ['rm -f']) |