diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index 20974dd046..b4fb9387a1 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -1,8 +1,5 @@ # vim: filetype=automake -LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \ - locking/sanlock_helper.c - RPC_PROBE_FILES += $(srcdir)/locking/lock_protocol.x SYSCONF_FILES += locking/virtlockd.sysconf @@ -46,20 +43,6 @@ if WITH_LIBXL nodist_conf_DATA += locking/libxl-sanlock.conf endif WITH_LIBXL -libexec_PROGRAMS += libvirt_sanlock_helper - -libvirt_sanlock_helper_SOURCES = $(LOCK_DRIVER_SANLOCK_HELPER_SOURCES) -libvirt_sanlock_helper_CFLAGS = \ - -I$(srcdir)/conf \ - $(AM_CFLAGS) \ - $(NULL) -libvirt_sanlock_helper_LDFLAGS = \ - $(AM_LDFLAGS) \ - $(NULL) -libvirt_sanlock_helper_LDADD = \ - libvirt.la \ - $(GLIB_LIBS) \ - $(NULL) endif WITH_SANLOCK conf_DATA += locking/virtlockd.conf diff --git a/src/locking/meson.build b/src/locking/meson.build index cdd558779c..0e48c86afc 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -51,6 +51,10 @@ sanlock_sources = [ 'lock_driver_sanlock.c', ] +sanlock_helper_sources = files( + 'sanlock_helper.c', +) + lock_driver_lib = static_library( 'virt_lock_driver', [ @@ -129,4 +133,16 @@ if conf.has('WITH_LIBVIRTD') include_directories('.'), ], } + + if conf.has('WITH_SANLOCK') + virt_helpers += { + 'name': 'libvirt_sanlock_helper', + 'sources': [ + sanlock_helper_sources, + ], + 'include': [ + conf_inc_dir, + ], + } + endif endif