From 5e1ec05bbb91f7eb1316b19aa509f2603b41bfc8 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 14 Jun 2002 06:48:29 +0000 Subject: [PATCH] * 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. --- ChangeLog | 13 +++++++++++++ automake.in | 12 ++++++------ m4/header.m4 | 14 ++++++++------ tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/autoheader2.test | 18 ++++++++++++++++++ 6 files changed, 47 insertions(+), 12 deletions(-) create mode 100755 tests/autoheader2.test diff --git a/ChangeLog b/ChangeLog index b880b541..df30c8d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-06-14 Alexandre Duret-Lutz + + * 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 * m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): Use m4_copy instead diff --git a/automake.in b/automake.in index 926b3e88..8ffa097b 100755 --- a/automake.in +++ b/automake.in @@ -4592,6 +4592,7 @@ sub scan_autoconf_traces ($) AC_CANONICAL_SYSTEM AC_CONFIG_AUX_DIR AC_CONFIG_FILES + AC_CONFIG_HEADERS AC_INIT AC_LIBSOURCE AC_PROG_LEX @@ -4599,7 +4600,6 @@ sub scan_autoconf_traces ($) AC_SUBST AM_AUTOMAKE_VERSION AM_CONDITIONAL - AM_CONFIG_HEADER AM_C_PROTOTYPES AM_GNU_GETTEXT AM_INIT_AUTOMAKE @@ -4649,6 +4649,11 @@ sub scan_autoconf_traces ($) $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]) @@ -4697,11 +4702,6 @@ sub scan_autoconf_traces ($) { $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; diff --git a/m4/header.m4 b/m4/header.m4 index c2c0a91c..850341b3 100644 --- a/m4/header.m4 +++ b/m4/header.m4 @@ -70,11 +70,11 @@ $2], ])# _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 @@ -91,6 +91,8 @@ 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 +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 ]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 49ff1cb6..aa8fa3e6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,6 +31,7 @@ ansi7.test \ ar.test \ asm.test \ autoheader.test \ +autoheader2.test \ auxdir.test \ auxdir2.test \ backsl.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index b4444c19..ed733d05 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -117,6 +117,7 @@ ansi7.test \ ar.test \ asm.test \ autoheader.test \ +autoheader2.test \ auxdir.test \ auxdir2.test \ backsl.test \ diff --git a/tests/autoheader2.test b/tests/autoheader2.test new file mode 100755 index 00000000..78eadea2 --- /dev/null +++ b/tests/autoheader2.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack. + +. $srcdir/defs + +set -e + +cat >>configure.in < Makefile.am + +$ACLOCAL +$AUTOHEADER + +test -f thisfile.h.in -- 2.43.5