From: Pavel Hrdina Date: Tue, 30 Jun 2020 17:53:36 +0000 (+0200) Subject: meson: add kvm build dependency X-Git-Tag: v6.7.0-rc1~551 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bf9d6a22451110e5d62c1cf69ea97ebd4b201bb;p=thirdparty%2Flibvirt.git meson: add kvm build dependency Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- diff --git a/configure.ac b/configure.ac index c03e840e64..0abc79b68e 100644 --- a/configure.ac +++ b/configure.ac @@ -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], [], diff --git a/meson.build b/meson.build index 40c6f38f5c..e43a916d3c 100644 --- a/meson.build +++ b/meson.build @@ -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)