]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add kvm build dependency
authorPavel Hrdina <phrdina@redhat.com>
Tue, 30 Jun 2020 17:53:36 +0000 (19:53 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:26:59 +0000 (09:26 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
meson.build

index c03e840e645ff2d5b076e11c12c705f1ccc72286..0abc79b68e9ffb8dbc6fc50d71a4b9287729d521 100644 (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], [],
index 40c6f38f5ca16f1346d7a7418d6475f0553f155e..e43a916d3cfa66438f760305cb400dbff441c594 100644 (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)