Hello Ralf,

On Wed, Aug 10, 2005 at 03:42:18PM +0200, Ralf Wildenhues wrote:
> >   no, I don't think using ac_config_headers is a good idea.
> 
> I knew it.  ;)

So I passed the test.  :-)

> Rough draft, with a patch which does not fully work: using
>   AC_CONFIG_HEADERS(config.h)
>   AC_CONFIG_HEADERS(conf2.h)
> AH_HEADER ends up containing both names.

Weird, I'd say that your patch is correct.

Anyway, I'd hook it differently, see the attached patch.

The documentation seems ok, but perhaps it is worth mentioning that
AH_HEADER should be best used within code registered by
AC_CONFIG_COMMANDS_PRE.
(Do I guess correctly that this is the case with libtool?)

My biggest doubt is whether the name "AH_HEADER", which I coined without
any thinking, is teh right one.  But no one has said anything, yet...

Would you be so kind to combine the things together and test whether it
works for you?

Thank you very much,
        Stepan
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.72
diff -u -r1.72 status.m4
--- lib/autoconf/status.m4      26 Jul 2005 10:14:25 -0000      1.72
+++ lib/autoconf/status.m4      10 Aug 2005 14:54:11 -0000
@@ -258,9 +258,14 @@
 # With CONFIG_LINKS, reject DEST=., because it is makes it hard for 
./config.status
 # to guess the links to establish (`./config.status .').
 #
+# Save the name of the first config header to AH_HEADER.
+#
 m4_define([_AC_CONFIG_REGISTER_DEST],
 [_AC_CONFIG_UNIQUE([$1], [$3])dnl
-m4_if([$1 $3], [LINKS .], [AC_FATAL([invalid destination of a config link: 
`.'])])dnl
+m4_if([$1 $3], [LINKS .],
+      [AC_FATAL([invalid destination of a config link: `.'])])dnl
+m4_if([$1], [HEADERS],
+      [m4_define_default([AH_HEADER], [$3])])dnl
 dnl
 dnl Recognize TAG as an argument to config.status:
 dnl

Reply via email to