diff --git a/configure.ac b/configure.ac
index b144062d8c..fbd0fd4d6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,14 +98,12 @@ dnl Miscellaneous checks
dnl
LIBVIRT_ARG_NUMAD
-LIBVIRT_ARG_LOADER_NVRAM
LIBVIRT_ARG_LOGIN_SHELL
LIBVIRT_ARG_TLS_PRIORITY
LIBVIRT_ARG_SYSCTL_CONFIG
LIBVIRT_CHECK_NUMAD
-LIBVIRT_CHECK_LOADER_NVRAM
LIBVIRT_CHECK_LOGIN_SHELL
LIBVIRT_CHECK_TLS_PRIORITY
LIBVIRT_CHECK_SYSCTL_CONFIG
@@ -178,7 +176,6 @@ AC_MSG_NOTICE([])
AC_MSG_NOTICE([Miscellaneous])
AC_MSG_NOTICE([])
LIBVIRT_RESULT_NUMAD
-LIBVIRT_RESULT_LOADER_NVRAM
LIBVIRT_RESULT_LOGIN_SHELL
LIBVIRT_RESULT_TLS_PRIORITY
AC_MSG_NOTICE([])
diff --git a/m4/virt-loader-nvram.m4 b/m4/virt-loader-nvram.m4
deleted file mode 100644
index ed2ae0cf27..0000000000
--- a/m4/virt-loader-nvram.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-dnl The loader:nvram list check
-dnl
-dnl Copyright (C) 2016 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library. If not, see
-dnl .
-dnl
-
-AC_DEFUN([LIBVIRT_ARG_LOADER_NVRAM], [
- LIBVIRT_ARG_WITH([LOADER_NVRAM],
- [Pass list of pairs of : paths.
- Both pairs and list items are separated by a colon.],
- [''])
-])
-
-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])
- elif test $l -gt 0 ; then
- AC_MSG_WARN([Note that --with-loader-nvram is obsolete and will be removed soon])
- fi
- AC_DEFINE_UNQUOTED([DEFAULT_LOADER_NVRAM], ["$with_loader_nvram"],
- [List of loader:nvram pairs])
- fi
-])
-
-AC_DEFUN([LIBVIRT_RESULT_LOADER_NVRAM], [
- if test "x$with_loader_nvram" != "xno" && \
- test "x$with_loader_nvram" != "x" ; then
- LIBVIRT_RESULT([Loader/NVRAM], [$with_loader_nvram],
- [!!! Using this configure option is strongly discouraged !!!])
- else
- LIBVIRT_RESULT([Loader/NVRAM], [$with_loader_nvram])
- fi
-])
diff --git a/meson.build b/meson.build
index 135d4408c5..48f3c56035 100644
--- a/meson.build
+++ b/meson.build
@@ -2112,6 +2112,14 @@ else
init_script = get_option('init_script')
endif
+loader_nvram = get_option('loader_nvram')
+if loader_nvram != ''
+ if (loader_nvram.split(':').length() % 2) != 0
+ error('Malformed loader_nvram option')
+ endif
+ conf.set_quoted('DEFAULT_LOADER_NVRAM', loader_nvram)
+endif
+
# define top include directory
@@ -2232,12 +2240,18 @@ test_summary = {
}
summary(test_summary, section: 'Test suite', bool_yn: true)
+if conf.has('DEFAULT_LOADER_NVRAM')
+ loader_res = '@0@ !!! Using this configure option is strongly discouraged !!!'.format(conf.get_unquoted('DEFAULT_LOADER_NVRAM'))
+else
+ loader_res = ''
+endif
misc_summary = {
'Use -Werror': cc_flags.contains('-Werror'),
'Warning Flags': supported_cc_flags,
'DTrace': conf.has('WITH_DTRACE_PROBES'),
'Init script': init_script,
'Char device locks': chrdev_lock_files,
+ 'Loader/NVRAM': loader_res,
'virt-host-validate': conf.has('WITH_HOST_VALIDATE'),
}
summary(misc_summary, section: 'Miscellaneous', bool_yn: true, list_sep: ' ')
diff --git a/meson_options.txt b/meson_options.txt
index 8b67aa9bc7..203d87acf3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -95,3 +95,4 @@ option('chrdev_lock_files', type: 'string', value: '', description: 'location fo
option('dtrace', type: 'feature', value: 'auto', description: 'use dtrace for static probing')
option('host_validate', type: 'feature', value: 'auto', description: 'build virt-host-validate')
option('init_script', type: 'combo', choices: ['systemd', 'openrc', 'check', 'none'], value: 'check', description: 'Style of init script to install')
+option('loader_nvram', type: 'string', value: '', description: 'Pass list of pairs of : paths. Both pairs and list items are separated by a colon.')