mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
build: fix regression in requiring yajl for new enough qemu
Jonathan Lebon reported an issue to me off-list about his build failing to use qemu because he failed to install yajl-devel. But I recalled specifically tweaking configure.ac to die in that situation (commits350583c,ba9c38b). After a bit more head-scratching, we found the cause of the regression: commit654c709rearranged things so that the qemu version check now occurs before AC_ARG_WITH has had a chance to set either $with_qemu or $with_yajl. Coincidentally, this fix aligns with a documentation patch that was just posted to the autoconf mailing list :) http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/8324 * m4/virt-lib.m4 (LIBVIRT_CHECK_LIB, LIBVIRT_CHECK_LIB_ALT) (LIBVIRT_CHECK_PKG): Populate defaults earlier. * configure.ac (AC_ARG_WITH): Likewise for drivers. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -62,10 +62,10 @@ AC_DEFUN([LIBVIRT_CHECK_LIB],[
|
||||
m4_pushdef([arg_var], [with-]check_name_lc)
|
||||
m4_pushdef([with_var], [with_]check_name_lc)
|
||||
|
||||
m4_divert_text([DEFAULTS], [with_var][=check])
|
||||
AC_ARG_WITH(check_name_lc,
|
||||
[AS_HELP_STRING([--arg_var],
|
||||
[with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])],
|
||||
[],[with_var][=check])
|
||||
[with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])])
|
||||
|
||||
old_LIBS=$LIBS
|
||||
old_CFLAGS=$CFLAGS
|
||||
@@ -192,10 +192,10 @@ AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
|
||||
m4_pushdef([config_var_alt], [WITH_]check_name_alt)
|
||||
m4_pushdef([make_var_alt], [WITH_]check_name_alt)
|
||||
|
||||
m4_divert_text([DEFAULTS], [with_var][=check])
|
||||
AC_ARG_WITH(check_name_lc,
|
||||
[AS_HELP_STRING([--arg_var],
|
||||
[with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])],
|
||||
[],[with_var][=check])
|
||||
[with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])])
|
||||
|
||||
old_LIBS=$LIBS
|
||||
old_CFLAGS=$CFLAGS
|
||||
@@ -318,10 +318,10 @@ AC_DEFUN([LIBVIRT_CHECK_PKG],[
|
||||
m4_pushdef([arg_var], [with-]check_name_lc)
|
||||
m4_pushdef([with_var], [with_]check_name_lc)
|
||||
|
||||
m4_divert_text([DEFAULTS], [with_var][=check])
|
||||
AC_ARG_WITH(check_name_lc,
|
||||
[AS_HELP_STRING([--arg_var],
|
||||
[with ]]m4_dquote(pc_name)[[ (>= ]]m4_dquote(pc_version)[[) support @<:@default=check@:>@])],
|
||||
[],[with_var][=check])
|
||||
[with ]]m4_dquote(pc_name)[[ (>= ]]m4_dquote(pc_version)[[) support @<:@default=check@:>@])])
|
||||
|
||||
fail=0
|
||||
if test "x$with_var" != "xno" ; then
|
||||
|
||||
Reference in New Issue
Block a user