+2001-03-13 Akim Demaille <akim@epita.fr>
+
+ * tests/tools.at (AWK portability): Use AT_CHECK to check for GNU
+ AWK so that there is always a AT_CHECK between
+ AT_SETUP/AT_CLEANUP.
+ Reported by Nicolas Joly.
+
2001-03-13 Akim Demaille <akim@epita.fr>
* tests/tools.at: Be sure to remove configure.ac~.
AT_DATA([configure.ac],
[])
-if (gawk --version) >/dev/null 2>&1; then
- # Generation of the script.
- AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
- [], [])
- # Tracing.
- AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
- ignore, [])
- # Syntax correctness of ifnames.
- AT_CHECK([AWK='gawk --posix' ifnames empty], 0,
- [], [])
-fi
+# Skip if we don't have GNU Awk.
+AT_CHECK([gawk --version || exit 77], 0, ignore, ignore)
+
+# Generation of the script.
+AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
+ [], [])
+# Tracing.
+AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
+ ignore, [])
+# Syntax correctness of ifnames.
+AT_CHECK([AWK='gawk --posix' ifnames empty], 0,
+ [], [])
AT_CLEANUP(configure)