Merge tag jb8u242-b1644.3

Change-Id: I80167d596b75a0e77ab21b443172934933d6c2df
diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4
index 4ee9cdd..9f232a5 100644
--- a/common/autoconf/basics.m4
+++ b/common/autoconf/basics.m4
@@ -315,10 +315,11 @@
         # Otherwise we believe it is a complete path. Use it as it is.
         AC_MSG_NOTICE([Will use user supplied tool $1=$tool_specified])
         AC_MSG_CHECKING([for $1])
-        if test ! -x "$tool_specified"; then
-          AC_MSG_RESULT([not found])
-          AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
+#       fi
         AC_MSG_RESULT([$tool_specified])
       fi
     fi
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 15f0021..0c42e74 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4599,11 +4599,11 @@
 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
 $as_echo_n "checking for BASENAME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool BASENAME=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -4792,11 +4792,11 @@
 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
 $as_echo_n "checking for BASH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool BASH=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -4985,11 +4985,11 @@
 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
 $as_echo_n "checking for CAT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CAT=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -5178,11 +5178,11 @@
 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
 $as_echo_n "checking for CHMOD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CHMOD=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -5371,11 +5371,11 @@
 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
 $as_echo_n "checking for CMP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CMP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -5564,11 +5564,11 @@
 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
 $as_echo_n "checking for COMM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool COMM=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -5757,11 +5757,11 @@
 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
 $as_echo_n "checking for CP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -5950,11 +5950,11 @@
 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
 $as_echo_n "checking for CUT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CUT=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -6143,11 +6143,11 @@
 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
 $as_echo_n "checking for DATE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool DATE=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -6336,11 +6336,11 @@
 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
 $as_echo_n "checking for DIFF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool DIFF=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -6529,11 +6529,11 @@
 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
 $as_echo_n "checking for DIRNAME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool DIRNAME=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -6722,11 +6722,11 @@
 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
 $as_echo_n "checking for ECHO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool ECHO=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -6915,11 +6915,11 @@
 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
 $as_echo_n "checking for EXPR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool EXPR=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -7108,11 +7108,11 @@
 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
 $as_echo_n "checking for FILE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool FILE=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -7301,11 +7301,11 @@
 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
 $as_echo_n "checking for FIND... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool FIND=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -7494,11 +7494,11 @@
 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
 $as_echo_n "checking for HEAD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool HEAD=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -7687,11 +7687,11 @@
 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
 $as_echo_n "checking for LN... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool LN=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -7880,11 +7880,11 @@
 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
 $as_echo_n "checking for LS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool LS=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -8073,11 +8073,11 @@
 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
 $as_echo_n "checking for MKDIR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool MKDIR=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -8266,11 +8266,11 @@
 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
 $as_echo_n "checking for MKTEMP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool MKTEMP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -8459,11 +8459,11 @@
 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
 $as_echo_n "checking for MV... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool MV=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -8652,11 +8652,11 @@
 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
 $as_echo_n "checking for NAWK... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool NAWK=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -8845,11 +8845,11 @@
 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
 $as_echo_n "checking for PRINTF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool PRINTF=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -9038,11 +9038,11 @@
 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
 $as_echo_n "checking for RM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool RM=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -9231,11 +9231,11 @@
 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
 $as_echo_n "checking for SH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool SH=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -9424,11 +9424,11 @@
 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
 $as_echo_n "checking for SORT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool SORT=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -9617,11 +9617,11 @@
 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
 $as_echo_n "checking for TAIL... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool TAIL=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -9810,11 +9810,11 @@
 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
 $as_echo_n "checking for TAR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool TAR=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -10003,11 +10003,11 @@
 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
 $as_echo_n "checking for TEE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool TEE=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -10196,11 +10196,11 @@
 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
 $as_echo_n "checking for TOUCH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool TOUCH=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -10389,11 +10389,11 @@
 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
 $as_echo_n "checking for TR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool TR=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -10582,11 +10582,11 @@
 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
 $as_echo_n "checking for UNAME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool UNAME=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -10775,11 +10775,11 @@
 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
 $as_echo_n "checking for UNIQ... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool UNIQ=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -10968,11 +10968,11 @@
 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
 $as_echo_n "checking for WC... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool WC=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -11161,11 +11161,11 @@
 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
 $as_echo_n "checking for WHICH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool WHICH=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -11354,11 +11354,11 @@
 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
 $as_echo_n "checking for XARGS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool XARGS=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -11542,11 +11542,11 @@
 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
 $as_echo_n "checking for AWK... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool AWK=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -11769,11 +11769,11 @@
 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
 $as_echo_n "checking for GREP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool GREP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -12004,11 +12004,11 @@
 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
 $as_echo_n "checking for EGREP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool EGREP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -12239,11 +12239,11 @@
 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
 $as_echo_n "checking for FGREP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool FGREP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -12478,11 +12478,11 @@
 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
 $as_echo_n "checking for SED... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool SED=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -12678,11 +12678,11 @@
 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
 $as_echo_n "checking for CYGPATH... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CYGPATH=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -12864,11 +12864,11 @@
 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
 $as_echo_n "checking for READLINK... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool READLINK=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -13050,11 +13050,11 @@
 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
 $as_echo_n "checking for DF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool DF=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -13236,11 +13236,11 @@
 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
 $as_echo_n "checking for SETFILE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool SETFILE=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -13422,11 +13422,11 @@
 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
 $as_echo_n "checking for CPIO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CPIO=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -17437,11 +17437,11 @@
 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
 $as_echo_n "checking for UNZIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool UNZIP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -17630,11 +17630,11 @@
 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
 $as_echo_n "checking for ZIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool ZIP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -17825,11 +17825,11 @@
 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
 $as_echo_n "checking for LDD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool LDD=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -18017,11 +18017,11 @@
 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
 $as_echo_n "checking for READELF... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool READELF=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -18203,11 +18203,11 @@
 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
 $as_echo_n "checking for HG... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool HG=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -18389,11 +18389,11 @@
 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
 $as_echo_n "checking for STAT... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool STAT=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -18575,11 +18575,11 @@
 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
 $as_echo_n "checking for TIME... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool TIME=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -18772,11 +18772,11 @@
 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
 $as_echo_n "checking for COMM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool COMM=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -18968,11 +18968,11 @@
 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
 $as_echo_n "checking for DSYMUTIL... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -19161,11 +19161,11 @@
 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
 $as_echo_n "checking for XATTR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool XATTR=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -19353,11 +19353,11 @@
 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
 $as_echo_n "checking for CODESIGN... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CODESIGN=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -26909,11 +26909,12 @@
       else
         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
       fi
-    else
-      # Otherwise it might already be a complete path
-      if test ! -x "$CC"; then
-        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
-      fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#   else
+#     # Otherwise it might already be a complete path
+#     if test ! -x "[$]CC"; then
+#       AC_MSG_ERROR([User supplied compiler CC=[$]CC does not exist])
+#     fi
     fi
   else
     # No user supplied value. Locate compiler ourselves.
@@ -27941,7 +27942,7 @@
     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
     # Check that this is likely to be GCC.
-    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Apple LLVM version\|Free Software Foundation" > /dev/null
+    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Apple LLVM version\|Free Software Foundation\|clang version" > /dev/null
     if test $? -ne 0; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
@@ -28650,11 +28651,12 @@
       else
         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
       fi
-    else
-      # Otherwise it might already be a complete path
-      if test ! -x "$CXX"; then
-        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
-      fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#   else
+#     # Otherwise it might already be a complete path
+#     if test ! -x "[$]CXX"; then
+#       AC_MSG_ERROR([User supplied compiler CXX=[$]CXX does not exist])
+#     fi
     fi
   else
     # No user supplied value. Locate compiler ourselves.
@@ -29682,7 +29684,7 @@
     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
     # Check that this is likely to be GCC.
-    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Apple LLVM version\|Free Software Foundation" > /dev/null
+    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Apple LLVM version\|Free Software Foundation\|clang version" > /dev/null
     if test $? -ne 0; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
@@ -31398,11 +31400,11 @@
 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
 $as_echo_n "checking for AS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool AS=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -32025,11 +32027,11 @@
 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
 $as_echo_n "checking for AR... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool AR=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -33030,11 +33032,11 @@
 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
 $as_echo_n "checking for LIPO... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool LIPO=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -34542,11 +34544,11 @@
 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
 $as_echo_n "checking for STRIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool STRIP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -35010,11 +35012,11 @@
 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
 $as_echo_n "checking for NM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool NM=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -35478,11 +35480,11 @@
 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
 $as_echo_n "checking for GNM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool GNM=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -35947,11 +35949,11 @@
 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
 $as_echo_n "checking for MCS... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool MCS=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -36527,11 +36529,11 @@
 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
 $as_echo_n "checking for STRIP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool STRIP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -37148,11 +37150,11 @@
 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
 $as_echo_n "checking for NM... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool NM=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -37733,11 +37735,11 @@
 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
 $as_echo_n "checking for OBJCOPY... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool OBJCOPY=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -38316,11 +38318,11 @@
 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
 $as_echo_n "checking for OBJDUMP... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool OBJDUMP=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -38816,11 +38818,11 @@
 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
 $as_echo_n "checking for BUILD_CC... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool BUILD_CC=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -39284,11 +39286,11 @@
 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
 $as_echo_n "checking for BUILD_CXX... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -39752,11 +39754,11 @@
 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
 $as_echo_n "checking for BUILD_LD... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool BUILD_LD=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -40510,11 +40512,11 @@
 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
 $as_echo_n "checking for JTREGEXE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool JTREGEXE=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
@@ -52555,11 +52557,11 @@
 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
 $as_echo_n "checking for CCACHE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#       if test ! -x "$tool_specified"; then
+#         AC_MSG_RESULT([not found])
+#         AC_MSG_ERROR([User supplied tool CCACHE=$tool_specified does not exist or is not executable])
+#       fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
 $as_echo "$tool_specified" >&6; }
       fi
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
index df02d8e..aba21c8 100644
--- a/common/autoconf/toolchain.m4
+++ b/common/autoconf/toolchain.m4
@@ -422,7 +422,7 @@
     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
     # Check that this is likely to be GCC.
-    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Apple LLVM version\|Free Software Foundation" > /dev/null
+    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Apple LLVM version\|Free Software Foundation\|clang version" > /dev/null
     if test $? -ne 0; then
       AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler.])
       AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION"])
@@ -489,11 +489,12 @@
       else
         AC_MSG_ERROR([User supplied compiler $1=[$]$1 could not be found])
       fi
-    else
-      # Otherwise it might already be a complete path
-      if test ! -x "[$]$1"; then
-        AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
-      fi
+# Android Studio: $tool_specified may contain a command with arguments, not just a path
+#   else
+#     # Otherwise it might already be a complete path
+#     if test ! -x "[$]$1"; then
+#       AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
+#     fi
     fi
   else
     # No user supplied value. Locate compiler ourselves.