[gnome-session/wip/benzea/systemd-user-switch: 8/21] meson: Add compile time option to control systemd session management



commit 797d5b19e31517a1fee00093e0289a207a1d8597
Author: Benjamin Berg <bberg redhat com>
Date:   Mon May 13 12:10:05 2019 +0200

    meson: Add compile time option to control systemd session management
    
    This is in preparation to add the other parts that allow us to use the
    systemd user instance for session management.

 meson.build       | 5 +++++
 meson_options.txt | 1 +
 2 files changed, 6 insertions(+)
---
diff --git a/meson.build b/meson.build
index afc97457..5fc6f393 100644
--- a/meson.build
+++ b/meson.build
@@ -120,6 +120,7 @@ enable_session_selector = get_option('session_selector')
 session_tracking = 'null backend'
 
 enable_systemd = get_option('systemd')
+enable_systemd_session = get_option('systemd_session')
 enable_systemd_journal = get_option('systemd_journal')
 enable_consolekit = get_option('consolekit')
 if enable_systemd or enable_consolekit
@@ -161,7 +162,11 @@ if enable_systemd or enable_consolekit
     endif
   endif
 endif
+if enable_systemd_session
+  assert(enable_systemd, 'Systemd support must be enabled when using systemd session management')
+endif
 config_h.set('HAVE_SYSTEMD', enable_systemd)
+config_h.set('ENABLE_SYSTEMD_SESSION', enable_systemd_session)
 config_h.set('ENABLE_SYSTEMD_JOURNAL', enable_systemd_journal)
 config_h.set('HAVE_CONSOLEKIT', enable_consolekit)
 
diff --git a/meson_options.txt b/meson_options.txt
index 05174fec..63ee413f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,7 @@
 option('deprecation_flags', type: 'boolean', value: false, description: 'use *_DISABLE_DEPRECATED flags')
 option('session_selector', type: 'boolean', value: false, description: 'enable building a custom session 
selector dialog')
 option('systemd', type: 'boolean', value: true, description: 'Use systemd')
+option('systemd_session', type: 'boolean', value: true, description: 'Use systemd for session management')
 option('systemd_journal', type: 'boolean', value:'true', description: 'Send log to systemd-journal')
 option('consolekit', type: 'boolean', value: false, description: 'Use consolekit')
 option('docbook', type: 'boolean', value: true, description: 'build documentation')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]