autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reorganized config.status


From: Ralf Wildenhues
Subject: Re: reorganized config.status
Date: Mon, 8 Aug 2005 08:56:29 +0200
User-agent: Mutt/1.4.1i

Hi Stepan,

* Stepan Kasal wrote on Wed, Aug 03, 2005 at 02:55:12PM CEST:
> On Tue, Aug 02, 2005 at 03:30:34PM +0200, Ralf Wildenhues wrote:
> > | m4_ifset([AC_LIST_HEADERS],
> > |     [CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[     ]]*,,;s,[[ 
> > :]].*$,,'`],
> > |   [CONFIG_H=config.h;AC_CONFIG_HEADERS([config.h])])
> > | AC_SUBST([CONFIG_H])
> > 
> > We compute CONFIG_H, because we later do a 
> > | DEFS = -DHAVE_CONFIG_H="<$(CONFIG_H)>" -DLTDL
> 
> OK, so it seems you'd like to know what's the name of the first declared
> config header.  Perhaps the first AC_CONFIG_HEADERS could define a macro, say
> AH_HEADER which would hold the name.
>
> You could then do:
> m4_ifndef([AH_HEADER], [AC_CONFIG_HEADERS([config.h])])
> AC_SUBST([CONFIG_H], ["AH_HEADER"])

Hmm, yes, maybe.  But I have a much simpler idea: I don't need this
in form of a m4 macro, a shell variable would be quite sufficient.

This patch against Libtool seems to work for Automake before and
after the change, could probably be simplified to skip the case
where AC_LIST_HEADERS is set (because), but needs publication of
$ac_config_headers.  Would something to this extent qualify for
Autoconf or is this a too low-level interface?

Cheers,
Ralf

        * m4/ltdl.m4 (LTDL_INIT): Compute CONFIG_H from
        $ac_config_headers if _AC_LIST_TAGS is defined, for
        compatibility with CVS Autoconf.

Index: m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltdl.m4,v
retrieving revision 1.31
diff -u -r1.31 ltdl.m4
--- m4/ltdl.m4  29 Jul 2005 13:24:13 -0000      1.31
+++ m4/ltdl.m4  4 Aug 2005 12:40:58 -0000
@@ -164,10 +164,10 @@
 # the parent projects config.h file, The first file in AC_CONFIG_HEADERS
 # must contain the definitions required by ltdl.c.
 m4_ifset([_AC_LIST_TAGS],
-    [CONFIG_H=`echo "_AC_LIST_TAGS" | $GREP HEADERS | $SED 's,^[[      
]]*,,;s,[[ :)]].*$,,'`],
-  [m4_ifset([AC_LIST_HEADERS],
-    [CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[    ]]*,,;s,[[ :]].*$,,'`],
-  [CONFIG_H=config.h;AC_CONFIG_HEADERS([config.h])]])
+        [CONFIG_H=`echo "$ac_config_headers" | $SED 's,^[[     ]]*,,;s,[[ 
:)]].*$,,'`],
+        [m4_ifset([AC_LIST_HEADERS],
+                  [CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      
]]*,,;s,[[ :]].*$,,'`],
+                  [CONFIG_H=config.h;AC_CONFIG_HEADERS([config.h])])])
 AC_SUBST([CONFIG_H])
 
 AC_CHECK_HEADERS([memory.h unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h],




reply via email to

[Prev in Thread] Current Thread [Next in Thread]