[libvirt PATCH 114/351] meson: add default_editor build option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 configure.ac              |  3 ---
 m4/virt-default-editor.m4 | 32 --------------------------------
 meson.build               |  3 +++
 meson_options.txt         |  1 +
 4 files changed, 4 insertions(+), 35 deletions(-)
 delete mode 100644 m4/virt-default-editor.m4

diff --git a/configure.ac b/configure.ac
index 2ecdd30d48f..61e830a97eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,7 +104,6 @@ dnl
 LIBVIRT_ARG_DTRACE
 LIBVIRT_ARG_NUMAD
 LIBVIRT_ARG_INIT_SCRIPT
-LIBVIRT_ARG_DEFAULT_EDITOR
 LIBVIRT_ARG_LOGIN_SHELL
 LIBVIRT_ARG_HOST_VALIDATE
 LIBVIRT_ARG_TLS_PRIORITY
@@ -114,7 +113,6 @@ LIBVIRT_ARG_SYSCTL_CONFIG
 LIBVIRT_CHECK_DTRACE
 LIBVIRT_CHECK_NUMAD
 LIBVIRT_CHECK_INIT_SCRIPT
-LIBVIRT_CHECK_DEFAULT_EDITOR
 LIBVIRT_CHECK_LOGIN_SHELL
 LIBVIRT_CHECK_HOST_VALIDATE
 LIBVIRT_CHECK_TLS_PRIORITY
@@ -198,7 +196,6 @@ AC_MSG_NOTICE([])
 LIBVIRT_RESULT_DTRACE
 LIBVIRT_RESULT_NUMAD
 LIBVIRT_RESULT_INIT_SCRIPT
-LIBVIRT_RESULT_DEFAULT_EDITOR
 LIBVIRT_RESULT_LOGIN_SHELL
 LIBVIRT_RESULT_HOST_VALIDATE
 LIBVIRT_RESULT_TLS_PRIORITY
diff --git a/m4/virt-default-editor.m4 b/m4/virt-default-editor.m4
deleted file mode 100644
index 4b4cad4e875..00000000000
--- a/m4/virt-default-editor.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl The default editor 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 <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_ARG_DEFAULT_EDITOR], [
-  LIBVIRT_ARG_WITH([DEFAULT_EDITOR],
-                   [Editor to use for interactive commands], [vi])
-])
-
-AC_DEFUN([LIBVIRT_CHECK_DEFAULT_EDITOR], [
-  AC_DEFINE_UNQUOTED([DEFAULT_EDITOR], ["$with_default_editor"],
-                     [Default editor to use])
-])
-
-AC_DEFUN([LIBVIRT_RESULT_DEFAULT_EDITOR], [
-  LIBVIRT_RESULT([Default Editor], [$with_default_editor])
-])
diff --git a/meson.build b/meson.build
index 1a7cc483595..d48912eedc9 100644
--- a/meson.build
+++ b/meson.build
@@ -2063,6 +2063,8 @@ if get_option('debug_logs')
   conf.set('ENABLE_DEBUG', 1)
 endif
 
+conf.set_quoted('DEFAULT_EDITOR', get_option('default_editor'))
+
 
 # define top include directory
 
@@ -2183,6 +2185,7 @@ misc_summary = {
   'Use -Werror': cc_flags.contains('-Werror'),
   'Warning Flags': supported_cc_flags,
   'Char device locks': chrdev_lock_files,
+  'Default Editor': conf.get_unquoted('DEFAULT_EDITOR'),
 }
 summary(misc_summary, section: 'Miscellaneous', bool_yn: true, list_sep: ' ')
 
diff --git a/meson_options.txt b/meson_options.txt
index a09dad02875..476ed12a933 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -92,3 +92,4 @@ option('storage_zfs', type: 'feature', value: 'auto', description: 'ZFS backend
 # build feature options
 option('chrdev_lock_files', type: 'string', value: '', description: 'location for UUCP style lock files for character devices (leave empty for default paths on some platforms)')
 option('debug_logs', type: 'boolean', value: true, description: 'enable debugging output')
+option('default_editor', type: 'string', value: 'vi', description: 'Editor to use for interactive commands')
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux