Currently behaviour of --with-loader-nvram is as follows * No arg given -> use built-in default * --with-loader-nvram=STRING -> use STRING instead of built-in default * --with-loader-nvram= -> use built-in default * --without-loader-nvram -> use built-in default IOW, there is no way to disable the built-in default. We thus change the behaviour to * No arg given -> use built-in default * --with-loader-nvram=STRING -> use STRING instead of built-in default * --with-loader-nvram= -> disable built-in default * --without-loader-nvram -> disable built-in default Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- m4/virt-loader-nvram.m4 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/m4/virt-loader-nvram.m4 b/m4/virt-loader-nvram.m4 index 0eb77fa923..9089a16f82 100644 --- a/m4/virt-loader-nvram.m4 +++ b/m4/virt-loader-nvram.m4 @@ -21,15 +21,19 @@ AC_DEFUN([LIBVIRT_ARG_LOADER_NVRAM], [ LIBVIRT_ARG_WITH([LOADER_NVRAM], [Pass list of pairs of <loader>:<nvram> paths. Both pairs and list items are separated by a colon.], - ['']) + ['builtin']) ]) AC_DEFUN([LIBVIRT_CHECK_LOADER_NVRAM], [ - if test "x$with_loader_nvram" != "xno" && \ - test "x$with_loader_nvram" != "x" ; then - l=$(echo $with_loader_nvram | tr ':' '\n' | wc -l) - if test $(expr $l % 2) -ne 0 ; then - AC_MSG_ERROR([Malformed --with-loader-nvram argument]) + if test "x$with_loader_nvram" != "xbuiltin" ; then + if test "x$with_loader_nvram" = "xno" ; then + with_loader_nvram= + fi + if test "x$with_loader_nvram" != "x" ; then + l=$(echo $with_loader_nvram | tr ':' '\n' | wc -l) + if test $(expr $l % 2) -ne 0 ; then + AC_MSG_ERROR([Malformed --with-loader-nvram argument string '$with_loader_nvram']) + fi fi AC_DEFINE_UNQUOTED([DEFAULT_LOADER_NVRAM], ["$with_loader_nvram"], [List of loader:nvram pairs]) -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list