+2000-10-25 Pavel Roskin <proski@gnu.org>
+
+ * tests/aclocal.m4 (AC_ENV_SAVE): Rename to ...
+ (AC_STATE_SAVE): ... this. Save the list of all files
+ in the current directory.
+ * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Compare lists of
+ files created by AC_ENV_SAVE. Remove state* before and after
+ the test.
+
2000-10-25 Pavel Roskin <proski@gnu.org>
* Makefile.am: Add acversion.m4.in to EXTRA_DIST.
[[$2][$1]join([$1], m4_shift(m4_shift($@)))])])
-# AC_ENV_SAVE(FILE)
+# AC_STATE_SAVE(FILE)
# ------------------
# Save the environment, but the variables we are allowed to touch.
# This is to check no test touches the user name space.
# Some variables some shells use and change
# - POW_LIB
# From acfunctions.m4.
-AC_DEFUN([AC_ENV_SAVE],
+AC_DEFUN([AC_STATE_SAVE],
[(set) 2>&1 |
egrep -v -e \
'join([|],
[^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' |
# There maybe variables spread on several lines, eg IFS, remove the dead
# lines
- fgrep = >$1
+ fgrep = >state-env.$1
+ rm -f state-ls.$1
+ ls -1 | grep -v '^state' | sort > state-ls.$1
])
[AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir)
AC_CONFIG_HEADER(config.h:config.hin)
-AC_ENV_SAVE(expout)
+AC_STATE_SAVE(before)
$1
-AC_ENV_SAVE(env-after)
+AC_STATE_SAVE(after)
AC_OUTPUT
])
$2
+rm -f state*
AT_CHECK([autoconf -W none --autoconf-dir .. -l $at_srcdir], 0, [], [])
AT_CHECK([autoheader --autoconf-dir .. -l $at_srcdir], 0, [], [])
AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, [])
dnl Some tests might exit prematurely when they find a problem, in
dnl which case `env-after' is probably missing. Don't check it then.
-if test -f env-after; then
- AT_CHECK([cat env-after], 0, expout)
+if test -f state-env.after; then
+ cp -f state-env.before expout
+ AT_CHECK([cat state-env.after], 0, expout)
+ cp -f state-ls.before expout
+ AT_CHECK([cat state-ls.after], 0, expout)
fi
+rm -f state*
])# _AT_CHECK_AC_MACRO