(_AM_CONFIG_HEADERS): ... this.
(_AM_CONFIG_HEADER_INSINUATE): Define AC_CONFIG_HEADERS to
call _AM_CONFIG_HEADERS; and AM_CONFIG_HEADER to call
AC_CONFIG_HEADERS.
* automake.in (scan_autoconf_traces): Trace AC_CONFIG_HEADERS
instead of AM_CONFIG_HEADER.
* tests/autoheader2.test: New file.
* tests/Makefile.am (TESTS): Add autoheader2.test.
Suggested by Raja R Harinath.
+2002-06-14 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * m4/header.m4 (AM_CONFIG_HEADER): Rename to ...
+ (_AM_CONFIG_HEADERS): ... this.
+ (_AM_CONFIG_HEADER_INSINUATE): Define AC_CONFIG_HEADERS to
+ call _AM_CONFIG_HEADERS; and AM_CONFIG_HEADER to call
+ AC_CONFIG_HEADERS.
+ * automake.in (scan_autoconf_traces): Trace AC_CONFIG_HEADERS
+ instead of AM_CONFIG_HEADER.
+ * tests/autoheader2.test: New file.
+ * tests/Makefile.am (TESTS): Add autoheader2.test.
+ Suggested by Raja R Harinath.
+
2002-06-13 Alexandre Duret-Lutz <duret_g@epita.fr>
* m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): Use m4_copy instead
AC_CANONICAL_SYSTEM
AC_CONFIG_AUX_DIR
AC_CONFIG_FILES
+ AC_CONFIG_HEADERS
AC_INIT
AC_LIBSOURCE
AC_PROG_LEX
AC_SUBST
AM_AUTOMAKE_VERSION
AM_CONDITIONAL
- AM_CONFIG_HEADER
AM_C_PROTOTYPES
AM_GNU_GETTEXT
AM_INIT_AUTOMAKE
$ac_config_files_location = $here;
&scan_autoconf_config_files ($args[1]);
}
+ elsif ($macro eq 'AC_CONFIG_HEADERS')
+ {
+ $config_header_location = $here;
+ push @config_headers, split (' ', $args[1]);
+ }
elsif ($macro eq 'AC_INIT')
{
if (defined $args[2])
{
$configure_cond{$args[1]} = $here;
}
- elsif ($macro eq 'AM_CONFIG_HEADER')
- {
- $config_header_location = $here;
- push @config_headers, split (' ', $args[1]);
- }
elsif ($macro eq 'AM_C_PROTOTYPES')
{
$am_c_prototypes = $here;
])# _AM_CONFIG_HEADER
-# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
-# --------------------------------------------------------------
-AC_DEFUN([AM_CONFIG_HEADER],
+# _AM_CONFIG_HEADERS(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
+# ----------------------------------------------------------------
+AC_DEFUN([_AM_CONFIG_HEADERS],
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
-])# AM_CONFIG_HEADER
+])# _AM_CONFIG_HEADERS
# _AM_CONFIG_HEADER_INSINUATE
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
+AC_DEFUN([AC_CONFIG_HEADERS], [_AM_CONFIG_HEADERS($][@)])dnl
+dnl Define AM_CONFIG_HEADERS (obsolete) in terms of AC_CONFIG_HEADERS.
+dnl This way autoheader will `see' the calls to AM_CONFIG_HEADER.
+AC_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($][@)])dnl
])
ar.test \
asm.test \
autoheader.test \
+autoheader2.test \
auxdir.test \
auxdir2.test \
backsl.test \
ar.test \
asm.test \
autoheader.test \
+autoheader2.test \
auxdir.test \
auxdir2.test \
backsl.test \
--- /dev/null
+#!/bin/sh
+
+# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
+
+. $srcdir/defs
+
+set -e
+
+cat >>configure.in <<EOF
+AM_CONFIG_HEADER([thisfile.h])
+EOF
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOHEADER
+
+test -f thisfile.h.in