Zbigniew Jędrzejewski-Szmek | 3a726fc | 2017-11-18 18:32:01 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
Zbigniew Jędrzejewski-Szmek | 3a726fc | 2017-11-18 18:32:01 +0100 | [diff] [blame] | 2 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3 | project('systemd', 'c', |
Zbigniew Jędrzejewski-Szmek | 384db81 | 2020-02-05 09:51:59 +0100 | [diff] [blame] | 4 | version : '245', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 5 | license : 'LGPLv2+', |
| 6 | default_options: [ |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 7 | 'c_std=gnu99', |
| 8 | 'prefix=/usr', |
| 9 | 'sysconfdir=/etc', |
| 10 | 'localstatedir=/var', |
Zbigniew Jędrzejewski-Szmek | 827ca90 | 2019-11-10 11:39:15 +0100 | [diff] [blame] | 11 | 'warning_level=2', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 12 | ], |
Yu Watanabe | 7a6397d | 2018-05-15 20:18:24 +0900 | [diff] [blame] | 13 | meson_version : '>= 0.46', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 14 | ) |
| 15 | |
Zbigniew Jędrzejewski-Szmek | 384db81 | 2020-02-05 09:51:59 +0100 | [diff] [blame] | 16 | libsystemd_version = '0.28.0' |
| 17 | libudev_version = '1.6.17' |
Zbigniew Jędrzejewski-Szmek | 56d50ab | 2017-09-28 19:24:16 +0200 | [diff] [blame] | 18 | |
Yu Watanabe | 348b443 | 2018-05-07 18:17:35 +0900 | [diff] [blame] | 19 | # We need the same data in two different formats, ugh! |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 20 | # Also, for hysterical reasons, we use different variable |
| 21 | # names, sometimes. Not all variables are included in every |
| 22 | # set. Ugh, ugh, ugh! |
| 23 | conf = configuration_data() |
Zbigniew Jędrzejewski-Szmek | 6ffeca8 | 2020-02-28 11:09:16 +0100 | [diff] [blame] | 24 | conf.set('PROJECT_VERSION', meson.project_version(), |
| 25 | description : 'Numerical project version (used where a simple number is expected)') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 26 | |
| 27 | substs = configuration_data() |
Zbigniew Jędrzejewski-Szmek | a67c318 | 2018-12-19 11:23:42 +0100 | [diff] [blame] | 28 | substs.set('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd') |
Zbigniew Jędrzejewski-Szmek | 6ffeca8 | 2020-02-28 11:09:16 +0100 | [diff] [blame] | 29 | substs.set('PROJECT_VERSION', meson.project_version(), |
| 30 | description : 'Numerical project version (used where a simple number is expected)') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 31 | |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 32 | # This is to be used instead of meson.source_root(), as the latter will return |
| 33 | # the wrong result when systemd is being built as a meson subproject |
| 34 | project_source_root = meson.current_source_dir() |
Zbigniew Jędrzejewski-Szmek | 81e0677 | 2020-04-24 20:12:03 +0200 | [diff] [blame] | 35 | project_build_root = meson.current_build_dir() |
Zbigniew Jędrzejewski-Szmek | a0b15b4 | 2019-06-07 14:41:36 +0200 | [diff] [blame] | 36 | relative_source_path = run_command('realpath', |
Zbigniew Jędrzejewski-Szmek | 81e0677 | 2020-04-24 20:12:03 +0200 | [diff] [blame] | 37 | '--relative-to=@0@'.format(project_build_root), |
Zbigniew Jędrzejewski-Szmek | a0b15b4 | 2019-06-07 14:41:36 +0200 | [diff] [blame] | 38 | project_source_root).stdout().strip() |
| 39 | conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 40 | |
Zbigniew Jędrzejewski-Szmek | c09edc7 | 2018-10-10 11:56:45 +0200 | [diff] [blame] | 41 | want_ossfuzz = get_option('oss-fuzz') |
| 42 | want_libfuzzer = get_option('llvm-fuzz') |
Evgeny Vereshchagin | 6b8d32e | 2020-03-30 06:42:19 +0000 | [diff] [blame] | 43 | if want_ossfuzz + want_libfuzzer > 1 |
| 44 | error('only one of oss-fuzz or llvm-fuzz can be specified') |
Zbigniew Jędrzejewski-Szmek | c09edc7 | 2018-10-10 11:56:45 +0200 | [diff] [blame] | 45 | endif |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 46 | |
| 47 | skip_deps = want_ossfuzz or want_libfuzzer |
Evgeny Vereshchagin | 6b8d32e | 2020-03-30 06:42:19 +0000 | [diff] [blame] | 48 | fuzzer_build = want_ossfuzz or want_libfuzzer |
Zbigniew Jędrzejewski-Szmek | c09edc7 | 2018-10-10 11:56:45 +0200 | [diff] [blame] | 49 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 50 | ##################################################################### |
| 51 | |
Zbigniew Jędrzejewski-Szmek | 003c887 | 2017-07-24 04:41:45 -0400 | [diff] [blame] | 52 | # Try to install the git pre-commit hook |
Zbigniew Jędrzejewski-Szmek | e2d612a | 2020-03-28 09:30:51 +0100 | [diff] [blame] | 53 | add_git_hook_sh = find_program('tools/add-git-hook.sh', required : false) |
| 54 | if add_git_hook_sh.found() |
| 55 | git_hook = run_command(add_git_hook_sh) |
| 56 | if git_hook.returncode() == 0 |
| 57 | message(git_hook.stdout().strip()) |
| 58 | endif |
Zbigniew Jędrzejewski-Szmek | 003c887 | 2017-07-24 04:41:45 -0400 | [diff] [blame] | 59 | endif |
| 60 | |
| 61 | ##################################################################### |
| 62 | |
Zbigniew Jędrzejewski-Szmek | 2675413 | 2018-03-01 11:49:42 +0100 | [diff] [blame] | 63 | if get_option('split-usr') == 'auto' |
| 64 | split_usr = run_command('test', '-L', '/bin').returncode() != 0 |
| 65 | else |
| 66 | split_usr = get_option('split-usr') == 'true' |
| 67 | endif |
Zbigniew Jędrzejewski-Szmek | 671f0f8 | 2018-03-01 21:48:36 +0100 | [diff] [blame] | 68 | conf.set10('HAVE_SPLIT_USR', split_usr, |
| 69 | description : '/usr/bin and /bin directories are separate') |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 70 | |
Zbigniew Jędrzejewski-Szmek | 157baa8 | 2018-03-01 10:28:29 +0100 | [diff] [blame] | 71 | if get_option('split-bin') == 'auto' |
| 72 | split_bin = run_command('test', '-L', '/usr/sbin').returncode() != 0 |
| 73 | else |
| 74 | split_bin = get_option('split-bin') == 'true' |
| 75 | endif |
Zbigniew Jędrzejewski-Szmek | 671f0f8 | 2018-03-01 21:48:36 +0100 | [diff] [blame] | 76 | conf.set10('HAVE_SPLIT_BIN', split_bin, |
| 77 | description : 'bin and sbin directories are separate') |
Zbigniew Jędrzejewski-Szmek | 157baa8 | 2018-03-01 10:28:29 +0100 | [diff] [blame] | 78 | |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 79 | rootprefixdir = get_option('rootprefix') |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 80 | # Unusual rootprefixdir values are used by some distros |
| 81 | # (see https://github.com/systemd/systemd/pull/7461). |
Zbigniew Jędrzejewski-Szmek | ba7f4ae | 2018-02-28 10:20:48 +0100 | [diff] [blame] | 82 | rootprefix_default = split_usr ? '/' : '/usr' |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 83 | if rootprefixdir == '' |
| 84 | rootprefixdir = rootprefix_default |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 85 | endif |
Zbigniew Jędrzejewski-Szmek | 23bdba6 | 2019-03-05 16:46:52 +0100 | [diff] [blame] | 86 | rootprefixdir_noslash = rootprefixdir == '/' ? '' : rootprefixdir |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 87 | |
| 88 | sysvinit_path = get_option('sysvinit-path') |
| 89 | sysvrcnd_path = get_option('sysvrcnd-path') |
Yu Watanabe | 348b443 | 2018-05-07 18:17:35 +0900 | [diff] [blame] | 90 | conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '', |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 91 | description : 'SysV init scripts and rcN.d links are supported') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 92 | |
Lennart Poettering | a8b627a | 2018-10-11 18:23:26 +0200 | [diff] [blame] | 93 | conf.set10('BUMP_PROC_SYS_FS_FILE_MAX', get_option('bump-proc-sys-fs-file-max')) |
| 94 | conf.set10('BUMP_PROC_SYS_FS_NR_OPEN', get_option('bump-proc-sys-fs-nr-open')) |
Lennart Poettering | 09dad04 | 2018-11-15 09:50:42 +0100 | [diff] [blame] | 95 | conf.set('HIGH_RLIMIT_NOFILE', 512*1024) |
Lennart Poettering | a8b627a | 2018-10-11 18:23:26 +0200 | [diff] [blame] | 96 | |
Zbigniew Jędrzejewski-Szmek | 23bdba6 | 2019-03-05 16:46:52 +0100 | [diff] [blame] | 97 | # join_paths ignores the preceding arguments if an absolute component is |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 98 | # encountered, so this should canonicalize various paths when they are |
| 99 | # absolute or relative. |
| 100 | prefixdir = get_option('prefix') |
| 101 | if not prefixdir.startswith('/') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 102 | error('Prefix is not absolute: "@0@"'.format(prefixdir)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 103 | endif |
| 104 | bindir = join_paths(prefixdir, get_option('bindir')) |
| 105 | libdir = join_paths(prefixdir, get_option('libdir')) |
| 106 | sysconfdir = join_paths(prefixdir, get_option('sysconfdir')) |
| 107 | includedir = join_paths(prefixdir, get_option('includedir')) |
| 108 | datadir = join_paths(prefixdir, get_option('datadir')) |
| 109 | localstatedir = join_paths('/', get_option('localstatedir')) |
| 110 | |
| 111 | rootbindir = join_paths(rootprefixdir, 'bin') |
Zbigniew Jędrzejewski-Szmek | 157baa8 | 2018-03-01 10:28:29 +0100 | [diff] [blame] | 112 | rootsbindir = join_paths(rootprefixdir, split_bin ? 'sbin' : 'bin') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 113 | rootlibexecdir = join_paths(rootprefixdir, 'lib/systemd') |
| 114 | |
| 115 | rootlibdir = get_option('rootlibdir') |
| 116 | if rootlibdir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 117 | rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1]) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 118 | endif |
| 119 | |
| 120 | # Dirs of external packages |
Benedikt Morbach | a95696e | 2018-08-10 04:59:54 +0200 | [diff] [blame] | 121 | pkgconfigdatadir = get_option('pkgconfigdatadir') == '' ? join_paths(datadir, 'pkgconfig') : get_option('pkgconfigdatadir') |
| 122 | pkgconfiglibdir = get_option('pkgconfiglibdir') == '' ? join_paths(libdir, 'pkgconfig') : get_option('pkgconfiglibdir') |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 123 | polkitpolicydir = join_paths(datadir, 'polkit-1/actions') |
| 124 | polkitrulesdir = join_paths(datadir, 'polkit-1/rules.d') |
| 125 | polkitpkladir = join_paths(localstatedir, 'lib/polkit-1/localauthority/10-vendor.d') |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 126 | xinitrcdir = join_paths(sysconfdir, 'X11/xinit/xinitrc.d') |
Yu Watanabe | 8a38aac | 2017-11-23 22:20:22 +0900 | [diff] [blame] | 127 | rpmmacrosdir = get_option('rpmmacrosdir') |
| 128 | if rpmmacrosdir != 'no' |
| 129 | rpmmacrosdir = join_paths(prefixdir, rpmmacrosdir) |
| 130 | endif |
Michael Biebl | 02fa054 | 2017-10-21 08:32:50 +0200 | [diff] [blame] | 131 | modprobedir = join_paths(rootprefixdir, 'lib/modprobe.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 132 | |
| 133 | # Our own paths |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 134 | pkgdatadir = join_paths(datadir, 'systemd') |
| 135 | environmentdir = join_paths(prefixdir, 'lib/environment.d') |
| 136 | pkgsysconfdir = join_paths(sysconfdir, 'systemd') |
| 137 | userunitdir = join_paths(prefixdir, 'lib/systemd/user') |
| 138 | userpresetdir = join_paths(prefixdir, 'lib/systemd/user-preset') |
| 139 | tmpfilesdir = join_paths(prefixdir, 'lib/tmpfiles.d') |
| 140 | sysusersdir = join_paths(prefixdir, 'lib/sysusers.d') |
| 141 | sysctldir = join_paths(prefixdir, 'lib/sysctl.d') |
| 142 | binfmtdir = join_paths(prefixdir, 'lib/binfmt.d') |
| 143 | modulesloaddir = join_paths(prefixdir, 'lib/modules-load.d') |
| 144 | networkdir = join_paths(rootprefixdir, 'lib/systemd/network') |
| 145 | pkgincludedir = join_paths(includedir, 'systemd') |
| 146 | systemgeneratordir = join_paths(rootlibexecdir, 'system-generators') |
| 147 | usergeneratordir = join_paths(prefixdir, 'lib/systemd/user-generators') |
| 148 | systemenvgeneratordir = join_paths(prefixdir, 'lib/systemd/system-environment-generators') |
| 149 | userenvgeneratordir = join_paths(prefixdir, 'lib/systemd/user-environment-generators') |
| 150 | systemshutdowndir = join_paths(rootlibexecdir, 'system-shutdown') |
| 151 | systemsleepdir = join_paths(rootlibexecdir, 'system-sleep') |
| 152 | systemunitdir = join_paths(rootprefixdir, 'lib/systemd/system') |
| 153 | systempresetdir = join_paths(rootprefixdir, 'lib/systemd/system-preset') |
| 154 | udevlibexecdir = join_paths(rootprefixdir, 'lib/udev') |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 155 | udevrulesdir = join_paths(udevlibexecdir, 'rules.d') |
| 156 | udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d') |
| 157 | catalogdir = join_paths(prefixdir, 'lib/systemd/catalog') |
| 158 | kernelinstalldir = join_paths(prefixdir, 'lib/kernel/install.d') |
| 159 | factorydir = join_paths(datadir, 'factory') |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 160 | bootlibdir = join_paths(prefixdir, 'lib/systemd/boot/efi') |
| 161 | testsdir = join_paths(prefixdir, 'lib/systemd/tests') |
| 162 | systemdstatedir = join_paths(localstatedir, 'lib/systemd') |
| 163 | catalogstatedir = join_paths(systemdstatedir, 'catalog') |
| 164 | randomseeddir = join_paths(localstatedir, 'lib/systemd') |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 165 | profiledir = join_paths(rootlibexecdir, 'portable', 'profile') |
Zbigniew Jędrzejewski-Szmek | e5ea741 | 2019-07-22 14:47:51 +0200 | [diff] [blame] | 166 | ntpservicelistdir = join_paths(rootprefixdir, 'lib/systemd/ntp-units.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 167 | |
tblume | 75aaade | 2018-02-01 22:46:15 +0100 | [diff] [blame] | 168 | docdir = get_option('docdir') |
| 169 | if docdir == '' |
| 170 | docdir = join_paths(datadir, 'doc/systemd') |
| 171 | endif |
| 172 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 173 | dbuspolicydir = get_option('dbuspolicydir') |
| 174 | if dbuspolicydir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 175 | dbuspolicydir = join_paths(datadir, 'dbus-1/system.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 176 | endif |
| 177 | |
| 178 | dbussessionservicedir = get_option('dbussessionservicedir') |
| 179 | if dbussessionservicedir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 180 | dbussessionservicedir = join_paths(datadir, 'dbus-1/services') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 181 | endif |
| 182 | |
| 183 | dbussystemservicedir = get_option('dbussystemservicedir') |
| 184 | if dbussystemservicedir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 185 | dbussystemservicedir = join_paths(datadir, 'dbus-1/system-services') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 186 | endif |
| 187 | |
| 188 | pamlibdir = get_option('pamlibdir') |
| 189 | if pamlibdir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 190 | pamlibdir = join_paths(rootlibdir, 'security') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 191 | endif |
| 192 | |
| 193 | pamconfdir = get_option('pamconfdir') |
| 194 | if pamconfdir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 195 | pamconfdir = join_paths(sysconfdir, 'pam.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 196 | endif |
| 197 | |
Zbigniew Jędrzejewski-Szmek | 444d586 | 2018-02-15 11:43:08 +0100 | [diff] [blame] | 198 | memory_accounting_default = get_option('memory-accounting-default') |
Zbigniew Jędrzejewski-Szmek | 36cf450 | 2019-06-06 19:22:20 +0200 | [diff] [blame] | 199 | status_unit_format_default = get_option('status-unit-format-default') |
Zbigniew Jędrzejewski-Szmek | 444d586 | 2018-02-15 11:43:08 +0100 | [diff] [blame] | 200 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 201 | conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir) |
Zbigniew Jędrzejewski-Szmek | 96d33e4 | 2020-03-24 16:28:26 +0100 | [diff] [blame] | 202 | conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'system')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 203 | conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir) |
| 204 | conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) |
| 205 | conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 206 | conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) |
Alexander F Rødseth | 96164a3 | 2018-03-01 13:12:02 +0100 | [diff] [blame] | 207 | |
Zbigniew Jędrzejewski-Szmek | f7c5427 | 2018-03-02 09:09:29 +0100 | [diff] [blame] | 208 | conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper()) |
Alexander F Rødseth | 96164a3 | 2018-03-01 13:12:02 +0100 | [diff] [blame] | 209 | |
Zbigniew Jędrzejewski-Szmek | 96d33e4 | 2020-03-24 16:28:26 +0100 | [diff] [blame] | 210 | conf.set_quoted('USER_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'user')) |
| 211 | conf.set_quoted('USER_DATA_UNIT_DIR', userunitdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 212 | conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 213 | conf.set_quoted('CATALOG_DATABASE', join_paths(catalogstatedir, 'database')) |
| 214 | conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH', join_paths(rootlibexecdir, 'systemd-cgroups-agent')) |
| 215 | conf.set_quoted('SYSTEMD_BINARY_PATH', join_paths(rootlibexecdir, 'systemd')) |
| 216 | conf.set_quoted('SYSTEMD_FSCK_PATH', join_paths(rootlibexecdir, 'systemd-fsck')) |
Zbigniew Jędrzejewski-Szmek | da495a0 | 2017-11-21 23:18:05 +0100 | [diff] [blame] | 217 | conf.set_quoted('SYSTEMD_MAKEFS_PATH', join_paths(rootlibexecdir, 'systemd-makefs')) |
Zbigniew Jędrzejewski-Szmek | 7f2806d | 2017-11-29 20:02:11 +0100 | [diff] [blame] | 218 | conf.set_quoted('SYSTEMD_GROWFS_PATH', join_paths(rootlibexecdir, 'systemd-growfs')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 219 | conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-shutdown')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 220 | conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbindir, 'systemctl')) |
| 221 | conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent')) |
| 222 | conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge')) |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 223 | conf.set_quoted('ROOTPREFIX', rootprefixdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 224 | conf.set_quoted('RANDOM_SEED_DIR', randomseeddir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 225 | conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed')) |
| 226 | conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', join_paths(rootlibexecdir, 'systemd-cryptsetup')) |
Zbigniew Jędrzejewski-Szmek | 96d33e4 | 2020-03-24 16:28:26 +0100 | [diff] [blame] | 227 | conf.set_quoted('SYSTEM_GENERATOR_DIR', systemgeneratordir) |
| 228 | conf.set_quoted('USER_GENERATOR_DIR', usergeneratordir) |
| 229 | conf.set_quoted('SYSTEM_ENV_GENERATOR_DIR', systemenvgeneratordir) |
| 230 | conf.set_quoted('USER_ENV_GENERATOR_DIR', userenvgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 231 | conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir) |
| 232 | conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 233 | conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', join_paths(pkgdatadir, 'kbd-model-map')) |
| 234 | conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', join_paths(pkgdatadir, 'language-fallback-map')) |
Filipe Brandenburger | e2d4137 | 2018-09-11 23:55:02 -0700 | [diff] [blame] | 235 | conf.set_quoted('SYSTEMD_TEST_DATA', join_paths(testsdir, 'testdata')) |
Filipe Brandenburger | 49cdae6 | 2018-09-12 00:23:40 -0700 | [diff] [blame] | 236 | conf.set_quoted('SYSTEMD_CATALOG_DIR', catalogdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 237 | conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 238 | conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 239 | conf.set_quoted('LIBDIR', libdir) |
| 240 | conf.set_quoted('ROOTLIBDIR', rootlibdir) |
| 241 | conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir) |
| 242 | conf.set_quoted('BOOTLIBDIR', bootlibdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 243 | conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull')) |
| 244 | conf.set_quoted('SYSTEMD_IMPORT_PATH', join_paths(rootlibexecdir, 'systemd-import')) |
Lennart Poettering | 1d7579c | 2018-10-10 21:20:08 +0200 | [diff] [blame] | 245 | conf.set_quoted('SYSTEMD_IMPORT_FS_PATH', join_paths(rootlibexecdir, 'systemd-import-fs')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 246 | conf.set_quoted('SYSTEMD_EXPORT_PATH', join_paths(rootlibexecdir, 'systemd-export')) |
| 247 | conf.set_quoted('VENDOR_KEYRING_PATH', join_paths(rootlibexecdir, 'import-pubring.gpg')) |
| 248 | conf.set_quoted('USER_KEYRING_PATH', join_paths(pkgsysconfdir, 'import-pubring.gpg')) |
| 249 | conf.set_quoted('DOCUMENT_ROOT', join_paths(pkgdatadir, 'gatewayd')) |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 250 | conf.set_quoted('SYSTEMD_HOMEWORK_PATH', join_paths(rootlibexecdir, 'systemd-homework')) |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 251 | conf.set_quoted('SYSTEMD_USERWORK_PATH', join_paths(rootlibexecdir, 'systemd-userwork')) |
Zbigniew Jędrzejewski-Szmek | 30538ff | 2018-10-17 14:36:09 +0200 | [diff] [blame] | 252 | conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default) |
Michal Koutný | 7f672e8 | 2018-03-09 18:27:13 +0100 | [diff] [blame] | 253 | conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', memory_accounting_default ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 36cf450 | 2019-06-06 19:22:20 +0200 | [diff] [blame] | 254 | conf.set('STATUS_UNIT_FORMAT_DEFAULT', 'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 255 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 256 | substs.set('prefix', prefixdir) |
Zbigniew Jędrzejewski-Szmek | 1c2c7c6 | 2018-11-17 15:38:15 +0100 | [diff] [blame] | 257 | substs.set('rootprefix', rootprefixdir) |
Zbigniew Jędrzejewski-Szmek | 23bdba6 | 2019-03-05 16:46:52 +0100 | [diff] [blame] | 258 | substs.set('rootprefix_noslash', rootprefixdir_noslash) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 259 | substs.set('exec_prefix', prefixdir) |
| 260 | substs.set('libdir', libdir) |
| 261 | substs.set('rootlibdir', rootlibdir) |
| 262 | substs.set('includedir', includedir) |
Zbigniew Jędrzejewski-Szmek | 1c2c7c6 | 2018-11-17 15:38:15 +0100 | [diff] [blame] | 263 | substs.set('sysconfdir', sysconfdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 264 | substs.set('bindir', bindir) |
| 265 | substs.set('rootbindir', rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 266 | substs.set('rootlibexecdir', rootlibexecdir) |
| 267 | substs.set('systemunitdir', systemunitdir) |
| 268 | substs.set('userunitdir', userunitdir) |
| 269 | substs.set('systempresetdir', systempresetdir) |
| 270 | substs.set('userpresetdir', userpresetdir) |
| 271 | substs.set('udevhwdbdir', udevhwdbdir) |
| 272 | substs.set('udevrulesdir', udevrulesdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 273 | substs.set('udevlibexecdir', udevlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 424e80b | 2018-05-19 17:02:37 +0200 | [diff] [blame] | 274 | substs.set('environmentdir', environmentdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 275 | substs.set('catalogdir', catalogdir) |
| 276 | substs.set('tmpfilesdir', tmpfilesdir) |
| 277 | substs.set('sysusersdir', sysusersdir) |
| 278 | substs.set('sysctldir', sysctldir) |
| 279 | substs.set('binfmtdir', binfmtdir) |
| 280 | substs.set('modulesloaddir', modulesloaddir) |
Zbigniew Jędrzejewski-Szmek | 424e80b | 2018-05-19 17:02:37 +0200 | [diff] [blame] | 281 | substs.set('modprobedir', modprobedir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 282 | substs.set('systemgeneratordir', systemgeneratordir) |
| 283 | substs.set('usergeneratordir', usergeneratordir) |
| 284 | substs.set('systemenvgeneratordir', systemenvgeneratordir) |
| 285 | substs.set('userenvgeneratordir', userenvgeneratordir) |
| 286 | substs.set('systemshutdowndir', systemshutdowndir) |
| 287 | substs.set('systemsleepdir', systemsleepdir) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 288 | substs.set('CERTIFICATEROOT', get_option('certificate-root')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 289 | substs.set('RANDOM_SEED', join_paths(randomseeddir, 'random-seed')) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 290 | substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path) |
| 291 | substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) |
| 292 | substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) |
Zbigniew Jędrzejewski-Szmek | 444d586 | 2018-02-15 11:43:08 +0100 | [diff] [blame] | 293 | substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 36cf450 | 2019-06-06 19:22:20 +0200 | [diff] [blame] | 294 | substs.set('STATUS_UNIT_FORMAT_DEFAULT', status_unit_format_default) |
Zbigniew Jędrzejewski-Szmek | c02b6ee | 2018-10-17 10:21:48 +0200 | [diff] [blame] | 295 | substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE')) |
Zbigniew Jędrzejewski-Szmek | 81e0677 | 2020-04-24 20:12:03 +0200 | [diff] [blame] | 296 | substs.set('BUILD_ROOT', project_build_root) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 297 | |
| 298 | ##################################################################### |
| 299 | |
| 300 | cc = meson.get_compiler('c') |
| 301 | pkgconfig = import('pkgconfig') |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 302 | check_compilation_sh = find_program('tools/check-compilation.sh') |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 303 | meson_build_sh = find_program('tools/meson-build.sh') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 304 | |
Zbigniew Jędrzejewski-Szmek | d3da291 | 2018-09-12 11:02:58 +0200 | [diff] [blame] | 305 | want_tests = get_option('tests') |
| 306 | slow_tests = want_tests != 'false' and get_option('slow-tests') |
| 307 | install_tests = get_option('install-tests') |
| 308 | |
James Hilliard | 46e63a2 | 2018-12-27 09:16:20 +0800 | [diff] [blame] | 309 | if add_languages('cpp', required : fuzzer_build) |
Zbigniew Jędrzejewski-Szmek | 3b2bdd6 | 2018-09-12 16:52:08 +0200 | [diff] [blame] | 310 | # Used only for tests |
Zbigniew Jędrzejewski-Szmek | e9f4f56 | 2019-11-10 12:16:41 +0100 | [diff] [blame] | 311 | cxx = meson.get_compiler('cpp') |
| 312 | cxx_cmd = ' '.join(cxx.cmd_array()) |
Zbigniew Jędrzejewski-Szmek | 1b2acaa | 2018-10-09 18:48:09 +0200 | [diff] [blame] | 313 | else |
Zbigniew Jędrzejewski-Szmek | 9b0ca01 | 2018-10-10 11:50:57 +0200 | [diff] [blame] | 314 | cxx_cmd = '' |
Zbigniew Jędrzejewski-Szmek | 94e2523 | 2017-05-13 13:23:28 -0400 | [diff] [blame] | 315 | endif |
| 316 | |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 317 | if want_libfuzzer |
Evgeny Vereshchagin | 9c5c467 | 2019-05-09 00:03:41 +0200 | [diff] [blame] | 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') |
| 323 | else |
| 324 | error('Looks like neither libFuzzer nor -fsanitize=fuzzer-no-link is supported') |
| 325 | endif |
Zbigniew Jędrzejewski-Szmek | c09edc7 | 2018-10-10 11:56:45 +0200 | [diff] [blame] | 326 | elif want_ossfuzz |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 327 | fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine') |
| 328 | endif |
| 329 | |
Zbigniew Jędrzejewski-Szmek | e9f4f56 | 2019-11-10 12:16:41 +0100 | [diff] [blame] | 330 | # Those generate many false positives, and we do not want to change the code to |
| 331 | # avoid them. |
| 332 | basic_disabled_warnings = [ |
| 333 | '-Wno-unused-parameter', |
| 334 | '-Wno-missing-field-initializers', |
| 335 | '-Wno-unused-result', |
| 336 | '-Wno-format-signedness', |
| 337 | ] |
Zbigniew Jędrzejewski-Szmek | e9f4f56 | 2019-11-10 12:16:41 +0100 | [diff] [blame] | 338 | |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 339 | possible_cc_flags = [ |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 340 | '-Werror=undef', |
| 341 | '-Wlogical-op', |
| 342 | '-Wmissing-include-dirs', |
| 343 | '-Wold-style-definition', |
| 344 | '-Wpointer-arith', |
| 345 | '-Winit-self', |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 346 | '-Wfloat-equal', |
| 347 | '-Wsuggest-attribute=noreturn', |
| 348 | '-Werror=missing-prototypes', |
| 349 | '-Werror=implicit-function-declaration', |
| 350 | '-Werror=missing-declarations', |
| 351 | '-Werror=return-type', |
| 352 | '-Werror=incompatible-pointer-types', |
| 353 | '-Werror=format=2', |
| 354 | '-Wstrict-prototypes', |
| 355 | '-Wredundant-decls', |
| 356 | '-Wmissing-noreturn', |
| 357 | '-Wimplicit-fallthrough=5', |
| 358 | '-Wshadow', |
| 359 | '-Wendif-labels', |
| 360 | '-Wstrict-aliasing=2', |
| 361 | '-Wwrite-strings', |
| 362 | '-Werror=overflow', |
Zbigniew Jędrzejewski-Szmek | b05ecb8 | 2018-06-09 13:12:52 +0200 | [diff] [blame] | 363 | '-Werror=shift-count-overflow', |
Zbigniew Jędrzejewski-Szmek | d28b67d | 2018-06-11 13:17:43 +0200 | [diff] [blame] | 364 | '-Werror=shift-overflow=2', |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 365 | '-Wdate-time', |
| 366 | '-Wnested-externs', |
Filipe Brandenburger | bf7efeb | 2018-09-08 13:55:09 -0700 | [diff] [blame] | 367 | |
| 368 | # negative arguments are correctly detected starting with meson 0.46. |
Zbigniew Jędrzejewski-Szmek | eed3362 | 2019-03-07 10:56:15 +0100 | [diff] [blame] | 369 | '-Wno-error=#warnings', # clang |
| 370 | '-Wno-string-plus-int', # clang |
Filipe Brandenburger | bf7efeb | 2018-09-08 13:55:09 -0700 | [diff] [blame] | 371 | |
Filipe Brandenburger | bf7efeb | 2018-09-08 13:55:09 -0700 | [diff] [blame] | 372 | # Disable -Wmaybe-uninitialized, since it's noisy on gcc 8 with |
| 373 | # optimizations enabled, producing essentially false positives. |
| 374 | '-Wno-maybe-uninitialized', |
| 375 | |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 376 | '-ffast-math', |
| 377 | '-fno-common', |
| 378 | '-fdiagnostics-show-option', |
| 379 | '-fno-strict-aliasing', |
| 380 | '-fvisibility=hidden', |
| 381 | '-fstack-protector', |
| 382 | '-fstack-protector-strong', |
| 383 | '--param=ssp-buffer-size=4', |
| 384 | ] |
| 385 | |
| 386 | # --as-needed and --no-undefined are provided by meson by default, |
| 387 | # run mesonconf to see what is enabled |
| 388 | possible_link_flags = [ |
| 389 | '-Wl,-z,relro', |
| 390 | '-Wl,-z,now', |
Norbert Lange | 68e70ac | 2019-09-19 17:49:20 +0200 | [diff] [blame] | 391 | '-fstack-protector', |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 392 | ] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 393 | |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 394 | if cc.get_id() == 'clang' |
| 395 | possible_cc_flags += [ |
| 396 | '-Wno-typedef-redefinition', |
| 397 | '-Wno-gnu-variable-sized-type-not-at-end', |
| 398 | ] |
| 399 | endif |
| 400 | |
| 401 | if get_option('buildtype') != 'debug' |
| 402 | possible_cc_flags += [ |
| 403 | '-ffunction-sections', |
| 404 | '-fdata-sections', |
| 405 | ] |
| 406 | |
| 407 | possible_link_flags += '-Wl,--gc-sections' |
| 408 | endif |
| 409 | |
Zbigniew Jędrzejewski-Szmek | e9f4f56 | 2019-11-10 12:16:41 +0100 | [diff] [blame] | 410 | add_project_arguments(cc.get_supported_arguments(basic_disabled_warnings), language : 'c') |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 411 | add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c') |
Yu Watanabe | 7a6397d | 2018-05-15 20:18:24 +0900 | [diff] [blame] | 412 | add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c') |
Yu Watanabe | 30a4ddf | 2018-05-10 15:30:42 +0900 | [diff] [blame] | 413 | |
Caio Marcelo de Oliveira Filho | 9e70f2f | 2018-02-19 01:37:19 -0800 | [diff] [blame] | 414 | if cc.compiles(''' |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 415 | #include <time.h> |
| 416 | #include <inttypes.h> |
| 417 | typedef uint64_t usec_t; |
| 418 | usec_t now(clockid_t clock); |
| 419 | int main(void) { |
| 420 | struct timespec now; |
| 421 | return 0; |
| 422 | } |
Fabrice Fontaine | 38c1c96 | 2018-11-29 13:22:08 +0100 | [diff] [blame] | 423 | ''', args: '-Werror=shadow', name : '-Werror=shadow with local shadowing') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 424 | add_project_arguments('-Werror=shadow', language : 'c') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 425 | endif |
| 426 | |
Zbigniew Jędrzejewski-Szmek | e9f4f56 | 2019-11-10 12:16:41 +0100 | [diff] [blame] | 427 | if cxx_cmd != '' |
| 428 | add_project_arguments(cxx.get_supported_arguments(basic_disabled_warnings), language : 'cpp') |
| 429 | endif |
| 430 | |
Zbigniew Jędrzejewski-Szmek | 0e3cc90 | 2018-10-11 15:12:41 +0200 | [diff] [blame] | 431 | cpp = ' '.join(cc.cmd_array()) + ' -E' |
Zbigniew Jędrzejewski-Szmek | 9cc0e6e | 2017-04-11 10:25:34 -0400 | [diff] [blame] | 432 | |
Zbigniew Jędrzejewski-Szmek | 6695c20 | 2019-05-07 15:10:58 +0200 | [diff] [blame] | 433 | has_wstringop_truncation = cc.has_argument('-Wstringop-truncation') |
| 434 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 435 | ##################################################################### |
| 436 | # compilation result tests |
| 437 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 438 | conf.set('_GNU_SOURCE', true) |
| 439 | conf.set('__SANE_USERSPACE_TYPES__', true) |
Zbigniew Jędrzejewski-Szmek | 6695c20 | 2019-05-07 15:10:58 +0200 | [diff] [blame] | 440 | conf.set10('HAVE_WSTRINGOP_TRUNCATION', has_wstringop_truncation) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 441 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 442 | conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>')) |
| 443 | conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>')) |
| 444 | conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>')) |
| 445 | conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>')) |
| 446 | |
| 447 | decl_headers = ''' |
| 448 | #include <uchar.h> |
Lennart Poettering | 4c2e1b3 | 2018-02-20 12:48:33 +0100 | [diff] [blame] | 449 | #include <sys/stat.h> |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 450 | ''' |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 451 | |
| 452 | foreach decl : ['char16_t', |
| 453 | 'char32_t', |
Lennart Poettering | 4c2e1b3 | 2018-02-20 12:48:33 +0100 | [diff] [blame] | 454 | 'struct statx', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 455 | ] |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 456 | |
| 457 | # We get -1 if the size cannot be determined |
Zbigniew Jędrzejewski-Szmek | 9c869d0 | 2018-07-18 17:26:17 +0200 | [diff] [blame] | 458 | have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0 |
| 459 | |
| 460 | if decl == 'struct statx' |
| 461 | if have |
| 462 | want_linux_stat_h = false |
| 463 | else |
| 464 | have = cc.sizeof(decl, |
| 465 | prefix : decl_headers + '#include <linux/stat.h>', |
| 466 | args : '-D_GNU_SOURCE') > 0 |
| 467 | want_linux_stat_h = have |
| 468 | endif |
| 469 | endif |
| 470 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 471 | conf.set10('HAVE_' + decl.underscorify().to_upper(), have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 472 | endforeach |
| 473 | |
Zbigniew Jędrzejewski-Szmek | 9c869d0 | 2018-07-18 17:26:17 +0200 | [diff] [blame] | 474 | conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h) |
Filipe Brandenburger | 75720bf | 2018-07-15 22:43:35 -0700 | [diff] [blame] | 475 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 476 | foreach ident : ['secure_getenv', '__secure_getenv'] |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 477 | conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 478 | endforeach |
| 479 | |
| 480 | foreach ident : [ |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 481 | ['memfd_create', '''#include <sys/mman.h>'''], |
Lennart Poettering | 7b961e4 | 2017-12-25 12:35:28 +0100 | [diff] [blame] | 482 | ['gettid', '''#include <sys/types.h> |
| 483 | #include <unistd.h>'''], |
Lennart Poettering | 3c042ad | 2017-12-25 12:07:40 +0100 | [diff] [blame] | 484 | ['pivot_root', '''#include <stdlib.h> |
| 485 | #include <unistd.h>'''], # no known header declares pivot_root |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 486 | ['name_to_handle_at', '''#include <sys/types.h> |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 487 | #include <sys/stat.h> |
| 488 | #include <fcntl.h>'''], |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 489 | ['setns', '''#include <sched.h>'''], |
Lennart Poettering | 2acfd0f | 2017-12-25 12:35:43 +0100 | [diff] [blame] | 490 | ['renameat2', '''#include <stdio.h> |
| 491 | #include <fcntl.h>'''], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 492 | ['kcmp', '''#include <linux/kcmp.h>'''], |
| 493 | ['keyctl', '''#include <sys/types.h> |
| 494 | #include <keyutils.h>'''], |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 495 | ['copy_file_range', '''#include <sys/syscall.h> |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 496 | #include <unistd.h>'''], |
Daniel Mack | 71e5200 | 2016-10-18 17:57:10 +0200 | [diff] [blame] | 497 | ['bpf', '''#include <sys/syscall.h> |
| 498 | #include <unistd.h>'''], |
Lennart Poettering | 4c2e1b3 | 2018-02-20 12:48:33 +0100 | [diff] [blame] | 499 | ['statx', '''#include <sys/types.h> |
| 500 | #include <sys/stat.h> |
| 501 | #include <unistd.h>'''], |
Zbigniew Jędrzejewski-Szmek | aa484f3 | 2018-02-26 21:20:00 +0100 | [diff] [blame] | 502 | ['explicit_bzero' , '''#include <string.h>'''], |
| 503 | ['reallocarray', '''#include <malloc.h>'''], |
Michal Sekletar | b070c7c | 2019-03-12 18:58:26 +0100 | [diff] [blame] | 504 | ['set_mempolicy', '''#include <stdlib.h> |
| 505 | #include <unistd.h>'''], |
| 506 | ['get_mempolicy', '''#include <stdlib.h> |
| 507 | #include <unistd.h>'''], |
Lennart Poettering | 5f152f4 | 2019-10-25 16:06:06 +0200 | [diff] [blame] | 508 | ['pidfd_send_signal', '''#include <stdlib.h> |
| 509 | #include <unistd.h> |
| 510 | #include <signal.h> |
| 511 | #include <sys/wait.h>'''], |
| 512 | ['pidfd_open', '''#include <stdlib.h> |
| 513 | #include <unistd.h> |
| 514 | #include <signal.h> |
| 515 | #include <sys/wait.h>'''], |
Lennart Poettering | 5ead4e8 | 2019-10-30 16:29:42 +0100 | [diff] [blame] | 516 | ['rt_sigqueueinfo', '''#include <stdlib.h> |
| 517 | #include <unistd.h> |
| 518 | #include <signal.h> |
| 519 | #include <sys/wait.h>'''], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 520 | ] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 521 | |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 522 | have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') |
Zbigniew Jędrzejewski-Szmek | 4b9545f | 2017-10-03 10:32:34 +0200 | [diff] [blame] | 523 | conf.set10('HAVE_' + ident[0].to_upper(), have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 524 | endforeach |
| 525 | |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 526 | if cc.has_function('getrandom', prefix : '''#include <sys/random.h>''', args : '-D_GNU_SOURCE') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 527 | conf.set10('USE_SYS_RANDOM_H', true) |
Zbigniew Jędrzejewski-Szmek | 4b9545f | 2017-10-03 10:32:34 +0200 | [diff] [blame] | 528 | conf.set10('HAVE_GETRANDOM', true) |
Zbigniew Jędrzejewski-Szmek | 4984c8b | 2017-04-19 21:20:54 -0400 | [diff] [blame] | 529 | else |
| 530 | have = cc.has_function('getrandom', prefix : '''#include <linux/random.h>''') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 531 | conf.set10('USE_SYS_RANDOM_H', false) |
Zbigniew Jędrzejewski-Szmek | 4b9545f | 2017-10-03 10:32:34 +0200 | [diff] [blame] | 532 | conf.set10('HAVE_GETRANDOM', have) |
Zbigniew Jędrzejewski-Szmek | 4984c8b | 2017-04-19 21:20:54 -0400 | [diff] [blame] | 533 | endif |
| 534 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 535 | ##################################################################### |
| 536 | |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 537 | vcs_tagger = [project_source_root + '/tools/meson-vcs-tag.sh', |
| 538 | project_source_root, |
Zbigniew Jędrzejewski-Szmek | e1ca734 | 2018-12-19 13:33:09 +0100 | [diff] [blame] | 539 | get_option('version-tag'), |
Zbigniew Jędrzejewski-Szmek | 681bd2c | 2018-12-20 20:35:25 +0100 | [diff] [blame] | 540 | meson.project_version()] |
| 541 | |
Louis Taylor | d1084aa | 2019-01-21 21:45:36 +0000 | [diff] [blame] | 542 | version_h = vcs_tag( |
| 543 | input : 'src/version/version.h.in', |
| 544 | output : 'version.h', |
| 545 | command: vcs_tagger) |
| 546 | |
| 547 | versiondep = declare_dependency(sources: version_h) |
| 548 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 549 | sed = find_program('sed') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 550 | awk = find_program('awk') |
Zbigniew Jędrzejewski-Szmek | d730e2d | 2017-04-25 08:49:58 -0400 | [diff] [blame] | 551 | m4 = find_program('m4') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 552 | stat = find_program('stat') |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 553 | git = find_program('git', required : false) |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 554 | env = find_program('env') |
Zbigniew Jędrzejewski-Szmek | b1ffacb | 2018-03-22 08:34:21 +0100 | [diff] [blame] | 555 | perl = find_program('perl', required : false) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 556 | |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 557 | meson_make_symlink = project_source_root + '/tools/meson-make-symlink.sh' |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 558 | mkdir_p = 'mkdir -p $DESTDIR/@0@' |
Zbigniew Jędrzejewski-Szmek | d83f4f5 | 2017-04-16 12:04:46 -0400 | [diff] [blame] | 559 | test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh') |
| 560 | splash_bmp = files('test/splash.bmp') |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 561 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 562 | # if -Dxxx-path option is found, use that. Otherwise, check in $PATH, |
| 563 | # /usr/sbin, /sbin, and fall back to the default from middle column. |
Mike Gilbert | 2fa645f | 2018-01-04 07:14:20 -0500 | [diff] [blame] | 564 | progs = [['quotaon', '/usr/sbin/quotaon' ], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 565 | ['quotacheck', '/usr/sbin/quotacheck' ], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 566 | ['kmod', '/usr/bin/kmod' ], |
| 567 | ['kexec', '/usr/sbin/kexec' ], |
| 568 | ['sulogin', '/usr/sbin/sulogin' ], |
| 569 | ['mount', '/usr/bin/mount', 'MOUNT_PATH'], |
| 570 | ['umount', '/usr/bin/umount', 'UMOUNT_PATH'], |
| 571 | ['loadkeys', '/usr/bin/loadkeys', 'KBD_LOADKEYS'], |
| 572 | ['setfont', '/usr/bin/setfont', 'KBD_SETFONT'], |
Michael Biebl | 6db9046 | 2019-07-18 01:24:00 +0200 | [diff] [blame] | 573 | ['nologin', '/usr/sbin/nologin', ], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 574 | ] |
| 575 | foreach prog : progs |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 576 | path = get_option(prog[0] + '-path') |
| 577 | if path != '' |
| 578 | message('Using @1@ for @0@'.format(prog[0], path)) |
| 579 | else |
| 580 | exe = find_program(prog[0], |
| 581 | '/usr/sbin/' + prog[0], |
| 582 | '/sbin/' + prog[0], |
| 583 | required: false) |
| 584 | path = exe.found() ? exe.path() : prog[1] |
| 585 | endif |
| 586 | name = prog.length() > 2 ? prog[2] : prog[0].to_upper() |
| 587 | conf.set_quoted(name, path) |
| 588 | substs.set(name, path) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 589 | endforeach |
| 590 | |
Mike Gilbert | 2fa645f | 2018-01-04 07:14:20 -0500 | [diff] [blame] | 591 | conf.set_quoted('TELINIT', get_option('telinit-path')) |
| 592 | |
Zbigniew Jędrzejewski-Szmek | 1276a9f | 2017-04-18 19:11:54 -0400 | [diff] [blame] | 593 | if run_command('ln', '--relative', '--help').returncode() != 0 |
Zbigniew Jędrzejewski-Szmek | cd00101 | 2018-03-09 08:56:23 +0100 | [diff] [blame] | 594 | error('ln does not support --relative (added in coreutils 8.16)') |
Zbigniew Jędrzejewski-Szmek | 1276a9f | 2017-04-18 19:11:54 -0400 | [diff] [blame] | 595 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 596 | |
| 597 | ############################################################ |
| 598 | |
| 599 | gperf = find_program('gperf') |
| 600 | |
| 601 | gperf_test_format = ''' |
| 602 | #include <string.h> |
| 603 | const char * in_word_set(const char *, @0@); |
| 604 | @1@ |
| 605 | ''' |
| 606 | gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C' |
| 607 | gperf_snippet = run_command('sh', '-c', gperf_snippet_format.format(gperf.path())) |
| 608 | gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout()) |
| 609 | if cc.compiles(gperf_test) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 610 | gperf_len_type = 'size_t' |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 611 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 612 | gperf_test = gperf_test_format.format('unsigned', gperf_snippet.stdout()) |
| 613 | if cc.compiles(gperf_test) |
| 614 | gperf_len_type = 'unsigned' |
| 615 | else |
| 616 | error('unable to determine gperf len type') |
| 617 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 618 | endif |
| 619 | message('gperf len type is @0@'.format(gperf_len_type)) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 620 | conf.set('GPERF_LEN_TYPE', gperf_len_type, |
| 621 | description : 'The type of gperf "len" parameter') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 622 | |
| 623 | ############################################################ |
| 624 | |
| 625 | if not cc.has_header('sys/capability.h') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 626 | error('POSIX caps headers not found') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 627 | endif |
Björn Esser | 9f555bb | 2018-01-25 15:30:15 +0100 | [diff] [blame] | 628 | foreach header : ['crypt.h', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 629 | 'linux/memfd.h', |
| 630 | 'linux/vm_sockets.h', |
Zbigniew Jędrzejewski-Szmek | af8786b | 2017-10-03 12:09:40 +0200 | [diff] [blame] | 631 | 'sys/auxv.h', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 632 | 'valgrind/memcheck.h', |
| 633 | 'valgrind/valgrind.h', |
| 634 | ] |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 635 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 636 | conf.set10('HAVE_' + header.underscorify().to_upper(), |
| 637 | cc.has_header(header)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 638 | endforeach |
| 639 | |
| 640 | ############################################################ |
| 641 | |
Zbigniew Jędrzejewski-Szmek | eef4b80 | 2020-05-07 17:30:02 +0200 | [diff] [blame] | 642 | fallback_hostname = get_option('fallback-hostname') |
| 643 | if fallback_hostname == '' or fallback_hostname[0] == '.' or fallback_hostname[0] == '-' |
| 644 | error('Invalid fallback-hostname configuration') |
| 645 | # A more extensive test is done in test-hostname-util. Let's catch |
| 646 | # the most obvious errors here so we don't fail with an assert later. |
| 647 | endif |
| 648 | conf.set_quoted('FALLBACK_HOSTNAME', fallback_hostname) |
| 649 | |
Zbigniew Jędrzejewski-Szmek | 5248e7e | 2017-07-11 02:15:08 -0400 | [diff] [blame] | 650 | conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname')) |
| 651 | gateway_hostnames = ['_gateway'] + (conf.get('ENABLE_COMPAT_GATEWAY_HOSTNAME') == 1 ? ['gateway'] : []) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 652 | |
| 653 | default_hierarchy = get_option('default-hierarchy') |
| 654 | conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy, |
| 655 | description : 'default cgroup hierarchy as string') |
| 656 | if default_hierarchy == 'legacy' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 657 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_NONE') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 658 | elif default_hierarchy == 'hybrid' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 659 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_SYSTEMD') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 660 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 661 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_ALL') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 662 | endif |
| 663 | |
Zbigniew Jędrzejewski-Szmek | 06da5c6 | 2018-12-11 23:28:29 +0100 | [diff] [blame] | 664 | default_net_naming_scheme = get_option('default-net-naming-scheme') |
| 665 | conf.set_quoted('DEFAULT_NET_NAMING_SCHEME', default_net_naming_scheme) |
| 666 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 667 | time_epoch = get_option('time-epoch') |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 668 | if time_epoch == -1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 669 | NEWS = files('NEWS') |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 670 | time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout().to_int() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 671 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 672 | conf.set('TIME_EPOCH', time_epoch) |
| 673 | |
| 674 | system_uid_max = get_option('system-uid-max') |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 675 | if system_uid_max == -1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 676 | system_uid_max = run_command( |
| 677 | awk, |
Caio Marcelo de Oliveira Filho | 2f62cf3 | 2018-02-18 18:33:16 -0800 | [diff] [blame] | 678 | '/^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }', |
| 679 | '/etc/login.defs').stdout().strip() |
| 680 | if system_uid_max == '' |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 681 | system_uid_max = 999 |
| 682 | else |
| 683 | system_uid_max = system_uid_max.to_int() |
Caio Marcelo de Oliveira Filho | 2f62cf3 | 2018-02-18 18:33:16 -0800 | [diff] [blame] | 684 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 685 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 686 | conf.set('SYSTEM_UID_MAX', system_uid_max) |
| 687 | substs.set('systemuidmax', system_uid_max) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 688 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 689 | system_gid_max = get_option('system-gid-max') |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 690 | if system_gid_max == -1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 691 | system_gid_max = run_command( |
| 692 | awk, |
Caio Marcelo de Oliveira Filho | 2f62cf3 | 2018-02-18 18:33:16 -0800 | [diff] [blame] | 693 | '/^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }', |
| 694 | '/etc/login.defs').stdout().strip() |
| 695 | if system_gid_max == '' |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 696 | system_gid_max = 999 |
| 697 | else |
| 698 | system_gid_max = system_gid_max.to_int() |
Caio Marcelo de Oliveira Filho | 2f62cf3 | 2018-02-18 18:33:16 -0800 | [diff] [blame] | 699 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 700 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 701 | conf.set('SYSTEM_GID_MAX', system_gid_max) |
| 702 | substs.set('systemgidmax', system_gid_max) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 703 | |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 704 | dynamic_uid_min = get_option('dynamic-uid-min') |
| 705 | dynamic_uid_max = get_option('dynamic-uid-max') |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 706 | conf.set('DYNAMIC_UID_MIN', dynamic_uid_min) |
| 707 | conf.set('DYNAMIC_UID_MAX', dynamic_uid_max) |
| 708 | substs.set('dynamicuidmin', dynamic_uid_min) |
| 709 | substs.set('dynamicuidmax', dynamic_uid_max) |
| 710 | |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 711 | container_uid_base_min = get_option('container-uid-base-min') |
| 712 | container_uid_base_max = get_option('container-uid-base-max') |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 713 | conf.set('CONTAINER_UID_BASE_MIN', container_uid_base_min) |
| 714 | conf.set('CONTAINER_UID_BASE_MAX', container_uid_base_max) |
| 715 | substs.set('containeruidbasemin', container_uid_base_min) |
| 716 | substs.set('containeruidbasemax', container_uid_base_max) |
| 717 | |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 718 | nobody_user = get_option('nobody-user') |
| 719 | nobody_group = get_option('nobody-group') |
| 720 | |
Chen Qi | 2484bff | 2018-07-23 14:53:09 +0800 | [diff] [blame] | 721 | if not meson.is_cross_build() |
| 722 | getent_result = run_command('getent', 'passwd', '65534') |
| 723 | if getent_result.returncode() == 0 |
| 724 | name = getent_result.stdout().split(':')[0] |
| 725 | if name != nobody_user |
| 726 | warning('\n' + |
| 727 | '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) + |
| 728 | 'Your build will result in an user table setup that is incompatible with the local system.') |
| 729 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 730 | endif |
Chen Qi | 2484bff | 2018-07-23 14:53:09 +0800 | [diff] [blame] | 731 | id_result = run_command('id', '-u', nobody_user) |
| 732 | if id_result.returncode() == 0 |
| 733 | id = id_result.stdout().to_int() |
| 734 | if id != 65534 |
| 735 | warning('\n' + |
| 736 | '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) + |
| 737 | 'Your build will result in an user table setup that is incompatible with the local system.') |
| 738 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 739 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 740 | |
Chen Qi | 2484bff | 2018-07-23 14:53:09 +0800 | [diff] [blame] | 741 | getent_result = run_command('getent', 'group', '65534') |
| 742 | if getent_result.returncode() == 0 |
| 743 | name = getent_result.stdout().split(':')[0] |
| 744 | if name != nobody_group |
| 745 | warning('\n' + |
| 746 | '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) + |
| 747 | 'Your build will result in an group table setup that is incompatible with the local system.') |
| 748 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 749 | endif |
Chen Qi | 2484bff | 2018-07-23 14:53:09 +0800 | [diff] [blame] | 750 | id_result = run_command('id', '-g', nobody_group) |
| 751 | if id_result.returncode() == 0 |
| 752 | id = id_result.stdout().to_int() |
| 753 | if id != 65534 |
| 754 | warning('\n' + |
| 755 | 'The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) + |
| 756 | 'Your build will result in an group table setup that is incompatible with the local system.') |
| 757 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 758 | endif |
| 759 | endif |
Yu Watanabe | 8374cc6 | 2017-12-07 17:19:11 +0900 | [diff] [blame] | 760 | if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup') |
Yu Watanabe | 8ea9fad | 2018-05-10 14:50:52 +0900 | [diff] [blame] | 761 | warning('\n' + |
| 762 | 'The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) + |
| 763 | 'Please re-check that both "nobody-user" and "nobody-group" options are correctly set.') |
Yu Watanabe | 8374cc6 | 2017-12-07 17:19:11 +0900 | [diff] [blame] | 764 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 765 | |
| 766 | conf.set_quoted('NOBODY_USER_NAME', nobody_user) |
| 767 | conf.set_quoted('NOBODY_GROUP_NAME', nobody_group) |
Yu Watanabe | 6071202 | 2017-12-07 15:49:16 +0900 | [diff] [blame] | 768 | substs.set('NOBODY_USER_NAME', nobody_user) |
| 769 | substs.set('NOBODY_GROUP_NAME', nobody_group) |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 770 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 771 | tty_gid = get_option('tty-gid') |
| 772 | conf.set('TTY_GID', tty_gid) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 773 | substs.set('TTY_GID', tty_gid) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 774 | |
Ikey Doherty | 84786b8 | 2017-12-03 12:28:23 +0000 | [diff] [blame] | 775 | # Ensure provided GID argument is numeric, otherwise fallback to default assignment |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 776 | users_gid = get_option('users-gid') |
| 777 | substs.set('USERS_GID', users_gid < 0 ? '-' : users_gid) |
Ikey Doherty | 84786b8 | 2017-12-03 12:28:23 +0000 | [diff] [blame] | 778 | |
Yu Watanabe | 348b443 | 2018-05-07 18:17:35 +0900 | [diff] [blame] | 779 | conf.set10('ENABLE_ADM_GROUP', get_option('adm-group')) |
| 780 | conf.set10('ENABLE_WHEEL_GROUP', get_option('wheel-group')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 781 | |
Michael Biebl | ace5e31 | 2018-07-13 23:36:13 +0200 | [diff] [blame] | 782 | dev_kvm_mode = get_option('dev-kvm-mode') |
| 783 | substs.set('DEV_KVM_MODE', dev_kvm_mode) |
| 784 | conf.set10('DEV_KVM_UACCESS', dev_kvm_mode != '0666') |
Michael Biebl | 055a083 | 2019-03-13 23:22:26 +0100 | [diff] [blame] | 785 | group_render_mode = get_option('group-render-mode') |
| 786 | substs.set('GROUP_RENDER_MODE', group_render_mode) |
| 787 | conf.set10('GROUP_RENDER_UACCESS', group_render_mode != '0666') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 788 | |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 789 | kill_user_processes = get_option('default-kill-user-processes') |
| 790 | conf.set10('KILL_USER_PROCESSES', kill_user_processes) |
Michal Koutný | c7f7e85 | 2018-03-09 16:40:41 +0100 | [diff] [blame] | 791 | conf.set_quoted('KILL_USER_PROCESSES_YES_NO', kill_user_processes ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 792 | substs.set('KILL_USER_PROCESSES', kill_user_processes ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 793 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 794 | dns_servers = get_option('dns-servers') |
| 795 | conf.set_quoted('DNS_SERVERS', dns_servers) |
| 796 | substs.set('DNS_SERVERS', dns_servers) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 797 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 798 | ntp_servers = get_option('ntp-servers') |
| 799 | conf.set_quoted('NTP_SERVERS', ntp_servers) |
| 800 | substs.set('NTP_SERVERS', ntp_servers) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 801 | |
Dave Reisner | 8ca9e92 | 2018-12-28 07:38:36 -0500 | [diff] [blame] | 802 | default_locale = get_option('default-locale') |
Yu Watanabe | 03475e2 | 2018-12-29 22:00:07 +0900 | [diff] [blame] | 803 | if default_locale == '' |
James Hilliard | 50f2fc7 | 2019-01-05 11:28:59 +0800 | [diff] [blame] | 804 | if not meson.is_cross_build() |
| 805 | choose_default_locale_sh = find_program('tools/choose-default-locale.sh') |
| 806 | default_locale = run_command(choose_default_locale_sh).stdout().strip() |
| 807 | else |
| 808 | default_locale = 'C.UTF-8' |
| 809 | endif |
Yu Watanabe | 03475e2 | 2018-12-29 22:00:07 +0900 | [diff] [blame] | 810 | endif |
Dave Reisner | 8ca9e92 | 2018-12-28 07:38:36 -0500 | [diff] [blame] | 811 | conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale) |
| 812 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 813 | conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) |
| 814 | |
Zbigniew Jędrzejewski-Szmek | 21d0dd5 | 2019-10-25 12:17:24 +0200 | [diff] [blame] | 815 | service_watchdog = get_option('service-watchdog') |
Anita Zhang | 7bc9ea5 | 2019-10-25 15:46:21 -0700 | [diff] [blame] | 816 | watchdog_value = service_watchdog == '' ? '' : 'WatchdogSec=' + service_watchdog |
| 817 | substs.set('SERVICE_WATCHDOG', watchdog_value) |
Zbigniew Jędrzejewski-Szmek | 21d0dd5 | 2019-10-25 12:17:24 +0200 | [diff] [blame] | 818 | |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 819 | substs.set('SUSHELL', get_option('debug-shell')) |
| 820 | substs.set('DEBUGTTY', get_option('debug-tty')) |
Jan Synacek | 93912e8 | 2019-04-25 12:19:16 +0200 | [diff] [blame] | 821 | conf.set_quoted('DEBUGTTY', get_option('debug-tty')) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 822 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 823 | enable_debug_hashmap = false |
| 824 | enable_debug_mmap_cache = false |
Yu Watanabe | d660149 | 2018-11-23 00:36:35 +0900 | [diff] [blame] | 825 | enable_debug_siphash = false |
Zbigniew Jędrzejewski-Szmek | 8f6b442 | 2018-08-19 19:11:30 +0200 | [diff] [blame] | 826 | foreach name : get_option('debug-extra') |
Yu Watanabe | ad7aa76 | 2018-05-02 13:56:28 +0900 | [diff] [blame] | 827 | if name == 'hashmap' |
| 828 | enable_debug_hashmap = true |
| 829 | elif name == 'mmap-cache' |
| 830 | enable_debug_mmap_cache = true |
Yu Watanabe | d660149 | 2018-11-23 00:36:35 +0900 | [diff] [blame] | 831 | elif name == 'siphash' |
| 832 | enable_debug_siphash = true |
Yu Watanabe | ad7aa76 | 2018-05-02 13:56:28 +0900 | [diff] [blame] | 833 | else |
| 834 | message('unknown debug option "@0@", ignoring'.format(name)) |
| 835 | endif |
| 836 | endforeach |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 837 | conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap) |
| 838 | conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache) |
Yu Watanabe | d660149 | 2018-11-23 00:36:35 +0900 | [diff] [blame] | 839 | conf.set10('ENABLE_DEBUG_SIPHASH', enable_debug_siphash) |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 840 | |
Zbigniew Jędrzejewski-Szmek | d18cb39 | 2018-05-13 22:28:24 +0200 | [diff] [blame] | 841 | conf.set10('VALGRIND', get_option('valgrind')) |
Zbigniew Jędrzejewski-Szmek | fd5dec9 | 2018-08-07 17:34:47 +0200 | [diff] [blame] | 842 | conf.set10('LOG_TRACE', get_option('log-trace')) |
Zbigniew Jędrzejewski-Szmek | d18cb39 | 2018-05-13 22:28:24 +0200 | [diff] [blame] | 843 | |
Zbigniew Jędrzejewski-Szmek | 3602ca6 | 2019-11-12 15:38:19 +0100 | [diff] [blame] | 844 | default_user_path = get_option('user-path') |
| 845 | if default_user_path != '' |
| 846 | conf.set_quoted('DEFAULT_USER_PATH', default_user_path) |
Zbigniew Jędrzejewski-Szmek | 5bc655c | 2019-11-13 22:22:58 +0100 | [diff] [blame] | 847 | default_user_path_display = default_user_path |
| 848 | else |
| 849 | # meson 0.49 fails when ?: is used in .format() |
| 850 | default_user_path_display = '(same as system services)' |
Zbigniew Jędrzejewski-Szmek | 3602ca6 | 2019-11-12 15:38:19 +0100 | [diff] [blame] | 851 | endif |
| 852 | |
Zbigniew Jędrzejewski-Szmek | 5bc655c | 2019-11-13 22:22:58 +0100 | [diff] [blame] | 853 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 854 | ##################################################################### |
| 855 | |
| 856 | threads = dependency('threads') |
| 857 | librt = cc.find_library('rt') |
| 858 | libm = cc.find_library('m') |
| 859 | libdl = cc.find_library('dl') |
| 860 | libcrypt = cc.find_library('crypt') |
| 861 | |
Zbigniew Jędrzejewski-Szmek | 1800cc8 | 2017-04-27 01:30:30 -0400 | [diff] [blame] | 862 | libcap = dependency('libcap', required : false) |
| 863 | if not libcap.found() |
| 864 | # Compat with Ubuntu 14.04 which ships libcap w/o .pc file |
| 865 | libcap = cc.find_library('cap') |
| 866 | endif |
| 867 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 868 | libmount = dependency('mount', |
Zbigniew Jędrzejewski-Szmek | c0b4b0f | 2018-03-09 14:58:47 +0100 | [diff] [blame] | 869 | version : fuzzer_build ? '>= 0' : '>= 2.30') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 870 | |
Lennart Poettering | e594a3b | 2019-12-10 21:31:41 +0100 | [diff] [blame] | 871 | want_libfdisk = get_option('fdisk') |
| 872 | if want_libfdisk != 'false' and not skip_deps |
| 873 | libfdisk = dependency('fdisk', |
| 874 | required : want_libfdisk == 'true') |
| 875 | have = libfdisk.found() |
| 876 | else |
| 877 | have = false |
| 878 | libfdisk = [] |
| 879 | endif |
| 880 | conf.set10('HAVE_LIBFDISK', have) |
| 881 | |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 882 | want_pwquality = get_option('pwquality') |
| 883 | if want_pwquality != 'false' and not skip_deps |
| 884 | libpwquality = dependency('pwquality', required : want_pwquality == 'true') |
| 885 | have = libpwquality.found() |
| 886 | else |
| 887 | have = false |
| 888 | libpwquality = [] |
| 889 | endif |
| 890 | conf.set10('HAVE_PWQUALITY', have) |
| 891 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 892 | want_seccomp = get_option('seccomp') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 893 | if want_seccomp != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 894 | libseccomp = dependency('libseccomp', |
Zbigniew Jędrzejewski-Szmek | 9f0e9c0 | 2017-04-27 10:05:18 -0400 | [diff] [blame] | 895 | version : '>= 2.3.1', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 896 | required : want_seccomp == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 897 | have = libseccomp.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 898 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 899 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 900 | libseccomp = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 901 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 902 | conf.set10('HAVE_SECCOMP', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 903 | |
| 904 | want_selinux = get_option('selinux') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 905 | if want_selinux != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 906 | libselinux = dependency('libselinux', |
| 907 | version : '>= 2.1.9', |
| 908 | required : want_selinux == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 909 | have = libselinux.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 910 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 911 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 912 | libselinux = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 913 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 914 | conf.set10('HAVE_SELINUX', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 915 | |
| 916 | want_apparmor = get_option('apparmor') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 917 | if want_apparmor != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 918 | libapparmor = dependency('libapparmor', |
| 919 | required : want_apparmor == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 920 | have = libapparmor.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 921 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 922 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 923 | libapparmor = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 924 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 925 | conf.set10('HAVE_APPARMOR', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 926 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 927 | smack_run_label = get_option('smack-run-label') |
| 928 | if smack_run_label != '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 929 | conf.set_quoted('SMACK_RUN_LABEL', smack_run_label) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 930 | endif |
| 931 | |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 932 | want_polkit = get_option('polkit') |
| 933 | install_polkit = false |
| 934 | install_polkit_pkla = false |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 935 | if want_polkit != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 936 | install_polkit = true |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 937 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 938 | libpolkit = dependency('polkit-gobject-1', |
| 939 | required : false) |
| 940 | if libpolkit.found() and libpolkit.version().version_compare('< 0.106') |
| 941 | message('Old polkit detected, will install pkla files') |
| 942 | install_polkit_pkla = true |
| 943 | endif |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 944 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 945 | conf.set10('ENABLE_POLKIT', install_polkit) |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 946 | |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 947 | want_acl = get_option('acl') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 948 | if want_acl != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 949 | libacl = cc.find_library('acl', required : want_acl == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 950 | have = libacl.found() |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 951 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 952 | have = false |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 953 | libacl = [] |
| 954 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 955 | conf.set10('HAVE_ACL', have) |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 956 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 957 | want_audit = get_option('audit') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 958 | if want_audit != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 959 | libaudit = dependency('audit', required : want_audit == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 960 | have = libaudit.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 961 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 962 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 963 | libaudit = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 964 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 965 | conf.set10('HAVE_AUDIT', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 966 | |
| 967 | want_blkid = get_option('blkid') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 968 | if want_blkid != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 969 | libblkid = dependency('blkid', required : want_blkid == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 970 | have = libblkid.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 971 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 972 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 973 | libblkid = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 974 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 975 | conf.set10('HAVE_BLKID', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 976 | |
| 977 | want_kmod = get_option('kmod') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 978 | if want_kmod != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 979 | libkmod = dependency('libkmod', |
| 980 | version : '>= 15', |
| 981 | required : want_kmod == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 982 | have = libkmod.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 983 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 984 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 985 | libkmod = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 986 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 987 | conf.set10('HAVE_KMOD', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 988 | |
| 989 | want_pam = get_option('pam') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 990 | if want_pam != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 991 | libpam = cc.find_library('pam', required : want_pam == 'true') |
| 992 | libpam_misc = cc.find_library('pam_misc', required : want_pam == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 993 | have = libpam.found() and libpam_misc.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 994 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 995 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 996 | libpam = [] |
| 997 | libpam_misc = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 998 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 999 | conf.set10('HAVE_PAM', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1000 | |
| 1001 | want_microhttpd = get_option('microhttpd') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1002 | if want_microhttpd != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1003 | libmicrohttpd = dependency('libmicrohttpd', |
| 1004 | version : '>= 0.9.33', |
| 1005 | required : want_microhttpd == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1006 | have = libmicrohttpd.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1007 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1008 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1009 | libmicrohttpd = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1010 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1011 | conf.set10('HAVE_MICROHTTPD', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1012 | |
| 1013 | want_libcryptsetup = get_option('libcryptsetup') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1014 | if want_libcryptsetup != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1015 | libcryptsetup = dependency('libcryptsetup', |
Jay Strict | d90874b | 2019-09-26 15:54:29 +0200 | [diff] [blame] | 1016 | version : '>= 2.0.1', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1017 | required : want_libcryptsetup == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1018 | have = libcryptsetup.found() |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 1019 | |
| 1020 | conf.set10('HAVE_CRYPT_SET_METADATA_SIZE', |
| 1021 | have and cc.has_function('crypt_set_metadata_size', dependencies : libcryptsetup)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1022 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1023 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1024 | libcryptsetup = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1025 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1026 | conf.set10('HAVE_LIBCRYPTSETUP', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1027 | |
| 1028 | want_libcurl = get_option('libcurl') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1029 | if want_libcurl != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1030 | libcurl = dependency('libcurl', |
| 1031 | version : '>= 7.32.0', |
| 1032 | required : want_libcurl == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1033 | have = libcurl.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1034 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1035 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1036 | libcurl = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1037 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1038 | conf.set10('HAVE_LIBCURL', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1039 | |
| 1040 | want_libidn = get_option('libidn') |
Zbigniew Jędrzejewski-Szmek | 87057e2 | 2017-05-09 21:56:34 -0400 | [diff] [blame] | 1041 | want_libidn2 = get_option('libidn2') |
| 1042 | if want_libidn == 'true' and want_libidn2 == 'true' |
| 1043 | error('libidn and libidn2 cannot be requested simultaneously') |
| 1044 | endif |
| 1045 | |
Yu Watanabe | 1b93139 | 2019-06-29 03:13:30 +0900 | [diff] [blame] | 1046 | if want_libidn2 != 'false' and want_libidn != 'true' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 7f7ab22 | 2017-07-12 03:25:59 -0400 | [diff] [blame] | 1047 | libidn = dependency('libidn2', |
| 1048 | required : want_libidn2 == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1049 | have = libidn.found() |
| 1050 | else |
| 1051 | have = false |
Yu Watanabe | 1b93139 | 2019-06-29 03:13:30 +0900 | [diff] [blame] | 1052 | libidn = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1053 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1054 | conf.set10('HAVE_LIBIDN2', have) |
Yu Watanabe | 1b93139 | 2019-06-29 03:13:30 +0900 | [diff] [blame] | 1055 | if not have and want_libidn != 'false' and not skip_deps |
| 1056 | # libidn is used for both libidn and libidn2 objects |
| 1057 | libidn = dependency('libidn', |
| 1058 | required : want_libidn == 'true') |
| 1059 | have = libidn.found() |
| 1060 | else |
| 1061 | have = false |
| 1062 | endif |
| 1063 | conf.set10('HAVE_LIBIDN', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1064 | |
| 1065 | want_libiptc = get_option('libiptc') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1066 | if want_libiptc != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1067 | libiptc = dependency('libiptc', |
| 1068 | required : want_libiptc == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1069 | have = libiptc.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1070 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1071 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1072 | libiptc = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1073 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1074 | conf.set10('HAVE_LIBIPTC', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1075 | |
| 1076 | want_qrencode = get_option('qrencode') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1077 | if want_qrencode != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1078 | libqrencode = dependency('libqrencode', |
| 1079 | required : want_qrencode == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1080 | have = libqrencode.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1081 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1082 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1083 | libqrencode = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1084 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1085 | conf.set10('HAVE_QRENCODE', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1086 | |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1087 | want_gcrypt = get_option('gcrypt') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1088 | if want_gcrypt != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1089 | libgcrypt = cc.find_library('gcrypt', required : want_gcrypt == 'true') |
| 1090 | libgpg_error = cc.find_library('gpg-error', required : want_gcrypt == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1091 | have = libgcrypt.found() and libgpg_error.found() |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1092 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1093 | have = false |
| 1094 | endif |
| 1095 | if not have |
| 1096 | # link to neither of the libs if one is not found |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1097 | libgcrypt = [] |
| 1098 | libgpg_error = [] |
| 1099 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1100 | conf.set10('HAVE_GCRYPT', have) |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1101 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1102 | want_gnutls = get_option('gnutls') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1103 | if want_gnutls != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1104 | libgnutls = dependency('gnutls', |
| 1105 | version : '>= 3.1.4', |
| 1106 | required : want_gnutls == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1107 | have = libgnutls.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1108 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1109 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1110 | libgnutls = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1111 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1112 | conf.set10('HAVE_GNUTLS', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1113 | |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1114 | want_openssl = get_option('openssl') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1115 | if want_openssl != 'false' and not skip_deps |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1116 | libopenssl = dependency('openssl', |
| 1117 | version : '>= 1.1.0', |
| 1118 | required : want_openssl == 'true') |
| 1119 | have = libopenssl.found() |
| 1120 | else |
| 1121 | have = false |
| 1122 | libopenssl = [] |
| 1123 | endif |
| 1124 | conf.set10('HAVE_OPENSSL', have) |
| 1125 | |
Lennart Poettering | 839fddb | 2019-11-05 11:49:27 +0100 | [diff] [blame] | 1126 | want_p11kit = get_option('p11kit') |
| 1127 | if want_p11kit != 'false' and not skip_deps |
| 1128 | libp11kit = dependency('p11-kit-1', |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1129 | version : '>= 0.23.3', |
| 1130 | required : want_p11kit == 'true') |
Lennart Poettering | 839fddb | 2019-11-05 11:49:27 +0100 | [diff] [blame] | 1131 | have = libp11kit.found() |
| 1132 | else |
| 1133 | have = false |
| 1134 | libp11kit = [] |
| 1135 | endif |
| 1136 | conf.set10('HAVE_P11KIT', have) |
| 1137 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1138 | want_elfutils = get_option('elfutils') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1139 | if want_elfutils != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1140 | libdw = dependency('libdw', |
| 1141 | required : want_elfutils == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1142 | have = libdw.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1143 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1144 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1145 | libdw = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1146 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1147 | conf.set10('HAVE_ELFUTILS', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1148 | |
| 1149 | want_zlib = get_option('zlib') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1150 | if want_zlib != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1151 | libz = dependency('zlib', |
| 1152 | required : want_zlib == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1153 | have = libz.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1154 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1155 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1156 | libz = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1157 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1158 | conf.set10('HAVE_ZLIB', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1159 | |
| 1160 | want_bzip2 = get_option('bzip2') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1161 | if want_bzip2 != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1162 | libbzip2 = cc.find_library('bz2', |
| 1163 | required : want_bzip2 == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1164 | have = libbzip2.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1165 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1166 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1167 | libbzip2 = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1168 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1169 | conf.set10('HAVE_BZIP2', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1170 | |
| 1171 | want_xz = get_option('xz') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1172 | if want_xz != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1173 | libxz = dependency('liblzma', |
| 1174 | required : want_xz == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1175 | have = libxz.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1176 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1177 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1178 | libxz = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1179 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1180 | conf.set10('HAVE_XZ', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1181 | |
| 1182 | want_lz4 = get_option('lz4') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1183 | if want_lz4 != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1184 | liblz4 = dependency('liblz4', |
Zbigniew Jędrzejewski-Szmek | e0a1d4b | 2018-10-29 18:32:51 +0100 | [diff] [blame] | 1185 | version : '>= 1.3.0', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1186 | required : want_lz4 == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1187 | have = liblz4.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1188 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1189 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1190 | liblz4 = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1191 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1192 | conf.set10('HAVE_LZ4', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1193 | |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 1194 | want_zstd = get_option('zstd') |
| 1195 | if want_zstd != 'false' and not skip_deps |
| 1196 | libzstd = dependency('libzstd', |
| 1197 | required : want_zstd == 'true', |
| 1198 | version : '>= 1.4.0') |
| 1199 | have = libzstd.found() |
| 1200 | else |
| 1201 | have = false |
| 1202 | libzstd = [] |
| 1203 | endif |
| 1204 | conf.set10('HAVE_ZSTD', have) |
| 1205 | |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1206 | want_xkbcommon = get_option('xkbcommon') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1207 | if want_xkbcommon != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1208 | libxkbcommon = dependency('xkbcommon', |
| 1209 | version : '>= 0.3.0', |
| 1210 | required : want_xkbcommon == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1211 | have = libxkbcommon.found() |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1212 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1213 | have = false |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1214 | libxkbcommon = [] |
| 1215 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1216 | conf.set10('HAVE_XKBCOMMON', have) |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1217 | |
Zbigniew Jędrzejewski-Szmek | c4c978a | 2018-01-12 05:47:17 +0100 | [diff] [blame] | 1218 | want_pcre2 = get_option('pcre2') |
| 1219 | if want_pcre2 != 'false' |
| 1220 | libpcre2 = dependency('libpcre2-8', |
| 1221 | required : want_pcre2 == 'true') |
| 1222 | have = libpcre2.found() |
| 1223 | else |
| 1224 | have = false |
| 1225 | libpcre2 = [] |
| 1226 | endif |
| 1227 | conf.set10('HAVE_PCRE2', have) |
| 1228 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1229 | want_glib = get_option('glib') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1230 | if want_glib != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1231 | libglib = dependency('glib-2.0', |
| 1232 | version : '>= 2.22.0', |
| 1233 | required : want_glib == 'true') |
| 1234 | libgobject = dependency('gobject-2.0', |
| 1235 | version : '>= 2.22.0', |
| 1236 | required : want_glib == 'true') |
| 1237 | libgio = dependency('gio-2.0', |
| 1238 | required : want_glib == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1239 | have = libglib.found() and libgobject.found() and libgio.found() |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1240 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1241 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1242 | libglib = [] |
| 1243 | libgobject = [] |
| 1244 | libgio = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1245 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1246 | conf.set10('HAVE_GLIB', have) |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1247 | |
| 1248 | want_dbus = get_option('dbus') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1249 | if want_dbus != 'false' and not skip_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1250 | libdbus = dependency('dbus-1', |
| 1251 | version : '>= 1.3.2', |
| 1252 | required : want_dbus == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1253 | have = libdbus.found() |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1254 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1255 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1256 | libdbus = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1257 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1258 | conf.set10('HAVE_DBUS', have) |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1259 | |
Yu Watanabe | 42303dc | 2017-06-18 05:22:32 +0900 | [diff] [blame] | 1260 | default_dnssec = get_option('default-dnssec') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1261 | if skip_deps |
Jonathan Rudenberg | b4081f3 | 2018-01-15 18:27:37 -0500 | [diff] [blame] | 1262 | default_dnssec = 'no' |
| 1263 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1264 | if default_dnssec != 'no' and conf.get('HAVE_GCRYPT') == 0 |
Yu Watanabe | 42303dc | 2017-06-18 05:22:32 +0900 | [diff] [blame] | 1265 | message('default-dnssec cannot be set to yes or allow-downgrade when gcrypt is disabled. Setting default-dnssec to no.') |
| 1266 | default_dnssec = 'no' |
| 1267 | endif |
| 1268 | conf.set('DEFAULT_DNSSEC_MODE', |
| 1269 | 'DNSSEC_' + default_dnssec.underscorify().to_upper()) |
| 1270 | substs.set('DEFAULT_DNSSEC_MODE', default_dnssec) |
| 1271 | |
Yu Watanabe | 56ddbf1 | 2018-06-21 01:29:49 +0900 | [diff] [blame] | 1272 | dns_over_tls = get_option('dns-over-tls') |
| 1273 | if dns_over_tls != 'false' |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1274 | if dns_over_tls == 'openssl' |
| 1275 | have_gnutls = false |
| 1276 | else |
Iwan Timmer | 38e053c | 2019-10-29 20:26:05 +0100 | [diff] [blame] | 1277 | have_gnutls = (conf.get('HAVE_GNUTLS') == 1 and libgnutls.version().version_compare('>= 3.6.0')) |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1278 | if dns_over_tls == 'gnutls' and not have_gnutls |
| 1279 | error('DNS-over-TLS support was requested with gnutls, but dependencies are not available') |
| 1280 | endif |
Yu Watanabe | 56ddbf1 | 2018-06-21 01:29:49 +0900 | [diff] [blame] | 1281 | endif |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1282 | if dns_over_tls == 'gnutls' or have_gnutls |
| 1283 | have_openssl = false |
| 1284 | else |
| 1285 | have_openssl = conf.get('HAVE_OPENSSL') == 1 |
| 1286 | if dns_over_tls != 'auto' and not have_openssl |
| 1287 | str = dns_over_tls == 'openssl' ? ' with openssl' : '' |
Yu Watanabe | b349bc5 | 2019-06-17 10:22:54 +0900 | [diff] [blame] | 1288 | error('DNS-over-TLS support was requested@0@, but dependencies are not available'.format(str)) |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1289 | endif |
| 1290 | endif |
| 1291 | have = have_gnutls or have_openssl |
Yu Watanabe | 56ddbf1 | 2018-06-21 01:29:49 +0900 | [diff] [blame] | 1292 | else |
Michael Olbrich | be5536a | 2018-11-11 11:30:53 +0100 | [diff] [blame] | 1293 | have = false |
| 1294 | have_gnutls = false |
| 1295 | have_openssl = false |
Yu Watanabe | 56ddbf1 | 2018-06-21 01:29:49 +0900 | [diff] [blame] | 1296 | endif |
| 1297 | conf.set10('ENABLE_DNS_OVER_TLS', have) |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 1298 | conf.set10('DNS_OVER_TLS_USE_GNUTLS', have_gnutls) |
| 1299 | conf.set10('DNS_OVER_TLS_USE_OPENSSL', have_openssl) |
Yu Watanabe | 56ddbf1 | 2018-06-21 01:29:49 +0900 | [diff] [blame] | 1300 | |
Iwan Timmer | c9299be | 2018-06-13 20:26:24 +0200 | [diff] [blame] | 1301 | default_dns_over_tls = get_option('default-dns-over-tls') |
Evgeny Vereshchagin | 87ac55a | 2019-05-05 19:28:42 +0000 | [diff] [blame] | 1302 | if skip_deps |
Iwan Timmer | c9299be | 2018-06-13 20:26:24 +0200 | [diff] [blame] | 1303 | default_dns_over_tls = 'no' |
Iwan Timmer | 5d67a7a | 2018-04-27 17:50:38 +0200 | [diff] [blame] | 1304 | endif |
Yu Watanabe | 56ddbf1 | 2018-06-21 01:29:49 +0900 | [diff] [blame] | 1305 | if default_dns_over_tls != 'no' and conf.get('ENABLE_DNS_OVER_TLS') == 0 |
Iwan Timmer | 4310bfc | 2019-02-18 20:41:46 +0100 | [diff] [blame] | 1306 | 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.') |
Iwan Timmer | c9299be | 2018-06-13 20:26:24 +0200 | [diff] [blame] | 1307 | default_dns_over_tls = 'no' |
Iwan Timmer | 5d67a7a | 2018-04-27 17:50:38 +0200 | [diff] [blame] | 1308 | endif |
Iwan Timmer | c9299be | 2018-06-13 20:26:24 +0200 | [diff] [blame] | 1309 | conf.set('DEFAULT_DNS_OVER_TLS_MODE', |
| 1310 | 'DNS_OVER_TLS_' + default_dns_over_tls.underscorify().to_upper()) |
| 1311 | substs.set('DEFAULT_DNS_OVER_TLS_MODE', default_dns_over_tls) |
Iwan Timmer | 5d67a7a | 2018-04-27 17:50:38 +0200 | [diff] [blame] | 1312 | |
Zbigniew Jędrzejewski-Szmek | 3614df0 | 2020-04-14 22:18:18 +0200 | [diff] [blame] | 1313 | default_mdns = get_option('default-mdns') |
| 1314 | conf.set('DEFAULT_MDNS_MODE', |
| 1315 | 'RESOLVE_SUPPORT_' + default_mdns.to_upper()) |
| 1316 | substs.set('DEFAULT_MDNS_MODE', default_mdns) |
| 1317 | |
| 1318 | default_llmnr = get_option('default-llmnr') |
| 1319 | conf.set('DEFAULT_LLMNR_MODE', |
| 1320 | 'RESOLVE_SUPPORT_' + default_llmnr.to_upper()) |
| 1321 | substs.set('DEFAULT_LLMNR_MODE', default_llmnr) |
| 1322 | |
Lennart Poettering | e594a3b | 2019-12-10 21:31:41 +0100 | [diff] [blame] | 1323 | want_repart = get_option('repart') |
| 1324 | if want_repart != 'false' |
| 1325 | have = (conf.get('HAVE_OPENSSL') == 1 and |
| 1326 | conf.get('HAVE_LIBFDISK') == 1) |
| 1327 | if want_repart == 'true' and not have |
| 1328 | error('repart support was requested, but dependencies are not available') |
| 1329 | endif |
| 1330 | else |
| 1331 | have = false |
| 1332 | endif |
| 1333 | conf.set10('ENABLE_REPART', have) |
| 1334 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1335 | want_importd = get_option('importd') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 1336 | if want_importd != 'false' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1337 | have = (conf.get('HAVE_LIBCURL') == 1 and |
| 1338 | conf.get('HAVE_ZLIB') == 1 and |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1339 | conf.get('HAVE_XZ') == 1 and |
| 1340 | conf.get('HAVE_GCRYPT') == 1) |
| 1341 | if want_importd == 'true' and not have |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1342 | error('importd support was requested, but dependencies are not available') |
| 1343 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1344 | else |
| 1345 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1346 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1347 | conf.set10('ENABLE_IMPORTD', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1348 | |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 1349 | want_homed = get_option('homed') |
| 1350 | if want_homed != 'false' |
| 1351 | have = (conf.get('HAVE_OPENSSL') == 1 and |
| 1352 | conf.get('HAVE_LIBFDISK') == 1 and |
| 1353 | conf.get('HAVE_LIBCRYPTSETUP') == 1) |
| 1354 | if want_homed == 'true' and not have |
| 1355 | error('homed support was requested, but dependencies are not available') |
| 1356 | endif |
| 1357 | else |
| 1358 | have = false |
| 1359 | endif |
| 1360 | conf.set10('ENABLE_HOMED', have) |
| 1361 | |
Yu Watanabe | af06ddf | 2020-02-01 11:01:41 +0900 | [diff] [blame] | 1362 | have = have and conf.get('HAVE_PAM') == 1 |
| 1363 | conf.set10('ENABLE_PAM_HOME', have) |
| 1364 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1365 | want_remote = get_option('remote') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 1366 | if want_remote != 'false' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1367 | have_deps = [conf.get('HAVE_MICROHTTPD') == 1, |
| 1368 | conf.get('HAVE_LIBCURL') == 1] |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1369 | # sd-j-remote requires µhttpd, and sd-j-upload requires libcurl, so |
| 1370 | # it's possible to build one without the other. Complain only if |
Ben Boeckel | 5238e95 | 2019-04-26 20:22:40 -0400 | [diff] [blame] | 1371 | # support was explicitly requested. The auxiliary files like sysusers |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1372 | # config should be installed when any of the programs are built. |
| 1373 | if want_remote == 'true' and not (have_deps[0] and have_deps[1]) |
| 1374 | error('remote support was requested, but dependencies are not available') |
| 1375 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1376 | have = have_deps[0] or have_deps[1] |
| 1377 | else |
| 1378 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1379 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1380 | conf.set10('ENABLE_REMOTE', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1381 | |
Zbigniew Jędrzejewski-Szmek | a9149d8 | 2017-10-03 13:15:27 +0200 | [diff] [blame] | 1382 | foreach term : ['utmp', |
| 1383 | 'hibernate', |
| 1384 | 'environment-d', |
| 1385 | 'binfmt', |
| 1386 | 'coredump', |
Eric DeVolder | 9b4abc6 | 2019-05-16 08:59:01 -0500 | [diff] [blame] | 1387 | 'pstore', |
Zbigniew Jędrzejewski-Szmek | a9149d8 | 2017-10-03 13:15:27 +0200 | [diff] [blame] | 1388 | 'resolve', |
| 1389 | 'logind', |
| 1390 | 'hostnamed', |
| 1391 | 'localed', |
| 1392 | 'machined', |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 1393 | 'portabled', |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 1394 | 'userdb', |
Zbigniew Jędrzejewski-Szmek | a9149d8 | 2017-10-03 13:15:27 +0200 | [diff] [blame] | 1395 | 'networkd', |
| 1396 | 'timedated', |
| 1397 | 'timesyncd', |
Zbigniew Jędrzejewski-Szmek | a9149d8 | 2017-10-03 13:15:27 +0200 | [diff] [blame] | 1398 | 'firstboot', |
| 1399 | 'randomseed', |
| 1400 | 'backlight', |
| 1401 | 'vconsole', |
| 1402 | 'quotacheck', |
| 1403 | 'sysusers', |
| 1404 | 'tmpfiles', |
| 1405 | 'hwdb', |
| 1406 | 'rfkill', |
| 1407 | 'ldconfig', |
| 1408 | 'efi', |
| 1409 | 'tpm', |
| 1410 | 'ima', |
| 1411 | 'smack', |
| 1412 | 'gshadow', |
| 1413 | 'idn', |
Yu Watanabe | 08540a9 | 2018-07-18 09:25:57 +0900 | [diff] [blame] | 1414 | 'nss-myhostname', |
Zbigniew Jędrzejewski-Szmek | a9149d8 | 2017-10-03 13:15:27 +0200 | [diff] [blame] | 1415 | 'nss-systemd'] |
| 1416 | have = get_option(term) |
| 1417 | name = 'ENABLE_' + term.underscorify().to_upper() |
| 1418 | conf.set10(name, have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1419 | endforeach |
| 1420 | |
Yu Watanabe | 08540a9 | 2018-07-18 09:25:57 +0900 | [diff] [blame] | 1421 | foreach tuple : [['nss-mymachines', 'machined'], |
| 1422 | ['nss-resolve', 'resolve']] |
| 1423 | want = get_option(tuple[0]) |
| 1424 | if want != 'false' |
| 1425 | have = get_option(tuple[1]) |
| 1426 | if want == 'true' and not have |
| 1427 | error('@0@ is requested but @1@ is disabled'.format(tuple[0], tuple[1])) |
| 1428 | endif |
| 1429 | else |
| 1430 | have = false |
| 1431 | endif |
| 1432 | name = 'ENABLE_' + tuple[0].underscorify().to_upper() |
| 1433 | conf.set10(name, have) |
| 1434 | endforeach |
| 1435 | |
| 1436 | enable_nss = false |
| 1437 | foreach term : ['ENABLE_NSS_MYHOSTNAME', |
| 1438 | 'ENABLE_NSS_MYMACHINES', |
| 1439 | 'ENABLE_NSS_RESOLVE', |
| 1440 | 'ENABLE_NSS_SYSTEMD'] |
| 1441 | if conf.get(term) == 1 |
| 1442 | enable_nss = true |
| 1443 | endif |
| 1444 | endforeach |
| 1445 | conf.set10('ENABLE_NSS', enable_nss) |
| 1446 | |
Yu Watanabe | 348b443 | 2018-05-07 18:17:35 +0900 | [diff] [blame] | 1447 | conf.set10('ENABLE_TIMEDATECTL', get_option('timedated') or get_option('timesyncd')) |
Yu Watanabe | 6129ec8 | 2018-05-03 18:07:43 +0900 | [diff] [blame] | 1448 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1449 | tests = [] |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 1450 | fuzzers = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1451 | |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 1452 | conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests) |
Zbigniew Jędrzejewski-Szmek | 00d82c8 | 2017-07-12 21:25:17 +0000 | [diff] [blame] | 1453 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1454 | ##################################################################### |
| 1455 | |
| 1456 | if get_option('efi') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1457 | efi_arch = host_machine.cpu_family() |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1458 | |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1459 | if efi_arch == 'x86' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1460 | EFI_MACHINE_TYPE_NAME = 'ia32' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1461 | gnu_efi_arch = 'ia32' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1462 | elif efi_arch == 'x86_64' |
| 1463 | EFI_MACHINE_TYPE_NAME = 'x64' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1464 | gnu_efi_arch = 'x86_64' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1465 | elif efi_arch == 'arm' |
| 1466 | EFI_MACHINE_TYPE_NAME = 'arm' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1467 | gnu_efi_arch = 'arm' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1468 | elif efi_arch == 'aarch64' |
| 1469 | EFI_MACHINE_TYPE_NAME = 'aa64' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1470 | gnu_efi_arch = 'aarch64' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1471 | else |
| 1472 | EFI_MACHINE_TYPE_NAME = '' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1473 | gnu_efi_arch = '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1474 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1475 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1476 | have = true |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1477 | conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME) |
Zbigniew Jędrzejewski-Szmek | 80c6fce | 2017-04-24 19:28:04 -0400 | [diff] [blame] | 1478 | |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 1479 | conf.set('SD_TPM_PCR', get_option('tpm-pcrindex')) |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1480 | else |
| 1481 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1482 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1483 | conf.set10('ENABLE_EFI', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1484 | |
| 1485 | ##################################################################### |
| 1486 | |
| 1487 | config_h = configure_file( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1488 | output : 'config.h', |
| 1489 | configuration : conf) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1490 | |
Yu Watanabe | 348b443 | 2018-05-07 18:17:35 +0900 | [diff] [blame] | 1491 | meson_apply_m4 = find_program('tools/meson-apply-m4.sh') |
| 1492 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1493 | includes = include_directories('src/basic', |
Zbigniew Jędrzejewski-Szmek | 91b08bb | 2019-07-02 13:01:23 +0200 | [diff] [blame] | 1494 | 'src/boot', |
Lennart Poettering | c76dd73 | 2020-05-05 09:57:04 +0200 | [diff] [blame^] | 1495 | 'src/home', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1496 | 'src/shared', |
| 1497 | 'src/systemd', |
| 1498 | 'src/journal', |
Zbigniew Jędrzejewski-Szmek | a38f7fe | 2018-05-16 12:05:07 +0200 | [diff] [blame] | 1499 | 'src/journal-remote', |
Zbigniew Jędrzejewski-Szmek | 97d9061 | 2018-05-28 10:37:11 +0200 | [diff] [blame] | 1500 | 'src/nspawn', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1501 | 'src/resolve', |
| 1502 | 'src/timesync', |
Peter A. Bigot | 5c3376e | 2018-03-21 06:42:04 -0500 | [diff] [blame] | 1503 | 'src/time-wait-sync', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1504 | 'src/login', |
| 1505 | 'src/udev', |
| 1506 | 'src/libudev', |
| 1507 | 'src/core', |
Lennart Poettering | 9e71f5d | 2019-03-05 12:12:33 +0100 | [diff] [blame] | 1508 | 'src/shutdown', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1509 | 'src/libsystemd/sd-bus', |
| 1510 | 'src/libsystemd/sd-device', |
Yu Watanabe | a137a1c | 2018-11-16 17:30:42 +0900 | [diff] [blame] | 1511 | 'src/libsystemd/sd-event', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1512 | 'src/libsystemd/sd-hwdb', |
| 1513 | 'src/libsystemd/sd-id128', |
| 1514 | 'src/libsystemd/sd-netlink', |
| 1515 | 'src/libsystemd/sd-network', |
Yu Watanabe | ceb26cd | 2018-12-10 15:45:48 +0900 | [diff] [blame] | 1516 | 'src/libsystemd/sd-resolve', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1517 | 'src/libsystemd-network', |
Zbigniew Jędrzejewski-Szmek | 2d4ceca | 2017-12-19 14:19:46 +0100 | [diff] [blame] | 1518 | '.') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1519 | |
| 1520 | add_project_arguments('-include', 'config.h', language : 'c') |
| 1521 | |
Yu Watanabe | 6ec439f | 2018-11-28 20:19:41 +0900 | [diff] [blame] | 1522 | generate_gperfs = find_program('tools/generate-gperfs.py') |
| 1523 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1524 | subdir('po') |
| 1525 | subdir('catalog') |
| 1526 | subdir('src/systemd') |
| 1527 | subdir('src/basic') |
| 1528 | subdir('src/libsystemd') |
| 1529 | subdir('src/libsystemd-network') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1530 | subdir('src/journal') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1531 | subdir('src/login') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1532 | |
| 1533 | libjournal_core = static_library( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1534 | 'journal-core', |
| 1535 | libjournal_core_sources, |
| 1536 | journald_gperf_c, |
| 1537 | include_directories : includes, |
| 1538 | install : false) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1539 | |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 1540 | libsystemd_sym_path = '@0@/@1@'.format(project_source_root, libsystemd_sym) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1541 | libsystemd = shared_library( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1542 | 'systemd', |
Zbigniew Jędrzejewski-Szmek | a5d8835 | 2018-10-09 16:02:55 +0200 | [diff] [blame] | 1543 | disable_mempool_c, |
Zbigniew Jędrzejewski-Szmek | 56d50ab | 2017-09-28 19:24:16 +0200 | [diff] [blame] | 1544 | version : libsystemd_version, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1545 | include_directories : includes, |
| 1546 | link_args : ['-shared', |
| 1547 | '-Wl,--version-script=' + libsystemd_sym_path], |
Zbigniew Jędrzejewski-Szmek | 34e221a | 2017-12-19 19:06:56 +0100 | [diff] [blame] | 1548 | link_with : [libbasic, |
| 1549 | libbasic_gcrypt], |
Zbigniew Jędrzejewski-Szmek | 5e3cec8 | 2017-12-19 19:38:43 +0100 | [diff] [blame] | 1550 | link_whole : [libsystemd_static, |
| 1551 | libjournal_client], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1552 | dependencies : [threads, |
| 1553 | librt, |
| 1554 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 1555 | libzstd, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1556 | liblz4], |
| 1557 | link_depends : libsystemd_sym, |
| 1558 | install : true, |
| 1559 | install_dir : rootlibdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1560 | |
Davide Cavalca | 70848ec | 2018-04-09 02:43:35 -0700 | [diff] [blame] | 1561 | static_libsystemd = get_option('static-libsystemd') |
| 1562 | static_libsystemd_pic = static_libsystemd == 'true' or static_libsystemd == 'pic' |
| 1563 | |
| 1564 | install_libsystemd_static = static_library( |
| 1565 | 'systemd', |
| 1566 | libsystemd_sources, |
| 1567 | journal_client_sources, |
Zbigniew Jędrzejewski-Szmek | 975464e | 2018-04-25 15:29:48 +0200 | [diff] [blame] | 1568 | basic_sources, |
| 1569 | basic_gcrypt_sources, |
Yu Watanabe | be44b57 | 2018-10-12 11:59:55 +0900 | [diff] [blame] | 1570 | disable_mempool_c, |
Davide Cavalca | 70848ec | 2018-04-09 02:43:35 -0700 | [diff] [blame] | 1571 | include_directories : includes, |
Davide Cavalca | 70848ec | 2018-04-09 02:43:35 -0700 | [diff] [blame] | 1572 | build_by_default : static_libsystemd != 'false', |
| 1573 | install : static_libsystemd != 'false', |
| 1574 | install_dir : rootlibdir, |
| 1575 | pic : static_libsystemd == 'true' or static_libsystemd == 'pic', |
| 1576 | dependencies : [threads, |
| 1577 | librt, |
| 1578 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 1579 | libzstd, |
Davide Cavalca | 70848ec | 2018-04-09 02:43:35 -0700 | [diff] [blame] | 1580 | liblz4, |
Zbigniew Jędrzejewski-Szmek | 975464e | 2018-04-25 15:29:48 +0200 | [diff] [blame] | 1581 | libcap, |
| 1582 | libblkid, |
| 1583 | libmount, |
| 1584 | libselinux, |
Davide Cavalca | 70848ec | 2018-04-09 02:43:35 -0700 | [diff] [blame] | 1585 | libgcrypt], |
| 1586 | c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC'])) |
| 1587 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1588 | # Generate autosuspend rules |
Mario Limonciello | b61d777 | 2019-09-09 22:49:35 +0100 | [diff] [blame] | 1589 | make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py') |
| 1590 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1591 | ############################################################ |
| 1592 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1593 | # binaries that have --help and are intended for use by humans, |
| 1594 | # usually, but not always, installed in /bin. |
| 1595 | public_programs = [] |
| 1596 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1597 | subdir('src/libudev') |
| 1598 | subdir('src/shared') |
| 1599 | subdir('src/core') |
Lennart Poettering | 9e71f5d | 2019-03-05 12:12:33 +0100 | [diff] [blame] | 1600 | subdir('src/shutdown') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1601 | subdir('src/udev') |
| 1602 | subdir('src/network') |
| 1603 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1604 | subdir('src/analyze') |
| 1605 | subdir('src/journal-remote') |
| 1606 | subdir('src/coredump') |
Eric DeVolder | 9b4abc6 | 2019-05-16 08:59:01 -0500 | [diff] [blame] | 1607 | subdir('src/pstore') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1608 | subdir('src/hostname') |
| 1609 | subdir('src/import') |
Lennart Poettering | e594a3b | 2019-12-10 21:31:41 +0100 | [diff] [blame] | 1610 | subdir('src/partition') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1611 | subdir('src/kernel-install') |
| 1612 | subdir('src/locale') |
| 1613 | subdir('src/machine') |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 1614 | subdir('src/portable') |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 1615 | subdir('src/userdb') |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 1616 | subdir('src/home') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1617 | subdir('src/nspawn') |
| 1618 | subdir('src/resolve') |
| 1619 | subdir('src/timedate') |
| 1620 | subdir('src/timesync') |
| 1621 | subdir('src/vconsole') |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1622 | subdir('src/boot/efi') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1623 | |
| 1624 | subdir('src/test') |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 1625 | subdir('src/fuzz') |
Zbigniew Jędrzejewski-Szmek | ef2ad30 | 2019-10-08 16:43:18 +0200 | [diff] [blame] | 1626 | subdir('rules.d') |
Zbigniew Jędrzejewski-Szmek | 4ff3f25 | 2017-04-13 20:47:20 -0400 | [diff] [blame] | 1627 | subdir('test') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1628 | |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1629 | ############################################################ |
| 1630 | |
| 1631 | # only static linking apart from libdl, to make sure that the |
| 1632 | # module is linked to all libraries that it uses. |
| 1633 | test_dlopen = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1634 | 'test-dlopen', |
| 1635 | test_dlopen_c, |
Zbigniew Jędrzejewski-Szmek | a5d8835 | 2018-10-09 16:02:55 +0200 | [diff] [blame] | 1636 | disable_mempool_c, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1637 | include_directories : includes, |
| 1638 | link_with : [libbasic], |
Yu Watanabe | fd1939f | 2018-09-12 21:47:56 +0900 | [diff] [blame] | 1639 | dependencies : [libdl], |
| 1640 | build_by_default : want_tests != 'false') |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1641 | |
Yu Watanabe | 08540a9 | 2018-07-18 09:25:57 +0900 | [diff] [blame] | 1642 | foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'], |
Lennart Poettering | 1684c56 | 2019-07-04 18:31:11 +0200 | [diff] [blame] | 1643 | ['systemd', 'ENABLE_NSS_SYSTEMD', 'src/nss-systemd/userdb-glue.c src/nss-systemd/userdb-glue.h'], |
Yu Watanabe | 08540a9 | 2018-07-18 09:25:57 +0900 | [diff] [blame] | 1644 | ['mymachines', 'ENABLE_NSS_MYMACHINES'], |
| 1645 | ['resolve', 'ENABLE_NSS_RESOLVE']] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1646 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1647 | condition = tuple[1] == '' or conf.get(tuple[1]) == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1648 | if condition |
| 1649 | module = tuple[0] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1650 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1651 | sym = 'src/nss-@0@/nss-@0@.sym'.format(module) |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 1652 | version_script_arg = join_paths(project_source_root, sym) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1653 | |
Lennart Poettering | 1684c56 | 2019-07-04 18:31:11 +0200 | [diff] [blame] | 1654 | sources = ['src/nss-@0@/nss-@0@.c'.format(module)] |
| 1655 | if tuple.length() > 2 |
| 1656 | sources += tuple[2].split() |
| 1657 | endif |
| 1658 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1659 | nss = shared_library( |
| 1660 | 'nss_' + module, |
Lennart Poettering | 1684c56 | 2019-07-04 18:31:11 +0200 | [diff] [blame] | 1661 | sources, |
Zbigniew Jędrzejewski-Szmek | a5d8835 | 2018-10-09 16:02:55 +0200 | [diff] [blame] | 1662 | disable_mempool_c, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1663 | version : '2', |
| 1664 | include_directories : includes, |
Lennart Poettering | b4b36f4 | 2017-12-12 20:13:16 +0100 | [diff] [blame] | 1665 | # Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned |
| 1666 | link_args : ['-Wl,-z,nodelete', |
| 1667 | '-shared', |
Jussi Pakkanen | 700805f | 2019-04-06 21:59:06 +0200 | [diff] [blame] | 1668 | '-Wl,--version-script=' + version_script_arg], |
Zbigniew Jędrzejewski-Szmek | 37e4d7a | 2017-12-19 11:35:01 +0100 | [diff] [blame] | 1669 | link_with : [libsystemd_static, |
Lennart Poettering | 733cbd0 | 2019-07-23 14:22:06 +0200 | [diff] [blame] | 1670 | libshared_static, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1671 | libbasic], |
| 1672 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 5486a31 | 2017-05-12 08:31:46 -0400 | [diff] [blame] | 1673 | librt], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1674 | link_depends : sym, |
| 1675 | install : true, |
| 1676 | install_dir : rootlibdir) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1677 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1678 | # We cannot use shared_module because it does not support version suffix. |
| 1679 | # Unfortunately shared_library insists on creating the symlink… |
| 1680 | meson.add_install_script('sh', '-c', |
| 1681 | 'rm $DESTDIR@0@/libnss_@1@.so' |
| 1682 | .format(rootlibdir, module)) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1683 | |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 1684 | if want_tests != 'false' |
| 1685 | test('dlopen-nss_' + module, |
| 1686 | test_dlopen, |
| 1687 | # path to dlopen must include a slash |
| 1688 | args : nss.full_path()) |
| 1689 | endif |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1690 | endif |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1691 | endforeach |
| 1692 | |
| 1693 | ############################################################ |
| 1694 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1695 | executable( |
| 1696 | 'systemd', |
| 1697 | systemd_sources, |
| 1698 | include_directories : includes, |
| 1699 | link_with : [libcore, |
| 1700 | libshared], |
| 1701 | dependencies : [versiondep, |
| 1702 | threads, |
| 1703 | librt, |
| 1704 | libseccomp, |
| 1705 | libselinux, |
| 1706 | libmount, |
| 1707 | libblkid], |
| 1708 | install_rpath : rootlibexecdir, |
| 1709 | install : true, |
| 1710 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1711 | |
Zbigniew Jędrzejewski-Szmek | ba7f4ae | 2018-02-28 10:20:48 +0100 | [diff] [blame] | 1712 | meson.add_install_script(meson_make_symlink, |
| 1713 | join_paths(rootlibexecdir, 'systemd'), |
| 1714 | join_paths(rootsbindir, 'init')) |
| 1715 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1716 | public_programs += executable( |
| 1717 | 'systemd-analyze', |
| 1718 | systemd_analyze_sources, |
| 1719 | include_directories : includes, |
| 1720 | link_with : [libcore, |
| 1721 | libshared], |
| 1722 | dependencies : [versiondep, |
| 1723 | threads, |
| 1724 | librt, |
| 1725 | libseccomp, |
| 1726 | libselinux, |
| 1727 | libmount, |
| 1728 | libblkid], |
| 1729 | install_rpath : rootlibexecdir, |
| 1730 | install : get_option('analyze')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1731 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1732 | executable( |
| 1733 | 'systemd-journald', |
| 1734 | systemd_journald_sources, |
| 1735 | include_directories : includes, |
| 1736 | link_with : [libjournal_core, |
| 1737 | libshared], |
| 1738 | dependencies : [threads, |
| 1739 | libxz, |
| 1740 | liblz4, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 1741 | libselinux, |
| 1742 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1743 | install_rpath : rootlibexecdir, |
| 1744 | install : true, |
| 1745 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1746 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1747 | public_programs += executable( |
| 1748 | 'systemd-cat', |
| 1749 | systemd_cat_sources, |
| 1750 | include_directories : includes, |
| 1751 | link_with : [libjournal_core, |
| 1752 | libshared], |
| 1753 | dependencies : [threads], |
| 1754 | install_rpath : rootlibexecdir, |
| 1755 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1756 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1757 | public_programs += executable( |
| 1758 | 'journalctl', |
| 1759 | journalctl_sources, |
| 1760 | include_directories : includes, |
| 1761 | link_with : [libshared], |
| 1762 | dependencies : [threads, |
| 1763 | libqrencode, |
| 1764 | libxz, |
| 1765 | liblz4, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 1766 | libpcre2, |
| 1767 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1768 | install_rpath : rootlibexecdir, |
| 1769 | install : true, |
| 1770 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1771 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1772 | executable( |
| 1773 | 'systemd-getty-generator', |
| 1774 | 'src/getty-generator/getty-generator.c', |
| 1775 | include_directories : includes, |
| 1776 | link_with : [libshared], |
| 1777 | install_rpath : rootlibexecdir, |
| 1778 | install : true, |
| 1779 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1780 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1781 | executable( |
| 1782 | 'systemd-debug-generator', |
| 1783 | 'src/debug-generator/debug-generator.c', |
| 1784 | include_directories : includes, |
| 1785 | link_with : [libshared], |
| 1786 | install_rpath : rootlibexecdir, |
| 1787 | install : true, |
| 1788 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1789 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1790 | executable( |
| 1791 | 'systemd-run-generator', |
| 1792 | 'src/run-generator/run-generator.c', |
| 1793 | include_directories : includes, |
| 1794 | link_with : [libshared], |
| 1795 | install_rpath : rootlibexecdir, |
| 1796 | install : true, |
| 1797 | install_dir : systemgeneratordir) |
Lennart Poettering | 35a1ff4 | 2018-11-15 22:09:29 +0100 | [diff] [blame] | 1798 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1799 | executable( |
| 1800 | 'systemd-fstab-generator', |
| 1801 | 'src/fstab-generator/fstab-generator.c', |
| 1802 | include_directories : includes, |
| 1803 | link_with : [libcore_shared, |
| 1804 | libshared], |
| 1805 | install_rpath : rootlibexecdir, |
| 1806 | install : true, |
| 1807 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1808 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1809 | if conf.get('ENABLE_ENVIRONMENT_D') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1810 | executable( |
| 1811 | '30-systemd-environment-d-generator', |
| 1812 | 'src/environment-d-generator/environment-d-generator.c', |
| 1813 | include_directories : includes, |
| 1814 | link_with : [libshared], |
| 1815 | install_rpath : rootlibexecdir, |
| 1816 | install : true, |
| 1817 | install_dir : userenvgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 1818 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1819 | meson.add_install_script(meson_make_symlink, |
| 1820 | join_paths(sysconfdir, 'environment'), |
| 1821 | join_paths(environmentdir, '99-environment.conf')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1822 | endif |
| 1823 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1824 | if conf.get('ENABLE_HIBERNATE') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1825 | executable( |
| 1826 | 'systemd-hibernate-resume-generator', |
| 1827 | 'src/hibernate-resume/hibernate-resume-generator.c', |
| 1828 | include_directories : includes, |
| 1829 | link_with : [libshared], |
| 1830 | install_rpath : rootlibexecdir, |
| 1831 | install : true, |
| 1832 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1833 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1834 | executable( |
| 1835 | 'systemd-hibernate-resume', |
| 1836 | 'src/hibernate-resume/hibernate-resume.c', |
| 1837 | include_directories : includes, |
| 1838 | link_with : [libshared], |
| 1839 | install_rpath : rootlibexecdir, |
| 1840 | install : true, |
| 1841 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1842 | endif |
| 1843 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1844 | if conf.get('HAVE_BLKID') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1845 | executable( |
| 1846 | 'systemd-gpt-auto-generator', |
| 1847 | 'src/gpt-auto-generator/gpt-auto-generator.c', |
| 1848 | 'src/shared/blkid-util.h', |
| 1849 | include_directories : includes, |
| 1850 | link_with : [libshared], |
| 1851 | dependencies : libblkid, |
| 1852 | install_rpath : rootlibexecdir, |
| 1853 | install : true, |
| 1854 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1855 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1856 | public_programs += executable( |
| 1857 | 'systemd-dissect', |
| 1858 | 'src/dissect/dissect.c', |
| 1859 | include_directories : includes, |
| 1860 | link_with : [libshared], |
| 1861 | install_rpath : rootlibexecdir, |
| 1862 | install : true, |
| 1863 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1864 | endif |
| 1865 | |
Zbigniew Jędrzejewski-Szmek | 1ec57f3 | 2017-10-03 13:12:29 +0200 | [diff] [blame] | 1866 | if conf.get('ENABLE_RESOLVE') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1867 | executable( |
| 1868 | 'systemd-resolved', |
| 1869 | systemd_resolved_sources, |
| 1870 | include_directories : includes, |
| 1871 | link_with : [libshared, |
| 1872 | libbasic_gcrypt, |
| 1873 | libsystemd_resolve_core], |
| 1874 | dependencies : systemd_resolved_dependencies, |
| 1875 | install_rpath : rootlibexecdir, |
| 1876 | install : true, |
| 1877 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1878 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1879 | public_programs += executable( |
| 1880 | 'resolvectl', |
| 1881 | resolvectl_sources, |
| 1882 | include_directories : includes, |
| 1883 | link_with : [libshared, |
| 1884 | libbasic_gcrypt, |
| 1885 | libsystemd_resolve_core], |
| 1886 | dependencies : [threads, |
| 1887 | libgpg_error, |
| 1888 | libm, |
| 1889 | libidn], |
| 1890 | install_rpath : rootlibexecdir, |
| 1891 | install : true) |
Lennart Poettering | 088c136 | 2018-02-27 17:48:54 +0100 | [diff] [blame] | 1892 | |
| 1893 | meson.add_install_script(meson_make_symlink, |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1894 | join_paths(bindir, 'resolvectl'), |
| 1895 | join_paths(rootsbindir, 'resolvconf')) |
Yu Watanabe | c2e84ca | 2018-04-19 03:24:23 +0900 | [diff] [blame] | 1896 | |
| 1897 | meson.add_install_script(meson_make_symlink, |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1898 | join_paths(bindir, 'resolvectl'), |
| 1899 | join_paths(bindir, 'systemd-resolve')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1900 | endif |
| 1901 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1902 | if conf.get('ENABLE_LOGIND') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1903 | executable( |
| 1904 | 'systemd-logind', |
| 1905 | systemd_logind_sources, |
| 1906 | include_directories : includes, |
| 1907 | link_with : [liblogind_core, |
| 1908 | libshared], |
| 1909 | dependencies : [threads, |
| 1910 | libacl], |
| 1911 | install_rpath : rootlibexecdir, |
| 1912 | install : true, |
| 1913 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1914 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1915 | public_programs += executable( |
| 1916 | 'loginctl', |
| 1917 | loginctl_sources, |
| 1918 | include_directories : includes, |
| 1919 | link_with : [libshared], |
| 1920 | dependencies : [threads, |
| 1921 | liblz4, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 1922 | libxz, |
| 1923 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1924 | install_rpath : rootlibexecdir, |
| 1925 | install : true, |
| 1926 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1927 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1928 | public_programs += executable( |
| 1929 | 'systemd-inhibit', |
| 1930 | 'src/login/inhibit.c', |
| 1931 | include_directories : includes, |
| 1932 | link_with : [libshared], |
| 1933 | install_rpath : rootlibexecdir, |
| 1934 | install : true, |
| 1935 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1936 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1937 | if conf.get('HAVE_PAM') == 1 |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 1938 | version_script_arg = join_paths(project_source_root, pam_systemd_sym) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1939 | pam_systemd = shared_library( |
| 1940 | 'pam_systemd', |
| 1941 | pam_systemd_c, |
| 1942 | name_prefix : '', |
| 1943 | include_directories : includes, |
| 1944 | link_args : ['-shared', |
| 1945 | '-Wl,--version-script=' + version_script_arg], |
Zbigniew Jędrzejewski-Szmek | 37e4d7a | 2017-12-19 11:35:01 +0100 | [diff] [blame] | 1946 | link_with : [libsystemd_static, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1947 | libshared_static], |
| 1948 | dependencies : [threads, |
| 1949 | libpam, |
| 1950 | libpam_misc], |
| 1951 | link_depends : pam_systemd_sym, |
| 1952 | install : true, |
| 1953 | install_dir : pamlibdir) |
| 1954 | |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 1955 | if want_tests != 'false' |
| 1956 | test('dlopen-pam_systemd', |
| 1957 | test_dlopen, |
| 1958 | # path to dlopen must include a slash |
Zbigniew Jędrzejewski-Szmek | c1cd674 | 2018-09-12 16:57:06 +0200 | [diff] [blame] | 1959 | args : pam_systemd.full_path()) |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 1960 | endif |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1961 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1962 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1963 | executable( |
| 1964 | 'systemd-user-runtime-dir', |
| 1965 | user_runtime_dir_sources, |
| 1966 | include_directories : includes, |
| 1967 | link_with : [libshared], |
| 1968 | install_rpath : rootlibexecdir, |
| 1969 | install : true, |
| 1970 | install_dir : rootlibexecdir) |
Lennart Poettering | 07ee5ad | 2018-08-08 14:50:57 +0200 | [diff] [blame] | 1971 | endif |
Zbigniew Jędrzejewski-Szmek | a9f0f5e | 2017-12-09 19:30:17 +0100 | [diff] [blame] | 1972 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1973 | if conf.get('HAVE_PAM') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1974 | executable( |
| 1975 | 'systemd-user-sessions', |
| 1976 | 'src/user-sessions/user-sessions.c', |
| 1977 | include_directories : includes, |
| 1978 | link_with : [libshared], |
| 1979 | install_rpath : rootlibexecdir, |
| 1980 | install : true, |
| 1981 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1982 | endif |
| 1983 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1984 | if conf.get('ENABLE_EFI') == 1 and conf.get('HAVE_BLKID') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1985 | public_programs += executable( |
| 1986 | 'bootctl', |
| 1987 | 'src/boot/bootctl.c', |
| 1988 | include_directories : includes, |
| 1989 | link_with : [libshared], |
| 1990 | dependencies : [libblkid], |
| 1991 | install_rpath : rootlibexecdir, |
| 1992 | install : true) |
Lennart Poettering | 36695e8 | 2018-06-25 17:24:09 +0200 | [diff] [blame] | 1993 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 1994 | public_programs += executable( |
| 1995 | 'systemd-bless-boot', |
| 1996 | 'src/boot/bless-boot.c', |
| 1997 | include_directories : includes, |
| 1998 | link_with : [libshared], |
| 1999 | dependencies : [libblkid], |
| 2000 | install_rpath : rootlibexecdir, |
| 2001 | install : true, |
| 2002 | install_dir : rootlibexecdir) |
Lennart Poettering | 8d16ed0 | 2018-06-22 17:00:47 +0200 | [diff] [blame] | 2003 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2004 | executable( |
| 2005 | 'systemd-bless-boot-generator', |
| 2006 | 'src/boot/bless-boot-generator.c', |
| 2007 | include_directories : includes, |
| 2008 | link_with : [libshared], |
| 2009 | install_rpath : rootlibexecdir, |
| 2010 | install : true, |
| 2011 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2012 | endif |
| 2013 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2014 | executable( |
| 2015 | 'systemd-boot-check-no-failures', |
| 2016 | 'src/boot/boot-check-no-failures.c', |
| 2017 | include_directories : includes, |
| 2018 | link_with : [libshared], |
| 2019 | dependencies : [libblkid], |
| 2020 | install_rpath : rootlibexecdir, |
| 2021 | install : true, |
| 2022 | install_dir : rootlibexecdir) |
Lennart Poettering | f876f53 | 2018-06-25 16:07:33 +0200 | [diff] [blame] | 2023 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2024 | public_programs += executable( |
| 2025 | 'systemd-socket-activate', |
| 2026 | 'src/activate/activate.c', |
| 2027 | include_directories : includes, |
| 2028 | link_with : [libshared], |
| 2029 | dependencies : [threads], |
| 2030 | install_rpath : rootlibexecdir, |
| 2031 | install : true) |
Felipe Sateler | f379436 | 2018-05-22 15:08:57 -0400 | [diff] [blame] | 2032 | |
| 2033 | if get_option('link-systemctl-shared') |
| 2034 | systemctl_link_with = [libshared] |
| 2035 | else |
| 2036 | systemctl_link_with = [libsystemd_static, |
| 2037 | libshared_static, |
| 2038 | libjournal_client, |
| 2039 | libbasic_gcrypt] |
| 2040 | endif |
| 2041 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2042 | public_programs += executable( |
| 2043 | 'systemctl', |
| 2044 | 'src/systemctl/systemctl.c', |
| 2045 | 'src/systemctl/sysv-compat.h', |
| 2046 | 'src/systemctl/sysv-compat.c', |
| 2047 | include_directories : includes, |
| 2048 | link_with : systemctl_link_with, |
| 2049 | dependencies : [threads, |
| 2050 | libcap, |
| 2051 | libselinux, |
| 2052 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2053 | liblz4, |
| 2054 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2055 | install_rpath : rootlibexecdir, |
| 2056 | install : true, |
| 2057 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2058 | |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 2059 | if conf.get('ENABLE_PORTABLED') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2060 | executable( |
| 2061 | 'systemd-portabled', |
| 2062 | systemd_portabled_sources, |
| 2063 | include_directories : includes, |
| 2064 | link_with : [libshared], |
| 2065 | dependencies : [threads], |
| 2066 | install_rpath : rootlibexecdir, |
| 2067 | install : true, |
| 2068 | install_dir : rootlibexecdir) |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 2069 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2070 | public_programs += executable( |
| 2071 | 'portablectl', |
| 2072 | 'src/portable/portablectl.c', |
| 2073 | include_directories : includes, |
| 2074 | link_with : [libshared], |
| 2075 | dependencies : [threads], |
| 2076 | install_rpath : rootlibexecdir, |
| 2077 | install : true, |
| 2078 | install_dir : rootbindir) |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 2079 | endif |
| 2080 | |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 2081 | if conf.get('ENABLE_USERDB') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2082 | executable( |
| 2083 | 'systemd-userwork', |
| 2084 | systemd_userwork_sources, |
| 2085 | include_directories : includes, |
| 2086 | link_with : [libshared], |
| 2087 | dependencies : [threads], |
| 2088 | install_rpath : rootlibexecdir, |
| 2089 | install : true, |
| 2090 | install_dir : rootlibexecdir) |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 2091 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2092 | executable( |
| 2093 | 'systemd-userdbd', |
| 2094 | systemd_userdbd_sources, |
| 2095 | include_directories : includes, |
| 2096 | link_with : [libshared], |
| 2097 | dependencies : [threads], |
| 2098 | install_rpath : rootlibexecdir, |
| 2099 | install : true, |
| 2100 | install_dir : rootlibexecdir) |
Lennart Poettering | 1604937 | 2019-08-05 18:22:01 +0200 | [diff] [blame] | 2101 | |
Zbigniew Jędrzejewski-Szmek | 460e5af | 2020-04-28 09:08:37 +0200 | [diff] [blame] | 2102 | public_programs += executable( |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2103 | 'userdbctl', |
| 2104 | userdbctl_sources, |
| 2105 | include_directories : includes, |
| 2106 | link_with : [libshared], |
| 2107 | dependencies : [threads], |
| 2108 | install_rpath : rootlibexecdir, |
| 2109 | install : true, |
| 2110 | install_dir : rootbindir) |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 2111 | endif |
| 2112 | |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 2113 | if conf.get('ENABLE_HOMED') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2114 | executable( |
| 2115 | 'systemd-homework', |
| 2116 | systemd_homework_sources, |
| 2117 | include_directories : includes, |
| 2118 | link_with : [libshared], |
| 2119 | dependencies : [threads, |
| 2120 | libcryptsetup, |
| 2121 | libblkid, |
| 2122 | libcrypt, |
| 2123 | libopenssl, |
| 2124 | libfdisk, |
| 2125 | libp11kit], |
| 2126 | install_rpath : rootlibexecdir, |
| 2127 | install : true, |
| 2128 | install_dir : rootlibexecdir) |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 2129 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2130 | executable( |
| 2131 | 'systemd-homed', |
| 2132 | systemd_homed_sources, |
| 2133 | include_directories : includes, |
| 2134 | link_with : [libshared], |
| 2135 | dependencies : [threads, |
| 2136 | libcrypt, |
| 2137 | libopenssl, |
| 2138 | libpwquality], |
| 2139 | install_rpath : rootlibexecdir, |
| 2140 | install : true, |
| 2141 | install_dir : rootlibexecdir) |
Lennart Poettering | 4aa0a8a | 2019-07-04 19:06:15 +0200 | [diff] [blame] | 2142 | |
Zbigniew Jędrzejewski-Szmek | 460e5af | 2020-04-28 09:08:37 +0200 | [diff] [blame] | 2143 | public_programs += executable( |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2144 | 'homectl', |
| 2145 | homectl_sources, |
| 2146 | include_directories : includes, |
| 2147 | link_with : [libshared], |
| 2148 | dependencies : [threads, |
| 2149 | libcrypt, |
| 2150 | libopenssl, |
| 2151 | libp11kit, |
| 2152 | libpwquality], |
| 2153 | install_rpath : rootlibexecdir, |
| 2154 | install : true, |
| 2155 | install_dir : rootbindir) |
Lennart Poettering | 26cf9fb | 2019-07-04 19:06:26 +0200 | [diff] [blame] | 2156 | |
| 2157 | if conf.get('HAVE_PAM') == 1 |
| 2158 | version_script_arg = join_paths(project_source_root, pam_systemd_home_sym) |
| 2159 | pam_systemd = shared_library( |
| 2160 | 'pam_systemd_home', |
| 2161 | pam_systemd_home_c, |
| 2162 | name_prefix : '', |
| 2163 | include_directories : includes, |
| 2164 | link_args : ['-shared', |
| 2165 | '-Wl,--version-script=' + version_script_arg], |
| 2166 | link_with : [libsystemd_static, |
| 2167 | libshared_static], |
| 2168 | dependencies : [threads, |
| 2169 | libpam, |
| 2170 | libpam_misc, |
| 2171 | libcrypt], |
| 2172 | link_depends : pam_systemd_home_sym, |
| 2173 | install : true, |
| 2174 | install_dir : pamlibdir) |
| 2175 | endif |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 2176 | endif |
| 2177 | |
Zbigniew Jędrzejewski-Szmek | ba7f4ae | 2018-02-28 10:20:48 +0100 | [diff] [blame] | 2178 | foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit'] |
| 2179 | meson.add_install_script(meson_make_symlink, |
| 2180 | join_paths(rootbindir, 'systemctl'), |
| 2181 | join_paths(rootsbindir, alias)) |
| 2182 | endforeach |
| 2183 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2184 | if conf.get('ENABLE_BACKLIGHT') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2185 | executable( |
| 2186 | 'systemd-backlight', |
| 2187 | 'src/backlight/backlight.c', |
| 2188 | include_directories : includes, |
| 2189 | link_with : [libshared], |
| 2190 | install_rpath : rootlibexecdir, |
| 2191 | install : true, |
| 2192 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2193 | endif |
| 2194 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2195 | if conf.get('ENABLE_RFKILL') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2196 | executable( |
| 2197 | 'systemd-rfkill', |
| 2198 | 'src/rfkill/rfkill.c', |
| 2199 | include_directories : includes, |
| 2200 | link_with : [libshared], |
| 2201 | install_rpath : rootlibexecdir, |
| 2202 | install : true, |
| 2203 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2204 | endif |
| 2205 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2206 | executable( |
| 2207 | 'systemd-system-update-generator', |
| 2208 | 'src/system-update-generator/system-update-generator.c', |
| 2209 | include_directories : includes, |
| 2210 | link_with : [libshared], |
| 2211 | install_rpath : rootlibexecdir, |
| 2212 | install : true, |
| 2213 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2214 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2215 | if conf.get('HAVE_LIBCRYPTSETUP') == 1 |
Lennart Poettering | 0866970 | 2019-08-22 10:21:11 +0200 | [diff] [blame] | 2216 | systemd_cryptsetup_sources = files(''' |
| 2217 | src/cryptsetup/cryptsetup.c |
| 2218 | src/cryptsetup/cryptsetup-pkcs11.h |
| 2219 | '''.split()) |
| 2220 | |
| 2221 | if conf.get('HAVE_P11KIT') == 1 |
| 2222 | systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-pkcs11.c') |
| 2223 | endif |
| 2224 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2225 | executable( |
| 2226 | 'systemd-cryptsetup', |
| 2227 | systemd_cryptsetup_sources, |
| 2228 | include_directories : includes, |
| 2229 | link_with : [libshared], |
| 2230 | dependencies : [libcryptsetup, |
| 2231 | libp11kit], |
| 2232 | install_rpath : rootlibexecdir, |
| 2233 | install : true, |
| 2234 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2235 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2236 | executable( |
| 2237 | 'systemd-cryptsetup-generator', |
| 2238 | 'src/cryptsetup/cryptsetup-generator.c', |
| 2239 | include_directories : includes, |
| 2240 | link_with : [libshared], |
| 2241 | dependencies : [libcryptsetup], |
| 2242 | install_rpath : rootlibexecdir, |
| 2243 | install : true, |
| 2244 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2245 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2246 | executable( |
| 2247 | 'systemd-veritysetup', |
| 2248 | 'src/veritysetup/veritysetup.c', |
| 2249 | include_directories : includes, |
| 2250 | link_with : [libshared], |
| 2251 | dependencies : [libcryptsetup], |
| 2252 | install_rpath : rootlibexecdir, |
| 2253 | install : true, |
| 2254 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2255 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2256 | executable( |
| 2257 | 'systemd-veritysetup-generator', |
| 2258 | 'src/veritysetup/veritysetup-generator.c', |
| 2259 | include_directories : includes, |
| 2260 | link_with : [libshared], |
| 2261 | dependencies : [libcryptsetup], |
| 2262 | install_rpath : rootlibexecdir, |
| 2263 | install : true, |
| 2264 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2265 | endif |
| 2266 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2267 | if conf.get('HAVE_SYSV_COMPAT') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2268 | executable( |
| 2269 | 'systemd-sysv-generator', |
| 2270 | 'src/sysv-generator/sysv-generator.c', |
| 2271 | include_directories : includes, |
| 2272 | link_with : [libshared], |
| 2273 | install_rpath : rootlibexecdir, |
| 2274 | install : true, |
| 2275 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2276 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2277 | executable( |
| 2278 | 'systemd-rc-local-generator', |
| 2279 | 'src/rc-local-generator/rc-local-generator.c', |
| 2280 | include_directories : includes, |
| 2281 | link_with : [libshared], |
| 2282 | install_rpath : rootlibexecdir, |
| 2283 | install : true, |
| 2284 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2285 | endif |
| 2286 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2287 | if conf.get('ENABLE_HOSTNAMED') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2288 | executable( |
| 2289 | 'systemd-hostnamed', |
| 2290 | 'src/hostname/hostnamed.c', |
| 2291 | include_directories : includes, |
| 2292 | link_with : [libshared], |
| 2293 | install_rpath : rootlibexecdir, |
| 2294 | install : true, |
| 2295 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2296 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2297 | public_programs += executable( |
| 2298 | 'hostnamectl', |
| 2299 | 'src/hostname/hostnamectl.c', |
| 2300 | include_directories : includes, |
| 2301 | link_with : [libshared], |
| 2302 | install_rpath : rootlibexecdir, |
| 2303 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2304 | endif |
| 2305 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2306 | if conf.get('ENABLE_LOCALED') == 1 |
| 2307 | if conf.get('HAVE_XKBCOMMON') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2308 | # logind will load libxkbcommon.so dynamically on its own |
| 2309 | deps = [libdl] |
| 2310 | else |
| 2311 | deps = [] |
| 2312 | endif |
Zbigniew Jędrzejewski-Szmek | 1eeb43f | 2017-04-13 19:37:14 -0400 | [diff] [blame] | 2313 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2314 | executable( |
| 2315 | 'systemd-localed', |
| 2316 | systemd_localed_sources, |
| 2317 | include_directories : includes, |
| 2318 | link_with : [libshared], |
| 2319 | dependencies : deps, |
| 2320 | install_rpath : rootlibexecdir, |
| 2321 | install : true, |
| 2322 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2323 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2324 | public_programs += executable( |
| 2325 | 'localectl', |
| 2326 | localectl_sources, |
| 2327 | include_directories : includes, |
| 2328 | link_with : [libshared], |
| 2329 | install_rpath : rootlibexecdir, |
| 2330 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2331 | endif |
| 2332 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2333 | if conf.get('ENABLE_TIMEDATED') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2334 | executable( |
| 2335 | 'systemd-timedated', |
| 2336 | 'src/timedate/timedated.c', |
| 2337 | include_directories : includes, |
| 2338 | link_with : [libshared], |
| 2339 | install_rpath : rootlibexecdir, |
| 2340 | install : true, |
| 2341 | install_dir : rootlibexecdir) |
Yu Watanabe | 6129ec8 | 2018-05-03 18:07:43 +0900 | [diff] [blame] | 2342 | endif |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2343 | |
Yu Watanabe | 6129ec8 | 2018-05-03 18:07:43 +0900 | [diff] [blame] | 2344 | if conf.get('ENABLE_TIMEDATECTL') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2345 | public_programs += executable( |
| 2346 | 'timedatectl', |
| 2347 | 'src/timedate/timedatectl.c', |
| 2348 | include_directories : includes, |
| 2349 | install_rpath : rootlibexecdir, |
| 2350 | link_with : [libshared], |
| 2351 | dependencies : [libm], |
| 2352 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2353 | endif |
| 2354 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2355 | if conf.get('ENABLE_TIMESYNCD') == 1 |
Robert Scheck | fd74a13 | 2020-02-08 14:02:09 +0100 | [diff] [blame] | 2356 | if get_option('link-timesyncd-shared') |
| 2357 | timesyncd_link_with = [libshared] |
| 2358 | else |
| 2359 | timesyncd_link_with = [libsystemd_static, |
| 2360 | libshared_static, |
| 2361 | libjournal_client, |
| 2362 | libbasic_gcrypt] |
| 2363 | endif |
| 2364 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2365 | executable( |
| 2366 | 'systemd-timesyncd', |
| 2367 | systemd_timesyncd_sources, |
| 2368 | include_directories : includes, |
| 2369 | link_with : [timesyncd_link_with], |
| 2370 | dependencies : [threads, |
| 2371 | libm], |
| 2372 | install_rpath : rootlibexecdir, |
| 2373 | install : true, |
| 2374 | install_dir : rootlibexecdir) |
Peter A. Bigot | 5c3376e | 2018-03-21 06:42:04 -0500 | [diff] [blame] | 2375 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2376 | executable( |
| 2377 | 'systemd-time-wait-sync', |
| 2378 | 'src/time-wait-sync/time-wait-sync.c', |
| 2379 | include_directories : includes, |
| 2380 | link_with : [timesyncd_link_with], |
| 2381 | install_rpath : rootlibexecdir, |
| 2382 | install : true, |
| 2383 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2384 | endif |
| 2385 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2386 | if conf.get('ENABLE_MACHINED') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2387 | executable( |
| 2388 | 'systemd-machined', |
| 2389 | systemd_machined_sources, |
| 2390 | include_directories : includes, |
| 2391 | link_with : [libmachine_core, |
| 2392 | libshared], |
| 2393 | install_rpath : rootlibexecdir, |
| 2394 | install : true, |
| 2395 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2396 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2397 | public_programs += executable( |
| 2398 | 'machinectl', |
| 2399 | 'src/machine/machinectl.c', |
| 2400 | include_directories : includes, |
| 2401 | link_with : [libshared], |
| 2402 | dependencies : [threads, |
| 2403 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2404 | liblz4, |
| 2405 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2406 | install_rpath : rootlibexecdir, |
| 2407 | install : true, |
| 2408 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2409 | endif |
| 2410 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2411 | if conf.get('ENABLE_IMPORTD') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2412 | executable( |
| 2413 | 'systemd-importd', |
| 2414 | systemd_importd_sources, |
| 2415 | include_directories : includes, |
| 2416 | link_with : [libshared], |
| 2417 | dependencies : [threads], |
| 2418 | install_rpath : rootlibexecdir, |
| 2419 | install : true, |
| 2420 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2421 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2422 | systemd_pull = executable( |
| 2423 | 'systemd-pull', |
| 2424 | systemd_pull_sources, |
| 2425 | include_directories : includes, |
| 2426 | link_with : [libshared], |
| 2427 | dependencies : [versiondep, |
| 2428 | libcurl, |
| 2429 | libz, |
| 2430 | libbzip2, |
| 2431 | libxz, |
| 2432 | libgcrypt], |
| 2433 | install_rpath : rootlibexecdir, |
| 2434 | install : true, |
| 2435 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2436 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2437 | systemd_import = executable( |
| 2438 | 'systemd-import', |
| 2439 | systemd_import_sources, |
| 2440 | include_directories : includes, |
| 2441 | link_with : [libshared], |
| 2442 | dependencies : [libcurl, |
| 2443 | libz, |
| 2444 | libbzip2, |
| 2445 | libxz], |
| 2446 | install_rpath : rootlibexecdir, |
| 2447 | install : true, |
| 2448 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2449 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2450 | systemd_import_fs = executable( |
| 2451 | 'systemd-import-fs', |
| 2452 | systemd_import_fs_sources, |
| 2453 | include_directories : includes, |
| 2454 | link_with : [libshared], |
| 2455 | install_rpath : rootlibexecdir, |
| 2456 | install : true, |
| 2457 | install_dir : rootlibexecdir) |
Lennart Poettering | 1d7579c | 2018-10-10 21:20:08 +0200 | [diff] [blame] | 2458 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2459 | systemd_export = executable( |
| 2460 | 'systemd-export', |
| 2461 | systemd_export_sources, |
| 2462 | include_directories : includes, |
| 2463 | link_with : [libshared], |
| 2464 | dependencies : [libcurl, |
| 2465 | libz, |
| 2466 | libbzip2, |
| 2467 | libxz], |
| 2468 | install_rpath : rootlibexecdir, |
| 2469 | install : true, |
| 2470 | install_dir : rootlibexecdir) |
Lennart Poettering | 1d7579c | 2018-10-10 21:20:08 +0200 | [diff] [blame] | 2471 | |
| 2472 | public_programs += [systemd_pull, systemd_import, systemd_import_fs, systemd_export] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2473 | endif |
| 2474 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2475 | if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2476 | public_programs += executable( |
| 2477 | 'systemd-journal-upload', |
| 2478 | systemd_journal_upload_sources, |
| 2479 | include_directories : includes, |
| 2480 | link_with : [libshared], |
| 2481 | dependencies : [versiondep, |
| 2482 | threads, |
| 2483 | libcurl, |
| 2484 | libgnutls, |
| 2485 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2486 | liblz4, |
| 2487 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2488 | install_rpath : rootlibexecdir, |
| 2489 | install : true, |
| 2490 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2491 | endif |
| 2492 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2493 | if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2494 | public_programs += executable( |
| 2495 | 'systemd-journal-remote', |
| 2496 | systemd_journal_remote_sources, |
| 2497 | include_directories : includes, |
| 2498 | link_with : [libshared, |
| 2499 | libsystemd_journal_remote], |
| 2500 | dependencies : [threads, |
| 2501 | libmicrohttpd, |
| 2502 | libgnutls, |
| 2503 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2504 | liblz4, |
| 2505 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2506 | install_rpath : rootlibexecdir, |
| 2507 | install : true, |
| 2508 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2509 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2510 | public_programs += executable( |
| 2511 | 'systemd-journal-gatewayd', |
| 2512 | systemd_journal_gatewayd_sources, |
| 2513 | include_directories : includes, |
| 2514 | link_with : [libshared], |
| 2515 | dependencies : [threads, |
| 2516 | libmicrohttpd, |
| 2517 | libgnutls, |
| 2518 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2519 | liblz4, |
| 2520 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2521 | install_rpath : rootlibexecdir, |
| 2522 | install : true, |
| 2523 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2524 | endif |
| 2525 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2526 | if conf.get('ENABLE_COREDUMP') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2527 | executable( |
| 2528 | 'systemd-coredump', |
| 2529 | systemd_coredump_sources, |
| 2530 | include_directories : includes, |
| 2531 | link_with : [libshared], |
| 2532 | dependencies : [threads, |
| 2533 | libacl, |
| 2534 | libdw, |
| 2535 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2536 | liblz4, |
| 2537 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2538 | install_rpath : rootlibexecdir, |
| 2539 | install : true, |
| 2540 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2541 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2542 | public_programs += executable( |
| 2543 | 'coredumpctl', |
| 2544 | coredumpctl_sources, |
| 2545 | include_directories : includes, |
| 2546 | link_with : [libshared], |
| 2547 | dependencies : [threads, |
| 2548 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2549 | liblz4, |
| 2550 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2551 | install_rpath : rootlibexecdir, |
| 2552 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2553 | endif |
| 2554 | |
Eric DeVolder | 9b4abc6 | 2019-05-16 08:59:01 -0500 | [diff] [blame] | 2555 | if conf.get('ENABLE_PSTORE') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2556 | executable( |
| 2557 | 'systemd-pstore', |
| 2558 | systemd_pstore_sources, |
| 2559 | include_directories : includes, |
| 2560 | link_with : [libshared], |
| 2561 | dependencies : [threads, |
| 2562 | libacl, |
| 2563 | libdw, |
| 2564 | libxz, |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 2565 | liblz4, |
| 2566 | libzstd], |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2567 | install_rpath : rootlibexecdir, |
| 2568 | install : true, |
| 2569 | install_dir : rootlibexecdir) |
Eric DeVolder | 9b4abc6 | 2019-05-16 08:59:01 -0500 | [diff] [blame] | 2570 | endif |
| 2571 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2572 | if conf.get('ENABLE_BINFMT') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2573 | public_programs += executable( |
| 2574 | 'systemd-binfmt', |
| 2575 | 'src/binfmt/binfmt.c', |
| 2576 | include_directories : includes, |
| 2577 | link_with : [libshared], |
| 2578 | install_rpath : rootlibexecdir, |
| 2579 | install : true, |
| 2580 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2581 | |
| 2582 | meson.add_install_script('sh', '-c', |
| 2583 | mkdir_p.format(binfmtdir)) |
| 2584 | meson.add_install_script('sh', '-c', |
| 2585 | mkdir_p.format(join_paths(sysconfdir, 'binfmt.d'))) |
| 2586 | endif |
| 2587 | |
Lennart Poettering | e594a3b | 2019-12-10 21:31:41 +0100 | [diff] [blame] | 2588 | if conf.get('ENABLE_REPART') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2589 | exe = executable( |
| 2590 | 'systemd-repart', |
| 2591 | systemd_repart_sources, |
| 2592 | include_directories : includes, |
| 2593 | link_with : [libshared], |
| 2594 | dependencies : [threads, |
| 2595 | libcryptsetup, |
| 2596 | libblkid, |
| 2597 | libfdisk, |
| 2598 | libopenssl], |
| 2599 | install_rpath : rootlibexecdir, |
| 2600 | install : true, |
| 2601 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | e29e4d5 | 2020-03-20 20:22:42 +0100 | [diff] [blame] | 2602 | |
| 2603 | if want_tests != 'false' |
| 2604 | test('test-repart', |
| 2605 | test_repart_sh, |
| 2606 | args : exe.full_path()) |
| 2607 | endif |
Lennart Poettering | e594a3b | 2019-12-10 21:31:41 +0100 | [diff] [blame] | 2608 | endif |
| 2609 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2610 | if conf.get('ENABLE_VCONSOLE') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2611 | executable( |
| 2612 | 'systemd-vconsole-setup', |
| 2613 | 'src/vconsole/vconsole-setup.c', |
| 2614 | include_directories : includes, |
| 2615 | link_with : [libshared], |
| 2616 | install_rpath : rootlibexecdir, |
| 2617 | install : true, |
| 2618 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2619 | endif |
| 2620 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2621 | if conf.get('ENABLE_RANDOMSEED') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2622 | executable( |
| 2623 | 'systemd-random-seed', |
| 2624 | 'src/random-seed/random-seed.c', |
| 2625 | include_directories : includes, |
| 2626 | link_with : [libshared], |
| 2627 | install_rpath : rootlibexecdir, |
| 2628 | install : true, |
| 2629 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2630 | endif |
| 2631 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2632 | if conf.get('ENABLE_FIRSTBOOT') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2633 | executable( |
| 2634 | 'systemd-firstboot', |
| 2635 | 'src/firstboot/firstboot.c', |
| 2636 | include_directories : includes, |
| 2637 | link_with : [libshared], |
| 2638 | dependencies : [libcrypt], |
| 2639 | install_rpath : rootlibexecdir, |
| 2640 | install : true, |
| 2641 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2642 | endif |
| 2643 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2644 | executable( |
| 2645 | 'systemd-remount-fs', |
| 2646 | 'src/remount-fs/remount-fs.c', |
| 2647 | include_directories : includes, |
| 2648 | link_with : [libcore_shared, |
| 2649 | libshared], |
| 2650 | install_rpath : rootlibexecdir, |
| 2651 | install : true, |
| 2652 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2653 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2654 | executable( |
| 2655 | 'systemd-machine-id-setup', |
| 2656 | 'src/machine-id-setup/machine-id-setup-main.c', |
| 2657 | include_directories : includes, |
| 2658 | link_with : [libcore_shared, |
| 2659 | libshared], |
| 2660 | install_rpath : rootlibexecdir, |
| 2661 | install : true, |
| 2662 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2663 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2664 | executable( |
| 2665 | 'systemd-fsck', |
| 2666 | 'src/fsck/fsck.c', |
| 2667 | include_directories : includes, |
| 2668 | link_with : [libshared], |
| 2669 | install_rpath : rootlibexecdir, |
| 2670 | install : true, |
| 2671 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2672 | |
Zbigniew Jędrzejewski-Szmek | 80750ad | 2017-10-23 13:40:38 +0200 | [diff] [blame] | 2673 | executable('systemd-growfs', |
| 2674 | 'src/partition/growfs.c', |
| 2675 | include_directories : includes, |
| 2676 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | c34b75a | 2017-11-21 18:56:52 +0100 | [diff] [blame] | 2677 | dependencies : [libcryptsetup], |
Zbigniew Jędrzejewski-Szmek | 80750ad | 2017-10-23 13:40:38 +0200 | [diff] [blame] | 2678 | install_rpath : rootlibexecdir, |
| 2679 | install : true, |
| 2680 | install_dir : rootlibexecdir) |
| 2681 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2682 | executable( |
| 2683 | 'systemd-makefs', |
| 2684 | 'src/partition/makefs.c', |
| 2685 | include_directories : includes, |
| 2686 | link_with : [libshared], |
| 2687 | install_rpath : rootlibexecdir, |
| 2688 | install : true, |
| 2689 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | b7f28ac | 2017-11-26 22:51:29 +0100 | [diff] [blame] | 2690 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2691 | executable( |
| 2692 | 'systemd-sleep', |
| 2693 | 'src/sleep/sleep.c', |
| 2694 | include_directories : includes, |
| 2695 | link_with : [libshared], |
| 2696 | install_rpath : rootlibexecdir, |
| 2697 | install : true, |
| 2698 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2699 | |
Yu Watanabe | d25e127 | 2019-01-03 02:32:57 +0900 | [diff] [blame] | 2700 | install_data('src/sleep/sleep.conf', |
| 2701 | install_dir : pkgsysconfdir) |
| 2702 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2703 | public_programs += executable( |
| 2704 | 'systemd-sysctl', |
| 2705 | 'src/sysctl/sysctl.c', |
| 2706 | include_directories : includes, |
| 2707 | link_with : [libshared], |
| 2708 | install_rpath : rootlibexecdir, |
| 2709 | install : true, |
| 2710 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2711 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2712 | executable( |
| 2713 | 'systemd-ac-power', |
| 2714 | 'src/ac-power/ac-power.c', |
| 2715 | include_directories : includes, |
| 2716 | link_with : [libshared], |
| 2717 | install_rpath : rootlibexecdir, |
| 2718 | install : true, |
| 2719 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2720 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2721 | public_programs += executable( |
| 2722 | 'systemd-detect-virt', |
| 2723 | 'src/detect-virt/detect-virt.c', |
| 2724 | include_directories : includes, |
| 2725 | link_with : [libshared], |
| 2726 | install_rpath : rootlibexecdir, |
| 2727 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2728 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2729 | public_programs += executable( |
| 2730 | 'systemd-delta', |
| 2731 | 'src/delta/delta.c', |
| 2732 | include_directories : includes, |
| 2733 | link_with : [libshared], |
| 2734 | install_rpath : rootlibexecdir, |
| 2735 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2736 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2737 | public_programs += executable( |
| 2738 | 'systemd-escape', |
| 2739 | 'src/escape/escape.c', |
| 2740 | include_directories : includes, |
| 2741 | link_with : [libshared], |
| 2742 | install_rpath : rootlibexecdir, |
| 2743 | install : true, |
| 2744 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2745 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2746 | public_programs += executable( |
| 2747 | 'systemd-notify', |
| 2748 | 'src/notify/notify.c', |
| 2749 | include_directories : includes, |
| 2750 | link_with : [libshared], |
| 2751 | install_rpath : rootlibexecdir, |
| 2752 | install : true, |
| 2753 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2754 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2755 | executable( |
| 2756 | 'systemd-volatile-root', |
| 2757 | 'src/volatile-root/volatile-root.c', |
| 2758 | include_directories : includes, |
| 2759 | link_with : [libshared], |
| 2760 | install_rpath : rootlibexecdir, |
| 2761 | install : true, |
| 2762 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2763 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2764 | executable( |
| 2765 | 'systemd-cgroups-agent', |
| 2766 | 'src/cgroups-agent/cgroups-agent.c', |
| 2767 | include_directories : includes, |
| 2768 | link_with : [libshared], |
| 2769 | install_rpath : rootlibexecdir, |
| 2770 | install : true, |
| 2771 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2772 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2773 | public_programs += executable( |
| 2774 | 'systemd-id128', |
| 2775 | 'src/id128/id128.c', |
| 2776 | include_directories : includes, |
| 2777 | link_with : [libshared], |
| 2778 | install_rpath : rootlibexecdir, |
| 2779 | install : true) |
Zbigniew Jędrzejewski-Szmek | 0d1d512 | 2018-08-21 16:08:48 +0200 | [diff] [blame] | 2780 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2781 | public_programs += executable( |
| 2782 | 'systemd-path', |
| 2783 | 'src/path/path.c', |
| 2784 | include_directories : includes, |
| 2785 | link_with : [libshared], |
| 2786 | install_rpath : rootlibexecdir, |
| 2787 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2788 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2789 | public_programs += executable( |
| 2790 | 'systemd-ask-password', |
| 2791 | 'src/ask-password/ask-password.c', |
| 2792 | include_directories : includes, |
| 2793 | link_with : [libshared], |
| 2794 | install_rpath : rootlibexecdir, |
| 2795 | install : true, |
| 2796 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2797 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2798 | executable( |
| 2799 | 'systemd-reply-password', |
| 2800 | 'src/reply-password/reply-password.c', |
| 2801 | include_directories : includes, |
| 2802 | link_with : [libshared], |
| 2803 | install_rpath : rootlibexecdir, |
| 2804 | install : true, |
| 2805 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2806 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2807 | public_programs += executable( |
| 2808 | 'systemd-tty-ask-password-agent', |
| 2809 | 'src/tty-ask-password-agent/tty-ask-password-agent.c', |
| 2810 | include_directories : includes, |
| 2811 | link_with : [libshared], |
| 2812 | install_rpath : rootlibexecdir, |
| 2813 | install : true, |
| 2814 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2815 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2816 | public_programs += executable( |
| 2817 | 'systemd-cgls', |
| 2818 | 'src/cgls/cgls.c', |
| 2819 | include_directories : includes, |
| 2820 | link_with : [libshared], |
| 2821 | install_rpath : rootlibexecdir, |
| 2822 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2823 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2824 | public_programs += executable( |
| 2825 | 'systemd-cgtop', |
| 2826 | 'src/cgtop/cgtop.c', |
| 2827 | include_directories : includes, |
| 2828 | link_with : [libshared], |
| 2829 | install_rpath : rootlibexecdir, |
| 2830 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2831 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2832 | executable( |
| 2833 | 'systemd-initctl', |
| 2834 | 'src/initctl/initctl.c', |
| 2835 | include_directories : includes, |
| 2836 | link_with : [libshared], |
| 2837 | install_rpath : rootlibexecdir, |
| 2838 | install : true, |
| 2839 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2840 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2841 | public_programs += executable( |
| 2842 | 'systemd-mount', |
| 2843 | 'src/mount/mount-tool.c', |
| 2844 | include_directories : includes, |
| 2845 | link_with : [libshared], |
| 2846 | dependencies: [libmount], |
| 2847 | install_rpath : rootlibexecdir, |
| 2848 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2849 | |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 2850 | meson.add_install_script(meson_make_symlink, |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 2851 | 'systemd-mount', join_paths(bindir, 'systemd-umount')) |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 2852 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2853 | public_programs += executable( |
| 2854 | 'systemd-run', |
| 2855 | 'src/run/run.c', |
| 2856 | include_directories : includes, |
| 2857 | link_with : [libshared], |
| 2858 | install_rpath : rootlibexecdir, |
| 2859 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2860 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2861 | public_programs += executable( |
| 2862 | 'systemd-stdio-bridge', |
| 2863 | 'src/stdio-bridge/stdio-bridge.c', |
| 2864 | include_directories : includes, |
| 2865 | link_with : [libshared], |
| 2866 | dependencies : [versiondep], |
| 2867 | install_rpath : rootlibexecdir, |
| 2868 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2869 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2870 | public_programs += executable( |
| 2871 | 'busctl', |
| 2872 | 'src/busctl/busctl.c', |
| 2873 | 'src/busctl/busctl-introspect.c', |
| 2874 | 'src/busctl/busctl-introspect.h', |
| 2875 | include_directories : includes, |
| 2876 | link_with : [libshared], |
| 2877 | install_rpath : rootlibexecdir, |
| 2878 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2879 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2880 | if conf.get('ENABLE_SYSUSERS') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2881 | public_programs += executable( |
| 2882 | 'systemd-sysusers', |
| 2883 | 'src/sysusers/sysusers.c', |
| 2884 | include_directories : includes, |
| 2885 | link_with : [libshared], |
| 2886 | install_rpath : rootlibexecdir, |
| 2887 | install : true, |
| 2888 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2889 | endif |
| 2890 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2891 | if conf.get('ENABLE_TMPFILES') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2892 | exe = executable( |
| 2893 | 'systemd-tmpfiles', |
| 2894 | 'src/tmpfiles/tmpfiles.c', |
| 2895 | include_directories : includes, |
| 2896 | link_with : [libshared], |
| 2897 | dependencies : [libacl], |
| 2898 | install_rpath : rootlibexecdir, |
| 2899 | install : true, |
| 2900 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5a8b164 | 2018-07-31 09:44:11 +0200 | [diff] [blame] | 2901 | public_programs += exe |
Zbigniew Jędrzejewski-Szmek | d9daae5 | 2017-11-22 14:13:32 +0100 | [diff] [blame] | 2902 | |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 2903 | if want_tests != 'false' |
| 2904 | test('test-systemd-tmpfiles', |
| 2905 | test_systemd_tmpfiles_py, |
| 2906 | # https://github.com/mesonbuild/meson/issues/2681 |
| 2907 | args : exe.full_path()) |
| 2908 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2909 | endif |
| 2910 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2911 | if conf.get('ENABLE_HWDB') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2912 | public_programs += executable( |
| 2913 | 'systemd-hwdb', |
| 2914 | 'src/hwdb/hwdb.c', |
| 2915 | 'src/libsystemd/sd-hwdb/hwdb-internal.h', |
| 2916 | include_directories : includes, |
| 2917 | link_with : [libudev_static], |
| 2918 | install_rpath : udev_rpath, |
| 2919 | install : true, |
| 2920 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2921 | endif |
| 2922 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2923 | if conf.get('ENABLE_QUOTACHECK') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2924 | executable( |
| 2925 | 'systemd-quotacheck', |
| 2926 | 'src/quotacheck/quotacheck.c', |
| 2927 | include_directories : includes, |
| 2928 | link_with : [libshared], |
| 2929 | install_rpath : rootlibexecdir, |
| 2930 | install : true, |
| 2931 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2932 | endif |
| 2933 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2934 | public_programs += executable( |
| 2935 | 'systemd-socket-proxyd', |
| 2936 | 'src/socket-proxy/socket-proxyd.c', |
| 2937 | include_directories : includes, |
| 2938 | link_with : [libshared], |
| 2939 | dependencies : [threads], |
| 2940 | install_rpath : rootlibexecdir, |
| 2941 | install : true, |
| 2942 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2943 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2944 | public_programs += executable( |
| 2945 | 'systemd-udevd', |
| 2946 | systemd_udevd_sources, |
| 2947 | include_directories : includes, |
| 2948 | c_args : '-DLOG_REALM=LOG_REALM_UDEV', |
| 2949 | link_with : [libudev_core, |
| 2950 | libsystemd_network, |
| 2951 | libudev_static], |
| 2952 | dependencies : [versiondep, |
| 2953 | threads, |
| 2954 | libkmod, |
| 2955 | libidn, |
| 2956 | libacl, |
| 2957 | libblkid], |
| 2958 | install_rpath : udev_rpath, |
| 2959 | install : true, |
| 2960 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2961 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2962 | public_programs += executable( |
| 2963 | 'udevadm', |
| 2964 | udevadm_sources, |
| 2965 | c_args : '-DLOG_REALM=LOG_REALM_UDEV', |
| 2966 | include_directories : includes, |
| 2967 | link_with : [libudev_core, |
| 2968 | libsystemd_network, |
| 2969 | libudev_static], |
| 2970 | dependencies : [versiondep, |
| 2971 | threads, |
| 2972 | libkmod, |
| 2973 | libidn, |
| 2974 | libacl, |
| 2975 | libblkid], |
| 2976 | install_rpath : udev_rpath, |
| 2977 | install : true, |
| 2978 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2979 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2980 | executable( |
| 2981 | 'systemd-shutdown', |
| 2982 | systemd_shutdown_sources, |
| 2983 | include_directories : includes, |
| 2984 | link_with : [libcore_shared, |
| 2985 | libshared], |
| 2986 | dependencies : [libmount], |
| 2987 | install_rpath : rootlibexecdir, |
| 2988 | install : true, |
| 2989 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2990 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 2991 | executable( |
| 2992 | 'systemd-update-done', |
| 2993 | 'src/update-done/update-done.c', |
| 2994 | include_directories : includes, |
| 2995 | link_with : [libshared], |
| 2996 | install_rpath : rootlibexecdir, |
| 2997 | install : true, |
| 2998 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2999 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3000 | executable( |
| 3001 | 'systemd-update-utmp', |
| 3002 | 'src/update-utmp/update-utmp.c', |
| 3003 | include_directories : includes, |
| 3004 | link_with : [libshared], |
| 3005 | dependencies : [libaudit], |
| 3006 | install_rpath : rootlibexecdir, |
| 3007 | install : true, |
| 3008 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3009 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 3010 | if conf.get('HAVE_KMOD') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3011 | executable( |
| 3012 | 'systemd-modules-load', |
| 3013 | 'src/modules-load/modules-load.c', |
| 3014 | include_directories : includes, |
| 3015 | link_with : [libshared], |
| 3016 | dependencies : [libkmod], |
| 3017 | install_rpath : rootlibexecdir, |
| 3018 | install : true, |
| 3019 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 3020 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3021 | meson.add_install_script('sh', '-c', |
| 3022 | mkdir_p.format(modulesloaddir)) |
| 3023 | meson.add_install_script('sh', '-c', |
| 3024 | mkdir_p.format(join_paths(sysconfdir, 'modules-load.d'))) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3025 | endif |
| 3026 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3027 | public_programs += executable( |
| 3028 | 'systemd-nspawn', |
| 3029 | systemd_nspawn_sources, |
| 3030 | include_directories : includes, |
| 3031 | link_with : [libcore_shared, |
| 3032 | libnspawn_core, |
| 3033 | libshared], |
| 3034 | dependencies : [libblkid, |
| 3035 | libseccomp], |
| 3036 | install_rpath : rootlibexecdir, |
| 3037 | install : true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3038 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 3039 | if conf.get('ENABLE_NETWORKD') == 1 |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3040 | executable( |
| 3041 | 'systemd-networkd', |
| 3042 | systemd_networkd_sources, |
| 3043 | include_directories : network_include_dir, |
| 3044 | link_with : [libnetworkd_core, |
| 3045 | libsystemd_network, |
| 3046 | libudev_static, |
| 3047 | networkd_link_with], |
| 3048 | dependencies : [threads], |
| 3049 | install_rpath : rootlibexecdir, |
| 3050 | install : true, |
| 3051 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3052 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3053 | executable( |
| 3054 | 'systemd-networkd-wait-online', |
| 3055 | systemd_networkd_wait_online_sources, |
| 3056 | include_directories : includes, |
| 3057 | link_with : [libnetworkd_core, |
| 3058 | networkd_link_with], |
| 3059 | install_rpath : rootlibexecdir, |
| 3060 | install : true, |
| 3061 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3062 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3063 | public_programs += executable( |
| 3064 | 'networkctl', |
| 3065 | networkctl_sources, |
| 3066 | include_directories : includes, |
| 3067 | link_with : [libsystemd_network, |
| 3068 | networkd_link_with], |
| 3069 | install_rpath : rootlibexecdir, |
| 3070 | install : true, |
| 3071 | install_dir : rootbindir) |
Yu Watanabe | 426c1d3 | 2019-07-13 03:35:04 +0900 | [diff] [blame] | 3072 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3073 | exe = executable( |
| 3074 | 'systemd-network-generator', |
| 3075 | network_generator_sources, |
| 3076 | include_directories : includes, |
| 3077 | link_with : [networkd_link_with], |
| 3078 | install_rpath : rootlibexecdir, |
| 3079 | install : true, |
| 3080 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | fbaa113 | 2019-12-10 13:04:39 +0100 | [diff] [blame] | 3081 | |
| 3082 | if want_tests != 'false' |
| 3083 | test('test-network-generator-conversion', |
| 3084 | test_network_generator_conversion_sh, |
| 3085 | # https://github.com/mesonbuild/meson/issues/2681 |
| 3086 | args : exe.full_path()) |
| 3087 | endif |
Felipe Sateler | dcfe072 | 2017-08-21 09:48:41 -0300 | [diff] [blame] | 3088 | endif |
Zbigniew Jędrzejewski-Szmek | e821f6a | 2017-12-07 10:44:43 +0100 | [diff] [blame] | 3089 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3090 | executable( |
| 3091 | 'systemd-sulogin-shell', |
| 3092 | ['src/sulogin-shell/sulogin-shell.c'], |
| 3093 | include_directories : includes, |
| 3094 | link_with : [libshared], |
| 3095 | install_rpath : rootlibexecdir, |
| 3096 | install : true, |
| 3097 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | e821f6a | 2017-12-07 10:44:43 +0100 | [diff] [blame] | 3098 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 3099 | ############################################################ |
| 3100 | |
Filipe Brandenburger | e2d4137 | 2018-09-11 23:55:02 -0700 | [diff] [blame] | 3101 | custom_target( |
| 3102 | 'systemd-runtest.env', |
| 3103 | output : 'systemd-runtest.env', |
| 3104 | command : ['sh', '-c', '{ ' + |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3105 | 'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) + |
Zbigniew Jędrzejewski-Szmek | 81e0677 | 2020-04-24 20:12:03 +0200 | [diff] [blame] | 3106 | 'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) + |
Filipe Brandenburger | e2d4137 | 2018-09-11 23:55:02 -0700 | [diff] [blame] | 3107 | '} >@OUTPUT@'], |
| 3108 | build_by_default : true) |
| 3109 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 3110 | foreach tuple : tests |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3111 | sources = tuple[0] |
| 3112 | link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] |
| 3113 | dependencies = tuple[2] |
| 3114 | condition = tuple.length() >= 4 ? tuple[3] : '' |
| 3115 | type = tuple.length() >= 5 ? tuple[4] : '' |
| 3116 | defs = tuple.length() >= 6 ? tuple[5] : [] |
| 3117 | incs = tuple.length() >= 7 ? tuple[6] : includes |
| 3118 | timeout = 30 |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 3119 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3120 | name = sources[0].split('/')[-1].split('.')[0] |
| 3121 | if type.startswith('timeout=') |
| 3122 | timeout = type.split('=')[1].to_int() |
| 3123 | type = '' |
| 3124 | endif |
Zbigniew Jędrzejewski-Szmek | 3b2bdd6 | 2018-09-12 16:52:08 +0200 | [diff] [blame] | 3125 | |
| 3126 | if condition == '' or conf.get(condition) == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3127 | exe = executable( |
| 3128 | name, |
| 3129 | sources, |
| 3130 | include_directories : incs, |
| 3131 | link_with : link_with, |
Zbigniew Jędrzejewski-Szmek | 60722ad | 2019-02-24 22:49:38 +0100 | [diff] [blame] | 3132 | dependencies : [versiondep, |
| 3133 | dependencies], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3134 | c_args : defs, |
Zbigniew Jędrzejewski-Szmek | 3b2bdd6 | 2018-09-12 16:52:08 +0200 | [diff] [blame] | 3135 | build_by_default : want_tests != 'false', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3136 | install_rpath : rootlibexecdir, |
Michael Biebl | 7cdd978 | 2017-06-23 03:23:30 +0200 | [diff] [blame] | 3137 | install : install_tests, |
| 3138 | install_dir : join_paths(testsdir, type)) |
Zbigniew Jędrzejewski-Szmek | 572baca | 2017-04-08 01:55:38 -0400 | [diff] [blame] | 3139 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3140 | if type == 'manual' |
| 3141 | message('@0@ is a manual test'.format(name)) |
| 3142 | elif type == 'unsafe' and want_tests != 'unsafe' |
| 3143 | message('@0@ is an unsafe test'.format(name)) |
Zbigniew Jędrzejewski-Szmek | 3b2bdd6 | 2018-09-12 16:52:08 +0200 | [diff] [blame] | 3144 | elif want_tests != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3145 | test(name, exe, |
| 3146 | env : test_env, |
| 3147 | timeout : timeout) |
| 3148 | endif |
| 3149 | else |
| 3150 | message('Not compiling @0@ because @1@ is not true'.format(name, condition)) |
| 3151 | endif |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 3152 | endforeach |
| 3153 | |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3154 | exe = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3155 | 'test-libsystemd-sym', |
| 3156 | test_libsystemd_sym_c, |
| 3157 | include_directories : includes, |
| 3158 | link_with : [libsystemd], |
Yu Watanabe | fd1939f | 2018-09-12 21:47:56 +0900 | [diff] [blame] | 3159 | build_by_default : want_tests != 'false', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3160 | install : install_tests, |
| 3161 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 3162 | if want_tests != 'false' |
| 3163 | test('test-libsystemd-sym', exe) |
| 3164 | endif |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 3165 | |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3166 | exe = executable( |
| 3167 | 'test-libsystemd-static-sym', |
| 3168 | test_libsystemd_sym_c, |
| 3169 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3170 | link_with : [install_libsystemd_static], |
| 3171 | dependencies : [threads], # threads is already included in dependencies on the library, |
| 3172 | # but does not seem to get propagated. Add here as a work-around. |
Yu Watanabe | fd1939f | 2018-09-12 21:47:56 +0900 | [diff] [blame] | 3173 | build_by_default : want_tests != 'false' and static_libsystemd_pic, |
Davide Cavalca | 20f3d32 | 2018-04-24 13:34:48 -0700 | [diff] [blame] | 3174 | install : install_tests and static_libsystemd_pic, |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3175 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 3176 | if want_tests != 'false' and static_libsystemd_pic |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3177 | test('test-libsystemd-static-sym', exe) |
| 3178 | endif |
| 3179 | |
| 3180 | exe = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3181 | 'test-libudev-sym', |
| 3182 | test_libudev_sym_c, |
| 3183 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | c1cd674 | 2018-09-12 16:57:06 +0200 | [diff] [blame] | 3184 | c_args : '-Wno-deprecated-declarations', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3185 | link_with : [libudev], |
Yu Watanabe | fd1939f | 2018-09-12 21:47:56 +0900 | [diff] [blame] | 3186 | build_by_default : want_tests != 'false', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3187 | install : install_tests, |
| 3188 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 3189 | if want_tests != 'false' |
| 3190 | test('test-libudev-sym', exe) |
| 3191 | endif |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3192 | |
| 3193 | exe = executable( |
| 3194 | 'test-libudev-static-sym', |
| 3195 | test_libudev_sym_c, |
| 3196 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | c1cd674 | 2018-09-12 16:57:06 +0200 | [diff] [blame] | 3197 | c_args : '-Wno-deprecated-declarations', |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3198 | link_with : [install_libudev_static], |
Yu Watanabe | fd1939f | 2018-09-12 21:47:56 +0900 | [diff] [blame] | 3199 | build_by_default : want_tests != 'false' and static_libudev_pic, |
Davide Cavalca | 20f3d32 | 2018-04-24 13:34:48 -0700 | [diff] [blame] | 3200 | install : install_tests and static_libudev_pic, |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3201 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 3202 | if want_tests != 'false' and static_libudev_pic |
Zbigniew Jędrzejewski-Szmek | 0632b4c | 2018-04-23 13:49:27 +0200 | [diff] [blame] | 3203 | test('test-libudev-static-sym', exe) |
| 3204 | endif |
Zbigniew Jędrzejewski-Szmek | e0bec52 | 2017-04-10 15:20:42 -0400 | [diff] [blame] | 3205 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 3206 | ############################################################ |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3207 | |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 3208 | fuzzer_exes = [] |
| 3209 | |
Michael Olbrich | 5996740 | 2018-11-11 11:27:35 +0100 | [diff] [blame] | 3210 | if get_option('tests') != 'false' |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3211 | foreach tuple : fuzzers |
| 3212 | sources = tuple[0] |
| 3213 | link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] |
| 3214 | dependencies = tuple[2] |
| 3215 | defs = tuple.length() >= 4 ? tuple[3] : [] |
| 3216 | incs = tuple.length() >= 5 ? tuple[4] : includes |
| 3217 | link_args = [] |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 3218 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3219 | if want_ossfuzz |
Evgeny Vereshchagin | 9c5c467 | 2019-05-09 00:03:41 +0200 | [diff] [blame] | 3220 | dependencies += fuzzing_engine |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3221 | elif want_libfuzzer |
| 3222 | if fuzzing_engine.found() |
| 3223 | dependencies += fuzzing_engine |
| 3224 | else |
| 3225 | link_args += ['-fsanitize=fuzzer'] |
| 3226 | endif |
Evgeny Vereshchagin | 9c5c467 | 2019-05-09 00:03:41 +0200 | [diff] [blame] | 3227 | else |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3228 | sources += 'src/fuzz/fuzz-main.c' |
Evgeny Vereshchagin | 9c5c467 | 2019-05-09 00:03:41 +0200 | [diff] [blame] | 3229 | endif |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 3230 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3231 | name = sources[0].split('/')[-1].split('.')[0] |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 3232 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3233 | fuzzer_exes += executable( |
| 3234 | name, |
| 3235 | sources, |
| 3236 | include_directories : [incs, include_directories('src/fuzz')], |
| 3237 | link_with : link_with, |
| 3238 | dependencies : dependencies, |
| 3239 | c_args : defs, |
| 3240 | link_args: link_args, |
| 3241 | install : false) |
| 3242 | endforeach |
Michael Olbrich | 5996740 | 2018-11-11 11:27:35 +0100 | [diff] [blame] | 3243 | endif |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 3244 | |
Zbigniew Jędrzejewski-Szmek | 6164ec4 | 2020-04-28 09:08:04 +0200 | [diff] [blame] | 3245 | run_target( |
| 3246 | 'fuzzers', |
Zbigniew Jędrzejewski-Szmek | 63058f4 | 2019-01-05 13:20:52 +0100 | [diff] [blame] | 3247 | depends : fuzzer_exes, |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 3248 | command : ['true']) |
| 3249 | |
| 3250 | ############################################################ |
| 3251 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3252 | make_directive_index_py = find_program('tools/make-directive-index.py') |
| 3253 | make_man_index_py = find_program('tools/make-man-index.py') |
Zbigniew Jędrzejewski-Szmek | b184e8f | 2017-04-13 19:59:21 -0400 | [diff] [blame] | 3254 | xml_helper_py = find_program('tools/xml_helper.py') |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3255 | hwdb_update_sh = find_program('tools/hwdb-update.sh') |
| 3256 | autosuspend_update_sh = find_program('tools/autosuspend-update.sh') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3257 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3258 | subdir('sysctl.d') |
| 3259 | subdir('sysusers.d') |
| 3260 | subdir('tmpfiles.d') |
Zbigniew Jędrzejewski-Szmek | 4f10b80 | 2019-10-08 16:52:10 +0200 | [diff] [blame] | 3261 | subdir('hwdb.d') |
| 3262 | subdir('units') |
Zbigniew Jędrzejewski-Szmek | e783f95 | 2017-11-23 13:23:42 +0100 | [diff] [blame] | 3263 | subdir('presets') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3264 | subdir('network') |
| 3265 | subdir('man') |
| 3266 | subdir('shell-completion/bash') |
| 3267 | subdir('shell-completion/zsh') |
Filipe Brandenburger | 9e825eb | 2018-09-07 01:02:42 -0700 | [diff] [blame] | 3268 | subdir('docs/sysvinit') |
| 3269 | subdir('docs/var-log') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3270 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3271 | install_subdir('factory/etc', |
| 3272 | install_dir : factorydir) |
| 3273 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3274 | install_data('xorg/50-systemd-user.sh', |
| 3275 | install_dir : xinitrcdir) |
Dimitri John Ledkov | 582faeb | 2017-08-02 13:41:18 +0100 | [diff] [blame] | 3276 | install_data('modprobe.d/systemd.conf', |
| 3277 | install_dir : modprobedir) |
Lennart Poettering | f09eb76 | 2018-02-26 11:48:46 +0100 | [diff] [blame] | 3278 | install_data('LICENSE.GPL2', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3279 | 'LICENSE.LGPL2.1', |
Lennart Poettering | f09eb76 | 2018-02-26 11:48:46 +0100 | [diff] [blame] | 3280 | 'NEWS', |
| 3281 | 'README', |
Faheel Ahmad | eea9840 | 2018-10-30 23:01:20 +0530 | [diff] [blame] | 3282 | 'docs/CODING_STYLE.md', |
Filipe Brandenburger | 1d1cb16 | 2018-09-07 01:22:34 -0700 | [diff] [blame] | 3283 | 'docs/DISTRO_PORTING.md', |
Filipe Brandenburger | 9e825eb | 2018-09-07 01:02:42 -0700 | [diff] [blame] | 3284 | 'docs/ENVIRONMENT.md', |
Zbigniew Jędrzejewski-Szmek | 5425f8a | 2020-01-15 13:45:04 +0100 | [diff] [blame] | 3285 | 'docs/HACKING.md', |
Filipe Brandenburger | 9e825eb | 2018-09-07 01:02:42 -0700 | [diff] [blame] | 3286 | 'docs/TRANSIENT-SETTINGS.md', |
Filipe Brandenburger | b6dc0d7 | 2018-09-07 01:44:49 -0700 | [diff] [blame] | 3287 | 'docs/TRANSLATORS.md', |
Filipe Brandenburger | 9e825eb | 2018-09-07 01:02:42 -0700 | [diff] [blame] | 3288 | 'docs/UIDS-GIDS.md', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 3289 | 'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION', |
| 3290 | install_dir : docdir) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 3291 | |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 3292 | meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir)) |
| 3293 | meson.add_install_script('sh', '-c', 'touch $DESTDIR@0@'.format(prefixdir)) |
| 3294 | |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 3295 | ############################################################ |
| 3296 | |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3297 | check_help = find_program('tools/check-help.sh') |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 3298 | |
| 3299 | foreach exec : public_programs |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3300 | name = exec.full_path().split('/')[-1] |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 3301 | if want_tests != 'false' |
| 3302 | test('check-help-' + name, |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3303 | check_help, |
Zbigniew Jędrzejewski-Szmek | c1cd674 | 2018-09-12 16:57:06 +0200 | [diff] [blame] | 3304 | args : exec.full_path()) |
Zbigniew Jędrzejewski-Szmek | 938be08 | 2018-09-12 11:08:49 +0200 | [diff] [blame] | 3305 | endif |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 3306 | endforeach |
| 3307 | |
| 3308 | ############################################################ |
| 3309 | |
Zbigniew Jędrzejewski-Szmek | c6448ee | 2019-05-07 20:46:36 +0200 | [diff] [blame] | 3310 | check_directives_sh = find_program('tools/check-directives.sh') |
| 3311 | |
| 3312 | if want_tests != 'false' |
| 3313 | test('check-directives', |
| 3314 | check_directives_sh, |
| 3315 | args : project_source_root) |
| 3316 | endif |
| 3317 | |
| 3318 | ############################################################ |
| 3319 | |
Zbigniew Jędrzejewski-Szmek | 52d4d1d | 2018-03-14 14:27:04 +0100 | [diff] [blame] | 3320 | # Enable tests for all supported sanitizers |
| 3321 | foreach tuple : sanitizers |
| 3322 | sanitizer = tuple[0] |
| 3323 | build = tuple[1] |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 3324 | |
Yu Watanabe | 7a6397d | 2018-05-15 20:18:24 +0900 | [diff] [blame] | 3325 | if cc.has_link_argument('-fsanitize=@0@'.format(sanitizer)) |
Zbigniew Jędrzejewski-Szmek | 52d4d1d | 2018-03-14 14:27:04 +0100 | [diff] [blame] | 3326 | prev = '' |
| 3327 | foreach p : fuzz_regression_tests |
| 3328 | b = p.split('/')[-2] |
| 3329 | c = p.split('/')[-1] |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 3330 | |
Zbigniew Jędrzejewski-Szmek | 52d4d1d | 2018-03-14 14:27:04 +0100 | [diff] [blame] | 3331 | name = '@0@:@1@'.format(b, sanitizer) |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 3332 | |
Zbigniew Jędrzejewski-Szmek | 52d4d1d | 2018-03-14 14:27:04 +0100 | [diff] [blame] | 3333 | if name != prev |
| 3334 | if want_tests == 'false' |
| 3335 | message('Not compiling @0@ because tests is set to false'.format(name)) |
| 3336 | elif slow_tests |
| 3337 | exe = custom_target( |
| 3338 | name, |
| 3339 | output : name, |
| 3340 | depends : build, |
| 3341 | command : [env, 'ln', '-fs', |
| 3342 | join_paths(build.full_path(), b), |
| 3343 | '@OUTPUT@'], |
| 3344 | build_by_default : true) |
| 3345 | else |
| 3346 | message('Not compiling @0@ because slow-tests is set to false'.format(name)) |
| 3347 | endif |
| 3348 | endif |
| 3349 | prev = name |
| 3350 | |
| 3351 | if want_tests != 'false' and slow_tests |
| 3352 | test('@0@:@1@:@2@'.format(b, c, sanitizer), |
| 3353 | env, |
| 3354 | args : [exe.full_path(), |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3355 | join_paths(project_source_root, p)]) |
Zbigniew Jędrzejewski-Szmek | 52d4d1d | 2018-03-14 14:27:04 +0100 | [diff] [blame] | 3356 | endif |
| 3357 | endforeach |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 3358 | endif |
| 3359 | endforeach |
| 3360 | |
Zbigniew Jędrzejewski-Szmek | 52d4d1d | 2018-03-14 14:27:04 +0100 | [diff] [blame] | 3361 | |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 3362 | ############################################################ |
| 3363 | |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 3364 | if git.found() |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3365 | all_files = run_command( |
| 3366 | git, |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3367 | ['--git-dir=@0@/.git'.format(project_source_root), |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3368 | 'ls-files', |
| 3369 | ':/*.[ch]']) |
| 3370 | all_files = files(all_files.stdout().split()) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 3371 | |
userwithuid | e85a690 | 2017-08-09 13:41:44 +0000 | [diff] [blame] | 3372 | custom_target( |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 3373 | 'tags', |
userwithuid | e85a690 | 2017-08-09 13:41:44 +0000 | [diff] [blame] | 3374 | output : 'tags', |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3375 | command : [env, 'etags', '-o', '@0@/TAGS'.format(project_source_root)] + all_files) |
Evegeny Vereshchagin | 2f09974 | 2018-05-18 10:52:17 +0000 | [diff] [blame] | 3376 | run_target( |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 3377 | 'ctags', |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3378 | command : [env, 'ctags', '-o', '@0@/tags'.format(project_source_root)] + all_files) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 3379 | endif |
Zbigniew Jędrzejewski-Szmek | 177929c | 2017-04-15 00:16:23 -0400 | [diff] [blame] | 3380 | |
| 3381 | if git.found() |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3382 | git_contrib_sh = find_program('tools/git-contrib.sh') |
Zbigniew Jędrzejewski-Szmek | a923e08 | 2017-04-17 19:48:20 -0400 | [diff] [blame] | 3383 | run_target( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 3384 | 'git-contrib', |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3385 | command : [git_contrib_sh]) |
Zbigniew Jędrzejewski-Szmek | 177929c | 2017-04-15 00:16:23 -0400 | [diff] [blame] | 3386 | endif |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 3387 | |
| 3388 | if git.found() |
| 3389 | git_head = run_command( |
| 3390 | git, |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3391 | ['--git-dir=@0@/.git'.format(project_source_root), |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 3392 | 'rev-parse', 'HEAD']).stdout().strip() |
| 3393 | git_head_short = run_command( |
| 3394 | git, |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3395 | ['--git-dir=@0@/.git'.format(project_source_root), |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 3396 | 'rev-parse', '--short=7', 'HEAD']).stdout().strip() |
| 3397 | |
| 3398 | run_target( |
| 3399 | 'git-snapshot', |
| 3400 | command : ['git', 'archive', |
Davide Cavalca | 1485aac | 2019-02-27 11:19:07 -0500 | [diff] [blame] | 3401 | '-o', '@0@/systemd-@1@.tar.gz'.format(project_source_root, |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 3402 | git_head_short), |
| 3403 | '--prefix', 'systemd-@0@/'.format(git_head), |
| 3404 | 'HEAD']) |
| 3405 | endif |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3406 | |
| 3407 | ############################################################ |
| 3408 | |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3409 | check_api_docs_sh = find_program('tools/check-api-docs.sh') |
Lennart Poettering | 51b1386 | 2017-12-20 12:51:14 +0100 | [diff] [blame] | 3410 | run_target( |
| 3411 | 'check-api-docs', |
| 3412 | depends : [man, libsystemd, libudev], |
Zbigniew Jędrzejewski-Szmek | dd1e33c | 2020-05-07 13:54:10 +0200 | [diff] [blame] | 3413 | command : [check_api_docs_sh, libsystemd.full_path(), libudev.full_path()]) |
Lennart Poettering | 51b1386 | 2017-12-20 12:51:14 +0100 | [diff] [blame] | 3414 | |
| 3415 | ############################################################ |
Anita Zhang | 7bc9ea5 | 2019-10-25 15:46:21 -0700 | [diff] [blame] | 3416 | watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog |
Lennart Poettering | 51b1386 | 2017-12-20 12:51:14 +0100 | [diff] [blame] | 3417 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3418 | status = [ |
| 3419 | '@0@ @1@'.format(meson.project_name(), meson.project_version()), |
| 3420 | |
Zbigniew Jędrzejewski-Szmek | 2675413 | 2018-03-01 11:49:42 +0100 | [diff] [blame] | 3421 | 'split /usr: @0@'.format(split_usr), |
Zbigniew Jędrzejewski-Szmek | 157baa8 | 2018-03-01 10:28:29 +0100 | [diff] [blame] | 3422 | 'split bin-sbin: @0@'.format(split_bin), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 3423 | 'prefix directory: @0@'.format(prefixdir), |
| 3424 | 'rootprefix directory: @0@'.format(rootprefixdir), |
| 3425 | 'sysconf directory: @0@'.format(sysconfdir), |
| 3426 | 'include directory: @0@'.format(includedir), |
| 3427 | 'lib directory: @0@'.format(libdir), |
| 3428 | 'rootlib directory: @0@'.format(rootlibdir), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3429 | 'SysV init scripts: @0@'.format(sysvinit_path), |
| 3430 | 'SysV rc?.d directories: @0@'.format(sysvrcnd_path), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 3431 | 'PAM modules directory: @0@'.format(pamlibdir), |
| 3432 | 'PAM configuration directory: @0@'.format(pamconfdir), |
| 3433 | 'RPM macros directory: @0@'.format(rpmmacrosdir), |
| 3434 | 'modprobe.d directory: @0@'.format(modprobedir), |
| 3435 | 'D-Bus policy directory: @0@'.format(dbuspolicydir), |
| 3436 | 'D-Bus session directory: @0@'.format(dbussessionservicedir), |
| 3437 | 'D-Bus system directory: @0@'.format(dbussystemservicedir), |
| 3438 | 'bash completions directory: @0@'.format(bashcompletiondir), |
| 3439 | 'zsh completions directory: @0@'.format(zshcompletiondir), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3440 | 'extra start script: @0@'.format(get_option('rc-local')), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3441 | 'debug shell: @0@ @ @1@'.format(get_option('debug-shell'), |
| 3442 | get_option('debug-tty')), |
| 3443 | 'TTY GID: @0@'.format(tty_gid), |
Yu Watanabe | ac09340 | 2018-05-10 16:04:16 +0900 | [diff] [blame] | 3444 | 'users GID: @0@'.format(substs.get('USERS_GID')), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3445 | 'maximum system UID: @0@'.format(system_uid_max), |
| 3446 | 'maximum system GID: @0@'.format(system_gid_max), |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 3447 | 'minimum dynamic UID: @0@'.format(dynamic_uid_min), |
| 3448 | 'maximum dynamic UID: @0@'.format(dynamic_uid_max), |
| 3449 | 'minimum container UID base: @0@'.format(container_uid_base_min), |
| 3450 | 'maximum container UID base: @0@'.format(container_uid_base_max), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3451 | '/dev/kvm access mode: @0@'.format(get_option('dev-kvm-mode')), |
Tom Stellard | 4e15a73 | 2017-10-31 08:46:24 -0700 | [diff] [blame] | 3452 | 'render group access mode: @0@'.format(get_option('group-render-mode')), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 3453 | 'certificate root directory: @0@'.format(get_option('certificate-root')), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3454 | 'support URL: @0@'.format(support_url), |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 3455 | 'nobody user name: @0@'.format(nobody_user), |
| 3456 | 'nobody group name: @0@'.format(nobody_group), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3457 | 'fallback hostname: @0@'.format(get_option('fallback-hostname')), |
Zbigniew Jędrzejewski-Szmek | 5248e7e | 2017-07-11 02:15:08 -0400 | [diff] [blame] | 3458 | 'symbolic gateway hostnames: @0@'.format(', '.join(gateway_hostnames)), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3459 | |
| 3460 | 'default DNSSEC mode: @0@'.format(default_dnssec), |
Iwan Timmer | c9299be | 2018-06-13 20:26:24 +0200 | [diff] [blame] | 3461 | 'default DNS-over-TLS mode: @0@'.format(default_dns_over_tls), |
Zbigniew Jędrzejewski-Szmek | 3614df0 | 2020-04-14 22:18:18 +0200 | [diff] [blame] | 3462 | 'default mDNS mode: @0@'.format(default_mdns), |
| 3463 | 'default LLMNR mode: @0@'.format(default_llmnr), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3464 | 'default cgroup hierarchy: @0@'.format(default_hierarchy), |
Zbigniew Jędrzejewski-Szmek | 06da5c6 | 2018-12-11 23:28:29 +0100 | [diff] [blame] | 3465 | 'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme), |
Dave Reisner | 8ca9e92 | 2018-12-28 07:38:36 -0500 | [diff] [blame] | 3466 | 'default KillUserProcesses setting: @0@'.format(kill_user_processes), |
Zbigniew Jędrzejewski-Szmek | 21d0dd5 | 2019-10-25 12:17:24 +0200 | [diff] [blame] | 3467 | 'default locale: @0@'.format(default_locale), |
Zbigniew Jędrzejewski-Szmek | 5bc655c | 2019-11-13 22:22:58 +0100 | [diff] [blame] | 3468 | 'default user $PATH: @0@'.format(default_user_path_display), |
Anita Zhang | 7bc9ea5 | 2019-10-25 15:46:21 -0700 | [diff] [blame] | 3469 | 'systemd service watchdog: @0@'.format(watchdog_opt)] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3470 | |
| 3471 | alt_dns_servers = '\n '.join(dns_servers.split(' ')) |
| 3472 | alt_ntp_servers = '\n '.join(ntp_servers.split(' ')) |
| 3473 | status += [ |
| 3474 | 'default DNS servers: @0@'.format(alt_dns_servers), |
| 3475 | 'default NTP servers: @0@'.format(alt_ntp_servers)] |
| 3476 | |
| 3477 | alt_time_epoch = run_command('date', '-Is', '-u', '-d', |
| 3478 | '@@0@'.format(time_epoch)).stdout().strip() |
| 3479 | status += [ |
| 3480 | 'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)] |
| 3481 | |
Lennart Poettering | 19d8c9c | 2018-10-05 16:38:42 +0200 | [diff] [blame] | 3482 | status += [ |
Zbigniew Jędrzejewski-Szmek | abc8caf | 2018-10-11 11:10:53 +0200 | [diff] [blame] | 3483 | 'static libsystemd: @0@'.format(static_libsystemd), |
| 3484 | 'static libudev: @0@'.format(static_libudev)] |
Lennart Poettering | 19d8c9c | 2018-10-05 16:38:42 +0200 | [diff] [blame] | 3485 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3486 | # TODO: |
| 3487 | # CFLAGS: ${OUR_CFLAGS} ${CFLAGS} |
| 3488 | # CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} |
| 3489 | # LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} |
| 3490 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 3491 | if conf.get('ENABLE_EFI') == 1 |
Zbigniew Jędrzejewski-Szmek | 5a8b164 | 2018-07-31 09:44:11 +0200 | [diff] [blame] | 3492 | status += 'efi arch: @0@'.format(efi_arch) |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3493 | |
| 3494 | if have_gnu_efi |
| 3495 | status += [ |
| 3496 | 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME), |
Zbigniew Jędrzejewski-Szmek | c512dfb | 2018-12-18 00:02:11 +0100 | [diff] [blame] | 3497 | 'EFI CC @0@'.format(' '.join(efi_cc)), |
Zbigniew Jędrzejewski-Szmek | ce4121c | 2020-02-03 20:38:54 +0100 | [diff] [blame] | 3498 | 'EFI lds: @0@'.format(efi_lds), |
| 3499 | 'EFI crt0: @0@'.format(efi_crt0), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 3500 | 'EFI include directory: @0@'.format(efi_incdir)] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3501 | endif |
| 3502 | endif |
| 3503 | |
| 3504 | found = [] |
| 3505 | missing = [] |
| 3506 | |
| 3507 | foreach tuple : [ |
| 3508 | ['libcryptsetup'], |
| 3509 | ['PAM'], |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 3510 | ['pwquality'], |
Yu Watanabe | c757517 | 2020-01-31 00:03:38 +0900 | [diff] [blame] | 3511 | ['libfdisk'], |
Lennart Poettering | 839fddb | 2019-11-05 11:49:27 +0100 | [diff] [blame] | 3512 | ['p11kit'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3513 | ['AUDIT'], |
| 3514 | ['IMA'], |
| 3515 | ['AppArmor'], |
| 3516 | ['SELinux'], |
| 3517 | ['SECCOMP'], |
| 3518 | ['SMACK'], |
| 3519 | ['zlib'], |
| 3520 | ['xz'], |
Norbert Lange | ef5924a | 2020-04-12 01:09:05 +0200 | [diff] [blame] | 3521 | ['zstd'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3522 | ['lz4'], |
| 3523 | ['bzip2'], |
| 3524 | ['ACL'], |
| 3525 | ['gcrypt'], |
| 3526 | ['qrencode'], |
| 3527 | ['microhttpd'], |
| 3528 | ['gnutls'], |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 3529 | ['openssl'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3530 | ['libcurl'], |
Zbigniew Jędrzejewski-Szmek | d1bf567 | 2017-06-16 09:16:28 -0400 | [diff] [blame] | 3531 | ['idn'], |
Zbigniew Jędrzejewski-Szmek | 87057e2 | 2017-05-09 21:56:34 -0400 | [diff] [blame] | 3532 | ['libidn2'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3533 | ['libidn'], |
| 3534 | ['libiptc'], |
| 3535 | ['elfutils'], |
| 3536 | ['binfmt'], |
Lennart Poettering | e594a3b | 2019-12-10 21:31:41 +0100 | [diff] [blame] | 3537 | ['repart'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3538 | ['vconsole'], |
| 3539 | ['quotacheck'], |
| 3540 | ['tmpfiles'], |
| 3541 | ['environment.d'], |
| 3542 | ['sysusers'], |
| 3543 | ['firstboot'], |
| 3544 | ['randomseed'], |
| 3545 | ['backlight'], |
| 3546 | ['rfkill'], |
| 3547 | ['logind'], |
| 3548 | ['machined'], |
Lennart Poettering | 61d0578 | 2018-04-16 21:41:40 +0200 | [diff] [blame] | 3549 | ['portabled'], |
Lennart Poettering | d093b62 | 2019-07-04 18:33:30 +0200 | [diff] [blame] | 3550 | ['userdb'], |
Lennart Poettering | 70a5db5 | 2019-07-04 18:35:39 +0200 | [diff] [blame] | 3551 | ['homed'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3552 | ['importd'], |
| 3553 | ['hostnamed'], |
| 3554 | ['timedated'], |
| 3555 | ['timesyncd'], |
| 3556 | ['localed'], |
| 3557 | ['networkd'], |
Yu Watanabe | a7456af | 2017-10-06 16:33:21 +0900 | [diff] [blame] | 3558 | ['resolve'], |
Iwan Timmer | 096cbdc | 2018-07-26 22:47:50 +0100 | [diff] [blame] | 3559 | ['DNS-over-TLS(gnutls)', conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1], |
| 3560 | ['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3561 | ['coredump'], |
Eric DeVolder | 9b4abc6 | 2019-05-16 08:59:01 -0500 | [diff] [blame] | 3562 | ['pstore'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3563 | ['polkit'], |
| 3564 | ['legacy pkla', install_polkit_pkla], |
| 3565 | ['efi'], |
| 3566 | ['gnu-efi', have_gnu_efi], |
| 3567 | ['kmod'], |
| 3568 | ['xkbcommon'], |
Zbigniew Jędrzejewski-Szmek | c4c978a | 2018-01-12 05:47:17 +0100 | [diff] [blame] | 3569 | ['pcre2'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3570 | ['blkid'], |
| 3571 | ['dbus'], |
| 3572 | ['glib'], |
Zbigniew Jędrzejewski-Szmek | 6bd2bc8 | 2018-08-07 18:10:53 +0200 | [diff] [blame] | 3573 | ['nss-myhostname'], |
| 3574 | ['nss-mymachines'], |
| 3575 | ['nss-resolve'], |
| 3576 | ['nss-systemd'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3577 | ['hwdb'], |
| 3578 | ['tpm'], |
| 3579 | ['man pages', want_man], |
| 3580 | ['html pages', want_html], |
| 3581 | ['man page indices', want_man and have_lxml], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3582 | ['SysV compat'], |
| 3583 | ['utmp'], |
| 3584 | ['ldconfig'], |
| 3585 | ['hibernate'], |
| 3586 | ['adm group', get_option('adm-group')], |
| 3587 | ['wheel group', get_option('wheel-group')], |
Franck Bui | b14e1b4 | 2017-05-09 14:02:37 +0200 | [diff] [blame] | 3588 | ['gshadow'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3589 | ['debug hashmap'], |
| 3590 | ['debug mmap cache'], |
Yu Watanabe | d660149 | 2018-11-23 00:36:35 +0900 | [diff] [blame] | 3591 | ['debug siphash'], |
Zbigniew Jędrzejewski-Szmek | d18cb39 | 2018-05-13 22:28:24 +0200 | [diff] [blame] | 3592 | ['valgrind', conf.get('VALGRIND') == 1], |
Zbigniew Jędrzejewski-Szmek | fd5dec9 | 2018-08-07 17:34:47 +0200 | [diff] [blame] | 3593 | ['trace logging', conf.get('LOG_TRACE') == 1], |
Zbigniew Jędrzejewski-Szmek | b6261be | 2019-12-16 17:01:17 +0100 | [diff] [blame] | 3594 | ['install tests', install_tests], |
Lennart Poettering | 19d8c9c | 2018-10-05 16:38:42 +0200 | [diff] [blame] | 3595 | ['link-udev-shared', get_option('link-udev-shared')], |
| 3596 | ['link-systemctl-shared', get_option('link-systemctl-shared')], |
Robert Scheck | 5ac8b50 | 2020-01-08 02:36:07 +0100 | [diff] [blame] | 3597 | ['link-networkd-shared', get_option('link-networkd-shared')], |
Robert Scheck | fd74a13 | 2020-02-08 14:02:09 +0100 | [diff] [blame] | 3598 | ['link-timesyncd-shared', get_option('link-timesyncd-shared')], |
Jakov Smolic | f30bf4d | 2020-04-15 17:58:25 +0200 | [diff] [blame] | 3599 | ['kernel-install', get_option('kernel-install')], |
| 3600 | ['systemd-analyze', get_option('analyze')], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3601 | ] |
| 3602 | |
Zbigniew Jędrzejewski-Szmek | af4d786 | 2018-03-09 14:21:08 +0100 | [diff] [blame] | 3603 | if tuple.length() >= 2 |
| 3604 | cond = tuple[1] |
| 3605 | else |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3606 | ident1 = 'HAVE_' + tuple[0].underscorify().to_upper() |
| 3607 | ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper() |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 3608 | cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1 |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3609 | endif |
| 3610 | if cond |
Zbigniew Jędrzejewski-Szmek | 5a8b164 | 2018-07-31 09:44:11 +0200 | [diff] [blame] | 3611 | found += tuple[0] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3612 | else |
Zbigniew Jędrzejewski-Szmek | 5a8b164 | 2018-07-31 09:44:11 +0200 | [diff] [blame] | 3613 | missing += tuple[0] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3614 | endif |
| 3615 | endforeach |
| 3616 | |
| 3617 | status += [ |
Zbigniew Jędrzejewski-Szmek | 9d39c1b | 2017-07-26 14:14:44 -0400 | [diff] [blame] | 3618 | '', |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3619 | 'enabled features: @0@'.format(', '.join(found)), |
Zbigniew Jędrzejewski-Szmek | 9d39c1b | 2017-07-26 14:14:44 -0400 | [diff] [blame] | 3620 | '', |
| 3621 | 'disabled features: @0@'.format(', '.join(missing)), |
| 3622 | ''] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 3623 | message('\n '.join(status)) |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 3624 | |
| 3625 | if rootprefixdir != rootprefix_default |
Yu Watanabe | 8ea9fad | 2018-05-10 14:50:52 +0900 | [diff] [blame] | 3626 | warning('\n' + |
| 3627 | 'Note that the installation prefix was changed to "@0@".\n'.format(rootprefixdir) + |
| 3628 | 'systemd used fixed names for unit file directories and other paths, so anything\n' + |
| 3629 | 'except the default ("@0@") is strongly discouraged.'.format(rootprefix_default)) |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 3630 | endif |