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(a)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