diff options
-rw-r--r-- | meson.build | 13 | ||||
-rw-r--r-- | meson_options.txt | 2 | ||||
-rw-r--r-- | monitor/udisks2/gvfsudisks2utils.c | 2 | ||||
-rw-r--r-- | monitor/udisks2/meson.build | 4 |
4 files changed, 13 insertions, 8 deletions
diff --git a/meson.build b/meson.build index 17828388..b3e52ea5 100644 --- a/meson.build +++ b/meson.build @@ -362,11 +362,16 @@ if enable_udisks2 endif # *** Check for libsystemd-login *** -enable_libsystemd_login = get_option('enable-libsystemd-login') -if enable_libsystemd_login - libsystemd_login_dep = dependency('libsystemd') +enable_logind = get_option('enable-logind') +if enable_logind + logind_dep = dependency('libsystemd', required: false) + if not logind_dep.found() + logind_dep = dependency('libelogind', version: '>= 229', required: false) + endif + + assert(logind_dep.found(), 'logind requested but libsystemd nor libelogind not found') endif -config_h.set('HAVE_LIBSYSTEMD_LOGIN', enable_libsystemd_login) +config_h.set('HAVE_LOGIND', enable_logind) # *** Check if we should build with AFC backend *** enable_afc = get_option('enable-afc') diff --git a/meson_options.txt b/meson_options.txt index 38b62dfb..3b2d7555 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -24,7 +24,7 @@ option('enable-fuse', type: 'boolean', value: true, description: 'build with fus option('enable-gcr', type: 'boolean', value: true, description: 'build with gcr certificate support') option('enable-gudev', type: 'boolean', value: true, description: 'build with gudev device support') option('enable-keyring', type: 'boolean', value: true, description: 'build with keyring support') -option('enable-libsystemd-login', type: 'boolean', value: true, description: 'build with logind support') +option('enable-logind', type: 'boolean', value: true, description: 'build with logind support') option('enable-libusb', type: 'boolean', value: true, description: 'build with libusb interruption support') option('enable-udev', type: 'boolean', value: true, description: 'build with libudev device support') diff --git a/monitor/udisks2/gvfsudisks2utils.c b/monitor/udisks2/gvfsudisks2utils.c index 26d76b99..07be6954 100644 --- a/monitor/udisks2/gvfsudisks2utils.c +++ b/monitor/udisks2/gvfsudisks2utils.c @@ -530,7 +530,7 @@ gvfs_udisks2_utils_spawn_finish (GAsyncResult *res, /* ---------------------------------------------------------------------------------------------------- */ -#if defined(HAVE_LIBSYSTEMD_LOGIN) +#if defined(HAVE_LOGIND) #include <systemd/sd-login.h> static const gchar * diff --git a/monitor/udisks2/meson.build b/monitor/udisks2/meson.build index 995b3008..50c928a3 100644 --- a/monitor/udisks2/meson.build +++ b/monitor/udisks2/meson.build @@ -44,8 +44,8 @@ deps = glib_deps + [ libgvfsproxyvolumemonitordaemon_noin_dep ] -if enable_libsystemd_login - deps += libsystemd_login_dep +if enable_logind + deps += logind_dep endif if enable_keyring |