summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-10-25 12:47:08 +0200
committerOndrej Holy <oholy@redhat.com>2017-11-01 08:28:14 +0100
commit1e9d338fe10f501cd9a6c9cdb2192755ba2b9bd9 (patch)
tree6a238e26dcd4ed1fb800d8316a87771da5400160
parent5e2dff62c1ec332f3f8d7c0c1438835dc66a56b0 (diff)
downloadgvfs-1e9d338fe10f501cd9a6c9cdb2192755ba2b9bd9.tar.gz
build: Enable elogind support in meson
This patch adds support for elogind in meson, which is systemd-login extracted as a standalone package. https://bugzilla.gnome.org/show_bug.cgi?id=788707
-rw-r--r--meson.build13
-rw-r--r--meson_options.txt2
-rw-r--r--monitor/udisks2/gvfsudisks2utils.c2
-rw-r--r--monitor/udisks2/meson.build4
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