obsolete: better error message if AM_CONFIG_HEADER is used
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 30 Dec 2012 09:33:23 +0000 (10:33 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 30 Dec 2012 10:21:22 +0000 (11:21 +0100)
commit8e921bf86103578b56b2910590c7f1157e96e380
tree42e1d83d9b59f0140fd05f85ecd7eed1b8bc212f
parent2e269cff5425cded47fb9f5578102dee0ac12dc9
obsolete: better error message if AM_CONFIG_HEADER is used

In Automake 1.13, the long-deprecated macro AM_CONFIG_HEADER (deprecated
since 2002) has been removed in favour of AC_CONFIG_HEADERS.  However,
the removal was done without a proper deprecation period, and that
caused packages upgrading to Automake 1.13 to fail with very unclear
error messages, e.g.:

    configure.ac:4: warning: macro 'AM_CONFIG_HEADER' not found in library

from aclocal, and:

    configure.ac:4: error: possibly undefined macro: AM_CONFIG_HEADER
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

from autoconf.

In an attempt to mitigate this issue, we re-add an AM_CONFIG_HEADER
definition that simply raises a *clear* error message when the macro
is used.

Report by Paolo Bonzini:
<http://lists.gnu.org/archive/html/automake/2012-12/msg00039.html>

* t/am-config-header-no-more.sh: New test.
* t/list-of-tests.mk: Add it.
* m4/obsolete-err.m4: New file, contain the new AM_CONFIG_HEADER
"error-raising" definition, as well as the definition of the
similarly obsolete macros 'AM_C_PROTOTYPES' and 'fp_C_PROTOTYPES',
moved in from ...
* m4/protos.m4: ... this file, which has thus been removed.
* Makefile.am (dist_automake_ac_DATA): Adjust.
* t/ansi2knr-no-more.sh: Likewise.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am
NEWS
m4/obsolete-err.m4 [moved from m4/protos.m4 with 62% similarity]
t/am-config-header-no-more.sh [new file with mode: 0755]
t/ansi2knr-no-more.sh
t/list-of-tests.mk