This change addresses https://bugs.gnu.org/50046.
Patch posted:
https://lists.gnu.org/archive/html/automake-patches/2021-08/msg00000.html
* m4/init.m4: Make attempts to expand AM_INIT_AUTOMAKE more than
once a fatal error at m4 time.
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl