* Ralf Wildenhues wrote on Mon, Feb 28, 2011 at 07:38:50AM CET:
> This patch doesn't change at all the semantics of whether you need to
> run autoconf or not. Only when you run it, no matter whether triggered
> by make or run manually, it diagnoses buggy m4 versions.
Nobody complained about the patch, so I'm committing it to GCC and
syncing to src, with recommendations updated. If you get a runtime
failure from m4 when running any of autoconf, aclocal, or automake, in
the GCC or src trees, then that means you have a buggy m4 and should
update to a fixed version.
I am specifically _not_ testing for the other bug Eric found (see
because we don't yet have evidence that the bug causes differing output
in practice, and I'm guessing that m4 versions with that particular bug
are so widespread that it would upset people to see their
--enable-maintainer-mode builds fail due to the check.
+dnl Ensure we do not use a buggy M4.
+m4_if(m4_index([..wi.d.], [.d.]), [-1],
+ [m4_fatal(m4_do([m4 with buggy strstr detected. Please install
+GNU M4 1.4.16 or newer and set the M4 environment variable]))])
dnl Fix 2.64 cross compile detection for AVR and RTEMS
dnl by not trying to compile fopen.