mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
meson: add numad build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
c742687055
commit
e221085c27
@ -96,12 +96,10 @@ dnl
|
||||
dnl Miscellaneous checks
|
||||
dnl
|
||||
|
||||
LIBVIRT_ARG_NUMAD
|
||||
LIBVIRT_ARG_TLS_PRIORITY
|
||||
LIBVIRT_ARG_SYSCTL_CONFIG
|
||||
|
||||
|
||||
LIBVIRT_CHECK_NUMAD
|
||||
LIBVIRT_CHECK_TLS_PRIORITY
|
||||
LIBVIRT_CHECK_SYSCTL_CONFIG
|
||||
|
||||
@ -170,6 +168,5 @@ LIBVIRT_WIN_RESULT_WINDRES
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Miscellaneous])
|
||||
AC_MSG_NOTICE([])
|
||||
LIBVIRT_RESULT_NUMAD
|
||||
LIBVIRT_RESULT_TLS_PRIORITY
|
||||
AC_MSG_NOTICE([])
|
||||
|
@ -1,58 +0,0 @@
|
||||
dnl The numad binary 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_NUMAD], [
|
||||
LIBVIRT_ARG_WITH([NUMAD], [use numad to manage CPU placement dynamically],
|
||||
[check])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_NUMAD], [
|
||||
AC_REQUIRE([LIBVIRT_CHECK_NUMACTL])
|
||||
|
||||
if test "$with_numad" != "no" ; then
|
||||
fail=0
|
||||
|
||||
AC_PATH_PROG([NUMAD], [numad], [], [$LIBVIRT_SBIN_PATH])
|
||||
|
||||
if test "$with_numad" = "check"; then
|
||||
test "$with_numactl" = "yes" || fail=1
|
||||
if test -z "$NUMAD" || test $fail = 1; then
|
||||
with_numad="no"
|
||||
else
|
||||
with_numad="yes"
|
||||
fi
|
||||
else
|
||||
test -z "$NUMAD" &&
|
||||
AC_MSG_ERROR([You must install numad package to manage CPU and memory placement dynamically])
|
||||
|
||||
test "$with_numactl" = "yes" || fail=1
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the numactl development package in order to compile and run libvirt])
|
||||
fi
|
||||
fi
|
||||
if test "$with_numad" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_NUMAD], 1, [whether numad is available])
|
||||
AC_DEFINE_UNQUOTED([NUMAD],["$NUMAD"], [Location or name of the numad program])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_NUMAD], [
|
||||
LIBVIRT_RESULT([numad], [$with_numad])
|
||||
])
|
11
meson.build
11
meson.build
@ -2166,6 +2166,16 @@ if not get_option('nss').disabled()
|
||||
endif
|
||||
endif
|
||||
|
||||
if not get_option('numad').disabled() and numactl_dep.found()
|
||||
numad_prog = find_program('numad', required: get_option('numad'), dirs: libvirt_sbin_path)
|
||||
if numad_prog.found()
|
||||
conf.set('HAVE_NUMAD', 1)
|
||||
conf.set_quoted('NUMAD', numad_prog.path())
|
||||
endif
|
||||
elif get_option('numad').enabled()
|
||||
error('You must have numactl enabled for numad support.')
|
||||
endif
|
||||
|
||||
|
||||
# define top include directory
|
||||
|
||||
@ -2296,6 +2306,7 @@ misc_summary = {
|
||||
'Use -Werror': cc_flags.contains('-Werror'),
|
||||
'Warning Flags': supported_cc_flags,
|
||||
'DTrace': conf.has('WITH_DTRACE_PROBES'),
|
||||
'numad': conf.has('HAVE_NUMAD'),
|
||||
'Init script': init_script,
|
||||
'Char device locks': chrdev_lock_files,
|
||||
'Loader/NVRAM': loader_res,
|
||||
|
@ -98,3 +98,4 @@ option('init_script', type: 'combo', choices: ['systemd', 'openrc', 'check', 'no
|
||||
option('loader_nvram', type: 'string', value: '', description: 'Pass list of pairs of <loader>:<nvram> paths. Both pairs and list items are separated by a colon.')
|
||||
option('login_shell', type: 'feature', value: 'auto', description: 'build virt-login-shell')
|
||||
option('nss', type: 'feature', value: 'auto', description: 'enable Name Service Switch plugin for resolving guest IP addresses')
|
||||
option('numad', type: 'feature', value: 'auto', description: 'use numad to manage CPU placement dynamically')
|
||||
|
Loading…
Reference in New Issue
Block a user