mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-01 14:16:02 +08:00
* 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.
This commit is contained in:
parent
498b9c8446
commit
5d3ad5cb5a
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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` &&
|
||||
|
Loading…
Reference in New Issue
Block a user