diff options
-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']) |