The full explanation for this is here:
http://stackoverflow.com/questions/
15283220/android-shell-eof
In short, Android's sh has a bug in that writing
cat <<EOF
...
EOF
will try creating a temporary file in /sqlite_stmt_journals,
which may or may not exist, and may or may not be writeable
by the current user.
So instead do the right thing and set TMPDIR to whatever the
current File::Spec->tmpdir returns.
print "Please read configure.readme for information on how to run it yourself\n";
$ENV{'CC'} = $Config{'cc'};
+ if ( $^O eq 'android' && !$ENV{'TMPDIR'} ) {
+ # See http://stackoverflow.com/a/15417261
+ require File::Spec;
+ $ENV{'TMPDIR'} = File::Spec->tmpdir();
+ }
system("$Config{sh} configure");
}