function calls.
Reported by John David Anglin.
* doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
section.
* tests/tools.m4 (AWK portability): New test.
+2000-08-09 Akim Demaille <akim@epita.fr>
+
+ * autoconf.sh (finalize.awk): Don't leave spaces before the user
+ function calls.
+ Reported by John David Anglin.
+ * doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
+ section.
+ * tests/tools.m4 (AWK portability): New test.
+
2000-08-0 Pavel Roskin <proski@gnu.org>
* Makefile.am: substitute @bindir@ in shell scripts, needed by
if (index (\$0, macro))
{
delete macros [macro]
- undefined ("$infile", line, macro)
+ undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
- undefined ("$outfile", macros [macro], macro)
+ undefined("$outfile", macros [macro], macro)
exit 1
}
}
if (index (\$0, macro))
{
delete macros [macro]
- undefined ("$infile", line, macro)
+ undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
- undefined ("$outfile", macros [macro], macro)
+ undefined("$outfile", macros [macro], macro)
exit 1
}
}
if (index (\$0, macro))
{
delete macros [macro]
- undefined ("$infile", line, macro)
+ undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
- undefined ("$outfile", macros [macro], macro)
+ undefined("$outfile", macros [macro], macro)
exit 1
}
}
the @samp{x} into account later in the pipe.
@table @asis
-@item @command{break}
-@cindex @command{break}
-The use of @samp{break 2} etc. is safe.
-
@item @command{!}
@cindex @command{!}
You can't use @command{!}, you'll have to rewrite your code.
+@item @command{break}
+@cindex @command{break}
+The use of @samp{break 2} etc. is safe.
+
@item @command{case}
@cindex @command{case}
You don't need to quote the argument, no splitting is performed.
find some limitations you should be aware of.
@table @asis
+@item @command{awk}
+@cindex @command{awk}
+Don't leave white spaces before the parentheses in user functions calls,
+@sc{gnu} awk will reject it:
+
+@example
+$ gawk 'function die () @{ print "Aaaaarg!" @}
+ BEGIN @{ die () @}'
+gawk: cmd. line:2: BEGIN @{ die () @}
+gawk: cmd. line:2: ^ parse error
+$ gawk 'function die () @{ print "Aaaaarg!" @}
+ BEGIN @{ die() @}'
+Aaaaarg!
+@end example
+
@item @command{cat}
@cindex @command{cat}
Don't rely on any option.
]])
AT_CLEANUP(configure)
+
+
+
+
+
+## ---------------------------- ##
+## autoconf's AWK portability. ##
+## ---------------------------- ##
+
+AT_SETUP(AWK portability)
+
+AT_DATA([configure.in],
+[[AC_INIT
+]])
+
+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, [])
+fi
+
+AT_CLEANUP(configure)