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 > configure.in it complains about that as_fn_set_status and as_fn_exit are not The file name configure.in is deprecated; hence I'm referring to configure.ac. > 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 configure.in > script that seems to work fine with the same Autoconf version, so I am a bit > confused. I'd have to see the two configure.ac 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 configure.in 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 configure.ac earlier than AC_INIT didn't make a difference. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf