I had the error:
/usr/bin/m4:configure.ac:142: recursion limit of 1024 exceeded, use -L<n> to change it
autom4te: /usr/bin/m4 failed with exit status: 1</n>
When building on RHEL6 with tcsh as the shell. I changed line 17 of configure to:
if (test -n "${ZSH_VERSION+set}" || test -n "${tcsh+set}") && (emulate sh) >/dev/null 2>&1; then :
and this solved the problem. I think the configure script should probably be checking for several different shells here.
The script is generated by Autoconf. If there is a problem then you should report it to Autoconf mailing list.
TBH, I do not think that using tcsh will work. You need POSIX shell, which tcsh is not. AFAIK
I do also get a lot of warnings from autoconf because I don't have the same version:
WARNING: 'aclocal-1.12' is missing on your system. You should only need it if
you modified 'acinclude.m4' or 'configure.ac'. You might want
to install the Automake and Perl packages. Grab them from
any GNU archive site.
You can try running
scripts/fix-timestamps.shto fix this.