Consistent with the existing behavior of autoreconf regarding
hand-maintained aclocal.m4, make both autoheader and autoreconf
check for the /* Generated from configure.ac by autoheader */
line that autoheader emits at the beginning of its generated
configuration header templates. If the file exists but the
marker line is not there, they will now leave the file alone
unless given the new command line option --replace-handwritten.
I’m looking for feedback regarding whether the new option should
also cause autoreconf to clobber a hand-written aclocal.m4, or any
other files that _could_ be generated but aren’t always. (aclocal.m4
in particular may need coordination with Automake, since the ‘aclocal’
tool belongs to them.)
* bin/autoheader.in: Add option --replace-handwritten. If the
primary template file already exists and doesn’t begin with a
marker comment indicating it was generated by autoheader, don’t
modify it unless --replace-handwritten was given.
* bin/autoreconf.in: Similarly.
* doc/autoconf.texi: Document new option for autoheader and
autoreconf.
* tests/tools.at: Test new behavior.