[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can packages rely on AC_PROVIDE_IFELSE?
From: |
Eric Blake |
Subject: |
Re: Can packages rely on AC_PROVIDE_IFELSE? |
Date: |
Fri, 07 Dec 2012 06:59:25 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 11/26/2012 08:02 AM, Nick Bowler wrote:
> Hi folks,
>
> Autoconf defines a macro called AC_PROVIDE_IFELSE, which can allow
> one to hook into the AC_REQUIRE machinery in order to do potentially
> interesting things. For a specific example, I recently wanted to emit a
> (hopefully) helpful warning message if LT_INIT had not been previously
> expanded, and it seems that I can do that very easily with something
> like:
>
> AC_PROVIDE_IFELSE([LT_INIT], , [m4_warn([syntax], [blah blah])])
Good question - looks like you found a real hole in the documentation.
It looks like AC_PROVIDE vs. AC_PROVIDE_IFELSE should be documented
together; and also that m4_provide and m4_provide_if should be
documented together. What's more, the manual mentions that macros can
call AC_PROVIDE but does not document what it does.
>
> However, AC_PROVIDE_IFELSE is not described in the Autoconf manual,
> which makes me wonder if the macro should be used by packages. The fact
> that it's defined at all (as an alias for m4_provide_if) seems to
> suggest that it was intended to be used...
Yes, the macros are stable and intended to be usable; we're just missing
the documentation patch.
>
> Also, on a related note, AC_PROVIDE is referred to several times in the
> Autoconf manual (in a manner that suggests that packages can use it) but
> the manual never actually explains what AC_PROVIDE does or how to invoke
> it properly.
Yep, I just came to the same conclusion after reading just your first
paragraph and searching for myself.
>
> So, are these macros intended to be used by packages? If so, can they
> be documented in the manual?
Absolutely. Want to help write the patch?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Can packages rely on AC_PROVIDE_IFELSE?,
Eric Blake <=