From: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
---
Makefile | 5 -----
configure | 1 -
meson.build | 10 ++++++++++
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 764981d..0cbdc34 100644
--- a/Makefile
+++ b/Makefile
@@ -231,11 +231,6 @@ Makefile: $(version-obj-y)
COMMON_LDADDS = libqemuutil.a
-scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o
$(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-ifdef CONFIG_MPATH
-scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
-endif
-
ifneq ($(EXESUF),)
.PHONY: qga/qemu-ga
qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
diff --git a/configure b/configure
index 964897c..4757e45 100755
--- a/configure
+++ b/configure
@@ -6061,7 +6061,6 @@ if test "$softmmu" = yes ; then
fi
mpath=no
fi
- tools="$tools scsi/qemu-pr-helper\$(EXESUF)"
else
if test "$virtfs" = yes; then
error_exit "VirtFS is supported only on Linux"
diff --git a/meson.build b/meson.build
index 2b4b36d..b16ab72 100644
--- a/meson.build
+++ b/meson.build
@@ -108,6 +108,10 @@ if 'CONFIG_LIBCAP_NG' in config_host
endif
xkbcommon = dependency('xkbcommon', required: false)
rt = cc.find_library('rt', required: false)
+libmpathpersist = declare_dependency()
+if config_host.has_key('CONFIG_MPATH')
+ libmpathpersist = cc.find_library('mpathpersist')
+endif
libiscsi = declare_dependency()
if 'CONFIG_LIBISCSI' in config_host
libiscsi = declare_dependency(compile_args:
config_host['LIBISCSI_CFLAGS'].split(),
@@ -586,6 +590,7 @@ foreach target : target_dirs
endforeach
# Other build targets
+
if 'CONFIG_GUEST_AGENT' in config_host
subdir('qga')
endif
@@ -623,6 +628,11 @@ if have_tools
dependencies: [qemuutil, libcap_ng],
install: true,
install_dir: get_option('libexecdir'))
+
+ executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c',
'scsi/utils.c'),
+ dependencies: [authz, crypto, io, qom, qemuutil,
+ libcap_ng, libudev, libmpathpersist],
+ install: true)
endif
if 'CONFIG_IVSHMEM' in config_host
--
1.8.3.1