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

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@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)[[@:>@])]) @@ -456,7 +456,7 @@ AC_DEFUN([LIBVIRT_ARG_WITH_ALT], [ m4_pushdef([with_var], [with_]check_name_lc) 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], ]m4_dquote(help_desc)[[ @<:@default=]]m4_dquote(default_action)[[@:>@])]) @@ -494,7 +494,7 @@ AC_DEFUN([LIBVIRT_ARG_ENABLE], [ m4_pushdef([enable_var], [enable_]check_name_lc) m4_divert_text([DEFAULTS], [enable_var][[=]][default_action]) - AC_ARG_ENABLE([check_name_dash], + AC_ARG_ENABLE([check_name_lc], [AS_HELP_STRING([[--]arg_var], ]m4_dquote(help_desc)[[ @<:@default=]]m4_dquote(default_action)[[@:>@])]) -- 2.11.0

On Wed, Dec 21, 2016 at 10:26:14PM +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@redhat.com> --- m4/virt-lib.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|

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@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? :) -- Andrea Bolognani / Red Hat / Virtualization

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@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
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrange
-
Pavel Hrdina