Merge tag jb8u212-b1586.4

Change-Id: I9f62d7426302091e85e720c97b2d8bb763c5f5de
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 af4dbcc..e816745 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4598,11 +4598,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
@@ -4791,11 +4791,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
@@ -4984,11 +4984,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
@@ -5177,11 +5177,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
@@ -5370,11 +5370,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
@@ -5563,11 +5563,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
@@ -5756,11 +5756,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
@@ -5949,11 +5949,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
@@ -6142,11 +6142,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
@@ -6335,11 +6335,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
@@ -6528,11 +6528,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
@@ -6721,11 +6721,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
@@ -6914,11 +6914,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
@@ -7107,11 +7107,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
@@ -7300,11 +7300,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
@@ -7493,11 +7493,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
@@ -7686,11 +7686,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
@@ -7879,11 +7879,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
@@ -8072,11 +8072,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
@@ -8265,11 +8265,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
@@ -8458,11 +8458,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
@@ -8651,11 +8651,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
@@ -8844,11 +8844,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
@@ -9037,11 +9037,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
@@ -9230,11 +9230,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
@@ -9423,11 +9423,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
@@ -9616,11 +9616,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
@@ -9809,11 +9809,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
@@ -10002,11 +10002,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
@@ -10195,11 +10195,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
@@ -10388,11 +10388,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
@@ -10581,11 +10581,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
@@ -10774,11 +10774,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
@@ -10967,11 +10967,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
@@ -11160,11 +11160,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
@@ -11353,11 +11353,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
@@ -11541,11 +11541,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
@@ -11768,11 +11768,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
@@ -12003,11 +12003,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
@@ -12238,11 +12238,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
@@ -12477,11 +12477,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
@@ -12677,11 +12677,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
@@ -12863,11 +12863,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
@@ -13049,11 +13049,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
@@ -13235,11 +13235,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
@@ -13421,11 +13421,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
@@ -17436,11 +17436,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
@@ -17629,11 +17629,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
@@ -17824,11 +17824,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
@@ -18016,11 +18016,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
@@ -18202,11 +18202,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
@@ -18388,11 +18388,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
@@ -18574,11 +18574,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
@@ -18771,11 +18771,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
@@ -18967,11 +18967,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
@@ -19160,11 +19160,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
@@ -19352,11 +19352,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
@@ -26908,11 +26908,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.
@@ -27940,7 +27941,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;}
@@ -28649,11 +28650,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.
@@ -29681,7 +29683,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;}
@@ -31397,11 +31399,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
@@ -32024,11 +32026,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
@@ -33029,11 +33031,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
@@ -34541,11 +34543,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
@@ -35009,11 +35011,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
@@ -35477,11 +35479,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
@@ -35946,11 +35948,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
@@ -36526,11 +36528,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
@@ -37147,11 +37149,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
@@ -37732,11 +37734,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
@@ -38315,11 +38317,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
@@ -38815,11 +38817,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
@@ -39283,11 +39285,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
@@ -39751,11 +39753,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
@@ -40509,11 +40511,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
@@ -52420,11 +52422,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.