]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Mon May 27 13:49:02 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Mon, 27 May 1996 17:49:32 +0000 (17:49 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 27 May 1996 17:49:32 +0000 (17:49 +0000)
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): If $TMPDIR names an
existing, writable directory, then test it instead of /tmp, /var/tmp,
and /usr/tmp for long file name support.

acspecific.m4
lib/autoconf/specific.m4

index 7d6fad8f5772879dfd6c98adccd93a3efbdceee8..c7d75f3eef880e5b10e40ced4ba7bad162b1ff1b 100644 (file)
@@ -1593,13 +1593,20 @@ AC_DEFUN(AC_SYS_LONG_FILE_NAMES,
 [ac_cv_sys_long_file_names=yes
 # Test for long file names in all the places we know might matter:
 #      .               the current directory, where building will happen
-#      /tmp            where it might want to write temporary files
-#      /var/tmp                likewise
-#      /usr/tmp                likewise
 #      $prefix/lib     where we will be installing things
 #      $exec_prefix/lib        likewise
 # eval it to expand exec_prefix.
-for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
+#      $TMPDIR         if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+#      /tmp            where it might want to write temporary files
+#      /var/tmp                likewise
+#      /usr/tmp                likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+  ac_tmpdirs="$TMPDIR"
+else
+  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
   test -d $ac_dir || continue
   test -w $ac_dir || continue # It is less confusing to not echo anything here.
   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
index 7d6fad8f5772879dfd6c98adccd93a3efbdceee8..c7d75f3eef880e5b10e40ced4ba7bad162b1ff1b 100644 (file)
@@ -1593,13 +1593,20 @@ AC_DEFUN(AC_SYS_LONG_FILE_NAMES,
 [ac_cv_sys_long_file_names=yes
 # Test for long file names in all the places we know might matter:
 #      .               the current directory, where building will happen
-#      /tmp            where it might want to write temporary files
-#      /var/tmp                likewise
-#      /usr/tmp                likewise
 #      $prefix/lib     where we will be installing things
 #      $exec_prefix/lib        likewise
 # eval it to expand exec_prefix.
-for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
+#      $TMPDIR         if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+#      /tmp            where it might want to write temporary files
+#      /var/tmp                likewise
+#      /usr/tmp                likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+  ac_tmpdirs="$TMPDIR"
+else
+  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
   test -d $ac_dir || continue
   test -w $ac_dir || continue # It is less confusing to not echo anything here.
   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null