[libvirt] [PATCH] m4/virt-lib: use correct format of package name for AC_ARG_* macros

Pavel Hrdina phrdina at redhat.com
Thu Dec 22 13:09:22 UTC 2016


On Thu, Dec 22, 2016 at 11:47:07AM +0100, Andrea Bolognani wrote:
> On Wed, 2016-12-21 at 22:26 +0100, Pavel Hrdina wrote:
> > Introduced by commit 25034b3c40 and reused by commit 4519e94b743.
> > This patch silences warning printed by configure:
>> >   configure: WARNING: unrecognized options: --with-qemu-user
>> > Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> > ---
> >  m4/virt-lib.m4 | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
>> > diff --git a/m4/virt-lib.m4 b/m4/virt-lib.m4
> > index 5c3fde258e..031f8890c0 100644
> > --- a/m4/virt-lib.m4
> > +++ b/m4/virt-lib.m4
> > @@ -414,7 +414,7 @@ AC_DEFUN([LIBVIRT_ARG_WITH], [
> >    m4_pushdef([version_text], m4_ifnblank(min_version, [[ (>= ]]min_version[[)]]))
> >  
> >    m4_divert_text([DEFAULTS], [with_var][[=]][default_action])
> > -  AC_ARG_WITH([check_name_dash],
> > +  AC_ARG_WITH([check_name_lc],
> >                [AS_HELP_STRING([[--]arg_var],
> >                                [with ]]m4_dquote(help_name)m4_dquote(version_text)[[ support @<:@default=]]m4_dquote(default_action)[[@:>@])])
> 
> Regardless of warnings, after your patch the code that ends
> up being generated in configure is clearly correct, but I'm
> a bit confused as to the why.
> 
> Using check_name_dash would seem the right thing to do here
> at first sight, especially considering that the same check
> passed 'qemu-user' (not 'qemu_user') to AC_ARG_WITH() before
> your recent reorganization - awesome job, by the way!
> 
> Would you mind spending a couple of minutes pointing out the
> obvious thing I'm missing? :)

It's kind of tricky to dig through the code :)

I had to check the autoconf code and the generated configure to figure
this out. The thing is that the first argument of AC_ARG_WITH() is
placed into *ac_user_opts* variable using with_${first-argument} format.
Each option specified for the configure script is for purpose of the
"unrecognized options" check renamed using this sed command
"sed 's/[-+.]/_/g'" and the renamed option is compared against the
*ac_user_opts* variable.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161222/4e2e4585/attachment-0001.sig>


More information about the libvir-list mailing list