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