override AC_CONFIG_HEADERS with AM_CONFIG_HEADER.
(_AM_CONFIG_HEADER): Use _AM_AC_CONFIG_HEADERS.
* m4/init.m4: Call _AM_CONFIG_HEADER_INSINUATE.
* tests/stamph2.test: Use AC_CONFIG_HEADERS for some of the config
files.
* tests/confh5.test: New file.
* tests/Makefile.am (TESTS): Add confh5.test.
* automake.texi (Optional, Public macros): Update descriptions
of AC_CONFIG_HEADERS and AM_CONFIG_HEADER.
+2002-04-19 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): New function,
+ override AC_CONFIG_HEADERS with AM_CONFIG_HEADER.
+ (_AM_CONFIG_HEADER): Use _AM_AC_CONFIG_HEADERS.
+ * m4/init.m4: Call _AM_CONFIG_HEADER_INSINUATE.
+ * tests/stamph2.test: Use AC_CONFIG_HEADERS for some of the config
+ files.
+ * tests/confh5.test: New file.
+ * tests/Makefile.am (TESTS): Add confh5.test.
+ * automake.texi (Optional, Public macros): Update descriptions
+ of AC_CONFIG_HEADERS and AM_CONFIG_HEADER.
+
2002-04-13 Alexandre Duret-Lutz <duret_g@epita.fr>
* tests/man2.test: New file.
New in 1.6a:
+* It is no longuer a requirement to use AM_CONFIG_HEADER instead of
+ AC_CONFIG_HEADERS. AM_CONFIG_HEADER is obsolete.
* Use Autoconf's --trace interface to inspect configure.ac and get
a more accurate view of it.
* automake --output-dir is deprecated
and their effects are:
@table @code
-@item AC_CONFIG_HEADER
-Automake requires the use of @code{AM_CONFIG_HEADER} (@pxref{Macros}),
-which is similar to @code{AC_CONFIG_HEADER} (@pxref{Configuration
-Headers, , Configuration Header Files, autoconf, The Autoconf Manual}),
-but does some useful Automake-specific work.
-@cvindex AC_CONFIG_HEADER
+@item AC_CONFIG_HEADERS
+Automake will generate rules to rebuild these headers. Older versions
+of Automake required the use of @code{AM_CONFIG_HEADER}
+(@pxref{Macros}); this no longuer the case today.
+@cvindex AC_CONFIG_HEADERS
@item AC_CONFIG_AUX_DIR
Automake will look for various helper scripts, such as
@table @code
@item AM_CONFIG_HEADER
Automake will generate rules to automatically regenerate the config
-header.
+header. This obsolete macro is a synonym of @code{AC_CONFIG_HEADERS}
+today (@pxref{Optional}).
@cvindex AM_CONFIG_HEADER
@item AM_ENABLE_MULTILIB
Automake already provides some @samp{-I} options automatically. In
particular it generates @samp{-I$(srcdir)}, @samp{-I.}, and a @samp{-I}
pointing to the directory holding @file{config.h} (if you've used
-@code{AC_CONFIG_HEADER} or @code{AM_CONFIG_HEADER}). You can disable
+@code{AC_CONFIG_HEADERS} or @code{AM_CONFIG_HEADER}). You can disable
the default @samp{-I} options using the @samp{nostdinc} option.
@item INCLUDES
AC_DEFUN([_AM_CONFIG_HEADER],
[# Add the stamp file to the list of files AC keeps track of,
# along with our hook.
-AC_CONFIG_HEADERS([$1],
+_AM_AC_CONFIG_HEADERS([$1],
[# update the timestamp
echo 'timestamp for $1' >"_AM_STAMP([$1])"
$2],
AC_DEFUN([AM_CONFIG_HEADER],
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
])# AM_CONFIG_HEADER
+
+
+# _AM_CONFIG_HEADER_INSINUATE
+# ---------------------------
+# Replace AC_CONFIG_HEADERS with our AM_CONFIG_HEADER.
+# We don't care about AC_CONFIG_HEADER (without S): it's an obsolete
+# Autoconf macro which will simply call AC_CONFIG_HEADERS (with S).
+AC_DEFUN([_AM_CONFIG_HEADER_INSINUATE], [
+dnl Since the substitution is only effective after AM_INIT_AUTOMAKE,
+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 (Don't use m4_copy because we are tracing AM_CONFIG_HEADER.)
+AC_DEFUN([AC_CONFIG_HEADERS], [AM_CONFIG_HEADER($][@)])dnl
+])
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_][CC],
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_][CC],
- defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_][CXX],
- defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
+_AM_CONFIG_HEADER_INSINUATE
])
-@set UPDATED 12 April 2002
+@set UPDATED 19 April 2002
@set UPDATED-MONTH April 2002
@set EDITION 1.6a
@set VERSION 1.6a
confdist.test \
confh.test \
confh4.test \
+confh5.test \
config.test \
confincl.test \
confsub.test \
confdist.test \
confh.test \
confh4.test \
+confh5.test \
config.test \
confincl.test \
confsub.test \
--- /dev/null
+#! /bin/sh
+
+# Make sure Autoconf complains if AC_CONFIG_HEADERS appears
+# before AM_INIT_AUTOMAKE.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT
+AC_CONFIG_HEADERS(config.h)
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_OUTPUT
+END
+
+: > config.h.in
+
+$ACLOCAL || exit 1
+$AUTOCONF 2>&1 | grep AC_CONFIG_HEADERS || exit 1
+:
# Make sure stamp-h* files are created where we expect
. $srcdir/defs || exit 1
-cat > configure.in << END
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE($me, 1.0)
+cat >> configure.in << END
AM_CONFIG_HEADER(1.h
2.h:config.hin
- 3.h:sdir1/config1.hin
-
- sdir1/4.h
- sdir1/5.h:config.hin
- sdir1/6.h:sdir1/config1.hin
- sdir1/7.h:sdir2/config2.hin)
-AC_OUTPUT(Makefile)
+ 3.h:sdir1/config1.hin)
+# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
+AC_CONFIG_HEADERS(sdir1/4.h
+ sdir1/5.h:config.hin
+ sdir1/6.h:sdir1/config1.hin
+ sdir1/7.h:sdir2/config2.hin)
+AC_OUTPUT
END
: > Makefile.am
-@set UPDATED 12 April 2002
+@set UPDATED 19 April 2002
@set UPDATED-MONTH April 2002
@set EDITION 1.6a
@set VERSION 1.6a