Eric Blake <[EMAIL PROTECTED]> writes: > +fatal "need GNU m4 1.4.5 or later: $m4" > + unless system "echo 'ifdef(mac,bug)dnl' | $m4 --trace=mac 2>&1 | grep bug > >/dev/null"; > + > +# Detect if we can use feature added in M4 1.4.9 to warn user about $10. > +# Override the user's choice of --warn-macro-sequence, since the default > +# macro sequence rejects ${1} even though we guarantee it is safe. > +$m4 .= " --warn-macro-sequence='\\\$\\([0-9][0-9]+\\|{{\\)'" > + if ! system "$m4 --help | grep warn-macro-sequence >/dev/null";
Can you please rewrite this so that it invokes m4 once instead of twice, and doesn't use grep at all? You can use Perl's pattern matching instead of grep. And I think you can test for both features by a single call to 'm4'. This will help autom4te start up a bit faster. Perhaps it would be even better to test for these things at configure-time: that way, we won't have to invoke 'm4' at all, at run-time. A nit: the "+" isn't needed. Once you see two digits, you don't need to look for more. _______________________________________________ M4-discuss mailing list M4-discuss@gnu.org http://lists.gnu.org/mailman/listinfo/m4-discuss