meson: add kvm build dependency

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:
Pavel Hrdina 2020-06-30 19:53:36 +02:00
parent fa36446279
commit 3bf9d6a224
2 changed files with 6 additions and 7 deletions

View File

@ -359,13 +359,6 @@ fi
AM_CONDITIONAL([WITH_NODE_DEVICES], [test "$with_nodedev" = "yes"])
# Check for BSD kvm (kernel memory interface)
if test $with_freebsd = yes; then
AC_CHECK_LIB([kvm], [kvm_getprocs], [],
[AC_MSG_ERROR([BSD kernel memory interface library is required to build on FreeBSD])]
)
fi
GNUmakefile=GNUmakefile
m4_if(m4_version_compare([2.61a.100],
m4_defn([m4_PACKAGE_VERSION])), [1], [],

View File

@ -1075,6 +1075,12 @@ if hal_dep.found()
conf.set('WITH_HAL', 1)
endif
# Check for BSD kvm (kernel memory interface)
if host_machine.system() == 'freebsd'
kvm_dep = cc.find_library('kvm')
add_project_link_arguments('-lkvm', language: 'c')
endif
# readline 7.0 is the first version which includes pkg-config support
readline_version = '7.0'
readline_dep = dependency('readline', version: '>=' + readline_version, required: false)