     char **old_argv = argv;
   
 +   /* Force -mandroid on Android platforms.  This is brutal, but works. */
-+   if (strstr (DEFAULT_TARGET_MACHINE, "-android-"))
++   if (strstr (DEFAULT_TARGET_MACHINE, "-android"))
 +     {
 +       char **new_argv = (char**) xmalloc ((argc + 1) * sizeof (char *));
 +       int i;

      noconfigdirs="$noconfigdirs ld gas gprof"
      noconfigdirs="$noconfigdirs sim target-rda"
      ;;
+   *-android-*)
+   # The Android C++ environment does not support exceptions or rtti,
+   # and so building libstdc++-v3 tends not to always work.
+     noconfigdirs="$noconfigdirs target-newlib target-libstdc++-v3 ${libgcj}"

+# Android's getpagesize is a static __inline__ which confuses
+# the autoconf test.
+case ${host} in
+*-android*) ac_cv_func_getpagesize=yes ;;
+esac
 
 
