diff -uNr autoconf-2.13/acspecific.m4 autoconf-2.13.mod/acspecific.m4
--- autoconf-2.13/acspecific.m4	1999-01-05 13:27:52.000000000 +0000
+++ autoconf-2.13.mod/acspecific.m4	2020-11-05 19:58:31.094308943 +0000
@@ -2248,7 +2248,7 @@
 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
   ac_tmpdirs="$TMPDIR"
 else
-  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+  ac_tmpdirs='@TERMUX_PREFIX@/tmp'
 fi
 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
   test -d $ac_dir || continue
