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