1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 project('systemd', 'c',
13 meson_version : '>= 0.53.2',
16 libsystemd_version = '0.32.0'
17 libudev_version = '1.7.2'
19 conf = configuration_data()
20 conf.set_quoted('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
21 conf.set('PROJECT_VERSION', meson.project_version(),
22 description : 'Numerical project version (used where a simple number is expected)')
24 # This is to be used instead of meson.source_root(), as the latter will return
25 # the wrong result when systemd is being built as a meson subproject
26 project_source_root = meson.current_source_dir()
27 project_build_root = meson.current_build_dir()
28 relative_source_path = run_command('realpath',
29 '--relative-to=@0@'.format(project_build_root),
30 project_source_root).stdout().strip()
31 conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
33 conf.set10('BUILD_MODE_DEVELOPER', get_option('mode') == 'developer',
34 description : 'tailor build to development or release builds')
36 want_ossfuzz = get_option('oss-fuzz')
37 want_libfuzzer = get_option('llvm-fuzz')
38 if want_ossfuzz and want_libfuzzer
39 error('only one of oss-fuzz or llvm-fuzz can be specified')
42 skip_deps = want_ossfuzz or want_libfuzzer
43 fuzzer_build = want_ossfuzz or want_libfuzzer
45 #####################################################################
47 # Try to install the git pre-commit hook
48 add_git_hook_sh = find_program('tools/add-git-hook.sh', required : false)
49 if add_git_hook_sh.found()
50 git_hook = run_command(add_git_hook_sh)
51 if git_hook.returncode() == 0
52 message(git_hook.stdout().strip())
56 #####################################################################
58 if get_option('split-usr') == 'auto'
59 split_usr = run_command('test', '-L', '/bin').returncode() != 0
61 split_usr = get_option('split-usr') == 'true'
64 warning('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n'
65 + ' split-usr mode is going to be removed\n' +
66 '\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
68 conf.set10('HAVE_SPLIT_USR', split_usr,
69 description : '/usr/bin and /bin directories are separate')
71 if get_option('split-bin') == 'auto'
72 split_bin = run_command('test', '-L', '/usr/sbin').returncode() != 0
74 split_bin = get_option('split-bin') == 'true'
76 conf.set10('HAVE_SPLIT_BIN', split_bin,
77 description : 'bin and sbin directories are separate')
79 rootprefixdir = get_option('rootprefix')
80 # Unusual rootprefixdir values are used by some distros
81 # (see https://github.com/systemd/systemd/pull/7461).
82 rootprefix_default = split_usr ? '/' : '/usr'
83 if rootprefixdir == ''
84 rootprefixdir = rootprefix_default
86 rootprefixdir_noslash = rootprefixdir == '/' ? '' : rootprefixdir
88 have_standalone_binaries = get_option('standalone-binaries')
90 sysvinit_path = get_option('sysvinit-path')
91 sysvrcnd_path = get_option('sysvrcnd-path')
92 conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '',
93 description : 'SysV init scripts and rcN.d links are supported')
94 conf.set10('CREATE_LOG_DIRS', get_option('create-log-dirs'))
96 if get_option('hibernate') and not get_option('initrd')
97 error('hibernate depends on initrd')
100 conf.set10('BUMP_PROC_SYS_FS_FILE_MAX', get_option('bump-proc-sys-fs-file-max'))
101 conf.set10('BUMP_PROC_SYS_FS_NR_OPEN', get_option('bump-proc-sys-fs-nr-open'))
102 conf.set('HIGH_RLIMIT_NOFILE', 512*1024)
104 # Meson ignores the preceding arguments when joining paths if an absolute
105 # component is encountered, so this should canonicalize various paths when they
106 # are absolute or relative.
107 prefixdir = get_option('prefix')
108 if not prefixdir.startswith('/')
109 error('Prefix is not absolute: "@0@"'.format(prefixdir))
111 if prefixdir != rootprefixdir and rootprefixdir != '/' and not prefixdir.strip('/').startswith(rootprefixdir.strip('/') + '/')
112 error('Prefix is not below root prefix (now rootprefix=@0@ prefix=@1@)'.format(
113 rootprefixdir, prefixdir))
116 bindir = prefixdir / get_option('bindir')
117 libdir = prefixdir / get_option('libdir')
118 sysconfdir = prefixdir / get_option('sysconfdir')
119 includedir = prefixdir / get_option('includedir')
120 datadir = prefixdir / get_option('datadir')
121 localstatedir = '/' / get_option('localstatedir')
123 rootbindir = rootprefixdir / 'bin'
124 rootsbindir = rootprefixdir / (split_bin ? 'sbin' : 'bin')
125 rootlibexecdir = rootprefixdir / 'lib/systemd'
127 rootlibdir = get_option('rootlibdir')
129 rootlibdir = rootprefixdir / libdir.split('/')[-1]
132 install_sysconfdir = get_option('install-sysconfdir') != 'false'
133 install_sysconfdir_samples = get_option('install-sysconfdir') == 'true'
134 # Dirs of external packages
135 pkgconfigdatadir = get_option('pkgconfigdatadir') != '' ? get_option('pkgconfigdatadir') : datadir / 'pkgconfig'
136 pkgconfiglibdir = get_option('pkgconfiglibdir') != '' ? get_option('pkgconfiglibdir') : libdir / 'pkgconfig'
137 polkitpolicydir = datadir / 'polkit-1/actions'
138 polkitrulesdir = datadir / 'polkit-1/rules.d'
139 polkitpkladir = localstatedir / 'lib/polkit-1/localauthority/10-vendor.d'
140 xinitrcdir = get_option('xinitrcdir') != '' ? get_option('xinitrcdir') : sysconfdir / 'X11/xinit/xinitrc.d'
141 rpmmacrosdir = get_option('rpmmacrosdir')
142 if rpmmacrosdir != 'no'
143 rpmmacrosdir = prefixdir / rpmmacrosdir
145 modprobedir = rootprefixdir / 'lib/modprobe.d'
148 pkgdatadir = datadir / 'systemd'
149 environmentdir = prefixdir / 'lib/environment.d'
150 pkgsysconfdir = sysconfdir / 'systemd'
151 userunitdir = prefixdir / 'lib/systemd/user'
152 userpresetdir = prefixdir / 'lib/systemd/user-preset'
153 tmpfilesdir = prefixdir / 'lib/tmpfiles.d'
154 sysusersdir = prefixdir / 'lib/sysusers.d'
155 sysctldir = prefixdir / 'lib/sysctl.d'
156 binfmtdir = prefixdir / 'lib/binfmt.d'
157 modulesloaddir = prefixdir / 'lib/modules-load.d'
158 networkdir = rootprefixdir / 'lib/systemd/network'
159 pkgincludedir = includedir / 'systemd'
160 systemgeneratordir = rootlibexecdir / 'system-generators'
161 usergeneratordir = prefixdir / 'lib/systemd/user-generators'
162 systemenvgeneratordir = prefixdir / 'lib/systemd/system-environment-generators'
163 userenvgeneratordir = prefixdir / 'lib/systemd/user-environment-generators'
164 systemshutdowndir = rootlibexecdir / 'system-shutdown'
165 systemsleepdir = rootlibexecdir / 'system-sleep'
166 systemunitdir = rootprefixdir / 'lib/systemd/system'
167 systempresetdir = rootprefixdir / 'lib/systemd/system-preset'
168 udevlibexecdir = rootprefixdir / 'lib/udev'
169 udevrulesdir = udevlibexecdir / 'rules.d'
170 udevhwdbdir = udevlibexecdir / 'hwdb.d'
171 catalogdir = prefixdir / 'lib/systemd/catalog'
172 kernelinstalldir = prefixdir / 'lib/kernel/install.d'
173 factorydir = datadir / 'factory'
174 bootlibdir = prefixdir / 'lib/systemd/boot/efi'
175 testsdir = prefixdir / 'lib/systemd/tests'
176 systemdstatedir = localstatedir / 'lib/systemd'
177 catalogstatedir = systemdstatedir / 'catalog'
178 randomseeddir = localstatedir / 'lib/systemd'
179 profiledir = rootlibexecdir / 'portable' / 'profile'
180 ntpservicelistdir = rootprefixdir / 'lib/systemd/ntp-units.d'
182 docdir = get_option('docdir')
184 docdir = datadir / 'doc/systemd'
187 dbuspolicydir = get_option('dbuspolicydir')
188 if dbuspolicydir == ''
189 dbuspolicydir = datadir / 'dbus-1/system.d'
192 dbussessionservicedir = get_option('dbussessionservicedir')
193 if dbussessionservicedir == ''
194 dbussessionservicedir = datadir / 'dbus-1/services'
197 dbussystemservicedir = get_option('dbussystemservicedir')
198 if dbussystemservicedir == ''
199 dbussystemservicedir = datadir / 'dbus-1/system-services'
202 pamlibdir = get_option('pamlibdir')
204 pamlibdir = rootlibdir / 'security'
207 pamconfdir = get_option('pamconfdir')
209 pamconfdir = prefixdir / 'lib/pam.d'
212 libcryptsetup_plugins_dir = get_option('libcryptsetup-plugins-dir')
213 if libcryptsetup_plugins_dir == ''
214 libcryptsetup_plugins_dir = rootlibdir / 'cryptsetup'
217 memory_accounting_default = get_option('memory-accounting-default')
218 status_unit_format_default = get_option('status-unit-format-default')
220 conf.set_quoted('BINFMT_DIR', binfmtdir)
221 conf.set_quoted('BOOTLIBDIR', bootlibdir)
222 conf.set_quoted('CATALOG_DATABASE', catalogstatedir / 'database')
223 conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root'))
224 conf.set_quoted('DOC_DIR', docdir)
225 conf.set_quoted('DOCUMENT_ROOT', pkgdatadir / 'gatewayd')
226 conf.set_quoted('ENVIRONMENT_DIR', environmentdir)
227 conf.set_quoted('INCLUDE_DIR', includedir)
228 conf.set_quoted('LIBDIR', libdir)
229 conf.set_quoted('MODPROBE_DIR', modprobedir)
230 conf.set_quoted('MODULESLOAD_DIR', modulesloaddir)
231 conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir)
232 conf.set_quoted('POLKIT_AGENT_BINARY_PATH', bindir / 'pkttyagent')
233 conf.set_quoted('PREFIX', prefixdir)
234 conf.set_quoted('RANDOM_SEED', randomseeddir / 'random-seed')
235 conf.set_quoted('RANDOM_SEED_DIR', randomseeddir)
236 conf.set_quoted('RC_LOCAL_PATH', get_option('rc-local'))
237 conf.set_quoted('ROOTBINDIR', rootbindir)
238 conf.set_quoted('ROOTLIBDIR', rootlibdir)
239 conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir)
240 conf.set_quoted('ROOTPREFIX', rootprefixdir)
241 conf.set_quoted('ROOTPREFIX_NOSLASH', rootprefixdir_noslash)
242 conf.set_quoted('SYSCONF_DIR', sysconfdir)
243 conf.set_quoted('SYSCTL_DIR', sysctldir)
244 conf.set_quoted('SYSTEMCTL_BINARY_PATH', rootbindir / 'systemctl')
245 conf.set_quoted('SYSTEMD_BINARY_PATH', rootlibexecdir / 'systemd')
246 conf.set_quoted('SYSTEMD_CATALOG_DIR', catalogdir)
247 conf.set_quoted('SYSTEMD_CGROUPS_AGENT_PATH', rootlibexecdir / 'systemd-cgroups-agent')
248 conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', rootlibexecdir / 'systemd-cryptsetup')
249 conf.set_quoted('SYSTEMD_EXPORT_PATH', rootlibexecdir / 'systemd-export')
250 conf.set_quoted('SYSTEMD_FSCK_PATH', rootlibexecdir / 'systemd-fsck')
251 conf.set_quoted('SYSTEMD_GROWFS_PATH', rootlibexecdir / 'systemd-growfs')
252 conf.set_quoted('SYSTEMD_HOMEWORK_PATH', rootlibexecdir / 'systemd-homework')
253 conf.set_quoted('SYSTEMD_IMPORT_FS_PATH', rootlibexecdir / 'systemd-import-fs')
254 conf.set_quoted('SYSTEMD_IMPORT_PATH', rootlibexecdir / 'systemd-import')
255 conf.set_quoted('SYSTEMD_INTEGRITYSETUP_PATH', rootlibexecdir / 'systemd-integritysetup')
256 conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', pkgdatadir / 'kbd-model-map')
257 conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', pkgdatadir / 'language-fallback-map')
258 conf.set_quoted('SYSTEMD_MAKEFS_PATH', rootlibexecdir / 'systemd-makefs')
259 conf.set_quoted('SYSTEMD_PULL_PATH', rootlibexecdir / 'systemd-pull')
260 conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', rootlibexecdir / 'systemd-shutdown')
261 conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', bindir / 'systemd-stdio-bridge')
262 conf.set_quoted('SYSTEMD_TEST_DATA', testsdir / 'testdata')
263 conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', rootbindir / 'systemd-tty-ask-password-agent')
264 conf.set_quoted('SYSTEMD_UPDATE_HELPER_PATH', rootlibexecdir / 'systemd-update-helper')
265 conf.set_quoted('SYSTEMD_USERWORK_PATH', rootlibexecdir / 'systemd-userwork')
266 conf.set_quoted('SYSTEMD_VERITYSETUP_PATH', rootlibexecdir / 'systemd-veritysetup')
267 conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', pkgsysconfdir / 'system')
268 conf.set_quoted('SYSTEM_DATA_UNIT_DIR', systemunitdir)
269 conf.set_quoted('SYSTEM_ENV_GENERATOR_DIR', systemenvgeneratordir)
270 conf.set_quoted('SYSTEM_GENERATOR_DIR', systemgeneratordir)
271 conf.set_quoted('SYSTEM_PRESET_DIR', systempresetdir)
272 conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir)
273 conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir)
274 conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
275 conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
276 conf.set_quoted('SYSUSERS_DIR', sysusersdir)
277 conf.set_quoted('TMPFILES_DIR', tmpfilesdir)
278 conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
279 conf.set_quoted('UDEV_HWDB_DIR', udevhwdbdir)
280 conf.set_quoted('UDEV_RULES_DIR', udevrulesdir)
281 conf.set_quoted('UPDATE_HELPER_USER_TIMEOUT', get_option('update-helper-user-timeout'))
282 conf.set_quoted('USER_CONFIG_UNIT_DIR', pkgsysconfdir / 'user')
283 conf.set_quoted('USER_DATA_UNIT_DIR', userunitdir)
284 conf.set_quoted('USER_ENV_GENERATOR_DIR', userenvgeneratordir)
285 conf.set_quoted('USER_GENERATOR_DIR', usergeneratordir)
286 conf.set_quoted('USER_KEYRING_PATH', pkgsysconfdir / 'import-pubring.gpg')
287 conf.set_quoted('USER_PRESET_DIR', userpresetdir)
288 conf.set_quoted('VENDOR_KEYRING_PATH', rootlibexecdir / 'import-pubring.gpg')
290 conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper())
291 conf.set10('ENABLE_URLIFY', get_option('urlify'))
292 conf.set10('ENABLE_FEXECVE', get_option('fexecve'))
293 conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default)
294 conf.set('STATUS_UNIT_FORMAT_DEFAULT', 'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper())
295 conf.set_quoted('STATUS_UNIT_FORMAT_DEFAULT_STR', status_unit_format_default)
297 #####################################################################
299 cc = meson.get_compiler('c')
300 pkgconfig = import('pkgconfig')
301 check_compilation_sh = find_program('tools/check-compilation.sh')
302 meson_build_sh = find_program('tools/meson-build.sh')
304 want_tests = get_option('tests')
305 slow_tests = want_tests != 'false' and get_option('slow-tests')
306 fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
307 install_tests = get_option('install-tests')
309 if add_languages('cpp', required : fuzzer_build)
310 # Used only for tests
311 cxx = meson.get_compiler('cpp')
312 cxx_cmd = ' '.join(cxx.cmd_array())
318 fuzzing_engine = meson.get_compiler('cpp').find_library('Fuzzer', required : false)
319 if fuzzing_engine.found()
320 add_project_arguments('-fsanitize-coverage=trace-pc-guard,trace-cmp', language : 'c')
321 elif cc.has_argument('-fsanitize=fuzzer-no-link')
322 add_project_arguments('-fsanitize=fuzzer-no-link', language : 'c')
324 error('Looks like neither libFuzzer nor -fsanitize=fuzzer-no-link is supported')
327 fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine')
330 # Those generate many false positives, and we do not want to change the code to
332 basic_disabled_warnings = [
333 '-Wno-format-signedness',
334 '-Wno-missing-field-initializers',
335 '-Wno-unused-parameter',
338 possible_common_cc_flags = [
342 '-Werror=implicit-function-declaration',
343 '-Werror=incompatible-pointer-types',
344 '-Werror=int-conversion',
346 '-Werror=return-type',
347 '-Werror=shift-count-overflow',
348 '-Werror=shift-overflow=2',
350 '-Werror=unused-function',
352 '-Wimplicit-fallthrough=5',
355 '-Wmissing-include-dirs',
356 '-Wmissing-noreturn',
358 '-Wold-style-definition',
362 '-Wstrict-aliasing=2',
363 '-Wstrict-prototypes',
364 '-Wsuggest-attribute=noreturn',
367 # negative arguments are correctly detected starting with meson 0.46.
368 '-Wno-error=#warnings', # clang
369 '-Wno-string-plus-int', # clang
372 # Disable -Wmaybe-unitialized when compiling with -Os/-O1/-O3/etc. There are
373 # too many false positives with gcc >= 8. Effectively, we only test with -O0
374 # and -O2; this should be enough to catch most important cases without too much
375 # busywork. See https://github.com/systemd/systemd/pull/19226.
376 if cc.get_id() == 'gcc' and (not '02'.contains(get_option('optimization')) or
377 cc.version().version_compare('<10'))
378 possible_common_cc_flags += '-Wno-maybe-uninitialized'
381 # Disable -Wno-unused-result with gcc, see
382 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425.
383 if cc.get_id() == 'gcc'
384 possible_common_cc_flags += '-Wno-unused-result'
387 # --as-needed and --no-undefined are provided by meson by default,
388 # run 'meson configure' to see what is enabled
389 possible_link_flags = [
395 if cc.get_id() == 'clang'
396 possible_common_cc_flags += [
397 '-Wno-typedef-redefinition',
398 '-Wno-gnu-variable-sized-type-not-at-end',
402 possible_cc_flags = possible_common_cc_flags + [
403 '-Werror=missing-declarations',
404 '-Werror=missing-prototypes',
405 '-fdiagnostics-show-option',
408 '-fno-strict-aliasing',
410 '-fstack-protector-strong',
411 '-fvisibility=hidden',
412 '--param=ssp-buffer-size=4',
415 if get_option('buildtype') != 'debug'
416 possible_cc_flags += [
417 '-ffunction-sections',
421 possible_link_flags += '-Wl,--gc-sections'
424 add_project_arguments(cc.get_supported_arguments(basic_disabled_warnings), language : 'c')
425 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
426 add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
428 have = cc.has_argument('-Wzero-length-bounds')
429 conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have)
433 #include <inttypes.h>
434 typedef uint64_t usec_t;
435 usec_t now(clockid_t clock);
440 ''', args: '-Werror=shadow', name : '-Werror=shadow with local shadowing')
441 add_project_arguments('-Werror=shadow', language : 'c')
445 add_project_arguments(cxx.get_supported_arguments(basic_disabled_warnings), language : 'cpp')
448 cpp = ' '.join(cc.cmd_array()) + ' -E'
450 has_wstringop_truncation = cc.has_argument('-Wstringop-truncation')
452 #####################################################################
453 # compilation result tests
455 conf.set('_GNU_SOURCE', true)
456 conf.set('__SANE_USERSPACE_TYPES__', true)
457 conf.set10('HAVE_WSTRINGOP_TRUNCATION', has_wstringop_truncation)
459 conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>'))
460 conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>'))
461 conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>'))
462 conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>'))
466 #include <sys/mount.h>
467 #include <sys/stat.h>
468 #include <linux/fs.h>
471 foreach decl : ['char16_t',
477 # We get -1 if the size cannot be determined
478 have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
480 if decl == 'struct statx'
482 want_linux_stat_h = false
484 have = cc.sizeof(decl,
485 prefix : decl_headers + '#include <linux/stat.h>',
486 args : '-D_GNU_SOURCE') > 0
487 want_linux_stat_h = have
491 conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
494 conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
496 foreach ident : ['secure_getenv', '__secure_getenv']
497 conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
501 ['memfd_create', '''#include <sys/mman.h>'''],
502 ['gettid', '''#include <sys/types.h>
503 #include <unistd.h>'''],
504 ['pivot_root', '''#include <stdlib.h>
505 #include <unistd.h>'''], # no known header declares pivot_root
506 ['ioprio_get', '''#include <sched.h>'''], # no known header declares ioprio_get
507 ['ioprio_set', '''#include <sched.h>'''], # no known header declares ioprio_set
508 ['name_to_handle_at', '''#include <sys/types.h>
509 #include <sys/stat.h>
510 #include <fcntl.h>'''],
511 ['setns', '''#include <sched.h>'''],
512 ['renameat2', '''#include <stdio.h>
513 #include <fcntl.h>'''],
514 ['kcmp', '''#include <linux/kcmp.h>'''],
515 ['keyctl', '''#include <sys/types.h>
516 #include <keyutils.h>'''],
517 ['copy_file_range', '''#include <sys/syscall.h>
518 #include <unistd.h>'''],
519 ['bpf', '''#include <sys/syscall.h>
520 #include <unistd.h>'''],
521 ['statx', '''#include <sys/types.h>
522 #include <sys/stat.h>
523 #include <unistd.h>'''],
524 ['explicit_bzero' , '''#include <string.h>'''],
525 ['reallocarray', '''#include <stdlib.h>'''],
526 ['set_mempolicy', '''#include <stdlib.h>
527 #include <unistd.h>'''],
528 ['get_mempolicy', '''#include <stdlib.h>
529 #include <unistd.h>'''],
530 ['pidfd_send_signal', '''#include <stdlib.h>
533 #include <sys/wait.h>'''],
534 ['pidfd_open', '''#include <stdlib.h>
537 #include <sys/wait.h>'''],
538 ['rt_sigqueueinfo', '''#include <stdlib.h>
541 #include <sys/wait.h>'''],
542 ['mallinfo', '''#include <malloc.h>'''],
543 ['mallinfo2', '''#include <malloc.h>'''],
544 ['execveat', '''#include <unistd.h>'''],
545 ['close_range', '''#include <unistd.h>'''],
546 ['epoll_pwait2', '''#include <sys/epoll.h>'''],
547 ['mount_setattr', '''#include <sys/mount.h>'''],
548 ['move_mount', '''#include <sys/mount.h>'''],
549 ['open_tree', '''#include <sys/mount.h>'''],
550 ['getdents64', '''#include <dirent.h>'''],
553 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
554 conf.set10('HAVE_' + ident[0].to_upper(), have)
557 if cc.has_function('getrandom', prefix : '''#include <sys/random.h>''', args : '-D_GNU_SOURCE')
558 conf.set10('USE_SYS_RANDOM_H', true)
559 conf.set10('HAVE_GETRANDOM', true)
561 have = cc.has_function('getrandom', prefix : '''#include <linux/random.h>''')
562 conf.set10('USE_SYS_RANDOM_H', false)
563 conf.set10('HAVE_GETRANDOM', have)
566 #####################################################################
568 version_tag = get_option('version-tag')
570 vcs_data = configuration_data()
571 vcs_data.set('VCS_TAG', version_tag)
572 version_h = configure_file(configuration : vcs_data,
573 input : 'src/version/version.h.in',
574 output : 'version.h')
577 project_source_root + '/tools/meson-vcs-tag.sh',
579 meson.project_version()]
582 input : 'src/version/version.h.in',
583 output : 'version.h',
587 versiondep = declare_dependency(sources: version_h)
589 sh = find_program('sh')
590 echo = find_program('echo')
591 test = find_program('test')
592 sed = find_program('sed')
593 awk = find_program('awk')
594 stat = find_program('stat')
595 ln = find_program('ln')
596 git = find_program('git', required : false)
597 env = find_program('env')
598 perl = find_program('perl', required : false)
599 rsync = find_program('rsync', required : false)
600 meson_make_symlink = project_source_root + '/tools/meson-make-symlink.sh'
601 test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh')
603 mkdir_p = 'mkdir -p $DESTDIR/@0@'
604 splash_bmp = files('test/splash.bmp')
606 # If -Dxxx-path option is found, use that. Otherwise, check in $PATH,
607 # /usr/sbin, /sbin, and fall back to the default from middle column.
608 progs = [['quotaon', '/usr/sbin/quotaon' ],
609 ['quotacheck', '/usr/sbin/quotacheck' ],
610 ['kmod', '/usr/bin/kmod' ],
611 ['kexec', '/usr/sbin/kexec' ],
612 ['sulogin', '/usr/sbin/sulogin' ],
613 ['mount', '/usr/bin/mount', 'MOUNT_PATH'],
614 ['umount', '/usr/bin/umount', 'UMOUNT_PATH'],
615 ['loadkeys', '/usr/bin/loadkeys', 'KBD_LOADKEYS'],
616 ['setfont', '/usr/bin/setfont', 'KBD_SETFONT'],
617 ['nologin', '/usr/sbin/nologin', ],
620 path = get_option(prog[0] + '-path')
622 message('Using @1@ for @0@'.format(prog[0], path))
624 exe = find_program(prog[0],
625 '/usr/sbin/' + prog[0],
628 path = exe.found() ? exe.path() : prog[1]
630 name = prog.length() > 2 ? prog[2] : prog[0].to_upper()
631 conf.set_quoted(name, path)
634 conf.set_quoted('TELINIT', get_option('telinit-path'))
636 if run_command(ln, '--relative', '--help').returncode() != 0
637 error('ln does not support --relative (added in coreutils 8.16)')
640 ############################################################
642 if run_command('python3', '-c', 'import jinja2').returncode() != 0
643 error('python3 jinja2 missing')
646 ############################################################
648 gperf = find_program('gperf')
650 gperf_test_format = '''
652 const char * in_word_set(const char *, @0@);
655 gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C'
656 gperf_snippet = run_command(sh, '-c', gperf_snippet_format.format(gperf.path()))
657 gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout())
658 if cc.compiles(gperf_test)
659 gperf_len_type = 'size_t'
661 gperf_test = gperf_test_format.format('unsigned', gperf_snippet.stdout())
662 if cc.compiles(gperf_test)
663 gperf_len_type = 'unsigned'
665 error('unable to determine gperf len type')
668 message('gperf len type is @0@'.format(gperf_len_type))
669 conf.set('GPERF_LEN_TYPE', gperf_len_type,
670 description : 'The type of gperf "len" parameter')
672 ############################################################
674 if not cc.has_header('sys/capability.h')
675 error('POSIX caps headers not found')
677 foreach header : ['crypt.h',
679 'linux/vm_sockets.h',
681 'valgrind/memcheck.h',
682 'valgrind/valgrind.h',
683 'linux/time_types.h',
687 conf.set10('HAVE_' + header.underscorify().to_upper(),
688 cc.has_header(header))
691 ############################################################
693 fallback_hostname = get_option('fallback-hostname')
694 if fallback_hostname == '' or fallback_hostname[0] == '.' or fallback_hostname[0] == '-'
695 error('Invalid fallback-hostname configuration')
696 # A more extensive test is done in test-hostname-util. Let's catch
697 # the most obvious errors here so we don't fail with an assert later.
699 conf.set_quoted('FALLBACK_HOSTNAME', fallback_hostname)
701 default_hierarchy = get_option('default-hierarchy')
702 conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy,
703 description : 'default cgroup hierarchy as string')
704 if default_hierarchy == 'legacy'
705 conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_NONE')
706 elif default_hierarchy == 'hybrid'
707 conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_SYSTEMD')
709 conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_ALL')
712 extra_net_naming_schemes = []
713 extra_net_naming_map = []
714 foreach scheme: get_option('extra-net-naming-schemes').split(',')
716 name = scheme.split('=')[0]
717 value = scheme.split('=')[1]
718 NAME = name.underscorify().to_upper()
720 foreach field: value.split('+')
721 VALUE += 'NAMING_' + field.underscorify().to_upper()
723 extra_net_naming_schemes += 'NAMING_@0@ = @1@,'.format(NAME, '|'.join(VALUE))
724 extra_net_naming_map += '{ "@0@", NAMING_@1@ },'.format(name, NAME)
727 conf.set('EXTRA_NET_NAMING_SCHEMES', ' '.join(extra_net_naming_schemes))
728 conf.set('EXTRA_NET_NAMING_MAP', ' '.join(extra_net_naming_map))
730 default_net_naming_scheme = get_option('default-net-naming-scheme')
731 conf.set_quoted('DEFAULT_NET_NAMING_SCHEME', default_net_naming_scheme)
732 if default_net_naming_scheme != 'latest'
733 conf.set('_DEFAULT_NET_NAMING_SCHEME_TEST',
734 'NAMING_' + default_net_naming_scheme.underscorify().to_upper())
737 time_epoch = get_option('time-epoch')
739 time_epoch = run_command(sh, '-c', 'echo "$SOURCE_DATE_EPOCH"').stdout().strip()
740 if time_epoch == '' and git.found() and run_command('test', '-e', '.git').returncode() == 0
741 # If we're in a git repository, use the creation time of the latest git tag.
742 latest_tag = run_command(git, 'describe', '--abbrev=0', '--tags').stdout().strip()
743 time_epoch = run_command(git, 'log', '--no-show-signature', '-1', '--format=%at', latest_tag).stdout()
747 time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout()
749 time_epoch = time_epoch.to_int()
751 conf.set('TIME_EPOCH', time_epoch)
753 conf.set('CLOCK_VALID_RANGE_USEC_MAX', get_option('clock-valid-range-usec-max'))
755 foreach tuple : [['system-alloc-uid-min', 'SYS_UID_MIN', 1], # Also see login.defs(5).
756 ['system-uid-max', 'SYS_UID_MAX', 999],
757 ['system-alloc-gid-min', 'SYS_GID_MIN', 1],
758 ['system-gid-max', 'SYS_GID_MAX', 999]]
759 v = get_option(tuple[0])
763 '/^\s*@0@\s+/ { uid=$2 } END { print uid }'.format(tuple[1]),
764 '/etc/login.defs').stdout().strip()
771 conf.set(tuple[0].underscorify().to_upper(), v)
773 if conf.get('SYSTEM_ALLOC_UID_MIN') >= conf.get('SYSTEM_UID_MAX')
774 error('Invalid uid allocation range')
776 if conf.get('SYSTEM_ALLOC_GID_MIN') >= conf.get('SYSTEM_GID_MAX')
777 error('Invalid gid allocation range')
780 dynamic_uid_min = get_option('dynamic-uid-min')
781 dynamic_uid_max = get_option('dynamic-uid-max')
782 conf.set('DYNAMIC_UID_MIN', dynamic_uid_min)
783 conf.set('DYNAMIC_UID_MAX', dynamic_uid_max)
785 container_uid_base_min = get_option('container-uid-base-min')
786 container_uid_base_max = get_option('container-uid-base-max')
787 conf.set('CONTAINER_UID_BASE_MIN', container_uid_base_min)
788 conf.set('CONTAINER_UID_BASE_MAX', container_uid_base_max)
790 nobody_user = get_option('nobody-user')
791 nobody_group = get_option('nobody-group')
793 if not meson.is_cross_build()
794 getent_result = run_command('getent', 'passwd', '65534')
795 if getent_result.returncode() == 0
796 name = getent_result.stdout().split(':')[0]
797 if name != nobody_user
799 'The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
800 'Your build will result in an user table setup that is incompatible with the local system.')
803 id_result = run_command('id', '-u', nobody_user)
804 if id_result.returncode() == 0
805 id = id_result.stdout().to_int()
808 'The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
809 'Your build will result in an user table setup that is incompatible with the local system.')
813 getent_result = run_command('getent', 'group', '65534')
814 if getent_result.returncode() == 0
815 name = getent_result.stdout().split(':')[0]
816 if name != nobody_group
818 'The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
819 'Your build will result in an group table setup that is incompatible with the local system.')
822 id_result = run_command('id', '-g', nobody_group)
823 if id_result.returncode() == 0
824 id = id_result.stdout().to_int()
827 'The local group with the configured group name "@0@" of the nobody group does not have GID 65534 (it has @1@).\n'.format(nobody_group, id) +
828 'Your build will result in an group table setup that is incompatible with the local system.')
832 if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
834 'The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
835 'Please re-check that both "nobody-user" and "nobody-group" options are correctly set.')
838 conf.set_quoted('NOBODY_USER_NAME', nobody_user)
839 conf.set_quoted('NOBODY_GROUP_NAME', nobody_group)
842 foreach option : ['adm-gid',
859 'systemd-journal-gid',
860 'systemd-network-uid',
861 'systemd-resolve-uid',
862 'systemd-timesync-uid']
863 name = option.underscorify().to_upper()
864 val = get_option(option)
866 # Ensure provided GID argument is numeric, otherwise fall back to default assignment
867 conf.set(name, val >= 0 ? val : '-')
869 static_ugids += '@0@:@1@'.format(option, val)
873 conf.set10('ENABLE_ADM_GROUP', get_option('adm-group'))
874 conf.set10('ENABLE_WHEEL_GROUP', get_option('wheel-group'))
876 dev_kvm_mode = get_option('dev-kvm-mode')
877 conf.set_quoted('DEV_KVM_MODE', dev_kvm_mode) # FIXME: convert to 0o… notation
878 conf.set10('DEV_KVM_UACCESS', dev_kvm_mode != '0666')
879 group_render_mode = get_option('group-render-mode')
880 conf.set_quoted('GROUP_RENDER_MODE', group_render_mode)
881 conf.set10('GROUP_RENDER_UACCESS', group_render_mode != '0666')
883 kill_user_processes = get_option('default-kill-user-processes')
884 conf.set10('KILL_USER_PROCESSES', kill_user_processes)
886 dns_servers = get_option('dns-servers')
887 conf.set_quoted('DNS_SERVERS', dns_servers)
889 ntp_servers = get_option('ntp-servers')
890 conf.set_quoted('NTP_SERVERS', ntp_servers)
892 default_locale = get_option('default-locale')
893 if default_locale == ''
894 if not meson.is_cross_build()
895 choose_default_locale_sh = find_program('tools/choose-default-locale.sh')
896 default_locale = run_command(choose_default_locale_sh).stdout().strip()
898 default_locale = 'C.UTF-8'
901 conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
903 localegen_path = get_option('localegen-path')
904 if localegen_path != ''
905 conf.set_quoted('LOCALEGEN_PATH', localegen_path)
907 conf.set10('HAVE_LOCALEGEN', localegen_path != '')
909 conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
911 service_watchdog = get_option('service-watchdog')
912 watchdog_value = service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog
913 conf.set_quoted('SERVICE_WATCHDOG', watchdog_value)
915 conf.set_quoted('SUSHELL', get_option('debug-shell'))
916 conf.set_quoted('DEBUGTTY', get_option('debug-tty'))
918 enable_debug_hashmap = false
919 enable_debug_mmap_cache = false
920 enable_debug_siphash = false
921 foreach name : get_option('debug-extra')
923 enable_debug_hashmap = true
924 elif name == 'mmap-cache'
925 enable_debug_mmap_cache = true
926 elif name == 'siphash'
927 enable_debug_siphash = true
929 message('unknown debug option "@0@", ignoring'.format(name))
932 conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
933 conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
934 conf.set10('ENABLE_DEBUG_SIPHASH', enable_debug_siphash)
936 conf.set10('VALGRIND', get_option('valgrind'))
937 conf.set10('LOG_TRACE', get_option('log-trace'))
939 default_user_path = get_option('user-path')
940 if default_user_path != ''
941 conf.set_quoted('DEFAULT_USER_PATH', default_user_path)
945 #####################################################################
947 threads = dependency('threads')
948 librt = cc.find_library('rt')
949 libm = cc.find_library('m')
950 libdl = cc.find_library('dl')
951 libcrypt = cc.find_library('crypt')
953 crypt_header = conf.get('HAVE_CRYPT_H') == 1 ? '''#include <crypt.h>''' : '''#include <unistd.h>'''
955 ['crypt_ra', crypt_header],
956 ['crypt_preferred_method', crypt_header],
957 ['crypt_gensalt_ra', crypt_header]]
959 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE',
960 dependencies : libcrypt)
961 conf.set10('HAVE_' + ident[0].to_upper(), have)
964 libcap = dependency('libcap', required : false)
965 if not libcap.found()
966 # Compat with Ubuntu 14.04 which ships libcap w/o .pc file
967 libcap = cc.find_library('cap')
970 want_bpf_framework = get_option('bpf-framework')
971 bpf_framework_required = want_bpf_framework == 'true'
973 libbpf = dependency('libbpf', required : bpf_framework_required, version : '>= 0.2')
974 conf.set10('HAVE_LIBBPF', libbpf.found())
976 if want_bpf_framework == 'false'
977 conf.set10('BPF_FRAMEWORK', 0)
979 clang = find_program('clang', required : bpf_framework_required)
980 llvm_strip = find_program('llvm-strip', required : bpf_framework_required)
982 # Debian installs this in /usr/sbin/ which is not in $PATH.
983 # We check for 'bpftool' first, honouring $PATH, and in /usr/sbin/ for Debian.
984 bpftool = find_program('bpftool', '/usr/sbin/bpftool', required : bpf_framework_required)
986 bpf_arches = ['x86_64']
987 deps_found = libbpf.found() and clang.found() and llvm_strip.found() and bpftool.found()
988 # Can build BPF program from source code in restricted C
989 conf.set10('BPF_FRAMEWORK',
990 bpf_arches.contains(host_machine.cpu_family()) and deps_found)
993 libmount = dependency('mount',
994 version : fuzzer_build ? '>= 0' : '>= 2.30')
996 want_libfdisk = get_option('fdisk')
997 if want_libfdisk != 'false' and not skip_deps
998 libfdisk = dependency('fdisk',
1000 required : want_libfdisk == 'true')
1001 have = libfdisk.found()
1006 conf.set10('HAVE_LIBFDISK', have)
1008 want_pwquality = get_option('pwquality')
1009 if want_pwquality != 'false' and not skip_deps
1010 libpwquality = dependency('pwquality', required : want_pwquality == 'true')
1011 have = libpwquality.found()
1016 conf.set10('HAVE_PWQUALITY', have)
1018 want_seccomp = get_option('seccomp')
1019 if want_seccomp != 'false' and not skip_deps
1020 libseccomp = dependency('libseccomp',
1021 version : '>= 2.3.1',
1022 required : want_seccomp == 'true')
1023 have = libseccomp.found()
1028 conf.set10('HAVE_SECCOMP', have)
1030 want_selinux = get_option('selinux')
1031 if want_selinux != 'false' and not skip_deps
1032 libselinux = dependency('libselinux',
1033 version : '>= 2.1.9',
1034 required : want_selinux == 'true')
1035 have = libselinux.found()
1040 conf.set10('HAVE_SELINUX', have)
1042 want_apparmor = get_option('apparmor')
1043 if want_apparmor != 'false' and not skip_deps
1044 libapparmor = dependency('libapparmor',
1045 version : '>= 2.13',
1046 required : want_apparmor == 'true')
1047 have = libapparmor.found()
1052 conf.set10('HAVE_APPARMOR', have)
1054 have = get_option('smack') and get_option('smack-run-label') != ''
1055 conf.set10('HAVE_SMACK_RUN_LABEL', have)
1057 conf.set_quoted('SMACK_RUN_LABEL', get_option('smack-run-label'))
1060 want_polkit = get_option('polkit')
1061 install_polkit = false
1062 install_polkit_pkla = false
1063 if want_polkit != 'false' and not skip_deps
1064 install_polkit = true
1066 libpolkit = dependency('polkit-gobject-1',
1068 if libpolkit.found() and libpolkit.version().version_compare('< 0.106')
1069 message('Old polkit detected, will install pkla files')
1070 install_polkit_pkla = true
1073 conf.set10('ENABLE_POLKIT', install_polkit)
1075 want_acl = get_option('acl')
1076 if want_acl != 'false' and not skip_deps
1077 libacl = cc.find_library('acl', required : want_acl == 'true')
1078 have = libacl.found()
1083 conf.set10('HAVE_ACL', have)
1085 want_audit = get_option('audit')
1086 if want_audit != 'false' and not skip_deps
1087 libaudit = dependency('audit', required : want_audit == 'true')
1088 have = libaudit.found()
1093 conf.set10('HAVE_AUDIT', have)
1095 want_blkid = get_option('blkid')
1096 if want_blkid != 'false' and not skip_deps
1097 libblkid = dependency('blkid', required : want_blkid == 'true')
1098 have = libblkid.found()
1100 conf.set10('HAVE_BLKID_PROBE_SET_HINT',
1101 have and cc.has_function('blkid_probe_set_hint', dependencies : libblkid))
1106 conf.set10('HAVE_BLKID', have)
1108 want_kmod = get_option('kmod')
1109 if want_kmod != 'false' and not skip_deps
1110 libkmod = dependency('libkmod',
1112 required : want_kmod == 'true')
1113 have = libkmod.found()
1118 conf.set10('HAVE_KMOD', have)
1120 want_pam = get_option('pam')
1121 if want_pam != 'false' and not skip_deps
1122 libpam = cc.find_library('pam', required : want_pam == 'true')
1123 libpam_misc = cc.find_library('pam_misc', required : want_pam == 'true')
1124 have = libpam.found() and libpam_misc.found()
1130 conf.set10('HAVE_PAM', have)
1132 want_microhttpd = get_option('microhttpd')
1133 if want_microhttpd != 'false' and not skip_deps
1134 libmicrohttpd = dependency('libmicrohttpd',
1135 version : '>= 0.9.33',
1136 required : want_microhttpd == 'true')
1137 have = libmicrohttpd.found()
1142 conf.set10('HAVE_MICROHTTPD', have)
1144 want_libcryptsetup = get_option('libcryptsetup')
1145 want_libcryptsetup_plugins = get_option('libcryptsetup-plugins')
1147 if want_libcryptsetup_plugins == 'true' and want_libcryptsetup == 'false'
1148 error('libcryptsetup-plugins can not be requested without libcryptsetup')
1151 if want_libcryptsetup != 'false' and not skip_deps
1152 libcryptsetup = dependency('libcryptsetup',
1153 version : want_libcryptsetup_plugins == 'true' ? '>= 2.4.0' : '>= 2.0.1',
1154 required : want_libcryptsetup == 'true' or want_libcryptsetup_plugins == 'true')
1155 have = libcryptsetup.found()
1157 conf.set10('HAVE_CRYPT_SET_METADATA_SIZE',
1158 have and cc.has_function('crypt_set_metadata_size', dependencies : libcryptsetup))
1159 conf.set10('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY',
1160 have and cc.has_function('crypt_activate_by_signed_key', dependencies : libcryptsetup))
1161 conf.set10('HAVE_CRYPT_TOKEN_MAX',
1162 have and cc.has_function('crypt_token_max', dependencies : libcryptsetup))
1167 conf.set10('HAVE_LIBCRYPTSETUP', have)
1169 if want_libcryptsetup_plugins != 'false' and not skip_deps
1170 have = (cc.has_function('crypt_activate_by_token_pin', dependencies : libcryptsetup) and
1171 cc.has_function('crypt_token_external_path', dependencies : libcryptsetup))
1175 conf.set10('HAVE_LIBCRYPTSETUP_PLUGINS', have)
1177 want_libcurl = get_option('libcurl')
1178 if want_libcurl != 'false' and not skip_deps
1179 libcurl = dependency('libcurl',
1180 version : '>= 7.32.0',
1181 required : want_libcurl == 'true')
1182 have = libcurl.found()
1187 conf.set10('HAVE_LIBCURL', have)
1188 conf.set10('CURL_NO_OLDIES', conf.get('BUILD_MODE_DEVELOPER') == 1)
1190 want_libidn = get_option('libidn')
1191 want_libidn2 = get_option('libidn2')
1192 if want_libidn == 'true' and want_libidn2 == 'true'
1193 error('libidn and libidn2 cannot be requested simultaneously')
1196 if want_libidn2 != 'false' and want_libidn != 'true' and not skip_deps
1197 libidn = dependency('libidn2',
1198 required : want_libidn2 == 'true')
1199 have = libidn.found()
1204 conf.set10('HAVE_LIBIDN2', have)
1205 if not have and want_libidn != 'false' and not skip_deps
1206 # libidn is used for both libidn and libidn2 objects
1207 libidn = dependency('libidn',
1208 required : want_libidn == 'true')
1209 have = libidn.found()
1213 conf.set10('HAVE_LIBIDN', have)
1215 want_libiptc = get_option('libiptc')
1216 if want_libiptc != 'false' and not skip_deps
1217 libiptc = dependency('libiptc',
1218 required : want_libiptc == 'true')
1219 have = libiptc.found()
1224 conf.set10('HAVE_LIBIPTC', have)
1226 want_qrencode = get_option('qrencode')
1227 if want_qrencode != 'false' and not skip_deps
1228 libqrencode = dependency('libqrencode',
1230 required : want_qrencode == 'true')
1231 have = libqrencode.found()
1236 conf.set10('HAVE_QRENCODE', have)
1238 want_gcrypt = get_option('gcrypt')
1239 if want_gcrypt != 'false' and not skip_deps
1240 libgcrypt = cc.find_library('gcrypt', required : want_gcrypt == 'true')
1241 libgpg_error = cc.find_library('gpg-error', required : want_gcrypt == 'true')
1242 have = libgcrypt.found() and libgpg_error.found()
1247 # link to neither of the libs if one is not found
1251 conf.set10('HAVE_GCRYPT', have)
1253 want_gnutls = get_option('gnutls')
1254 if want_gnutls != 'false' and not skip_deps
1255 libgnutls = dependency('gnutls',
1256 version : '>= 3.1.4',
1257 required : want_gnutls == 'true')
1258 have = libgnutls.found()
1263 conf.set10('HAVE_GNUTLS', have)
1265 want_openssl = get_option('openssl')
1266 if want_openssl != 'false' and not skip_deps
1267 libopenssl = dependency('openssl',
1268 version : '>= 1.1.0',
1269 required : want_openssl == 'true')
1270 have = libopenssl.found()
1275 conf.set10('HAVE_OPENSSL', have)
1277 want_p11kit = get_option('p11kit')
1278 if want_p11kit != 'false' and not skip_deps
1279 libp11kit = dependency('p11-kit-1',
1280 version : '>= 0.23.3',
1281 required : want_p11kit == 'true')
1282 have = libp11kit.found()
1287 conf.set10('HAVE_P11KIT', have)
1289 want_libfido2 = get_option('libfido2')
1290 if want_libfido2 != 'false' and not skip_deps
1291 libfido2 = dependency('libfido2',
1292 required : want_libfido2 == 'true')
1293 have = libfido2.found()
1298 conf.set10('HAVE_LIBFIDO2', have)
1300 want_tpm2 = get_option('tpm2')
1301 if want_tpm2 != 'false' and not skip_deps
1302 tpm2 = dependency('tss2-esys tss2-rc tss2-mu',
1303 required : want_tpm2 == 'true')
1309 conf.set10('HAVE_TPM2', have)
1311 want_elfutils = get_option('elfutils')
1312 if want_elfutils != 'false' and not skip_deps
1313 libdw = dependency('libdw',
1314 required : want_elfutils == 'true')
1315 have = libdw.found()
1320 conf.set10('HAVE_ELFUTILS', have)
1322 want_zlib = get_option('zlib')
1323 if want_zlib != 'false' and not skip_deps
1324 libz = dependency('zlib',
1325 required : want_zlib == 'true')
1331 conf.set10('HAVE_ZLIB', have)
1333 want_bzip2 = get_option('bzip2')
1334 if want_bzip2 != 'false' and not skip_deps
1335 libbzip2 = cc.find_library('bz2',
1336 required : want_bzip2 == 'true')
1337 have = libbzip2.found()
1342 conf.set10('HAVE_BZIP2', have)
1344 want_xz = get_option('xz')
1345 if want_xz != 'false' and not skip_deps
1346 libxz = dependency('liblzma',
1347 required : want_xz == 'true')
1348 have_xz = libxz.found()
1353 conf.set10('HAVE_XZ', have_xz)
1355 want_lz4 = get_option('lz4')
1356 if want_lz4 != 'false' and not skip_deps
1357 liblz4 = dependency('liblz4',
1358 version : '>= 1.3.0',
1359 required : want_lz4 == 'true')
1360 have_lz4 = liblz4.found()
1365 conf.set10('HAVE_LZ4', have_lz4)
1367 want_zstd = get_option('zstd')
1368 if want_zstd != 'false' and not skip_deps
1369 libzstd = dependency('libzstd',
1370 required : want_zstd == 'true',
1371 version : '>= 1.4.0')
1372 have_zstd = libzstd.found()
1377 conf.set10('HAVE_ZSTD', have_zstd)
1379 conf.set10('HAVE_COMPRESSION', have_xz or have_lz4 or have_zstd)
1381 want_xkbcommon = get_option('xkbcommon')
1382 if want_xkbcommon != 'false' and not skip_deps
1383 libxkbcommon = dependency('xkbcommon',
1384 version : '>= 0.3.0',
1385 required : want_xkbcommon == 'true')
1386 have = libxkbcommon.found()
1391 conf.set10('HAVE_XKBCOMMON', have)
1393 want_pcre2 = get_option('pcre2')
1394 if want_pcre2 != 'false'
1395 libpcre2 = dependency('libpcre2-8',
1396 required : want_pcre2 == 'true')
1397 have = libpcre2.found()
1402 conf.set10('HAVE_PCRE2', have)
1404 want_glib = get_option('glib')
1405 if want_glib != 'false' and not skip_deps
1406 libglib = dependency('glib-2.0',
1407 version : '>= 2.22.0',
1408 required : want_glib == 'true')
1409 libgobject = dependency('gobject-2.0',
1410 version : '>= 2.22.0',
1411 required : want_glib == 'true')
1412 libgio = dependency('gio-2.0',
1413 required : want_glib == 'true')
1414 have = libglib.found() and libgobject.found() and libgio.found()
1421 conf.set10('HAVE_GLIB', have)
1423 want_dbus = get_option('dbus')
1424 if want_dbus != 'false' and not skip_deps
1425 libdbus = dependency('dbus-1',
1426 version : '>= 1.3.2',
1427 required : want_dbus == 'true')
1428 have = libdbus.found()
1433 conf.set10('HAVE_DBUS', have)
1435 default_dnssec = get_option('default-dnssec')
1437 default_dnssec = 'no'
1439 if default_dnssec != 'no' and conf.get('HAVE_GCRYPT') == 0
1440 message('default-dnssec cannot be set to yes or allow-downgrade when gcrypt is disabled. Setting default-dnssec to no.')
1441 default_dnssec = 'no'
1443 conf.set('DEFAULT_DNSSEC_MODE',
1444 'DNSSEC_' + default_dnssec.underscorify().to_upper())
1445 conf.set_quoted('DEFAULT_DNSSEC_MODE_STR', default_dnssec)
1447 dns_over_tls = get_option('dns-over-tls')
1448 if dns_over_tls != 'false'
1449 if dns_over_tls == 'openssl'
1452 have_gnutls = (conf.get('HAVE_GNUTLS') == 1 and libgnutls.version().version_compare('>= 3.6.0'))
1453 if dns_over_tls == 'gnutls' and not have_gnutls
1454 error('DNS-over-TLS support was requested with gnutls, but dependencies are not available')
1457 if dns_over_tls == 'gnutls' or have_gnutls
1458 have_openssl = false
1460 have_openssl = conf.get('HAVE_OPENSSL') == 1
1461 if dns_over_tls != 'auto' and not have_openssl
1462 str = dns_over_tls == 'openssl' ? ' with openssl' : ''
1463 error('DNS-over-TLS support was requested@0@, but dependencies are not available'.format(str))
1466 have = have_gnutls or have_openssl
1470 have_openssl = false
1472 conf.set10('ENABLE_DNS_OVER_TLS', have)
1473 conf.set10('DNS_OVER_TLS_USE_GNUTLS', have_gnutls)
1474 conf.set10('DNS_OVER_TLS_USE_OPENSSL', have_openssl)
1476 default_dns_over_tls = get_option('default-dns-over-tls')
1478 default_dns_over_tls = 'no'
1480 if default_dns_over_tls != 'no' and conf.get('ENABLE_DNS_OVER_TLS') == 0
1481 message('default-dns-over-tls cannot be enabled or set to opportunistic when DNS-over-TLS support is disabled. Setting default-dns-over-tls to no.')
1482 default_dns_over_tls = 'no'
1484 conf.set('DEFAULT_DNS_OVER_TLS_MODE',
1485 'DNS_OVER_TLS_' + default_dns_over_tls.underscorify().to_upper())
1486 conf.set_quoted('DEFAULT_DNS_OVER_TLS_MODE_STR', default_dns_over_tls)
1488 default_mdns = get_option('default-mdns')
1489 conf.set('DEFAULT_MDNS_MODE',
1490 'RESOLVE_SUPPORT_' + default_mdns.to_upper())
1491 conf.set_quoted('DEFAULT_MDNS_MODE_STR', default_mdns)
1493 default_llmnr = get_option('default-llmnr')
1494 conf.set('DEFAULT_LLMNR_MODE',
1495 'RESOLVE_SUPPORT_' + default_llmnr.to_upper())
1496 conf.set_quoted('DEFAULT_LLMNR_MODE_STR', default_llmnr)
1498 want_repart = get_option('repart')
1499 if want_repart != 'false'
1500 have = (conf.get('HAVE_OPENSSL') == 1 and
1501 conf.get('HAVE_LIBFDISK') == 1)
1502 if want_repart == 'true' and not have
1503 error('repart support was requested, but dependencies are not available')
1508 conf.set10('ENABLE_REPART', have)
1510 want_importd = get_option('importd')
1511 if want_importd != 'false'
1512 have = (conf.get('HAVE_LIBCURL') == 1 and
1513 conf.get('HAVE_ZLIB') == 1 and
1514 conf.get('HAVE_XZ') == 1 and
1515 conf.get('HAVE_GCRYPT') == 1)
1516 if want_importd == 'true' and not have
1517 error('importd support was requested, but dependencies are not available')
1522 conf.set10('ENABLE_IMPORTD', have)
1524 want_homed = get_option('homed')
1525 if want_homed != 'false'
1526 have = (conf.get('HAVE_OPENSSL') == 1 and
1527 conf.get('HAVE_LIBFDISK') == 1 and
1528 conf.get('HAVE_LIBCRYPTSETUP') == 1)
1529 if want_homed == 'true' and not have
1530 error('homed support was requested, but dependencies are not available')
1535 conf.set10('ENABLE_HOMED', have)
1537 have = have and conf.get('HAVE_PAM') == 1
1538 conf.set10('ENABLE_PAM_HOME', have)
1540 have = get_option('oomd')
1541 conf.set10('ENABLE_OOMD', have)
1543 want_remote = get_option('remote')
1544 if want_remote != 'false'
1545 have_deps = [conf.get('HAVE_MICROHTTPD') == 1,
1546 conf.get('HAVE_LIBCURL') == 1]
1547 # sd-j-remote requires µhttpd, and sd-j-upload requires libcurl, so
1548 # it's possible to build one without the other. Complain only if
1549 # support was explicitly requested. The auxiliary files like sysusers
1550 # config should be installed when any of the programs are built.
1551 if want_remote == 'true' and not (have_deps[0] and have_deps[1])
1552 error('remote support was requested, but dependencies are not available')
1554 have = have_deps[0] or have_deps[1]
1558 conf.set10('ENABLE_REMOTE', have)
1560 foreach term : ['analyze',
1574 'compat-mutable-uid-boundaries',
1600 have = get_option(term)
1601 name = 'ENABLE_' + term.underscorify().to_upper()
1602 conf.set10(name, have)
1605 enable_sysusers = conf.get('ENABLE_SYSUSERS') == 1
1607 foreach tuple : [['nss-mymachines', 'machined'],
1608 ['nss-resolve', 'resolve']]
1609 want = get_option(tuple[0])
1611 have = get_option(tuple[1])
1612 if want == 'true' and not have
1613 error('@0@ is requested but @1@ is disabled'.format(tuple[0], tuple[1]))
1618 name = 'ENABLE_' + tuple[0].underscorify().to_upper()
1619 conf.set10(name, have)
1623 foreach term : ['ENABLE_NSS_MYHOSTNAME',
1624 'ENABLE_NSS_MYMACHINES',
1625 'ENABLE_NSS_RESOLVE',
1626 'ENABLE_NSS_SYSTEMD']
1627 if conf.get(term) == 1
1631 conf.set10('ENABLE_NSS', enable_nss)
1633 conf.set10('ENABLE_TIMEDATECTL', get_option('timedated') or get_option('timesyncd'))
1635 conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
1637 #####################################################################
1639 if get_option('efi')
1640 efi_arch = host_machine.cpu_family()
1642 if efi_arch == 'x86'
1643 EFI_MACHINE_TYPE_NAME = 'ia32'
1644 gnu_efi_arch = 'ia32'
1645 elif efi_arch == 'x86_64'
1646 EFI_MACHINE_TYPE_NAME = 'x64'
1647 gnu_efi_arch = 'x86_64'
1648 elif efi_arch == 'arm'
1649 EFI_MACHINE_TYPE_NAME = 'arm'
1650 gnu_efi_arch = 'arm'
1651 elif efi_arch == 'aarch64'
1652 EFI_MACHINE_TYPE_NAME = 'aa64'
1653 gnu_efi_arch = 'aarch64'
1654 elif efi_arch == 'riscv64'
1655 EFI_MACHINE_TYPE_NAME = 'riscv64'
1656 gnu_efi_arch = 'riscv64'
1658 EFI_MACHINE_TYPE_NAME = ''
1663 conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
1667 conf.set10('ENABLE_EFI', have)
1669 subdir('src/fundamental')
1670 subdir('src/boot/efi')
1671 conf.set10('HAVE_GNU_EFI', have_gnu_efi)
1673 ############################################################
1675 build_bpf_skel_py = find_program('tools/build-bpf-skel.py')
1676 generate_gperfs = find_program('tools/generate-gperfs.py')
1677 make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py')
1678 make_directive_index_py = find_program('tools/make-directive-index.py')
1679 make_man_index_py = find_program('tools/make-man-index.py')
1680 meson_render_jinja2 = find_program('tools/meson-render-jinja2.py')
1681 update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
1682 update_hwdb_sh = find_program('tools/update-hwdb.sh')
1683 update_hwdb_autosuspend_sh = find_program('tools/update-hwdb-autosuspend.sh')
1684 update_syscall_tables_sh = find_program('tools/update-syscall-tables.sh')
1685 xml_helper_py = find_program('tools/xml_helper.py')
1687 #####################################################################
1689 config_h = configure_file(
1690 output : 'config.h',
1691 configuration : conf)
1693 add_project_arguments('-include', 'config.h', language : 'c')
1695 ############################################################
1697 # binaries that have --help and are intended for use by humans,
1698 # usually, but not always, installed in /bin.
1699 public_programs = []
1704 basic_includes = include_directories(
1710 libsystemd_includes = [basic_includes, include_directories(
1711 'src/libsystemd/sd-bus',
1712 'src/libsystemd/sd-device',
1713 'src/libsystemd/sd-event',
1714 'src/libsystemd/sd-hwdb',
1715 'src/libsystemd/sd-id128',
1716 'src/libsystemd/sd-journal',
1717 'src/libsystemd/sd-netlink',
1718 'src/libsystemd/sd-network',
1719 'src/libsystemd/sd-resolve')]
1721 includes = [libsystemd_includes, include_directories('src/shared')]
1726 subdir('src/libsystemd')
1727 subdir('src/shared')
1729 subdir('src/libudev')
1730 subdir('src/cryptsetup/cryptsetup-tokens')
1732 libsystemd = shared_library(
1735 version : libsystemd_version,
1736 include_directories : libsystemd_includes,
1737 link_args : ['-shared',
1738 '-Wl,--version-script=' + libsystemd_sym_path],
1739 link_with : [libbasic,
1741 link_whole : [libsystemd_static],
1742 dependencies : [threads,
1747 link_depends : libsystemd_sym,
1749 install_dir : rootlibdir)
1751 install_libsystemd_static = static_library(
1755 basic_gcrypt_sources,
1756 fundamental_sources,
1758 include_directories : libsystemd_includes,
1759 build_by_default : static_libsystemd != 'false',
1760 install : static_libsystemd != 'false',
1761 install_dir : rootlibdir,
1762 pic : static_libsystemd_pic,
1763 dependencies : [threads,
1774 c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC']))
1776 libudev = shared_library(
1779 version : libudev_version,
1780 include_directories : includes,
1781 link_args : ['-shared',
1782 '-Wl,--version-script=' + libudev_sym_path],
1783 link_with : [libsystemd_static, libshared_static],
1784 link_whole : libudev_basic,
1785 dependencies : [threads],
1786 link_depends : libudev_sym,
1788 install_dir : rootlibdir)
1790 install_libudev_static = static_library(
1793 fundamental_sources,
1798 include_directories : includes,
1799 build_by_default : static_libudev != 'false',
1800 install : static_libudev != 'false',
1801 install_dir : rootlibdir,
1802 link_depends : libudev_sym,
1803 dependencies : libshared_deps + [libmount],
1804 c_args : static_libudev_pic ? [] : ['-fno-PIC'],
1805 pic : static_libudev_pic)
1807 if conf.get('HAVE_LIBCRYPTSETUP_PLUGINS') == 1
1808 if conf.get('HAVE_TPM2') == 1
1809 cryptsetup_token_systemd_tpm2 = shared_library(
1810 'cryptsetup-token-systemd-tpm2',
1811 link_args : ['-shared',
1812 '-Wl,--version-script=' + cryptsetup_token_sym_path],
1813 dependencies : libshared_deps + [libcryptsetup, versiondep],
1814 link_with : [libshared],
1815 link_whole : [cryptsetup_token_systemd_tpm2_static],
1816 link_depends : cryptsetup_token_sym,
1817 install_rpath : rootlibexecdir,
1819 install_dir : libcryptsetup_plugins_dir)
1822 if conf.get('HAVE_LIBFIDO2') == 1
1823 cryptsetup_token_systemd_fido2 = shared_library(
1824 'cryptsetup-token-systemd-fido2',
1825 link_args : ['-shared',
1826 '-Wl,--version-script=' + cryptsetup_token_sym_path],
1827 dependencies : libshared_deps + [libcryptsetup, versiondep],
1828 link_with : [libshared],
1829 link_whole : [cryptsetup_token_systemd_fido2_static],
1830 link_depends : cryptsetup_token_sym,
1831 install_rpath : rootlibexecdir,
1833 install_dir : libcryptsetup_plugins_dir)
1836 if conf.get('HAVE_P11KIT') == 1
1837 cryptsetup_token_systemd_pkcs11 = shared_library(
1838 'cryptsetup-token-systemd-pkcs11',
1839 link_args : ['-shared',
1840 '-Wl,--version-script=' + cryptsetup_token_sym_path],
1841 dependencies : libshared_deps + [libcryptsetup, versiondep],
1842 link_with : [libshared],
1843 link_whole : [cryptsetup_token_systemd_pkcs11_static],
1844 link_depends : cryptsetup_token_sym,
1845 install_rpath : rootlibexecdir,
1847 install_dir : libcryptsetup_plugins_dir)
1851 ############################################################
1853 # systemd-analyze requires 'libcore'
1855 # systemd-journal-remote requires 'libjournal_core'
1856 subdir('src/journal')
1857 # systemd-networkd requires 'libsystemd_network'
1858 subdir('src/libsystemd-network')
1860 subdir('src/analyze')
1861 subdir('src/busctl')
1862 subdir('src/coredump')
1863 subdir('src/cryptenroll')
1864 subdir('src/cryptsetup')
1866 subdir('src/hostname')
1867 subdir('src/import')
1868 subdir('src/journal-remote')
1869 subdir('src/kernel-install')
1870 subdir('src/locale')
1872 subdir('src/machine')
1873 subdir('src/network')
1874 subdir('src/nspawn')
1876 subdir('src/partition')
1877 subdir('src/portable')
1878 subdir('src/pstore')
1879 subdir('src/resolve')
1881 subdir('src/shutdown')
1882 subdir('src/sysext')
1883 subdir('src/systemctl')
1884 subdir('src/timedate')
1885 subdir('src/timesync')
1886 subdir('src/tmpfiles')
1887 subdir('src/userdb')
1888 subdir('src/vconsole')
1889 subdir('src/xdg-autostart-generator')
1891 subdir('src/systemd')
1898 ############################################################
1900 # only static linking apart from libdl, to make sure that the
1901 # module is linked to all libraries that it uses.
1902 test_dlopen = executable(
1906 include_directories : includes,
1907 link_with : [libbasic],
1908 dependencies : [libdl],
1909 build_by_default : want_tests != 'false')
1911 foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
1912 ['systemd', 'ENABLE_NSS_SYSTEMD', ['nss-systemd.h', 'userdb-glue.c', 'userdb-glue.h']],
1913 ['mymachines', 'ENABLE_NSS_MYMACHINES'],
1914 ['resolve', 'ENABLE_NSS_RESOLVE', [], resolve_includes]]
1916 condition = tuple[1] == '' or conf.get(tuple[1]) == 1
1920 sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
1921 version_script_arg = project_source_root / sym
1923 sources = ['src/nss-@0@/nss-@0@.c'.format(module)]
1924 if tuple.length() > 2
1925 foreach s : tuple[2]
1926 sources += ['src/nss-@0@/@1@'.format(module, s)]
1930 incs = tuple.length() > 3 ? tuple[3] : includes
1932 nss = shared_library(
1937 include_directories : incs,
1938 # Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
1939 link_args : ['-Wl,-z,nodelete',
1941 '-Wl,--version-script=' + version_script_arg],
1942 link_with : [libsystemd_static,
1945 dependencies : [threads,
1949 install_dir : rootlibdir)
1951 # We cannot use shared_module because it does not support version suffix.
1952 # Unfortunately shared_library insists on creating the symlink…
1953 meson.add_install_script('sh', '-c',
1954 'rm $DESTDIR@0@/libnss_@1@.so'
1955 .format(rootlibdir, module))
1957 if want_tests != 'false'
1958 test('dlopen-nss_' + module,
1960 # path to dlopen must include a slash
1961 args : nss.full_path())
1966 ############################################################
1971 include_directories : includes,
1972 link_with : [libcore,
1974 dependencies : [versiondep,
1981 install_rpath : rootlibexecdir,
1983 install_dir : rootlibexecdir)
1985 meson.add_install_script(meson_make_symlink,
1986 rootlibexecdir / 'systemd',
1987 rootsbindir / 'init')
1989 public_programs += executable(
1991 systemd_analyze_sources,
1992 include_directories : core_includes,
1993 link_with : [libcore,
1995 dependencies : [versiondep,
2002 install_rpath : rootlibexecdir,
2003 install : conf.get('ENABLE_ANALYZE'))
2007 systemd_journald_sources,
2008 include_directories : includes,
2009 link_with : [libjournal_core,
2011 dependencies : [threads,
2016 install_rpath : rootlibexecdir,
2018 install_dir : rootlibexecdir)
2020 public_programs += executable(
2022 systemd_cat_sources,
2023 include_directories : includes,
2024 link_with : [libjournal_core,
2026 dependencies : [threads],
2027 install_rpath : rootlibexecdir,
2030 public_programs += executable(
2033 include_directories : includes,
2034 link_with : [libshared],
2035 dependencies : [threads,
2041 install_rpath : rootlibexecdir,
2043 install_dir : rootbindir)
2046 'systemd-getty-generator',
2047 'src/getty-generator/getty-generator.c',
2048 include_directories : includes,
2049 link_with : [libshared],
2050 install_rpath : rootlibexecdir,
2052 install_dir : systemgeneratordir)
2055 'systemd-debug-generator',
2056 'src/debug-generator/debug-generator.c',
2057 include_directories : includes,
2058 link_with : [libshared],
2059 install_rpath : rootlibexecdir,
2061 install_dir : systemgeneratordir)
2064 'systemd-run-generator',
2065 'src/run-generator/run-generator.c',
2066 include_directories : includes,
2067 link_with : [libshared],
2068 install_rpath : rootlibexecdir,
2070 install_dir : systemgeneratordir)
2073 'systemd-fstab-generator',
2074 'src/fstab-generator/fstab-generator.c',
2075 include_directories : includes,
2076 link_with : [libshared],
2077 install_rpath : rootlibexecdir,
2079 install_dir : systemgeneratordir)
2081 if conf.get('ENABLE_ENVIRONMENT_D') == 1
2083 '30-systemd-environment-d-generator',
2084 'src/environment-d-generator/environment-d-generator.c',
2085 include_directories : includes,
2086 link_with : [libshared],
2087 install_rpath : rootlibexecdir,
2089 install_dir : userenvgeneratordir)
2091 meson.add_install_script(meson_make_symlink,
2092 sysconfdir / 'environment',
2093 environmentdir / '99-environment.conf')
2096 if conf.get('ENABLE_HIBERNATE') == 1
2098 'systemd-hibernate-resume-generator',
2099 'src/hibernate-resume/hibernate-resume-generator.c',
2100 include_directories : includes,
2101 link_with : [libshared],
2102 install_rpath : rootlibexecdir,
2104 install_dir : systemgeneratordir)
2107 'systemd-hibernate-resume',
2108 'src/hibernate-resume/hibernate-resume.c',
2109 include_directories : includes,
2110 link_with : [libshared],
2111 install_rpath : rootlibexecdir,
2113 install_dir : rootlibexecdir)
2116 if conf.get('HAVE_BLKID') == 1
2118 'systemd-gpt-auto-generator',
2119 'src/gpt-auto-generator/gpt-auto-generator.c',
2120 include_directories : includes,
2121 link_with : [libshared],
2122 dependencies : libblkid,
2123 install_rpath : rootlibexecdir,
2125 install_dir : systemgeneratordir)
2127 public_programs += executable(
2129 'src/dissect/dissect.c',
2130 include_directories : includes,
2131 link_with : [libshared],
2132 install_rpath : rootlibexecdir,
2136 if conf.get('ENABLE_RESOLVE') == 1
2139 systemd_resolved_sources,
2140 include_directories : resolve_includes,
2141 link_with : [libshared,
2143 libsystemd_resolve_core],
2144 dependencies : systemd_resolved_dependencies,
2145 install_rpath : rootlibexecdir,
2147 install_dir : rootlibexecdir)
2149 public_programs += executable(
2152 include_directories : includes,
2153 link_with : [libshared,
2155 libsystemd_resolve_core],
2156 dependencies : [threads,
2160 install_rpath : rootlibexecdir,
2163 meson.add_install_script(meson_make_symlink,
2164 bindir / 'resolvectl',
2165 rootsbindir / 'resolvconf')
2167 meson.add_install_script(meson_make_symlink,
2168 bindir / 'resolvectl',
2169 bindir / 'systemd-resolve')
2172 if conf.get('ENABLE_LOGIND') == 1
2175 systemd_logind_sources,
2176 include_directories : includes,
2177 link_with : [liblogind_core,
2179 dependencies : [threads,
2181 install_rpath : rootlibexecdir,
2183 install_dir : rootlibexecdir)
2185 public_programs += executable(
2188 include_directories : includes,
2189 link_with : [libshared],
2190 dependencies : [threads,
2194 install_rpath : rootlibexecdir,
2196 install_dir : rootbindir)
2198 public_programs += executable(
2200 'src/login/inhibit.c',
2201 include_directories : includes,
2202 link_with : [libshared],
2203 install_rpath : rootlibexecdir,
2205 install_dir : rootbindir)
2207 if conf.get('HAVE_PAM') == 1
2208 version_script_arg = project_source_root / pam_systemd_sym
2209 pam_systemd = shared_library(
2213 include_directories : includes,
2214 link_args : ['-shared',
2215 '-Wl,--version-script=' + version_script_arg],
2216 link_with : [libsystemd_static,
2218 dependencies : [threads,
2221 link_depends : pam_systemd_sym,
2223 install_dir : pamlibdir)
2225 if want_tests != 'false'
2226 test('dlopen-pam_systemd',
2228 # path to dlopen must include a slash
2229 args : pam_systemd.full_path())
2234 'systemd-user-runtime-dir',
2235 user_runtime_dir_sources,
2236 include_directories : includes,
2237 link_with : [libshared],
2238 install_rpath : rootlibexecdir,
2240 install_dir : rootlibexecdir)
2243 if conf.get('HAVE_PAM') == 1
2245 'systemd-user-sessions',
2246 'src/user-sessions/user-sessions.c',
2247 include_directories : includes,
2248 link_with : [libshared],
2249 install_rpath : rootlibexecdir,
2251 install_dir : rootlibexecdir)
2254 if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
2255 public_programs += executable(
2257 'src/boot/bootctl.c',
2258 include_directories : includes,
2259 link_with : [libshared],
2260 dependencies : [libblkid],
2261 install_rpath : rootlibexecdir,
2264 public_programs += executable(
2265 'systemd-bless-boot',
2266 'src/boot/bless-boot.c',
2267 include_directories : includes,
2268 link_with : [libshared],
2269 dependencies : [libblkid],
2270 install_rpath : rootlibexecdir,
2272 install_dir : rootlibexecdir)
2275 'systemd-bless-boot-generator',
2276 'src/boot/bless-boot-generator.c',
2277 include_directories : includes,
2278 link_with : [libshared],
2279 install_rpath : rootlibexecdir,
2281 install_dir : systemgeneratordir)
2285 'systemd-boot-check-no-failures',
2286 'src/boot/boot-check-no-failures.c',
2287 include_directories : includes,
2288 link_with : [libshared],
2289 dependencies : [libblkid],
2290 install_rpath : rootlibexecdir,
2292 install_dir : rootlibexecdir)
2294 public_programs += executable(
2295 'systemd-socket-activate',
2296 'src/activate/activate.c',
2297 include_directories : includes,
2298 link_with : [libshared],
2299 dependencies : [threads],
2300 install_rpath : rootlibexecdir,
2303 public_programs += executable(
2306 include_directories : includes,
2307 link_with : systemctl_link_with,
2308 dependencies : [threads,
2314 install_rpath : rootlibexecdir,
2316 install_dir : rootbindir)
2318 if conf.get('ENABLE_PORTABLED') == 1
2320 'systemd-portabled',
2321 systemd_portabled_sources,
2322 include_directories : includes,
2323 link_with : [libshared],
2324 dependencies : [threads, libselinux],
2325 install_rpath : rootlibexecdir,
2327 install_dir : rootlibexecdir)
2329 public_programs += executable(
2331 'src/portable/portablectl.c',
2332 include_directories : includes,
2333 link_with : [libshared],
2334 dependencies : [threads],
2335 install_rpath : rootlibexecdir,
2337 install_dir : rootbindir)
2340 if conf.get('ENABLE_SYSEXT') == 1
2341 public_programs += executable(
2343 systemd_sysext_sources,
2344 include_directories : includes,
2345 link_with : [libshared],
2346 install_rpath : rootlibexecdir,
2348 install_dir : rootbindir)
2351 if conf.get('ENABLE_USERDB') == 1
2354 systemd_userwork_sources,
2355 include_directories : includes,
2356 link_with : [libshared],
2357 dependencies : [threads],
2358 install_rpath : rootlibexecdir,
2360 install_dir : rootlibexecdir)
2364 systemd_userdbd_sources,
2365 include_directories : includes,
2366 link_with : [libshared],
2367 dependencies : [threads],
2368 install_rpath : rootlibexecdir,
2370 install_dir : rootlibexecdir)
2372 public_programs += executable(
2375 include_directories : includes,
2376 link_with : [libshared],
2377 dependencies : [threads],
2378 install_rpath : rootlibexecdir,
2380 install_dir : rootbindir)
2383 if conf.get('ENABLE_HOMED') == 1
2386 systemd_homework_sources,
2387 include_directories : includes,
2388 link_with : [libshared],
2389 dependencies : [threads,
2395 install_rpath : rootlibexecdir,
2397 install_dir : rootlibexecdir)
2401 systemd_homed_sources,
2402 include_directories : home_includes,
2403 link_with : [libshared],
2404 dependencies : [threads,
2407 install_rpath : rootlibexecdir,
2409 install_dir : rootlibexecdir)
2411 public_programs += executable(
2414 include_directories : includes,
2415 link_with : [libshared],
2416 dependencies : [threads,
2421 install_rpath : rootlibexecdir,
2423 install_dir : rootbindir)
2425 if conf.get('HAVE_PAM') == 1
2426 version_script_arg = project_source_root / pam_systemd_home_sym
2427 pam_systemd = shared_library(
2431 include_directories : includes,
2432 link_args : ['-shared',
2433 '-Wl,--version-script=' + version_script_arg],
2434 link_with : [libsystemd_static,
2436 dependencies : [threads,
2440 link_depends : pam_systemd_home_sym,
2442 install_dir : pamlibdir)
2446 foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] +
2447 (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : []))
2448 meson.add_install_script(meson_make_symlink,
2449 rootbindir / 'systemctl',
2450 rootsbindir / alias)
2453 meson.add_install_script(meson_make_symlink,
2454 rootbindir / 'udevadm',
2455 rootlibexecdir / 'systemd-udevd')
2457 if conf.get('ENABLE_BACKLIGHT') == 1
2459 'systemd-backlight',
2460 'src/backlight/backlight.c',
2461 include_directories : includes,
2462 link_with : [libshared],
2463 install_rpath : rootlibexecdir,
2465 install_dir : rootlibexecdir)
2468 if conf.get('ENABLE_RFKILL') == 1
2471 'src/rfkill/rfkill.c',
2472 include_directories : includes,
2473 link_with : [libshared],
2474 install_rpath : rootlibexecdir,
2476 install_dir : rootlibexecdir)
2480 'systemd-system-update-generator',
2481 'src/system-update-generator/system-update-generator.c',
2482 include_directories : includes,
2483 link_with : [libshared],
2484 install_rpath : rootlibexecdir,
2486 install_dir : systemgeneratordir)
2488 if conf.get('HAVE_LIBCRYPTSETUP') == 1
2490 'systemd-cryptsetup',
2491 systemd_cryptsetup_sources,
2492 include_directories : includes,
2493 link_with : [libshared],
2494 dependencies : [libcryptsetup,
2496 install_rpath : rootlibexecdir,
2498 install_dir : rootlibexecdir)
2501 'systemd-cryptsetup-generator',
2502 'src/cryptsetup/cryptsetup-generator.c',
2503 include_directories : includes,
2504 link_with : [libshared],
2505 install_rpath : rootlibexecdir,
2507 install_dir : systemgeneratordir)
2510 'systemd-veritysetup',
2511 'src/veritysetup/veritysetup.c',
2512 include_directories : includes,
2513 link_with : [libshared],
2514 dependencies : [libcryptsetup],
2515 install_rpath : rootlibexecdir,
2517 install_dir : rootlibexecdir)
2520 'systemd-veritysetup-generator',
2521 'src/veritysetup/veritysetup-generator.c',
2522 include_directories : includes,
2523 link_with : [libshared],
2524 install_rpath : rootlibexecdir,
2526 install_dir : systemgeneratordir)
2529 'systemd-cryptenroll',
2530 systemd_cryptenroll_sources,
2531 include_directories : includes,
2532 link_with : [libshared],
2533 dependencies : [libcryptsetup,
2537 install_rpath : rootlibexecdir,
2541 'systemd-integritysetup',
2542 ['src/integritysetup/integritysetup.c', 'src/integritysetup/integrity-util.c'],
2543 include_directories : includes,
2544 link_with : [libshared],
2545 dependencies : [libcryptsetup],
2546 install_rpath : rootlibexecdir,
2548 install_dir : rootlibexecdir)
2551 'systemd-integritysetup-generator',
2552 ['src/integritysetup/integritysetup-generator.c', 'src/integritysetup/integrity-util.c'],
2553 include_directories : includes,
2554 link_with : [libshared],
2555 install_rpath : rootlibexecdir,
2557 install_dir : systemgeneratordir)
2560 if conf.get('HAVE_SYSV_COMPAT') == 1
2562 'systemd-sysv-generator',
2563 'src/sysv-generator/sysv-generator.c',
2564 include_directories : includes,
2565 link_with : [libshared],
2566 install_rpath : rootlibexecdir,
2568 install_dir : systemgeneratordir)
2571 'systemd-rc-local-generator',
2572 'src/rc-local-generator/rc-local-generator.c',
2573 include_directories : includes,
2574 link_with : [libshared],
2575 install_rpath : rootlibexecdir,
2577 install_dir : systemgeneratordir)
2580 if conf.get('ENABLE_XDG_AUTOSTART') == 1
2582 'systemd-xdg-autostart-generator',
2583 systemd_xdg_autostart_generator_sources,
2584 include_directories : includes,
2585 link_with : [libshared],
2586 install_rpath : rootlibexecdir,
2588 install_dir : usergeneratordir)
2591 'systemd-xdg-autostart-condition',
2592 'src/xdg-autostart-generator/xdg-autostart-condition.c',
2593 include_directories : includes,
2594 link_with : [libshared],
2595 install_rpath : rootlibexecdir,
2597 install_dir : rootlibexecdir)
2600 if conf.get('ENABLE_HOSTNAMED') == 1
2602 'systemd-hostnamed',
2603 'src/hostname/hostnamed.c',
2604 include_directories : includes,
2605 link_with : [libshared],
2606 install_rpath : rootlibexecdir,
2608 install_dir : rootlibexecdir)
2610 public_programs += executable(
2612 'src/hostname/hostnamectl.c',
2613 include_directories : includes,
2614 link_with : [libshared],
2615 install_rpath : rootlibexecdir,
2619 if conf.get('ENABLE_LOCALED') == 1
2620 if conf.get('HAVE_XKBCOMMON') == 1
2621 # logind will load libxkbcommon.so dynamically on its own, but we still
2622 # need to specify where the headers are
2623 deps = [libdl, libxkbcommon.partial_dependency(compile_args: true)]
2630 systemd_localed_sources,
2631 include_directories : includes,
2632 link_with : [libshared],
2633 dependencies : deps,
2634 install_rpath : rootlibexecdir,
2636 install_dir : rootlibexecdir)
2638 public_programs += executable(
2641 include_directories : includes,
2642 link_with : [libshared],
2643 install_rpath : rootlibexecdir,
2647 if conf.get('ENABLE_TIMEDATED') == 1
2649 'systemd-timedated',
2650 'src/timedate/timedated.c',
2651 include_directories : includes,
2652 link_with : [libshared],
2653 install_rpath : rootlibexecdir,
2655 install_dir : rootlibexecdir)
2658 if conf.get('ENABLE_TIMEDATECTL') == 1
2659 public_programs += executable(
2661 'src/timedate/timedatectl.c',
2662 include_directories : includes,
2663 install_rpath : rootlibexecdir,
2664 link_with : [libshared],
2665 dependencies : [libm],
2669 if conf.get('ENABLE_TIMESYNCD') == 1
2671 'systemd-timesyncd',
2672 systemd_timesyncd_sources,
2673 include_directories : includes,
2674 link_with : [libtimesyncd_core],
2675 dependencies : [threads,
2677 install_rpath : rootlibexecdir,
2679 install_dir : rootlibexecdir)
2682 'systemd-time-wait-sync',
2683 'src/timesync/wait-sync.c',
2684 include_directories : includes,
2685 link_with : [libtimesyncd_core],
2686 install_rpath : rootlibexecdir,
2688 install_dir : rootlibexecdir)
2691 if conf.get('ENABLE_MACHINED') == 1
2694 systemd_machined_sources,
2695 include_directories : includes,
2696 link_with : [libmachine_core,
2698 install_rpath : rootlibexecdir,
2700 install_dir : rootlibexecdir)
2702 public_programs += executable(
2704 'src/machine/machinectl.c',
2705 include_directories : includes,
2706 link_with : [libshared],
2707 dependencies : [threads,
2711 install_rpath : rootlibexecdir,
2713 install_dir : rootbindir)
2716 if conf.get('ENABLE_IMPORTD') == 1
2719 systemd_importd_sources,
2720 include_directories : includes,
2721 link_with : [libshared],
2722 dependencies : [threads],
2723 install_rpath : rootlibexecdir,
2725 install_dir : rootlibexecdir)
2727 systemd_pull = executable(
2729 systemd_pull_sources,
2730 include_directories : includes,
2731 link_with : [libshared],
2732 dependencies : [versiondep,
2738 install_rpath : rootlibexecdir,
2740 install_dir : rootlibexecdir)
2742 systemd_import = executable(
2744 systemd_import_sources,
2745 include_directories : includes,
2746 link_with : [libshared],
2747 dependencies : [libcurl,
2751 install_rpath : rootlibexecdir,
2753 install_dir : rootlibexecdir)
2755 systemd_import_fs = executable(
2756 'systemd-import-fs',
2757 systemd_import_fs_sources,
2758 include_directories : includes,
2759 link_with : [libshared],
2760 install_rpath : rootlibexecdir,
2762 install_dir : rootlibexecdir)
2764 systemd_export = executable(
2766 systemd_export_sources,
2767 include_directories : includes,
2768 link_with : [libshared],
2769 dependencies : [libcurl,
2773 install_rpath : rootlibexecdir,
2775 install_dir : rootlibexecdir)
2777 public_programs += [systemd_pull, systemd_import, systemd_import_fs, systemd_export]
2780 if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
2781 public_programs += executable(
2782 'systemd-journal-upload',
2783 systemd_journal_upload_sources,
2784 include_directories : includes,
2785 link_with : [libshared],
2786 dependencies : [versiondep,
2793 install_rpath : rootlibexecdir,
2795 install_dir : rootlibexecdir)
2798 if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
2799 public_programs += executable(
2800 'systemd-journal-remote',
2801 systemd_journal_remote_sources,
2802 include_directories : includes,
2803 link_with : [libshared,
2804 libsystemd_journal_remote],
2805 dependencies : [threads,
2811 install_rpath : rootlibexecdir,
2813 install_dir : rootlibexecdir)
2815 public_programs += executable(
2816 'systemd-journal-gatewayd',
2817 systemd_journal_gatewayd_sources,
2818 include_directories : includes,
2819 link_with : [libshared],
2820 dependencies : [threads,
2826 install_rpath : rootlibexecdir,
2828 install_dir : rootlibexecdir)
2831 if conf.get('ENABLE_COREDUMP') == 1
2834 systemd_coredump_sources,
2835 include_directories : includes,
2836 link_with : [libshared],
2837 dependencies : [threads,
2843 install_rpath : rootlibexecdir,
2845 install_dir : rootlibexecdir)
2847 public_programs += executable(
2849 coredumpctl_sources,
2850 include_directories : includes,
2851 link_with : [libshared],
2852 dependencies : [threads,
2856 install_rpath : rootlibexecdir,
2860 if conf.get('ENABLE_PSTORE') == 1
2863 systemd_pstore_sources,
2864 include_directories : includes,
2865 link_with : [libshared],
2866 dependencies : [threads,
2872 install_rpath : rootlibexecdir,
2874 install_dir : rootlibexecdir)
2877 if conf.get('ENABLE_OOMD') == 1
2878 executable('systemd-oomd',
2879 systemd_oomd_sources,
2880 include_directories : includes,
2881 link_with : [libshared],
2883 install_rpath : rootlibexecdir,
2885 install_dir : rootlibexecdir)
2887 public_programs += executable(
2890 include_directories : includes,
2891 link_with : [libshared],
2893 install_rpath : rootlibexecdir,
2895 install_dir : rootbindir)
2898 if conf.get('ENABLE_BINFMT') == 1
2899 public_programs += executable(
2901 'src/binfmt/binfmt.c',
2902 include_directories : includes,
2903 link_with : [libshared],
2904 install_rpath : rootlibexecdir,
2906 install_dir : rootlibexecdir)
2908 meson.add_install_script('sh', '-c',
2909 mkdir_p.format(binfmtdir))
2910 if install_sysconfdir
2911 meson.add_install_script('sh', '-c',
2912 mkdir_p.format(sysconfdir / 'binfmt.d'))
2916 if conf.get('ENABLE_REPART') == 1
2919 systemd_repart_sources,
2920 include_directories : includes,
2921 link_with : [libshared],
2922 dependencies : [threads,
2926 install_rpath : rootlibexecdir,
2928 install_dir : rootbindir)
2929 public_programs += exe
2931 if want_tests != 'false'
2934 args : exe.full_path())
2938 if conf.get('ENABLE_VCONSOLE') == 1
2940 'systemd-vconsole-setup',
2941 'src/vconsole/vconsole-setup.c',
2942 include_directories : includes,
2943 link_with : [libshared],
2944 install_rpath : rootlibexecdir,
2946 install_dir : rootlibexecdir)
2949 if conf.get('ENABLE_RANDOMSEED') == 1
2951 'systemd-random-seed',
2952 'src/random-seed/random-seed.c',
2953 include_directories : includes,
2954 link_with : [libshared],
2955 install_rpath : rootlibexecdir,
2957 install_dir : rootlibexecdir)
2960 if conf.get('ENABLE_FIRSTBOOT') == 1
2962 'systemd-firstboot',
2963 'src/firstboot/firstboot.c',
2964 include_directories : includes,
2965 link_with : [libshared],
2966 dependencies : [libcrypt],
2967 install_rpath : rootlibexecdir,
2969 install_dir : rootbindir)
2973 'systemd-remount-fs',
2974 'src/remount-fs/remount-fs.c',
2975 include_directories : includes,
2976 link_with : [libshared],
2977 install_rpath : rootlibexecdir,
2979 install_dir : rootlibexecdir)
2982 'systemd-machine-id-setup',
2983 'src/machine-id-setup/machine-id-setup-main.c',
2984 include_directories : includes,
2985 link_with : [libshared],
2986 install_rpath : rootlibexecdir,
2988 install_dir : rootbindir)
2993 include_directories : includes,
2994 link_with : [libshared],
2995 install_rpath : rootlibexecdir,
2997 install_dir : rootlibexecdir)
2999 executable('systemd-growfs',
3000 'src/partition/growfs.c',
3001 include_directories : includes,
3002 link_with : [libshared],
3003 install_rpath : rootlibexecdir,
3005 install_dir : rootlibexecdir)
3009 'src/partition/makefs.c',
3010 include_directories : includes,
3011 link_with : [libshared],
3012 install_rpath : rootlibexecdir,
3014 install_dir : rootlibexecdir)
3018 'src/sleep/sleep.c',
3019 include_directories : includes,
3020 link_with : [libshared],
3021 install_rpath : rootlibexecdir,
3023 install_dir : rootlibexecdir)
3025 if install_sysconfdir_samples
3026 install_data('src/sleep/sleep.conf',
3027 install_dir : pkgsysconfdir)
3030 public_programs += executable(
3032 'src/sysctl/sysctl.c',
3033 include_directories : includes,
3034 link_with : [libshared],
3035 install_rpath : rootlibexecdir,
3037 install_dir : rootlibexecdir)
3041 'src/ac-power/ac-power.c',
3042 include_directories : includes,
3043 link_with : [libshared],
3044 install_rpath : rootlibexecdir,
3046 install_dir : rootlibexecdir)
3048 public_programs += executable(
3049 'systemd-detect-virt',
3050 'src/detect-virt/detect-virt.c',
3051 include_directories : includes,
3052 link_with : [libshared],
3053 install_rpath : rootlibexecdir,
3056 public_programs += executable(
3058 'src/delta/delta.c',
3059 include_directories : includes,
3060 link_with : [libshared],
3061 install_rpath : rootlibexecdir,
3064 public_programs += executable(
3066 'src/escape/escape.c',
3067 include_directories : includes,
3068 link_with : [libshared],
3069 install_rpath : rootlibexecdir,
3071 install_dir : rootbindir)
3073 public_programs += executable(
3075 'src/notify/notify.c',
3076 include_directories : includes,
3077 link_with : [libshared],
3078 install_rpath : rootlibexecdir,
3080 install_dir : rootbindir)
3082 public_programs += executable(
3084 'src/creds/creds.c',
3085 include_directories : includes,
3086 link_with : [libshared],
3087 dependencies : [threads,
3089 install_rpath : rootlibexecdir,
3091 install_dir : rootbindir)
3094 'systemd-volatile-root',
3095 'src/volatile-root/volatile-root.c',
3096 include_directories : includes,
3097 link_with : [libshared],
3098 install_rpath : rootlibexecdir,
3099 install : conf.get('ENABLE_INITRD') == 1,
3100 install_dir : rootlibexecdir)
3103 'systemd-cgroups-agent',
3104 'src/cgroups-agent/cgroups-agent.c',
3105 include_directories : includes,
3106 link_with : [libshared],
3107 install_rpath : rootlibexecdir,
3109 install_dir : rootlibexecdir)
3111 public_programs += executable(
3113 'src/id128/id128.c',
3114 include_directories : includes,
3115 link_with : [libshared],
3116 install_rpath : rootlibexecdir,
3119 public_programs += executable(
3122 include_directories : includes,
3123 link_with : [libshared],
3124 install_rpath : rootlibexecdir,
3127 public_programs += executable(
3128 'systemd-ask-password',
3129 'src/ask-password/ask-password.c',
3130 include_directories : includes,
3131 link_with : [libshared],
3132 install_rpath : rootlibexecdir,
3134 install_dir : rootbindir)
3137 'systemd-reply-password',
3138 'src/reply-password/reply-password.c',
3139 include_directories : includes,
3140 link_with : [libshared],
3141 install_rpath : rootlibexecdir,
3143 install_dir : rootlibexecdir)
3145 public_programs += executable(
3146 'systemd-tty-ask-password-agent',
3147 'src/tty-ask-password-agent/tty-ask-password-agent.c',
3148 include_directories : includes,
3149 link_with : [libshared],
3150 install_rpath : rootlibexecdir,
3152 install_dir : rootbindir)
3154 public_programs += executable(
3157 include_directories : includes,
3158 link_with : [libshared],
3159 install_rpath : rootlibexecdir,
3162 public_programs += executable(
3164 'src/cgtop/cgtop.c',
3165 include_directories : includes,
3166 link_with : [libshared],
3167 install_rpath : rootlibexecdir,
3172 'src/initctl/initctl.c',
3173 include_directories : includes,
3174 link_with : [libshared],
3175 install_rpath : rootlibexecdir,
3176 install : (conf.get('HAVE_SYSV_COMPAT') == 1),
3177 install_dir : rootlibexecdir)
3179 public_programs += executable(
3181 'src/mount/mount-tool.c',
3182 include_directories : includes,
3183 link_with : [libshared],
3184 dependencies: [libmount],
3185 install_rpath : rootlibexecdir,
3188 meson.add_install_script(meson_make_symlink,
3189 'systemd-mount', bindir / 'systemd-umount')
3191 public_programs += executable(
3194 include_directories : includes,
3195 link_with : [libshared],
3196 install_rpath : rootlibexecdir,
3199 public_programs += executable(
3200 'systemd-stdio-bridge',
3201 'src/stdio-bridge/stdio-bridge.c',
3202 include_directories : includes,
3203 link_with : [libshared],
3204 dependencies : [versiondep],
3205 install_rpath : rootlibexecdir,
3208 public_programs += executable(
3211 include_directories : includes,
3212 link_with : [libshared],
3213 install_rpath : rootlibexecdir,
3219 'src/sysusers/sysusers.c',
3220 include_directories : includes,
3221 link_with : [libshared],
3222 install_rpath : rootlibexecdir,
3224 install_dir : rootbindir)
3225 public_programs += exe
3227 if want_tests != 'false'
3228 test('test-sysusers',
3230 # https://github.com/mesonbuild/meson/issues/2681
3231 args : exe.full_path())
3234 if have_standalone_binaries
3236 'systemd-sysusers.standalone',
3237 'src/sysusers/sysusers.c',
3238 include_directories : includes,
3239 c_args : '-DSTANDALONE',
3240 link_with : [libshared_static,
3245 install_dir : rootbindir)
3246 public_programs += exe
3248 if want_tests != 'false'
3249 test('test-sysusers.standalone',
3251 # https://github.com/mesonbuild/meson/issues/2681
3252 args : exe.full_path())
3257 if conf.get('ENABLE_TMPFILES') == 1
3260 systemd_tmpfiles_sources,
3261 include_directories : includes,
3262 link_with : [libshared],
3263 dependencies : [libacl],
3264 install_rpath : rootlibexecdir,
3266 install_dir : rootbindir)
3267 public_programs += exe
3269 if want_tests != 'false'
3270 test('test-systemd-tmpfiles',
3271 test_systemd_tmpfiles_py,
3272 # https://github.com/mesonbuild/meson/issues/2681
3273 args : exe.full_path())
3276 if have_standalone_binaries
3277 public_programs += executable(
3278 'systemd-tmpfiles.standalone',
3279 systemd_tmpfiles_sources,
3280 include_directories : includes,
3281 c_args : '-DSTANDALONE',
3282 link_with : [libshared_static,
3286 dependencies : [libacl],
3288 install_dir : rootbindir)
3292 if conf.get('ENABLE_HWDB') == 1
3293 systemd_hwdb = executable(
3296 include_directories : includes,
3297 link_with : udev_link_with,
3298 install_rpath : udev_rpath,
3300 install_dir : rootbindir)
3301 public_programs += systemd_hwdb
3303 if want_tests != 'false'
3306 args : [systemd_hwdb.full_path()],
3311 if conf.get('ENABLE_QUOTACHECK') == 1
3313 'systemd-quotacheck',
3314 'src/quotacheck/quotacheck.c',
3315 include_directories : includes,
3316 link_with : [libshared],
3317 install_rpath : rootlibexecdir,
3319 install_dir : rootlibexecdir)
3322 public_programs += executable(
3323 'systemd-socket-proxyd',
3324 'src/socket-proxy/socket-proxyd.c',
3325 include_directories : includes,
3326 link_with : [libshared],
3327 dependencies : [threads],
3328 install_rpath : rootlibexecdir,
3330 install_dir : rootlibexecdir)
3332 public_programs += executable(
3335 include_directories : includes,
3336 link_with : [libudevd_core],
3337 dependencies : [versiondep,
3343 install_rpath : udev_rpath,
3345 install_dir : rootbindir)
3349 systemd_shutdown_sources,
3350 include_directories : includes,
3351 link_with : [libshared],
3352 dependencies : [libmount],
3353 install_rpath : rootlibexecdir,
3355 install_dir : rootlibexecdir)
3358 'systemd-update-done',
3359 'src/update-done/update-done.c',
3360 include_directories : includes,
3361 link_with : [libshared],
3362 install_rpath : rootlibexecdir,
3364 install_dir : rootlibexecdir)
3367 'systemd-update-utmp',
3368 'src/update-utmp/update-utmp.c',
3369 include_directories : includes,
3370 link_with : [libshared],
3371 dependencies : [libaudit],
3372 install_rpath : rootlibexecdir,
3373 install : (conf.get('ENABLE_UTMP') == 1),
3374 install_dir : rootlibexecdir)
3376 if conf.get('HAVE_KMOD') == 1
3378 'systemd-modules-load',
3379 'src/modules-load/modules-load.c',
3380 include_directories : includes,
3381 link_with : [libshared],
3382 dependencies : [libkmod],
3383 install_rpath : rootlibexecdir,
3385 install_dir : rootlibexecdir)
3387 meson.add_install_script('sh', '-c',
3388 mkdir_p.format(modulesloaddir))
3389 if install_sysconfdir
3390 meson.add_install_script('sh', '-c',
3391 mkdir_p.format(sysconfdir / 'modules-load.d'))
3395 public_programs += executable(
3397 systemd_nspawn_sources,
3398 include_directories : includes,
3399 link_with : [libnspawn_core,
3401 dependencies : [libblkid,
3403 install_rpath : rootlibexecdir,
3406 if conf.get('ENABLE_NETWORKD') == 1
3409 systemd_networkd_sources,
3410 include_directories : network_includes,
3411 link_with : [libnetworkd_core,
3413 networkd_link_with],
3414 dependencies : [threads],
3415 install_rpath : rootlibexecdir,
3417 install_dir : rootlibexecdir)
3420 'systemd-networkd-wait-online',
3421 systemd_networkd_wait_online_sources,
3422 include_directories : includes,
3423 link_with : [networkd_link_with],
3424 install_rpath : rootlibexecdir,
3426 install_dir : rootlibexecdir)
3428 public_programs += executable(
3431 include_directories : libsystemd_network_includes,
3432 link_with : [libsystemd_network,
3433 networkd_link_with],
3434 install_rpath : rootlibexecdir,
3436 install_dir : rootbindir)
3439 'systemd-network-generator',
3440 network_generator_sources,
3441 include_directories : includes,
3442 link_with : [networkd_link_with],
3443 install_rpath : rootlibexecdir,
3445 install_dir : rootlibexecdir)
3447 if want_tests != 'false'
3448 test('test-network-generator-conversion',
3449 test_network_generator_conversion_sh,
3450 # https://github.com/mesonbuild/meson/issues/2681
3451 args : exe.full_path())
3456 'systemd-sulogin-shell',
3457 'src/sulogin-shell/sulogin-shell.c',
3458 include_directories : includes,
3459 link_with : [libshared],
3460 install_rpath : rootlibexecdir,
3462 install_dir : rootlibexecdir)
3464 ############################################################
3467 'systemd-runtest.env',
3468 output : 'systemd-runtest.env',
3469 command : [sh, '-c',
3470 '{ echo SYSTEMD_TEST_DATA=@0@; echo SYSTEMD_CATALOG_DIR=@1@; } >@OUTPUT@'.format(
3471 project_source_root / 'test',
3472 project_build_root / 'catalog')],
3473 build_by_default : true)
3475 test_cflags = ['-DTEST_CODE=1']
3476 # We intentionally do not do inline initializations with definitions for a
3477 # bunch of _cleanup_ variables in tests, to ensure valgrind is triggered if we
3478 # use the variable unexpectedly. This triggers a lot of maybe-uninitialized
3479 # false positives when the combination of -O2 and -flto is used. Suppress them.
3480 if '-O2' in get_option('c_args') and '-flto=auto' in get_option('c_args')
3481 test_cflags += cc.first_supported_argument('-Wno-maybe-uninitialized')
3484 foreach tuple : tests
3486 link_with = tuple.length() > 1 and tuple[1].length() > 0 ? tuple[1] : [libshared]
3487 dependencies = tuple.length() > 2 ? tuple[2] : []
3488 incs = tuple.length() > 3 and tuple[3].length() > 0 ? tuple[3] : includes
3489 condition = tuple.length() > 4 ? tuple[4] : ''
3490 type = tuple.length() > 5 ? tuple[5] : ''
3491 defs = tuple.length() > 6 ? tuple[6] : []
3493 parallel = tuple.length() > 7 ? tuple[7] : true
3496 name = sources[0].split('/')[-1].split('.')[0]
3497 if type.startswith('timeout=')
3498 timeout = type.split('=')[1].to_int()
3502 if condition == '' or conf.get(condition) == 1
3506 include_directories : incs,
3507 link_with : link_with,
3508 dependencies : [versiondep,
3511 build_by_default : want_tests != 'false',
3512 install_rpath : rootlibexecdir,
3513 install : install_tests,
3514 install_dir : testsdir / type)
3517 message('@0@ is a manual test'.format(name))
3518 elif type == 'unsafe' and want_tests != 'unsafe'
3519 message('@0@ is an unsafe test'.format(name))
3520 elif want_tests != 'false'
3526 message('Not compiling @0@ because @1@ is not true'.format(name, condition))
3531 'test-libsystemd-sym',
3532 test_libsystemd_sym_c,
3533 include_directories : includes,
3534 link_with : [libsystemd],
3535 build_by_default : want_tests != 'false',
3536 install : install_tests,
3537 install_dir : testsdir)
3538 if want_tests != 'false'
3539 test('test-libsystemd-sym', exe)
3543 'test-libsystemd-static-sym',
3544 test_libsystemd_sym_c,
3545 include_directories : includes,
3546 link_with : [install_libsystemd_static],
3547 dependencies : [threads], # threads is already included in dependencies on the library,
3548 # but does not seem to get propagated. Add here as a work-around.
3549 build_by_default : want_tests != 'false' and static_libsystemd_pic,
3550 install : install_tests and static_libsystemd_pic,
3551 install_dir : testsdir)
3552 if want_tests != 'false' and static_libsystemd_pic
3553 test('test-libsystemd-static-sym', exe)
3559 include_directories : libudev_includes,
3560 c_args : ['-Wno-deprecated-declarations'] + test_cflags,
3561 link_with : [libudev],
3562 build_by_default : want_tests != 'false',
3563 install : install_tests,
3564 install_dir : testsdir)
3565 if want_tests != 'false'
3566 test('test-libudev-sym', exe)
3570 'test-libudev-static-sym',
3572 include_directories : libudev_includes,
3573 c_args : ['-Wno-deprecated-declarations'] + test_cflags,
3574 link_with : [install_libudev_static],
3575 build_by_default : want_tests != 'false' and static_libudev_pic,
3576 install : install_tests and static_libudev_pic,
3577 install_dir : testsdir)
3578 if want_tests != 'false' and static_libudev_pic
3579 test('test-libudev-static-sym', exe)
3582 ############################################################
3586 foreach tuple : fuzzers
3588 link_with = tuple.length() > 1 and tuple[1].length() > 0 ? tuple[1] : [libshared]
3589 dependencies = tuple.length() > 2 ? tuple[2] : []
3590 incs = tuple.length() > 3 and tuple[3].length() > 0 ? tuple[3] : includes
3591 defs = tuple.length() > 4 ? tuple[4] : []
3595 dependencies += fuzzing_engine
3597 if fuzzing_engine.found()
3598 dependencies += fuzzing_engine
3600 link_args += ['-fsanitize=fuzzer']
3603 sources += 'src/fuzz/fuzz-main.c'
3606 name = sources[0].split('/')[-1].split('.')[0]
3611 include_directories : [incs, include_directories('src/fuzz')],
3612 link_with : link_with,
3613 dependencies : dependencies,
3614 c_args : defs + test_cflags,
3615 link_args: link_args,
3617 build_by_default : fuzzer_build)
3620 if want_tests != 'false'
3621 # Run the fuzz regression tests without any sanitizers enabled.
3622 # Additional invocations with sanitizers may be added below.
3623 foreach p : fuzz_regression_tests
3624 b = p.split('/')[-2]
3625 c = p.split('/')[-1]
3628 test('@0@_@1@'.format(b, c),
3630 args : [project_source_root / p])
3636 alias_target('fuzzers', fuzzer_exes)
3638 ############################################################
3640 subdir('modprobe.d')
3642 subdir('sysusers.d')
3643 subdir('tmpfiles.d')
3649 subdir('shell-completion/bash')
3650 subdir('shell-completion/zsh')
3651 subdir('docs/sysvinit')
3652 subdir('docs/var-log')
3654 install_subdir('factory/etc',
3655 install_dir : factorydir)
3657 if install_sysconfdir
3658 install_data('xorg/50-systemd-user.sh',
3659 install_dir : xinitrcdir)
3661 install_data('LICENSE.GPL2',
3665 'docs/CODING_STYLE.md',
3666 'docs/DISTRO_PORTING.md',
3667 'docs/ENVIRONMENT.md',
3669 'docs/TRANSIENT-SETTINGS.md',
3670 'docs/TRANSLATORS.md',
3671 'docs/UIDS-GIDS.md',
3672 'docs/GVARIANT-SERIALIZATION.md',
3673 install_dir : docdir)
3675 install_subdir('LICENSES',
3676 install_dir : docdir)
3678 meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir))
3679 meson.add_install_script('sh', '-c', 'touch $DESTDIR@0@'.format(prefixdir))
3681 ############################################################
3683 # Ensure that changes to the docs/ directory do not break the
3684 # basic Github pages build. But only run it in developer mode,
3685 # as it might be fragile due to changes in the tooling, and it is
3686 # not generally useful for users.
3687 jekyll = find_program('jekyll', required : false)
3688 if get_option('mode') == 'developer' and want_tests != 'false' and jekyll.found()
3689 test('github-pages',
3692 '--source', project_source_root / 'docs',
3693 '--destination', project_build_root / '_site'])
3696 ############################################################
3698 check_help = find_program('tools/check-help.sh')
3700 foreach exec : public_programs
3701 name = exec.full_path().split('/')[-1]
3702 if want_tests != 'false'
3703 test('check-help-' + name,
3705 args : exec.full_path())
3709 ############################################################
3711 check_directives_sh = find_program('tools/check-directives.sh')
3713 if want_tests != 'false'
3714 test('check-directives',
3715 check_directives_sh,
3716 args : [project_source_root, project_build_root])
3719 ############################################################
3721 # Enable tests for all supported sanitizers
3722 foreach tuple : sanitizers
3723 sanitizer = tuple[0]
3726 if cc.has_link_argument('-fsanitize=@0@'.format(sanitizer))
3728 foreach p : fuzz_regression_tests
3729 b = p.split('/')[-2]
3730 c = p.split('/')[-1]
3732 name = '@0@:@1@'.format(b, sanitizer)
3735 if want_tests == 'false'
3736 message('Not compiling @0@ because tests is set to false'.format(name))
3738 exe = custom_target(
3742 command : [ln, '-fs',
3743 build.full_path() / b,
3745 build_by_default : true)
3747 message('Not compiling @0@ because fuzz-tests is set to false'.format(name))
3753 test('@0@_@1@_@2@'.format(b, c, sanitizer),
3755 env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
3757 args : [exe.full_path(),
3758 project_source_root / p])
3765 ############################################################
3768 all_files = run_command(
3769 env, '-u', 'GIT_WORK_TREE',
3770 git, '--git-dir=@0@/.git'.format(project_source_root),
3771 'ls-files', ':/*.[ch]')
3773 all_files = files(all_files.stdout().split())
3778 command : [env, 'etags', '-o', '@0@/TAGS'.format(project_source_root)] + all_files)
3781 command : [env, 'ctags', '-o', '@0@/tags'.format(project_source_root)] + all_files)
3785 git_contrib_sh = find_program('tools/git-contrib.sh')
3788 command : [git_contrib_sh])
3792 git_head = run_command(
3794 '--git-dir=@0@/.git'.format(project_source_root),
3795 'rev-parse', 'HEAD').stdout().strip()
3796 git_head_short = run_command(
3798 '--git-dir=@0@/.git'.format(project_source_root),
3799 'rev-parse', '--short=7', 'HEAD').stdout().strip()
3803 command : [git, 'archive',
3804 '-o', '@0@/systemd-@1@.tar.gz'.format(project_source_root,
3806 '--prefix', 'systemd-@0@/'.format(git_head),
3810 ############################################################
3812 check_api_docs_sh = find_program('tools/check-api-docs.sh')
3815 depends : [man, libsystemd, libudev],
3816 command : [check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
3818 alias_target('update-dbus-docs', update_dbus_docs)
3819 alias_target('update-man-rules', update_man_rules)
3821 ############################################################
3823 alt_time_epoch = run_command('date', '-Is', '-u', '-d',
3824 '@@0@'.format(time_epoch)).stdout().strip()
3827 'build mode' : get_option('mode'),
3828 'split /usr' : split_usr,
3829 'split bin-sbin' : split_bin,
3830 'prefix directory' : prefixdir,
3831 'rootprefix directory' : rootprefixdir,
3832 'sysconf directory' : sysconfdir,
3833 'include directory' : includedir,
3834 'lib directory' : libdir,
3835 'rootlib directory' : rootlibdir,
3836 'SysV init scripts' : sysvinit_path,
3837 'SysV rc?.d directories' : sysvrcnd_path,
3838 'PAM modules directory' : pamlibdir,
3839 'PAM configuration directory' : pamconfdir,
3840 'libcryptsetup plugins directory' : libcryptsetup_plugins_dir,
3841 'RPM macros directory' : rpmmacrosdir,
3842 'modprobe.d directory' : modprobedir,
3843 'D-Bus policy directory' : dbuspolicydir,
3844 'D-Bus session directory' : dbussessionservicedir,
3845 'D-Bus system directory' : dbussystemservicedir,
3846 'bash completions directory' : bashcompletiondir,
3847 'zsh completions directory' : zshcompletiondir,
3848 'extra start script' : get_option('rc-local'),
3849 'debug shell' : '@0@ @ @1@'.format(get_option('debug-shell'),
3850 get_option('debug-tty')),
3851 'system UIDs' : '<=@0@ (alloc >=@1@)'.format(conf.get('SYSTEM_UID_MAX'),
3852 conf.get('SYSTEM_ALLOC_UID_MIN')),
3853 'system GIDs' : '<=@0@ (alloc >=@1@)'.format(conf.get('SYSTEM_GID_MAX'),
3854 conf.get('SYSTEM_ALLOC_GID_MIN')),
3855 'dynamic UIDs' : '@0@…@1@'.format(dynamic_uid_min, dynamic_uid_max),
3856 'container UID bases' : '@0@…@1@'.format(container_uid_base_min, container_uid_base_max),
3857 'static UID/GID allocations' : ' '.join(static_ugids),
3858 '/dev/kvm access mode' : get_option('dev-kvm-mode'),
3859 'render group access mode' : get_option('group-render-mode'),
3860 'certificate root directory' : get_option('certificate-root'),
3861 'support URL' : support_url,
3862 'nobody user name' : nobody_user,
3863 'nobody group name' : nobody_group,
3864 'fallback hostname' : get_option('fallback-hostname'),
3865 'default DNSSEC mode' : default_dnssec,
3866 'default DNS-over-TLS mode' : default_dns_over_tls,
3867 'default mDNS mode' : default_mdns,
3868 'default LLMNR mode' : default_llmnr,
3869 'default DNS servers' : dns_servers.split(' '),
3870 'default NTP servers' : ntp_servers.split(' '),
3871 'default cgroup hierarchy' : default_hierarchy,
3872 'default net.naming-scheme value' : default_net_naming_scheme,
3873 'default KillUserProcesses value' : kill_user_processes,
3874 'default locale' : default_locale,
3875 'default user $PATH' :
3876 default_user_path != '' ? default_user_path : '(same as system services)',
3877 'systemd service watchdog' : service_watchdog == '' ? 'disabled' : service_watchdog,
3878 'time epoch' : '@0@ (@1@)'.format(time_epoch, alt_time_epoch)})
3881 # CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
3882 # CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
3883 # LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
3885 if conf.get('ENABLE_EFI') == 1
3886 summary({'EFI arch' : efi_arch},
3887 section : 'Extensible Firmware Interface')
3891 'EFI machine type' : EFI_MACHINE_TYPE_NAME,
3892 'EFI CC' : '@0@'.format(' '.join(efi_cc)),
3893 'EFI lds' : efi_lds,
3894 'EFI crt0' : efi_crt0,
3895 'EFI include directory' : efi_incdir},
3896 section : 'Extensible Firmware Interface')
3919 ['libcryptsetup-plugins'],
3945 ['bpf-framework', conf.get('BPF_FRAMEWORK') == 1],
3949 ['gnu-efi', have_gnu_efi],
3957 ['kernel-install', get_option('kernel-install')],
3975 ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1],
3988 ['legacy-pkla', install_polkit_pkla],
3993 ['man pages', want_man],
3994 ['html pages', want_html],
3995 ['man page indices', want_man and have_lxml],
3997 ['compat-mutable-uid-boundaries'],
4000 ['adm group', get_option('adm-group')],
4001 ['wheel group', get_option('wheel-group')],
4004 ['debug mmap cache'],
4006 ['valgrind', conf.get('VALGRIND') == 1],
4007 ['trace logging', conf.get('LOG_TRACE') == 1],
4008 ['install tests', install_tests],
4009 ['link-udev-shared', get_option('link-udev-shared')],
4010 ['link-systemctl-shared', get_option('link-systemctl-shared')],
4011 ['link-networkd-shared', get_option('link-networkd-shared')],
4012 ['link-timesyncd-shared', get_option('link-timesyncd-shared')],
4014 ['standalone-binaries', get_option('standalone-binaries')],
4017 if tuple.length() >= 2
4020 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
4021 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
4022 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
4031 if static_libsystemd == 'false'
4032 missing += 'static-libsystemd'
4034 found += 'static-libsystemd(@0@)'.format(static_libsystemd)
4037 if static_libudev == 'false'
4038 missing += 'static-libudev'
4040 found += 'static-libudev(@0@)'.format(static_libudev)
4043 if conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1
4044 found += 'DNS-over-TLS(gnutls)'
4045 elif conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1
4046 found += 'DNS-over-TLS(openssl)'
4048 missing += 'DNS-over-TLS'
4052 'enabled' : ', '.join(found),
4053 'disabled' : ', '.join(missing)},
4054 section : 'Features')
4056 if rootprefixdir != rootprefix_default
4058 'Note that the installation prefix was changed to "@0@".\n'.format(rootprefixdir) +
4059 'systemd used fixed names for unit file directories and other paths, so anything\n' +
4060 'except the default ("@0@") is strongly discouraged.'.format(rootprefix_default))