]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): Move the trap commands ...
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Dec 2004 17:58:03 +0000 (17:58 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Dec 2004 17:58:03 +0000 (17:58 +0000)
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): ... here;
  give only 4-letter prefix to AS_TMPDIR, comment fixed.
* lib/autoconf/programs.m4 (_AC_PATH_PROG_FEATURE_CHECK): Don't
  create the temporary directory.
  (_AC_FEATURE_CHECK_LENGTH): Work in current directory.

ChangeLog
lib/autoconf/programs.m4
lib/autoconf/status.m4
lib/m4sugar/m4sh.m4

index 07977aa59788cd462090e916cf94ba1b7d94c454..56eeb654b717e578139181c2cc4611d4777e6d2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-12-13  Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Move the trap commands ...
+       * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): ... here;
+         give only 4-letter prefix to AS_TMPDIR, comment fixed.
+       * lib/autoconf/programs.m4 (_AC_PATH_PROG_FEATURE_CHECK): Don't
+         create the temporary directory.
+       (_AC_FEATURE_CHECK_LENGTH): Work in current directory.
+
 2004-12-12  Kelley Cook  <kcook@gcc.gnu.org>
 
        * bin/autoheader.in: Exit if no AC_CONFIG_HEADERS was found.
index 38ea9c287392231748ca6967a0ec77df581224ca..63ac02ca774caf391eca59ee1c8f41018b4764e2 100644 (file)
@@ -428,8 +428,7 @@ m4_define([_AC_PATH_PROG_FEATURE_CHECK],
 if test -z "$$1"; then
 set dummy $2; ac_prog_name=$[2]
 AC_CACHE_VAL([ac_cv_path_$1],
-[AS_TMPDIR([$1])
-ac_path_$1_found=false
+[ac_path_$1_found=false
 # Loop through the user's path and test for each of PROGNAME-LIST
 _AS_PATH_WALK([$4],
 [for ac_prog in $2; do
@@ -441,7 +440,6 @@ _AS_PATH_WALK([$4],
   done
 done
 ])
-rm -rf "$tmp"
 ])
 $1="$ac_cv_path_$1"
 if test -z "$$1"; then
@@ -468,15 +466,15 @@ m4_define([_AC_FEATURE_CHECK_LENGTH],
   _AC_PATH_PROG_FLAVOR_GNU([$$1],
     [$2="$$1" $1_found=:],
   [ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
   while :
   do
-    cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
-    mv "$tmp/conftest.tmp" "$tmp/conftest.in"
-    cp "$tmp/conftest.in" "$tmp/conftest.nl"
-    echo '$4' >> "$tmp/conftest.nl"
-    $3 < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
-    diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo '$4' >> "conftest.nl"
+    $3 < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     ac_count=`expr $ac_count + 1`
     if test $ac_count -gt ${$1_max-0}; then
       # Best one so far, save it but keep looking for a better one
index 5b24b283bd0c86c6b353c1a7fa97af56464552cb..3ab9ebb66f7b7a9fdbb5ecdcde8817da449edea6 100644 (file)
@@ -1539,9 +1539,16 @@ m4_ifset([AC_LIST_COMMANDS],
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-AS_TMPDIR([confstat], [.])
+# Hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -fr "$tmp" && exit $exit_status' 0
+  trap 'AS_EXIT([1])' 1 2 13 15
+}
+dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
+AS_TMPDIR([conf], [.])
 
 _ACEOF
 ])[]dnl m4_ifval
index 827706cba268d32ee6a81a504fb69cd293c1808c..7995e3dca1907dd3ef062dcb9a316fc4a755a3f0 100644 (file)
@@ -963,14 +963,7 @@ m4_define([AS_LITERAL_IF],
 # which name is inspired by PREFIX (should be 2-4 chars max), and set
 # trap mechanisms to remove it.
 m4_define([AS_TMPDIR],
-[# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
-  trap 'AS_EXIT([1])' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
+[# Create a (secure) tmp directory for tmp files.
 m4_if([$2], [], [: ${TMPDIR=/tmp}])
 {
   tmp=`(umask 077 && mktemp -d -q "m4_default([$2], [$TMPDIR])/$1XXXXXX") 2>/dev/null` &&