-2002-05-03 Paolo Bonzini <bonzini@gnu.org>
+2002-06-13 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): Use m4_copy instead
+ of m4_rename so that AC_CONFIG_HEADER is never undefined and
+ therefore still traced after the redefinition.
+ * tests/defs (AUTOHEADER): Define.
+ * tests/autoheader.test: New file.
+ * tests/Makefile.am (TESTS): Add autoheader.test.
+ Reported by Braden McDaniel.
+
+2002-06-13 Paolo Bonzini <bonzini@gnu.org>
* automake.in (check_gnu_standards): In --gnu mode, accept
one of COPTING, COPYING.LESSER, or COPYING.LIB.
(common_files): Add COPYING.LESSER.
* automake.texi (Gnits): Document this.
-2002-05-03 Paolo Bonzini <bonzini@gnu.org>
+2002-06-13 Paolo Bonzini <bonzini@gnu.org>
* automake.in (required_targets): Add the pdf and pdf-am targets.
(initialize_per_input): Likewise.
dnl make sure AC_CONFIG_HEADERS is not called before.
AC_BEFORE([AM_INIT_AUTOMAKE], [AC_CONFIG_HEADERS])dnl
dnl Save the previous AC_CONFIG_HEADERS definition
-m4_rename([AC_CONFIG_HEADERS], [_AM_AC_CONFIG_HEADERS])dnl
-dnl Setup ours.
+dnl (Beware: this must be m4_copy, not m4_rename, because we will
+dnl lose the --trace bit of AC_CONFIG_HEADERS if we undefine it.)
+m4_copy([AC_CONFIG_HEADERS], [_AM_AC_CONFIG_HEADERS])dnl
+dnl Override AC_CONFIG_HEADERS with ours.
dnl (Don't use m4_copy because we are tracing AM_CONFIG_HEADER.)
AC_DEFUN([AC_CONFIG_HEADERS], [AM_CONFIG_HEADER($][@)])dnl
])
--- /dev/null
+#!/bin/sh
+
+# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
+
+. $srcdir/defs
+
+set -e
+
+cat >>configure.in <<EOF
+AC_CONFIG_HEADERS([thisfile.h])
+EOF
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOHEADER
+
+test -f thisfile.h.in
# User can set which tools from Autoconf to use.
test -z "$AUTOCONF" && AUTOCONF=autoconf
+test -z "$AUTOHEADER" && AUTOHEADER=autoheader
echo "=== Running test $0"