FYI, now I'm looking at the changes induced by the following: git ls-files | grep '\.m4$' | xargs perl -pi \ -e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g' # [note that the above is not equivalent to using {0,3} ]
# This is the sole unwanted change (to onceonly.m4): # -# AC_CHECK_DECLS([DECL1], [DECL2], ...). # +# AC_CHECK_DECLS([DECL1], [DECL2], [...]). # Undo it: perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4 FYI, adding the 4-arg transform induced only two new changes, both in comments: +# _AC_FUNC_FNMATCH_IF([STANDARD = GNU | POSIX], [CACHE_VAR], [IF-TRUE], [IF-FALSE]) +dnl AC_LIB_HAVE_LINKFLAGS([name], [dependencies], [includes], [testcode])