[Top][All Lists]

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

Re: Functions used by init before defined

From: Eric Blake
Subject: Re: Functions used by init before defined
Date: Mon, 08 Apr 2013 19:21:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 04/08/2013 05:06 PM, jeremy wrote:
> Hi,
> I'm having a strange issue with Autoconf which involves a few built-in
> functions.  They are not being found.  Basically, if I run autoconf on my
> it complains about that as_fn_set_status and as_fn_exit are not

The file name is deprecated; hence I'm referring to

> being defined.  Looking in the generated configure script, indeed these are
> used at the top but defined at the bottom.  They are used very early in the
> script, apparently by the call to AC_INIT.  So my (very hacky) solution is
> simply inserting these two functions at the top of the script, and then the
> script runs fine.  Now, on the other hand, I have another
> script that seems to work fine with the same Autoconf version, so I am a bit
> confused.

I'd have to see the two scripts to compare them, before I
could say whether it is a usage error on your part or a bug in autoconf
itself.  Can you post them?  I suspect that you have something going on
with diversions that ends up causing things to be placed in the wrong
diversion, at which point the resulting configure file appears out of
order with a use of the function in one diversion before the definition
of the function in another diversion.

> It was also somewhat confusing that copying these methods and putting them
> at the top of my script did not seem to do anything as they are
> apparently ignored and defined in the same place in the output regardless.  

In autoconf, AC_INIT has to come first.  Anything appearing before
AC_INIT is treated as going to diversion -1; so while it might affect m4
definitions, it is not carried through to the resulting configure file.
 That would explain why pasting the functions in your
earlier than AC_INIT didn't make a difference.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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