From 17c3014bb7012793553c275f1509b2bb6f82cd50 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Sat, 17 Apr 2021 19:08:53 +0900
Subject: [PATCH] Prefer positive condition to double negative

Autoconf 2.70 seems to omit the check for the given CC,
`AC_COMPILE_IFELSE` does not know which is the cause of the
failure.
---
 configure.ac | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 27899f751d..ebfd52f62a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,11 +486,10 @@ done
 
 AC_MSG_CHECKING([whether it is Android])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-	@%:@ifdef __ANDROID__
-	@%:@error android
+	@%:@ifndef __ANDROID__
+	@%:@error Not android
 	@%:@endif
 ]], [[]])],
-[AC_MSG_RESULT(no)],
 [
 	AC_MSG_RESULT(yes)
 	target_os=${target_os}-android
@@ -501,7 +500,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
                 AC_MSG_RESULT($rb_android_api)
                 RUBY_APPEND_OPTIONS(CPPFLAGS, -D__ANDROID_API__=$rb_android_api -Wno-macro-redefined)
 	])
-])
+],
+[AC_MSG_RESULT(no)])
 
 AC_SUBST(RM, ['rm -f'])
 AC_SUBST(CP, ['cp'])