aclocal: error: too many loops 1) Thanks for the report. 2) Agreed there is a bug somewhere. 3) I know you provided a recipe for reproducing (thank you), But I just can't debug with your development configure.ac from scratch, especially since I'm not on Debian.
Thus it would help greatly if you could narrow it down by commenting out macros until you see where the problem lies, and then create a standalone source tree (i.e., not involving running apt or git) and post that. Else, all I can do is put this in the "to be looked at by someone else" pile (https://debbugs.gnu.org/cgi/pkgreport.cgi?package=automake#_0_4_3). Sorry, I wish I could do better, but that's the reality. --best, karl.