From 662be900adccafeac2a58f018741f3a50feb07f2 Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Fri, 7 Aug 2026 10:52:00 +0200 Subject: [PATCH] meson: systemd --- meson.build | 1 + meson.options | 1 + meson/systemd/meson.build | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 meson/systemd/meson.build diff --git a/meson.build b/meson.build index 32878f47f5..c36bc13ab3 100644 --- a/meson.build +++ b/meson.build @@ -134,6 +134,7 @@ subdir('meson' / 'pcre') subdir('meson' / 'gssapi') subdir('meson' / 'crypt') subdir('meson' / 'unwind') +subdir('meson' / 'systemd') dovecot_moduledir = get_option('moduledir') if dovecot_moduledir == '' diff --git a/meson.options b/meson.options index 0f70e6cb06..5829424ff3 100644 --- a/meson.options +++ b/meson.options @@ -14,6 +14,7 @@ option('random-source', type: 'string', value : '/dev/urandom', description: 'De option('ioloop', type: 'combo', choices: ['best', 'epoll', 'kqueue', 'poll', 'select'], value: 'best', description: 'I/O loop method to use (best for the fastest available)') option('notify', type: 'combo', choices: ['best', 'inotify', 'kqueue', 'none'], value: 'best', description: 'File system notification method to use (best for the fastest available)') option('libunwind', type: 'feature', value: 'auto', description: 'Build with libunwind support (better backtraces)') +option('systemd', type: 'feature', value: 'auto', description: 'Build with systemd support (sd_notify and socket activation)') option('sodium', type: 'feature', value: 'auto', description: 'Build with libsodium support (enables argon2)') option('pcre', type: 'feature', value: 'auto', description: 'Build with libpcre2 support (enables regular expressions)') option('gssapi', type: 'combo', choices: ['disabled', 'enabled', 'auto', 'plugin'], value: 'disabled', description: 'Build with GSSAPI authentication support') diff --git a/meson/systemd/meson.build b/meson/systemd/meson.build new file mode 100644 index 0000000000..b678e6a188 --- /dev/null +++ b/meson/systemd/meson.build @@ -0,0 +1,12 @@ +# TODO: Autoconf also resolves systemdsystemunitdir from the systemd .pc file and installs +# the unit files there. That belongs with the src/master port. + +ext_systemd = dependency('libsystemd', required: get_option('systemd')) + +conf.set( + 'HAVE_LIBSYSTEMD', + ext_systemd.found(), + description: 'Have libsystemd', +) + +summary({'systemd': ext_systemd}, section: 'Features')