if-not-failed.
* tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to
dump config.log when configure failed. Before, the log was
reported only on success.
+2000-12-19 Akim Demaille <akim@epita.fr>
+
+ * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and
+ if-not-failed.
+ * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to
+ dump config.log when configure failed. Before, the log was
+ reported only on success.
+
2000-12-19 Akim Demaille <akim@epita.fr>
* tests/foreign.at: New file.
( $1 ) >stdout 2>stderr
at_status=$?
$at_traceoff
-at_continue=:
+at_failed=false
dnl Check stderr.
m4_case([$4],
ignore, [cat stderr >&5],
experr, [AT_CLEANUP_FILE([experr])dnl
-$at_diff experr stderr >&5 || at_continue='exit 1'],
- [], [$at_diff empty stderr >&5 || at_continue='exit 1'],
- [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_continue='exit 1'])
+$at_diff experr stderr >&5 || at_failed=:],
+ [], [$at_diff empty stderr >&5 || at_failed=:],
+ [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_failed=:])
dnl Check stdout.
m4_case([$3],
ignore, [cat stdout >&5],
expout, [AT_CLEANUP_FILES([expout])dnl
-$at_diff expout stdout >&5 || at_continue='exit 1'],
- [], [$at_diff empty stdout >&5 || at_continue='exit 1'],
- [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1'])
+$at_diff expout stdout >&5 || at_failed=:],
+ [], [$at_diff empty stdout >&5 || at_failed=:],
+ [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_failed=:])
dnl Check exit val.
case $at_status in
77) exit 77;;
[ *);;],
[ m4_default([$2], [0])) ;;
*) $at_verbose "Exit code was $at_status, expected $2" >&2
- at_continue='exit 1';;])
+ at_failed=:;;])
esac
-$at_continue
+AS_IFELSE($at_failed, [$5], [$6])
+$at_failed && exit 1
$at_traceon
])# AT_CHECK
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = atconfig
DIST_COMMON = README Makefile.am Makefile.in atconfig.in config.guess \
-config.sub ltconfig ltmain.sh
+config.sub configure configure.in ltconfig ltmain.sh
PACKAGE = @PACKAGE@
( $1 ) >stdout 2>stderr
at_status=$?
$at_traceoff
-at_continue=:
+at_failed=false
dnl Check stderr.
m4_case([$4],
ignore, [cat stderr >&5],
experr, [AT_CLEANUP_FILE([experr])dnl
-$at_diff experr stderr >&5 || at_continue='exit 1'],
- [], [$at_diff empty stderr >&5 || at_continue='exit 1'],
- [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_continue='exit 1'])
+$at_diff experr stderr >&5 || at_failed=:],
+ [], [$at_diff empty stderr >&5 || at_failed=:],
+ [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_failed=:])
dnl Check stdout.
m4_case([$3],
ignore, [cat stdout >&5],
expout, [AT_CLEANUP_FILES([expout])dnl
-$at_diff expout stdout >&5 || at_continue='exit 1'],
- [], [$at_diff empty stdout >&5 || at_continue='exit 1'],
- [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1'])
+$at_diff expout stdout >&5 || at_failed=:],
+ [], [$at_diff empty stdout >&5 || at_failed=:],
+ [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_failed=:])
dnl Check exit val.
case $at_status in
77) exit 77;;
[ *);;],
[ m4_default([$2], [0])) ;;
*) $at_verbose "Exit code was $at_status, expected $2" >&2
- at_continue='exit 1';;])
+ at_failed=:;;])
esac
-$at_continue
+AS_IFELSE($at_failed, [$5], [$6])
+$at_failed && exit 1
$at_traceon
])# AT_CHECK
[AT_CLEANUP_FILE_IFELSE([config.hin],
[AT_CLEANUP_FILE(config.h)])dnl
AT_CLEANUP_FILES(config.log config.status config.cache)dnl
-AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, [])
-test $at_verbose = echo && echo "--- config.log" && cat config.log])
+AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, [],
+ [test $at_verbose = echo && echo "--- config.log" && cat config.log])])
# _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS)