mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
configure: Make virt-host-validate optional
virt-host-validate, just like virt-login-shell, doesn't make sense on Windows, so we should avoid building it. Make the tool optional and build it by default on all platforms except Windows, erroring out if the user attempts to build it anyway.
This commit is contained in:
parent
0b431fa0e6
commit
edebc16607
29
configure.ac
29
configure.ac
@ -1098,6 +1098,12 @@ dnl
|
||||
|
||||
LIBVIRT_CHECK_LOGIN_SHELL
|
||||
|
||||
dnl
|
||||
dnl Check for virt-host-validate
|
||||
dnl
|
||||
|
||||
LIBVIRT_CHECK_HOST_VALIDATE
|
||||
|
||||
AM_CONDITIONAL([WITH_SETUID_RPC_CLIENT], [test "$with_lxc$with_login_shell" != "nono"])
|
||||
|
||||
dnl
|
||||
@ -2925,17 +2931,18 @@ AC_MSG_NOTICE([ Alloc OOM: $enable_oom])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Miscellaneous])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([ Debug: $enable_debug])
|
||||
AC_MSG_NOTICE([ Use -Werror: $set_werror])
|
||||
AC_MSG_NOTICE([ Warning Flags: $WARN_CFLAGS])
|
||||
AC_MSG_NOTICE([ DTrace: $with_dtrace])
|
||||
AC_MSG_NOTICE([ numad: $with_numad])
|
||||
AC_MSG_NOTICE([ XML Catalog: $XML_CATALOG_FILE])
|
||||
AC_MSG_NOTICE([ Init script: $with_init_script])
|
||||
AC_MSG_NOTICE([Char device locks: $with_chrdev_lock_files])
|
||||
AC_MSG_NOTICE([ Default Editor: $DEFAULT_EDITOR])
|
||||
AC_MSG_NOTICE([ Loader/NVRAM: $with_loader_nvram])
|
||||
AC_MSG_NOTICE([ virt-login-shell: $with_login_shell])
|
||||
AC_MSG_NOTICE([ Debug: $enable_debug])
|
||||
AC_MSG_NOTICE([ Use -Werror: $set_werror])
|
||||
AC_MSG_NOTICE([ Warning Flags: $WARN_CFLAGS])
|
||||
AC_MSG_NOTICE([ DTrace: $with_dtrace])
|
||||
AC_MSG_NOTICE([ numad: $with_numad])
|
||||
AC_MSG_NOTICE([ XML Catalog: $XML_CATALOG_FILE])
|
||||
AC_MSG_NOTICE([ Init script: $with_init_script])
|
||||
AC_MSG_NOTICE([ Char device locks: $with_chrdev_lock_files])
|
||||
AC_MSG_NOTICE([ Default Editor: $DEFAULT_EDITOR])
|
||||
AC_MSG_NOTICE([ Loader/NVRAM: $with_loader_nvram])
|
||||
AC_MSG_NOTICE([ virt-login-shell: $with_login_shell])
|
||||
AC_MSG_NOTICE([virt-host-validate: $with_host_validate])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Developer Tools])
|
||||
AC_MSG_NOTICE([])
|
||||
|
40
m4/virt-host-validate.m4
Normal file
40
m4/virt-host-validate.m4
Normal file
@ -0,0 +1,40 @@
|
||||
dnl Copyright (C) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
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/>.
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_HOST_VALIDATE], [
|
||||
AC_ARG_WITH([host_validate],
|
||||
[AS_HELP_STRING([--with-host-validate],
|
||||
[build virt-host-validate @<:@default=check@:>@])])
|
||||
m4_divert_text([DEFAULTS], [with_host_validate=check])
|
||||
|
||||
if test "x$with_host_validate" != "xno"; then
|
||||
if test "x$with_win" = "xyes"; then
|
||||
if test "x$with_host_validate" = "xyes"; then
|
||||
AC_MSG_ERROR([virt-host-validate is not supported on Windows])
|
||||
else
|
||||
with_host_validate=no;
|
||||
fi
|
||||
else
|
||||
with_host_validate=yes;
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_host_validate" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_HOST_VALIDATE], 1, [whether virt-host-validate is built])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_HOST_VALIDATE], [test "x$with_host_validate" = "xyes"])
|
||||
])
|
@ -64,10 +64,9 @@ confdir = $(sysconfdir)/libvirt
|
||||
conf_DATA =
|
||||
|
||||
bin_SCRIPTS = virt-xml-validate virt-pki-validate
|
||||
bin_PROGRAMS = virsh virt-host-validate virt-admin
|
||||
bin_PROGRAMS = virsh virt-admin
|
||||
libexec_SCRIPTS = libvirt-guests.sh
|
||||
dist_man1_MANS = \
|
||||
virt-host-validate.1 \
|
||||
virt-pki-validate.1 \
|
||||
virt-xml-validate.1 \
|
||||
virsh.1 \
|
||||
@ -89,6 +88,13 @@ EXTRA_DIST += \
|
||||
virt-login-shell.1
|
||||
endif ! WITH_LOGIN_SHELL
|
||||
|
||||
if WITH_HOST_VALIDATE
|
||||
bin_PROGRAMS += virt-host-validate
|
||||
dist_man1_MANS += virt-host-validate.1
|
||||
else ! WITH_HOST_VALIDATE
|
||||
EXTRA_DIST += virt-host-validate.1
|
||||
endif ! WITH_HOST_VALIDATE
|
||||
|
||||
virt-xml-validate: virt-xml-validate.in Makefile
|
||||
$(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|g' \
|
||||
-e 's|[@]VERSION@|$(VERSION)|g' \
|
||||
|
Loading…
Reference in New Issue
Block a user