Zbigniew Jędrzejewski-Szmek | 3a726fc | 2017-11-18 18:32:01 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
| 2 | # |
| 3 | # Copyright 2017 Zbigniew Jędrzejewski-Szmek |
| 4 | # |
| 5 | # systemd is free software; you can redistribute it and/or modify it |
| 6 | # under the terms of the GNU Lesser General Public License as published by |
| 7 | # the Free Software Foundation; either version 2.1 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | # |
| 10 | # systemd is distributed in the hope that it will be useful, but |
| 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | # Lesser General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU Lesser General Public License |
| 16 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 18 | project('systemd', 'c', |
Lennart Poettering | 69cd51d | 2018-01-25 14:18:14 +0100 | [diff] [blame] | 19 | version : '237', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 20 | license : 'LGPLv2+', |
| 21 | default_options: [ |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 22 | 'c_std=gnu99', |
| 23 | 'prefix=/usr', |
| 24 | 'sysconfdir=/etc', |
| 25 | 'localstatedir=/var', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 26 | ], |
Zbigniew Jędrzejewski-Szmek | 86ea8d7 | 2017-11-20 08:08:43 +0100 | [diff] [blame] | 27 | meson_version : '>= 0.41', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 28 | ) |
| 29 | |
Lennart Poettering | 69cd51d | 2018-01-25 14:18:14 +0100 | [diff] [blame] | 30 | libsystemd_version = '0.21.0' |
| 31 | libudev_version = '1.6.9' |
Zbigniew Jędrzejewski-Szmek | 56d50ab | 2017-09-28 19:24:16 +0200 | [diff] [blame] | 32 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 33 | # We need the same data in three different formats, ugh! |
| 34 | # Also, for hysterical reasons, we use different variable |
| 35 | # names, sometimes. Not all variables are included in every |
| 36 | # set. Ugh, ugh, ugh! |
| 37 | conf = configuration_data() |
| 38 | conf.set_quoted('PACKAGE_STRING', meson.project_name() + ' ' + meson.project_version()) |
| 39 | conf.set_quoted('PACKAGE_VERSION', meson.project_version()) |
| 40 | |
| 41 | substs = configuration_data() |
| 42 | substs.set('PACKAGE_URL', 'https://www.freedesktop.org/wiki/Software/systemd') |
| 43 | substs.set('PACKAGE_VERSION', meson.project_version()) |
| 44 | |
| 45 | m4_defines = [] |
| 46 | |
| 47 | ##################################################################### |
| 48 | |
Zbigniew Jędrzejewski-Szmek | 003c887 | 2017-07-24 04:41:45 -0400 | [diff] [blame] | 49 | # Try to install the git pre-commit hook |
| 50 | git_hook = run_command(join_paths(meson.source_root(), 'tools/add-git-hook.sh')) |
| 51 | if git_hook.returncode() == 0 |
| 52 | message(git_hook.stdout().strip()) |
| 53 | endif |
| 54 | |
| 55 | ##################################################################### |
| 56 | |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 57 | split_usr = get_option('split-usr') |
| 58 | conf.set10('HAVE_SPLIT_USR', split_usr) |
| 59 | |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 60 | rootprefixdir = get_option('rootprefix') |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 61 | # Unusual rootprefixdir values are used by some distros |
| 62 | # (see https://github.com/systemd/systemd/pull/7461). |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 63 | rootprefix_default = get_option('split-usr') ? '/' : '/usr' |
| 64 | if rootprefixdir == '' |
| 65 | rootprefixdir = rootprefix_default |
Zbigniew Jędrzejewski-Szmek | 74344a1 | 2017-11-28 20:00:10 +0100 | [diff] [blame] | 66 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 67 | |
| 68 | sysvinit_path = get_option('sysvinit-path') |
| 69 | sysvrcnd_path = get_option('sysvrcnd-path') |
Max Harmathy | 5424824 | 2017-12-15 16:05:25 +0100 | [diff] [blame] | 70 | have = sysvinit_path != '' and sysvrcnd_path != '' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 71 | conf.set10('HAVE_SYSV_COMPAT', have, |
| 72 | description : 'SysV init scripts and rcN.d links are supported') |
| 73 | m4_defines += have ? ['-DHAVE_SYSV_COMPAT'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 74 | |
| 75 | # join_paths ignore the preceding arguments if an absolute component is |
| 76 | # encountered, so this should canonicalize various paths when they are |
| 77 | # absolute or relative. |
| 78 | prefixdir = get_option('prefix') |
| 79 | if not prefixdir.startswith('/') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 80 | error('Prefix is not absolute: "@0@"'.format(prefixdir)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 81 | endif |
| 82 | bindir = join_paths(prefixdir, get_option('bindir')) |
| 83 | libdir = join_paths(prefixdir, get_option('libdir')) |
| 84 | sysconfdir = join_paths(prefixdir, get_option('sysconfdir')) |
| 85 | includedir = join_paths(prefixdir, get_option('includedir')) |
| 86 | datadir = join_paths(prefixdir, get_option('datadir')) |
| 87 | localstatedir = join_paths('/', get_option('localstatedir')) |
| 88 | |
| 89 | rootbindir = join_paths(rootprefixdir, 'bin') |
| 90 | rootlibexecdir = join_paths(rootprefixdir, 'lib/systemd') |
| 91 | |
| 92 | rootlibdir = get_option('rootlibdir') |
| 93 | if rootlibdir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 94 | rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1]) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 95 | endif |
| 96 | |
| 97 | # Dirs of external packages |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 98 | pkgconfigdatadir = join_paths(datadir, 'pkgconfig') |
| 99 | pkgconfiglibdir = join_paths(libdir, 'pkgconfig') |
| 100 | polkitpolicydir = join_paths(datadir, 'polkit-1/actions') |
| 101 | polkitrulesdir = join_paths(datadir, 'polkit-1/rules.d') |
| 102 | polkitpkladir = join_paths(localstatedir, 'lib/polkit-1/localauthority/10-vendor.d') |
| 103 | varlogdir = join_paths(localstatedir, 'log') |
| 104 | xinitrcdir = join_paths(sysconfdir, 'X11/xinit/xinitrc.d') |
Yu Watanabe | 8a38aac | 2017-11-23 22:20:22 +0900 | [diff] [blame] | 105 | rpmmacrosdir = get_option('rpmmacrosdir') |
| 106 | if rpmmacrosdir != 'no' |
| 107 | rpmmacrosdir = join_paths(prefixdir, rpmmacrosdir) |
| 108 | endif |
Michael Biebl | 02fa054 | 2017-10-21 08:32:50 +0200 | [diff] [blame] | 109 | modprobedir = join_paths(rootprefixdir, 'lib/modprobe.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 110 | |
| 111 | # Our own paths |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 112 | pkgdatadir = join_paths(datadir, 'systemd') |
| 113 | environmentdir = join_paths(prefixdir, 'lib/environment.d') |
| 114 | pkgsysconfdir = join_paths(sysconfdir, 'systemd') |
| 115 | userunitdir = join_paths(prefixdir, 'lib/systemd/user') |
| 116 | userpresetdir = join_paths(prefixdir, 'lib/systemd/user-preset') |
| 117 | tmpfilesdir = join_paths(prefixdir, 'lib/tmpfiles.d') |
| 118 | sysusersdir = join_paths(prefixdir, 'lib/sysusers.d') |
| 119 | sysctldir = join_paths(prefixdir, 'lib/sysctl.d') |
| 120 | binfmtdir = join_paths(prefixdir, 'lib/binfmt.d') |
| 121 | modulesloaddir = join_paths(prefixdir, 'lib/modules-load.d') |
| 122 | networkdir = join_paths(rootprefixdir, 'lib/systemd/network') |
| 123 | pkgincludedir = join_paths(includedir, 'systemd') |
| 124 | systemgeneratordir = join_paths(rootlibexecdir, 'system-generators') |
| 125 | usergeneratordir = join_paths(prefixdir, 'lib/systemd/user-generators') |
| 126 | systemenvgeneratordir = join_paths(prefixdir, 'lib/systemd/system-environment-generators') |
| 127 | userenvgeneratordir = join_paths(prefixdir, 'lib/systemd/user-environment-generators') |
| 128 | systemshutdowndir = join_paths(rootlibexecdir, 'system-shutdown') |
| 129 | systemsleepdir = join_paths(rootlibexecdir, 'system-sleep') |
| 130 | systemunitdir = join_paths(rootprefixdir, 'lib/systemd/system') |
| 131 | systempresetdir = join_paths(rootprefixdir, 'lib/systemd/system-preset') |
| 132 | udevlibexecdir = join_paths(rootprefixdir, 'lib/udev') |
| 133 | udevhomedir = udevlibexecdir |
| 134 | udevrulesdir = join_paths(udevlibexecdir, 'rules.d') |
| 135 | udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d') |
| 136 | catalogdir = join_paths(prefixdir, 'lib/systemd/catalog') |
| 137 | kernelinstalldir = join_paths(prefixdir, 'lib/kernel/install.d') |
| 138 | factorydir = join_paths(datadir, 'factory') |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 139 | bootlibdir = join_paths(prefixdir, 'lib/systemd/boot/efi') |
| 140 | testsdir = join_paths(prefixdir, 'lib/systemd/tests') |
| 141 | systemdstatedir = join_paths(localstatedir, 'lib/systemd') |
| 142 | catalogstatedir = join_paths(systemdstatedir, 'catalog') |
| 143 | randomseeddir = join_paths(localstatedir, 'lib/systemd') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 144 | |
tblume | 75aaade | 2018-02-01 22:46:15 +0100 | [diff] [blame] | 145 | docdir = get_option('docdir') |
| 146 | if docdir == '' |
| 147 | docdir = join_paths(datadir, 'doc/systemd') |
| 148 | endif |
| 149 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 150 | dbuspolicydir = get_option('dbuspolicydir') |
| 151 | if dbuspolicydir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 152 | dbuspolicydir = join_paths(datadir, 'dbus-1/system.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 153 | endif |
| 154 | |
| 155 | dbussessionservicedir = get_option('dbussessionservicedir') |
| 156 | if dbussessionservicedir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 157 | dbussessionservicedir = join_paths(datadir, 'dbus-1/services') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 158 | endif |
| 159 | |
| 160 | dbussystemservicedir = get_option('dbussystemservicedir') |
| 161 | if dbussystemservicedir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 162 | dbussystemservicedir = join_paths(datadir, 'dbus-1/system-services') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 163 | endif |
| 164 | |
| 165 | pamlibdir = get_option('pamlibdir') |
| 166 | if pamlibdir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 167 | pamlibdir = join_paths(rootlibdir, 'security') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 168 | endif |
| 169 | |
| 170 | pamconfdir = get_option('pamconfdir') |
| 171 | if pamconfdir == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 172 | pamconfdir = join_paths(sysconfdir, 'pam.d') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 173 | endif |
| 174 | |
Zbigniew Jędrzejewski-Szmek | 444d586 | 2018-02-15 11:43:08 +0100 | [diff] [blame] | 175 | memory_accounting_default = get_option('memory-accounting-default') |
| 176 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 177 | conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 178 | 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] | 179 | conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir) |
| 180 | conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) |
| 181 | conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 182 | conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) |
| 183 | conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 184 | 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] | 185 | conf.set_quoted('USER_DATA_UNIT_PATH', userunitdir) |
| 186 | conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 187 | conf.set_quoted('CATALOG_DATABASE', join_paths(catalogstatedir, 'database')) |
| 188 | conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH', join_paths(rootlibexecdir, 'systemd-cgroups-agent')) |
| 189 | conf.set_quoted('SYSTEMD_BINARY_PATH', join_paths(rootlibexecdir, 'systemd')) |
| 190 | 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] | 191 | 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] | 192 | conf.set_quoted('SYSTEMD_GROWFS_PATH', join_paths(rootlibexecdir, 'systemd-growfs')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 193 | conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-shutdown')) |
| 194 | conf.set_quoted('SYSTEMD_SLEEP_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-sleep')) |
| 195 | conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbindir, 'systemctl')) |
| 196 | conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent')) |
| 197 | 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] | 198 | conf.set_quoted('ROOTPREFIX', rootprefixdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 199 | conf.set_quoted('RANDOM_SEED_DIR', randomseeddir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 200 | conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed')) |
| 201 | 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] | 202 | conf.set_quoted('SYSTEM_GENERATOR_PATH', systemgeneratordir) |
| 203 | conf.set_quoted('USER_GENERATOR_PATH', usergeneratordir) |
| 204 | conf.set_quoted('SYSTEM_ENV_GENERATOR_PATH', systemenvgeneratordir) |
| 205 | conf.set_quoted('USER_ENV_GENERATOR_PATH', userenvgeneratordir) |
| 206 | conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir) |
| 207 | conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 208 | conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', join_paths(pkgdatadir, 'kbd-model-map')) |
| 209 | conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', join_paths(pkgdatadir, 'language-fallback-map')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 210 | conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 211 | 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] | 212 | conf.set_quoted('LIBDIR', libdir) |
| 213 | conf.set_quoted('ROOTLIBDIR', rootlibdir) |
| 214 | conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir) |
| 215 | conf.set_quoted('BOOTLIBDIR', bootlibdir) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 216 | conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull')) |
| 217 | conf.set_quoted('SYSTEMD_IMPORT_PATH', join_paths(rootlibexecdir, 'systemd-import')) |
| 218 | conf.set_quoted('SYSTEMD_EXPORT_PATH', join_paths(rootlibexecdir, 'systemd-export')) |
| 219 | conf.set_quoted('VENDOR_KEYRING_PATH', join_paths(rootlibexecdir, 'import-pubring.gpg')) |
| 220 | conf.set_quoted('USER_KEYRING_PATH', join_paths(pkgsysconfdir, 'import-pubring.gpg')) |
| 221 | conf.set_quoted('DOCUMENT_ROOT', join_paths(pkgdatadir, 'gatewayd')) |
Zbigniew Jędrzejewski-Szmek | 444d586 | 2018-02-15 11:43:08 +0100 | [diff] [blame] | 222 | conf.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'true' : 'false') |
| 223 | conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_ON_OFF', memory_accounting_default ? 'on' : 'off') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 224 | |
| 225 | conf.set_quoted('ABS_BUILD_DIR', meson.build_root()) |
| 226 | conf.set_quoted('ABS_SRC_DIR', meson.source_root()) |
| 227 | |
| 228 | substs.set('prefix', prefixdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 229 | substs.set('exec_prefix', prefixdir) |
| 230 | substs.set('libdir', libdir) |
| 231 | substs.set('rootlibdir', rootlibdir) |
| 232 | substs.set('includedir', includedir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 233 | substs.set('pkgsysconfdir', pkgsysconfdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 234 | substs.set('bindir', bindir) |
| 235 | substs.set('rootbindir', rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 236 | substs.set('rootlibexecdir', rootlibexecdir) |
| 237 | substs.set('systemunitdir', systemunitdir) |
| 238 | substs.set('userunitdir', userunitdir) |
| 239 | substs.set('systempresetdir', systempresetdir) |
| 240 | substs.set('userpresetdir', userpresetdir) |
| 241 | substs.set('udevhwdbdir', udevhwdbdir) |
| 242 | substs.set('udevrulesdir', udevrulesdir) |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 243 | substs.set('udevlibexecdir', udevlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 244 | substs.set('catalogdir', catalogdir) |
| 245 | substs.set('tmpfilesdir', tmpfilesdir) |
| 246 | substs.set('sysusersdir', sysusersdir) |
| 247 | substs.set('sysctldir', sysctldir) |
| 248 | substs.set('binfmtdir', binfmtdir) |
| 249 | substs.set('modulesloaddir', modulesloaddir) |
| 250 | substs.set('systemgeneratordir', systemgeneratordir) |
| 251 | substs.set('usergeneratordir', usergeneratordir) |
| 252 | substs.set('systemenvgeneratordir', systemenvgeneratordir) |
| 253 | substs.set('userenvgeneratordir', userenvgeneratordir) |
| 254 | substs.set('systemshutdowndir', systemshutdowndir) |
| 255 | substs.set('systemsleepdir', systemsleepdir) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 256 | substs.set('VARLOGDIR', varlogdir) |
| 257 | substs.set('CERTIFICATEROOT', get_option('certificate-root')) |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 258 | substs.set('SYSTEMCTL', join_paths(rootbindir, 'systemctl')) |
| 259 | substs.set('RANDOM_SEED', join_paths(randomseeddir, 'random-seed')) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 260 | substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path) |
| 261 | substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) |
| 262 | substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) |
| 263 | substs.set('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local')) |
Zbigniew Jędrzejewski-Szmek | 444d586 | 2018-02-15 11:43:08 +0100 | [diff] [blame] | 264 | substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 265 | |
| 266 | ##################################################################### |
| 267 | |
| 268 | cc = meson.get_compiler('c') |
| 269 | pkgconfig = import('pkgconfig') |
Zbigniew Jędrzejewski-Szmek | 6e2afb1 | 2017-04-24 21:03:35 -0400 | [diff] [blame] | 270 | check_compilation_sh = find_program('tools/meson-check-compilation.sh') |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 271 | meson_build_sh = find_program('tools/meson-build.sh') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 272 | |
Adam Duskett | 08318a2 | 2018-01-15 06:25:46 -0500 | [diff] [blame] | 273 | if get_option('tests') != 'false' |
| 274 | cxx = find_program('c++', required : false) |
| 275 | if cxx.found() |
| 276 | # Used only for tests |
| 277 | add_languages('cpp') |
| 278 | endif |
Zbigniew Jędrzejewski-Szmek | 94e2523 | 2017-05-13 13:23:28 -0400 | [diff] [blame] | 279 | endif |
| 280 | |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 281 | want_ossfuzz = get_option('oss-fuzz') |
| 282 | want_libfuzzer = get_option('llvm-fuzz') |
| 283 | fuzzer_build = want_ossfuzz or want_libfuzzer |
| 284 | if want_ossfuzz and want_libfuzzer |
| 285 | error('only one of oss-fuzz and llvm-fuzz can be specified') |
| 286 | endif |
| 287 | if want_libfuzzer |
| 288 | fuzzing_engine = meson.get_compiler('cpp').find_library('Fuzzer') |
| 289 | endif |
| 290 | if want_ossfuzz |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 291 | fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine') |
| 292 | endif |
| 293 | |
Zbigniew Jędrzejewski-Szmek | 75cf1d6 | 2017-07-04 17:59:15 -0400 | [diff] [blame] | 294 | foreach arg : ['-Wextra', |
Zbigniew Jędrzejewski-Szmek | 70160ce | 2017-10-03 12:11:49 +0200 | [diff] [blame] | 295 | '-Werror=undef', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 296 | '-Wlogical-op', |
| 297 | '-Wmissing-include-dirs', |
| 298 | '-Wold-style-definition', |
| 299 | '-Wpointer-arith', |
| 300 | '-Winit-self', |
| 301 | '-Wdeclaration-after-statement', |
| 302 | '-Wfloat-equal', |
| 303 | '-Wsuggest-attribute=noreturn', |
| 304 | '-Werror=missing-prototypes', |
| 305 | '-Werror=implicit-function-declaration', |
| 306 | '-Werror=missing-declarations', |
| 307 | '-Werror=return-type', |
| 308 | '-Werror=incompatible-pointer-types', |
| 309 | '-Werror=format=2', |
| 310 | '-Wstrict-prototypes', |
| 311 | '-Wredundant-decls', |
| 312 | '-Wmissing-noreturn', |
Zbigniew Jędrzejewski-Szmek | 97279d8 | 2017-11-20 14:23:40 +0100 | [diff] [blame] | 313 | '-Wimplicit-fallthrough=5', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 314 | '-Wshadow', |
| 315 | '-Wendif-labels', |
| 316 | '-Wstrict-aliasing=2', |
| 317 | '-Wwrite-strings', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 318 | '-Werror=overflow', |
| 319 | '-Wdate-time', |
| 320 | '-Wnested-externs', |
| 321 | '-ffast-math', |
| 322 | '-fno-common', |
| 323 | '-fdiagnostics-show-option', |
| 324 | '-fno-strict-aliasing', |
| 325 | '-fvisibility=hidden', |
| 326 | '-fstack-protector', |
| 327 | '-fstack-protector-strong', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 328 | '--param=ssp-buffer-size=4', |
| 329 | ] |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 330 | if cc.has_argument(arg) |
| 331 | add_project_arguments(arg, language : 'c') |
| 332 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 333 | endforeach |
| 334 | |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 335 | # the oss-fuzz fuzzers are not built with -fPIE, so don't |
| 336 | # enable it when we are linking against them |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 337 | if not fuzzer_build |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 338 | if cc.has_argument('-fPIE') |
| 339 | add_project_arguments('-fPIE', language : 'c') |
| 340 | endif |
| 341 | endif |
| 342 | |
Zbigniew Jędrzejewski-Szmek | 2c5434a | 2017-04-27 10:05:41 -0400 | [diff] [blame] | 343 | # "negative" arguments: gcc on purpose does not return an error for "-Wno-" |
| 344 | # arguments, just emits a warnings. So test for the "positive" version instead. |
| 345 | foreach arg : ['unused-parameter', |
| 346 | 'missing-field-initializers', |
| 347 | 'unused-result', |
Zbigniew Jędrzejewski-Szmek | fb1b588 | 2017-09-04 19:49:12 +0300 | [diff] [blame] | 348 | 'format-signedness', |
| 349 | 'error=nonnull', # work-around for gcc 7.1 turning this on on its own |
| 350 | ] |
Zbigniew Jędrzejewski-Szmek | 2c5434a | 2017-04-27 10:05:41 -0400 | [diff] [blame] | 351 | if cc.has_argument('-W' + arg) |
| 352 | add_project_arguments('-Wno-' + arg, language : 'c') |
| 353 | endif |
| 354 | endforeach |
| 355 | |
Caio Marcelo de Oliveira Filho | 9e70f2f | 2018-02-19 01:37:19 -0800 | [diff] [blame] | 356 | if cc.compiles(''' |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 357 | #include <time.h> |
| 358 | #include <inttypes.h> |
| 359 | typedef uint64_t usec_t; |
| 360 | usec_t now(clockid_t clock); |
| 361 | int main(void) { |
| 362 | struct timespec now; |
| 363 | return 0; |
| 364 | } |
Caio Marcelo de Oliveira Filho | 9e70f2f | 2018-02-19 01:37:19 -0800 | [diff] [blame] | 365 | ''', name : '-Werror=shadow with local shadowing') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 366 | add_project_arguments('-Werror=shadow', language : 'c') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 367 | endif |
| 368 | |
| 369 | if cc.get_id() == 'clang' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 370 | foreach arg : ['-Wno-typedef-redefinition', |
| 371 | '-Wno-gnu-variable-sized-type-not-at-end', |
| 372 | ] |
Zbigniew Jędrzejewski-Szmek | 7572aa8 | 2017-04-24 21:46:40 -0400 | [diff] [blame] | 373 | if cc.has_argument(arg, |
| 374 | name : '@0@ is supported'.format(arg)) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 375 | add_project_arguments(arg, language : 'c') |
| 376 | endif |
| 377 | endforeach |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 378 | endif |
| 379 | |
Zbigniew Jędrzejewski-Szmek | 6e2afb1 | 2017-04-24 21:03:35 -0400 | [diff] [blame] | 380 | link_test_c = files('tools/meson-link-test.c') |
| 381 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 382 | # --as-needed and --no-undefined are provided by meson by default, |
| 383 | # run mesonconf to see what is enabled |
| 384 | foreach arg : ['-Wl,-z,relro', |
| 385 | '-Wl,-z,now', |
| 386 | '-pie', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 387 | ] |
Zbigniew Jędrzejewski-Szmek | 6e2afb1 | 2017-04-24 21:03:35 -0400 | [diff] [blame] | 388 | |
| 389 | have = run_command(check_compilation_sh, |
| 390 | cc.cmd_array(), '-x', 'c', arg, |
| 391 | '-include', link_test_c).returncode() == 0 |
| 392 | message('Linking with @0@ supported: @1@'.format(arg, have ? 'yes' : 'no')) |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 393 | if have and (arg != '-pie' or not fuzzer_build) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 394 | add_project_link_arguments(arg, language : 'c') |
| 395 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 396 | endforeach |
| 397 | |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 398 | # Check if various sanitizers are supported |
| 399 | sanitizers = [] |
| 400 | foreach arg : ['address'] |
| 401 | |
| 402 | have = run_command(check_compilation_sh, |
| 403 | cc.cmd_array(), '-x', 'c', |
| 404 | '-fsanitize=@0@'.format(arg), |
| 405 | '-include', link_test_c).returncode() == 0 |
| 406 | message('@0@ sanitizer supported: @1@'.format(arg, have ? 'yes' : 'no')) |
| 407 | if have |
| 408 | sanitizers += arg |
| 409 | endif |
| 410 | endforeach |
| 411 | |
Zbigniew Jędrzejewski-Szmek | 41afb5e | 2017-04-24 19:28:04 -0400 | [diff] [blame] | 412 | if get_option('buildtype') != 'debug' |
| 413 | foreach arg : ['-ffunction-sections', |
| 414 | '-fdata-sections'] |
Zbigniew Jędrzejewski-Szmek | 7572aa8 | 2017-04-24 21:46:40 -0400 | [diff] [blame] | 415 | if cc.has_argument(arg, |
| 416 | name : '@0@ is supported'.format(arg)) |
Zbigniew Jędrzejewski-Szmek | 41afb5e | 2017-04-24 19:28:04 -0400 | [diff] [blame] | 417 | add_project_arguments(arg, language : 'c') |
| 418 | endif |
| 419 | endforeach |
| 420 | |
| 421 | foreach arg : ['-Wl,--gc-sections'] |
Zbigniew Jędrzejewski-Szmek | 6e2afb1 | 2017-04-24 21:03:35 -0400 | [diff] [blame] | 422 | have = run_command(check_compilation_sh, |
| 423 | cc.cmd_array(), '-x', 'c', arg, |
| 424 | '-include', link_test_c).returncode() == 0 |
| 425 | message('Linking with @0@ supported: @1@'.format(arg, have ? 'yes' : 'no')) |
| 426 | if have |
Zbigniew Jędrzejewski-Szmek | 41afb5e | 2017-04-24 19:28:04 -0400 | [diff] [blame] | 427 | add_project_link_arguments(arg, language : 'c') |
| 428 | endif |
| 429 | endforeach |
| 430 | endif |
| 431 | |
Zbigniew Jędrzejewski-Szmek | 9cc0e6e | 2017-04-11 10:25:34 -0400 | [diff] [blame] | 432 | cpp = ' '.join(cc.cmd_array()) + ' -E' |
| 433 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 434 | ##################################################################### |
| 435 | # compilation result tests |
| 436 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 437 | conf.set('_GNU_SOURCE', true) |
| 438 | conf.set('__SANE_USERSPACE_TYPES__', true) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 439 | |
| 440 | conf.set('SIZEOF_PID_T', cc.sizeof('pid_t', prefix : '#include <sys/types.h>')) |
| 441 | conf.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include <sys/types.h>')) |
| 442 | conf.set('SIZEOF_GID_T', cc.sizeof('gid_t', prefix : '#include <sys/types.h>')) |
| 443 | conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>')) |
| 444 | conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>')) |
| 445 | conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>')) |
| 446 | conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>')) |
| 447 | |
| 448 | decl_headers = ''' |
| 449 | #include <uchar.h> |
| 450 | #include <linux/ethtool.h> |
Susant Sahani | bce67bb | 2017-09-14 19:51:39 +0000 | [diff] [blame] | 451 | #include <linux/fib_rules.h> |
Lennart Poettering | 4c2e1b3 | 2018-02-20 12:48:33 +0100 | [diff] [blame] | 452 | #include <linux/stat.h> |
| 453 | #include <sys/stat.h> |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 454 | ''' |
| 455 | # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail |
| 456 | |
| 457 | foreach decl : ['char16_t', |
| 458 | 'char32_t', |
| 459 | 'key_serial_t', |
| 460 | 'struct ethtool_link_settings', |
Susant Sahani | bce67bb | 2017-09-14 19:51:39 +0000 | [diff] [blame] | 461 | 'struct fib_rule_uid_range', |
Lennart Poettering | 4c2e1b3 | 2018-02-20 12:48:33 +0100 | [diff] [blame] | 462 | 'struct statx', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 463 | ] |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 464 | |
| 465 | # We get -1 if the size cannot be determined |
| 466 | have = cc.sizeof(decl, prefix : decl_headers) > 0 |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 467 | conf.set10('HAVE_' + decl.underscorify().to_upper(), have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 468 | endforeach |
| 469 | |
| 470 | foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'], |
| 471 | ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'], |
| 472 | ['IFLA_VRF_TABLE', 'linux/if_link.h'], |
| 473 | ['IFLA_MACVLAN_FLAGS', 'linux/if_link.h'], |
Susant Sahani | d384826 | 2017-12-23 23:25:03 +0530 | [diff] [blame] | 474 | ['IFLA_IPVLAN_FLAGS', 'linux/if_link.h'], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 475 | ['IFLA_PHYS_PORT_ID', 'linux/if_link.h'], |
| 476 | ['IFLA_BOND_AD_INFO', 'linux/if_link.h'], |
| 477 | ['IFLA_VLAN_PROTOCOL', 'linux/if_link.h'], |
| 478 | ['IFLA_VXLAN_REMCSUM_NOPARTIAL', 'linux/if_link.h'], |
| 479 | ['IFLA_VXLAN_GPE', 'linux/if_link.h'], |
Susant Sahani | 9dfed8d | 2017-04-25 20:30:34 +0530 | [diff] [blame] | 480 | ['IFLA_GENEVE_LABEL', 'linux/if_link.h'], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 481 | # if_tunnel.h is buggy and cannot be included on its own |
| 482 | ['IFLA_VTI_REMOTE', 'linux/if_tunnel.h', '#include <net/if.h>'], |
| 483 | ['IFLA_IPTUN_ENCAP_DPORT', 'linux/if_tunnel.h', '#include <net/if.h>'], |
| 484 | ['IFLA_GRE_ENCAP_DPORT', 'linux/if_tunnel.h', '#include <net/if.h>'], |
| 485 | ['IFLA_BRIDGE_VLAN_INFO', 'linux/if_bridge.h'], |
| 486 | ['IFLA_BRPORT_PROXYARP', 'linux/if_link.h'], |
| 487 | ['IFLA_BRPORT_LEARNING_SYNC', 'linux/if_link.h'], |
| 488 | ['IFLA_BR_VLAN_DEFAULT_PVID', 'linux/if_link.h'], |
Susant Sahani | d384826 | 2017-12-23 23:25:03 +0530 | [diff] [blame] | 489 | ['IPVLAN_F_PRIVATE', 'linux/if_link.h'], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 490 | ['NDA_IFINDEX', 'linux/neighbour.h'], |
| 491 | ['IFA_FLAGS', 'linux/if_addr.h'], |
Susant Sahani | bce67bb | 2017-09-14 19:51:39 +0000 | [diff] [blame] | 492 | ['FRA_UID_RANGE', 'linux/fib_rules.h'], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 493 | ['LO_FLAGS_PARTSCAN', 'linux/loop.h'], |
Susant Sahani | d6df583 | 2017-11-22 12:53:22 +0530 | [diff] [blame] | 494 | ['VXCAN_INFO_PEER', 'linux/can/vxcan.h'], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 495 | ] |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 496 | prefix = decl.length() > 2 ? decl[2] : '' |
| 497 | have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix) |
Zbigniew Jędrzejewski-Szmek | 4b9545f | 2017-10-03 10:32:34 +0200 | [diff] [blame] | 498 | conf.set10('HAVE_' + decl[0], have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 499 | endforeach |
| 500 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 501 | foreach ident : ['secure_getenv', '__secure_getenv'] |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 502 | conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 503 | endforeach |
| 504 | |
| 505 | foreach ident : [ |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 506 | ['memfd_create', '''#include <sys/mman.h>'''], |
Lennart Poettering | 7b961e4 | 2017-12-25 12:35:28 +0100 | [diff] [blame] | 507 | ['gettid', '''#include <sys/types.h> |
| 508 | #include <unistd.h>'''], |
Lennart Poettering | 3c042ad | 2017-12-25 12:07:40 +0100 | [diff] [blame] | 509 | ['pivot_root', '''#include <stdlib.h> |
| 510 | #include <unistd.h>'''], # no known header declares pivot_root |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 511 | ['name_to_handle_at', '''#include <sys/types.h> |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 512 | #include <sys/stat.h> |
| 513 | #include <fcntl.h>'''], |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 514 | ['setns', '''#include <sched.h>'''], |
Lennart Poettering | 2acfd0f | 2017-12-25 12:35:43 +0100 | [diff] [blame] | 515 | ['renameat2', '''#include <stdio.h> |
| 516 | #include <fcntl.h>'''], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 517 | ['kcmp', '''#include <linux/kcmp.h>'''], |
| 518 | ['keyctl', '''#include <sys/types.h> |
| 519 | #include <keyutils.h>'''], |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 520 | ['copy_file_range', '''#include <sys/syscall.h> |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 521 | #include <unistd.h>'''], |
Daniel Mack | 71e5200 | 2016-10-18 17:57:10 +0200 | [diff] [blame] | 522 | ['bpf', '''#include <sys/syscall.h> |
| 523 | #include <unistd.h>'''], |
Lennart Poettering | 4c2e1b3 | 2018-02-20 12:48:33 +0100 | [diff] [blame] | 524 | ['statx', '''#include <sys/types.h> |
| 525 | #include <sys/stat.h> |
| 526 | #include <unistd.h>'''], |
Zbigniew Jędrzejewski-Szmek | aa484f3 | 2018-02-26 21:20:00 +0100 | [diff] [blame] | 527 | ['explicit_bzero' , '''#include <string.h>'''], |
| 528 | ['reallocarray', '''#include <malloc.h>'''], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 529 | ] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 530 | |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 531 | 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] | 532 | conf.set10('HAVE_' + ident[0].to_upper(), have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 533 | endforeach |
| 534 | |
Lennart Poettering | 85db59b | 2017-12-25 12:01:14 +0100 | [diff] [blame] | 535 | 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] | 536 | conf.set10('USE_SYS_RANDOM_H', true) |
Zbigniew Jędrzejewski-Szmek | 4b9545f | 2017-10-03 10:32:34 +0200 | [diff] [blame] | 537 | conf.set10('HAVE_GETRANDOM', true) |
Zbigniew Jędrzejewski-Szmek | 4984c8b | 2017-04-19 21:20:54 -0400 | [diff] [blame] | 538 | else |
| 539 | have = cc.has_function('getrandom', prefix : '''#include <linux/random.h>''') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 540 | conf.set10('USE_SYS_RANDOM_H', false) |
Zbigniew Jędrzejewski-Szmek | 4b9545f | 2017-10-03 10:32:34 +0200 | [diff] [blame] | 541 | conf.set10('HAVE_GETRANDOM', have) |
Zbigniew Jędrzejewski-Szmek | 4984c8b | 2017-04-19 21:20:54 -0400 | [diff] [blame] | 542 | endif |
| 543 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 544 | ##################################################################### |
| 545 | |
| 546 | sed = find_program('sed') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 547 | awk = find_program('awk') |
Zbigniew Jędrzejewski-Szmek | d730e2d | 2017-04-25 08:49:58 -0400 | [diff] [blame] | 548 | m4 = find_program('m4') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 549 | stat = find_program('stat') |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 550 | git = find_program('git', required : false) |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 551 | env = find_program('env') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 552 | |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 553 | meson_make_symlink = meson.source_root() + '/tools/meson-make-symlink.sh' |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 554 | mkdir_p = 'mkdir -p $DESTDIR/@0@' |
Zbigniew Jędrzejewski-Szmek | d83f4f5 | 2017-04-16 12:04:46 -0400 | [diff] [blame] | 555 | test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh') |
| 556 | splash_bmp = files('test/splash.bmp') |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 557 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 558 | # if -Dxxx-path option is found, use that. Otherwise, check in $PATH, |
| 559 | # /usr/sbin, /sbin, and fall back to the default from middle column. |
Mike Gilbert | 2fa645f | 2018-01-04 07:14:20 -0500 | [diff] [blame] | 560 | progs = [['quotaon', '/usr/sbin/quotaon' ], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 561 | ['quotacheck', '/usr/sbin/quotacheck' ], |
| 562 | ['kill', '/usr/bin/kill' ], |
| 563 | ['kmod', '/usr/bin/kmod' ], |
| 564 | ['kexec', '/usr/sbin/kexec' ], |
| 565 | ['sulogin', '/usr/sbin/sulogin' ], |
| 566 | ['mount', '/usr/bin/mount', 'MOUNT_PATH'], |
| 567 | ['umount', '/usr/bin/umount', 'UMOUNT_PATH'], |
| 568 | ['loadkeys', '/usr/bin/loadkeys', 'KBD_LOADKEYS'], |
| 569 | ['setfont', '/usr/bin/setfont', 'KBD_SETFONT'], |
| 570 | ] |
| 571 | foreach prog : progs |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 572 | path = get_option(prog[0] + '-path') |
| 573 | if path != '' |
| 574 | message('Using @1@ for @0@'.format(prog[0], path)) |
| 575 | else |
| 576 | exe = find_program(prog[0], |
| 577 | '/usr/sbin/' + prog[0], |
| 578 | '/sbin/' + prog[0], |
| 579 | required: false) |
| 580 | path = exe.found() ? exe.path() : prog[1] |
| 581 | endif |
| 582 | name = prog.length() > 2 ? prog[2] : prog[0].to_upper() |
| 583 | conf.set_quoted(name, path) |
| 584 | substs.set(name, path) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 585 | endforeach |
| 586 | |
Mike Gilbert | 2fa645f | 2018-01-04 07:14:20 -0500 | [diff] [blame] | 587 | conf.set_quoted('TELINIT', get_option('telinit-path')) |
| 588 | |
Zbigniew Jędrzejewski-Szmek | 1276a9f | 2017-04-18 19:11:54 -0400 | [diff] [blame] | 589 | if run_command('ln', '--relative', '--help').returncode() != 0 |
| 590 | error('ln does not support --relative') |
| 591 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 592 | |
| 593 | ############################################################ |
| 594 | |
| 595 | gperf = find_program('gperf') |
| 596 | |
| 597 | gperf_test_format = ''' |
| 598 | #include <string.h> |
| 599 | const char * in_word_set(const char *, @0@); |
| 600 | @1@ |
| 601 | ''' |
| 602 | gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C' |
| 603 | gperf_snippet = run_command('sh', '-c', gperf_snippet_format.format(gperf.path())) |
| 604 | gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout()) |
| 605 | if cc.compiles(gperf_test) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 606 | gperf_len_type = 'size_t' |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 607 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 608 | gperf_test = gperf_test_format.format('unsigned', gperf_snippet.stdout()) |
| 609 | if cc.compiles(gperf_test) |
| 610 | gperf_len_type = 'unsigned' |
| 611 | else |
| 612 | error('unable to determine gperf len type') |
| 613 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 614 | endif |
| 615 | message('gperf len type is @0@'.format(gperf_len_type)) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 616 | conf.set('GPERF_LEN_TYPE', gperf_len_type, |
| 617 | description : 'The type of gperf "len" parameter') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 618 | |
| 619 | ############################################################ |
| 620 | |
| 621 | if not cc.has_header('sys/capability.h') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 622 | error('POSIX caps headers not found') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 623 | endif |
Björn Esser | 9f555bb | 2018-01-25 15:30:15 +0100 | [diff] [blame] | 624 | foreach header : ['crypt.h', |
| 625 | 'linux/btrfs.h', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 626 | 'linux/memfd.h', |
| 627 | 'linux/vm_sockets.h', |
Zbigniew Jędrzejewski-Szmek | af8786b | 2017-10-03 12:09:40 +0200 | [diff] [blame] | 628 | 'sys/auxv.h', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 629 | 'valgrind/memcheck.h', |
| 630 | 'valgrind/valgrind.h', |
| 631 | ] |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 632 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 633 | conf.set10('HAVE_' + header.underscorify().to_upper(), |
| 634 | cc.has_header(header)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 635 | endforeach |
| 636 | |
| 637 | ############################################################ |
| 638 | |
| 639 | conf.set_quoted('FALLBACK_HOSTNAME', get_option('fallback-hostname')) |
Zbigniew Jędrzejewski-Szmek | 5248e7e | 2017-07-11 02:15:08 -0400 | [diff] [blame] | 640 | conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname')) |
| 641 | 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] | 642 | |
| 643 | default_hierarchy = get_option('default-hierarchy') |
| 644 | conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy, |
| 645 | description : 'default cgroup hierarchy as string') |
| 646 | if default_hierarchy == 'legacy' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 647 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_NONE') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 648 | elif default_hierarchy == 'hybrid' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 649 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_SYSTEMD') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 650 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 651 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_ALL') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 652 | endif |
| 653 | |
| 654 | time_epoch = get_option('time-epoch') |
| 655 | if time_epoch == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 656 | NEWS = files('NEWS') |
| 657 | time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 658 | endif |
| 659 | time_epoch = time_epoch.to_int() |
| 660 | conf.set('TIME_EPOCH', time_epoch) |
| 661 | |
| 662 | system_uid_max = get_option('system-uid-max') |
| 663 | if system_uid_max == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 664 | system_uid_max = run_command( |
| 665 | awk, |
Caio Marcelo de Oliveira Filho | 2f62cf3 | 2018-02-18 18:33:16 -0800 | [diff] [blame] | 666 | '/^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }', |
| 667 | '/etc/login.defs').stdout().strip() |
| 668 | if system_uid_max == '' |
| 669 | system_uid_max = '999' |
| 670 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 671 | endif |
| 672 | system_uid_max = system_uid_max.to_int() |
| 673 | conf.set('SYSTEM_UID_MAX', system_uid_max) |
| 674 | substs.set('systemuidmax', system_uid_max) |
Zbigniew Jędrzejewski-Szmek | 7572aa8 | 2017-04-24 21:46:40 -0400 | [diff] [blame] | 675 | message('maximum system UID is @0@'.format(system_uid_max)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 676 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 677 | system_gid_max = get_option('system-gid-max') |
| 678 | if system_gid_max == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 679 | system_gid_max = run_command( |
| 680 | awk, |
Caio Marcelo de Oliveira Filho | 2f62cf3 | 2018-02-18 18:33:16 -0800 | [diff] [blame] | 681 | '/^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }', |
| 682 | '/etc/login.defs').stdout().strip() |
| 683 | if system_gid_max == '' |
| 684 | system_gid_max = '999' |
| 685 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 686 | endif |
| 687 | system_gid_max = system_gid_max.to_int() |
| 688 | conf.set('SYSTEM_GID_MAX', system_gid_max) |
| 689 | substs.set('systemgidmax', system_gid_max) |
Zbigniew Jędrzejewski-Szmek | 7572aa8 | 2017-04-24 21:46:40 -0400 | [diff] [blame] | 690 | message('maximum system GID is @0@'.format(system_gid_max)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 691 | |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 692 | dynamic_uid_min = get_option('dynamic-uid-min').to_int() |
| 693 | dynamic_uid_max = get_option('dynamic-uid-max').to_int() |
| 694 | conf.set('DYNAMIC_UID_MIN', dynamic_uid_min) |
| 695 | conf.set('DYNAMIC_UID_MAX', dynamic_uid_max) |
| 696 | substs.set('dynamicuidmin', dynamic_uid_min) |
| 697 | substs.set('dynamicuidmax', dynamic_uid_max) |
| 698 | |
| 699 | container_uid_base_min = get_option('container-uid-base-min').to_int() |
| 700 | container_uid_base_max = get_option('container-uid-base-max').to_int() |
| 701 | conf.set('CONTAINER_UID_BASE_MIN', container_uid_base_min) |
| 702 | conf.set('CONTAINER_UID_BASE_MAX', container_uid_base_max) |
| 703 | substs.set('containeruidbasemin', container_uid_base_min) |
| 704 | substs.set('containeruidbasemax', container_uid_base_max) |
| 705 | |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 706 | nobody_user = get_option('nobody-user') |
| 707 | nobody_group = get_option('nobody-group') |
| 708 | |
| 709 | getent_result = run_command('getent', 'passwd', '65534') |
| 710 | if getent_result.returncode() == 0 |
| 711 | name = getent_result.stdout().split(':')[0] |
| 712 | if name != nobody_user |
| 713 | message('WARNING:\n' + |
| 714 | ' 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) + |
| 715 | ' Your build will result in an user table setup that is incompatible with the local system.') |
| 716 | endif |
| 717 | endif |
| 718 | id_result = run_command('id', '-u', nobody_user) |
| 719 | if id_result.returncode() == 0 |
| 720 | id = id_result.stdout().to_int() |
| 721 | if id != 65534 |
| 722 | message('WARNING:\n' + |
| 723 | ' 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) + |
| 724 | ' Your build will result in an user table setup that is incompatible with the local system.') |
| 725 | endif |
| 726 | endif |
| 727 | |
| 728 | getent_result = run_command('getent', 'group', '65534') |
| 729 | if getent_result.returncode() == 0 |
| 730 | name = getent_result.stdout().split(':')[0] |
| 731 | if name != nobody_group |
| 732 | message('WARNING:\n' + |
| 733 | ' 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) + |
| 734 | ' Your build will result in an group table setup that is incompatible with the local system.') |
| 735 | endif |
| 736 | endif |
| 737 | id_result = run_command('id', '-g', nobody_group) |
| 738 | if id_result.returncode() == 0 |
| 739 | id = id_result.stdout().to_int() |
| 740 | if id != 65534 |
| 741 | message('WARNING:\n' + |
| 742 | ' 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) + |
| 743 | ' Your build will result in an group table setup that is incompatible with the local system.') |
| 744 | endif |
| 745 | endif |
Yu Watanabe | 8374cc6 | 2017-12-07 17:19:11 +0900 | [diff] [blame] | 746 | if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup') |
| 747 | message('WARNING:\n' + |
| 748 | ' The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) + |
| 749 | ' Please re-check that both "nobody-user" and "nobody-group" options are correctly set.') |
| 750 | endif |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 751 | |
| 752 | conf.set_quoted('NOBODY_USER_NAME', nobody_user) |
| 753 | conf.set_quoted('NOBODY_GROUP_NAME', nobody_group) |
Yu Watanabe | 6071202 | 2017-12-07 15:49:16 +0900 | [diff] [blame] | 754 | substs.set('NOBODY_USER_NAME', nobody_user) |
| 755 | substs.set('NOBODY_GROUP_NAME', nobody_group) |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 756 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 757 | tty_gid = get_option('tty-gid') |
| 758 | conf.set('TTY_GID', tty_gid) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 759 | substs.set('TTY_GID', tty_gid) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 760 | |
Ikey Doherty | 84786b8 | 2017-12-03 12:28:23 +0000 | [diff] [blame] | 761 | # Ensure provided GID argument is numeric, otherwise fallback to default assignment |
| 762 | if get_option('users-gid') != '' |
Yu Watanabe | d680687 | 2017-12-05 14:01:39 +0900 | [diff] [blame] | 763 | users_gid = get_option('users-gid').to_int() |
Ikey Doherty | 84786b8 | 2017-12-03 12:28:23 +0000 | [diff] [blame] | 764 | else |
Yu Watanabe | d680687 | 2017-12-05 14:01:39 +0900 | [diff] [blame] | 765 | users_gid = '-' |
Ikey Doherty | 84786b8 | 2017-12-03 12:28:23 +0000 | [diff] [blame] | 766 | endif |
| 767 | substs.set('USERS_GID', users_gid) |
| 768 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 769 | if get_option('adm-group') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 770 | m4_defines += ['-DENABLE_ADM_GROUP'] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 771 | endif |
| 772 | |
| 773 | if get_option('wheel-group') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 774 | m4_defines += ['-DENABLE_WHEEL_GROUP'] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 775 | endif |
| 776 | |
| 777 | substs.set('DEV_KVM_MODE', get_option('dev-kvm-mode')) |
Tom Stellard | 4e15a73 | 2017-10-31 08:46:24 -0700 | [diff] [blame] | 778 | substs.set('GROUP_RENDER_MODE', get_option('group-render-mode')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 779 | |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 780 | kill_user_processes = get_option('default-kill-user-processes') |
| 781 | conf.set10('KILL_USER_PROCESSES', kill_user_processes) |
| 782 | substs.set('KILL_USER_PROCESSES', kill_user_processes ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 783 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 784 | dns_servers = get_option('dns-servers') |
| 785 | conf.set_quoted('DNS_SERVERS', dns_servers) |
| 786 | substs.set('DNS_SERVERS', dns_servers) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 787 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 788 | ntp_servers = get_option('ntp-servers') |
| 789 | conf.set_quoted('NTP_SERVERS', ntp_servers) |
| 790 | substs.set('NTP_SERVERS', ntp_servers) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 791 | |
| 792 | conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) |
| 793 | |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 794 | substs.set('SUSHELL', get_option('debug-shell')) |
| 795 | substs.set('DEBUGTTY', get_option('debug-tty')) |
| 796 | |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 797 | debug = get_option('debug') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 798 | enable_debug_hashmap = false |
| 799 | enable_debug_mmap_cache = false |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 800 | if debug != '' |
| 801 | foreach name : debug.split(',') |
| 802 | if name == 'hashmap' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 803 | enable_debug_hashmap = true |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 804 | elif name == 'mmap-cache' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 805 | enable_debug_mmap_cache = true |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 806 | else |
| 807 | message('unknown debug option "@0@", ignoring'.format(name)) |
| 808 | endif |
| 809 | endforeach |
| 810 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 811 | conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap) |
| 812 | conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache) |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 813 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 814 | ##################################################################### |
| 815 | |
| 816 | threads = dependency('threads') |
| 817 | librt = cc.find_library('rt') |
| 818 | libm = cc.find_library('m') |
| 819 | libdl = cc.find_library('dl') |
| 820 | libcrypt = cc.find_library('crypt') |
| 821 | |
Zbigniew Jędrzejewski-Szmek | 1800cc8 | 2017-04-27 01:30:30 -0400 | [diff] [blame] | 822 | libcap = dependency('libcap', required : false) |
| 823 | if not libcap.found() |
| 824 | # Compat with Ubuntu 14.04 which ships libcap w/o .pc file |
| 825 | libcap = cc.find_library('cap') |
| 826 | endif |
| 827 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 828 | libmount = dependency('mount', |
Jonathan Rudenberg | b4081f3 | 2018-01-15 18:27:37 -0500 | [diff] [blame] | 829 | version : '>= 2.30', |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 830 | required : not fuzzer_build) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 831 | |
| 832 | want_seccomp = get_option('seccomp') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 833 | if want_seccomp != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 834 | libseccomp = dependency('libseccomp', |
Zbigniew Jędrzejewski-Szmek | 9f0e9c0 | 2017-04-27 10:05:18 -0400 | [diff] [blame] | 835 | version : '>= 2.3.1', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 836 | required : want_seccomp == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 837 | have = libseccomp.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 838 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 839 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 840 | libseccomp = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 841 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 842 | conf.set10('HAVE_SECCOMP', have) |
| 843 | m4_defines += have ? ['-DHAVE_SECCOMP'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 844 | |
| 845 | want_selinux = get_option('selinux') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 846 | if want_selinux != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 847 | libselinux = dependency('libselinux', |
| 848 | version : '>= 2.1.9', |
| 849 | required : want_selinux == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 850 | have = libselinux.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 851 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 852 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 853 | libselinux = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 854 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 855 | conf.set10('HAVE_SELINUX', have) |
| 856 | m4_defines += have ? ['-DHAVE_SELINUX'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 857 | |
| 858 | want_apparmor = get_option('apparmor') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 859 | if want_apparmor != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 860 | libapparmor = dependency('libapparmor', |
| 861 | required : want_apparmor == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 862 | have = libapparmor.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 863 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 864 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 865 | libapparmor = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 866 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 867 | conf.set10('HAVE_APPARMOR', have) |
| 868 | m4_defines += have ? ['-DHAVE_APPARMOR'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 869 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 870 | smack_run_label = get_option('smack-run-label') |
| 871 | if smack_run_label != '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 872 | conf.set_quoted('SMACK_RUN_LABEL', smack_run_label) |
| 873 | m4_defines += ['-DHAVE_SMACK_RUN_LABEL'] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 874 | endif |
| 875 | |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 876 | want_polkit = get_option('polkit') |
| 877 | install_polkit = false |
| 878 | install_polkit_pkla = false |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 879 | if want_polkit != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 880 | install_polkit = true |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 881 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 882 | libpolkit = dependency('polkit-gobject-1', |
| 883 | required : false) |
| 884 | if libpolkit.found() and libpolkit.version().version_compare('< 0.106') |
| 885 | message('Old polkit detected, will install pkla files') |
| 886 | install_polkit_pkla = true |
| 887 | endif |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 888 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 889 | conf.set10('ENABLE_POLKIT', install_polkit) |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 890 | |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 891 | want_acl = get_option('acl') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 892 | if want_acl != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 893 | libacl = cc.find_library('acl', required : want_acl == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 894 | have = libacl.found() |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 895 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 896 | have = false |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 897 | libacl = [] |
| 898 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 899 | conf.set10('HAVE_ACL', have) |
| 900 | m4_defines += have ? ['-DHAVE_ACL'] : [] |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 901 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 902 | want_audit = get_option('audit') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 903 | if want_audit != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 904 | libaudit = dependency('audit', required : want_audit == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 905 | have = libaudit.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 906 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 907 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 908 | libaudit = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 909 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 910 | conf.set10('HAVE_AUDIT', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 911 | |
| 912 | want_blkid = get_option('blkid') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 913 | if want_blkid != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 914 | libblkid = dependency('blkid', required : want_blkid == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 915 | have = libblkid.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 916 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 917 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 918 | libblkid = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 919 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 920 | conf.set10('HAVE_BLKID', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 921 | |
| 922 | want_kmod = get_option('kmod') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 923 | if want_kmod != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 924 | libkmod = dependency('libkmod', |
| 925 | version : '>= 15', |
| 926 | required : want_kmod == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 927 | have = libkmod.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 | libkmod = [] |
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_KMOD', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 933 | |
| 934 | want_pam = get_option('pam') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 935 | if want_pam != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 936 | libpam = cc.find_library('pam', required : want_pam == 'true') |
| 937 | 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] | 938 | have = libpam.found() and libpam_misc.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 939 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 940 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 941 | libpam = [] |
| 942 | libpam_misc = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 943 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 944 | conf.set10('HAVE_PAM', have) |
| 945 | m4_defines += have ? ['-DHAVE_PAM'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 946 | |
| 947 | want_microhttpd = get_option('microhttpd') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 948 | if want_microhttpd != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 949 | libmicrohttpd = dependency('libmicrohttpd', |
| 950 | version : '>= 0.9.33', |
| 951 | required : want_microhttpd == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 952 | have = libmicrohttpd.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 953 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 954 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 955 | libmicrohttpd = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 956 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 957 | conf.set10('HAVE_MICROHTTPD', have) |
| 958 | m4_defines += have ? ['-DHAVE_MICROHTTPD'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 959 | |
| 960 | want_libcryptsetup = get_option('libcryptsetup') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 961 | if want_libcryptsetup != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 962 | libcryptsetup = dependency('libcryptsetup', |
| 963 | version : '>= 1.6.0', |
| 964 | required : want_libcryptsetup == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 965 | have = libcryptsetup.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 966 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 967 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 968 | libcryptsetup = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 969 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 970 | conf.set10('HAVE_LIBCRYPTSETUP', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 971 | |
| 972 | want_libcurl = get_option('libcurl') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 973 | if want_libcurl != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 974 | libcurl = dependency('libcurl', |
| 975 | version : '>= 7.32.0', |
| 976 | required : want_libcurl == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 977 | have = libcurl.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 | libcurl = [] |
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_LIBCURL', have) |
| 983 | m4_defines += have ? ['-DHAVE_LIBCURL'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 984 | |
| 985 | want_libidn = get_option('libidn') |
Zbigniew Jędrzejewski-Szmek | 87057e2 | 2017-05-09 21:56:34 -0400 | [diff] [blame] | 986 | want_libidn2 = get_option('libidn2') |
| 987 | if want_libidn == 'true' and want_libidn2 == 'true' |
| 988 | error('libidn and libidn2 cannot be requested simultaneously') |
| 989 | endif |
| 990 | |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 991 | if want_libidn != 'false' and want_libidn2 != 'true' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 992 | libidn = dependency('libidn', |
| 993 | required : want_libidn == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 994 | have = libidn.found() |
Zbigniew Jędrzejewski-Szmek | 7f7ab22 | 2017-07-12 03:25:59 -0400 | [diff] [blame] | 995 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 996 | have = false |
Zbigniew Jędrzejewski-Szmek | 7f7ab22 | 2017-07-12 03:25:59 -0400 | [diff] [blame] | 997 | libidn = [] |
| 998 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 999 | conf.set10('HAVE_LIBIDN', have) |
| 1000 | m4_defines += have ? ['-DHAVE_LIBIDN'] : [] |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1001 | if not have and want_libidn2 != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 7f7ab22 | 2017-07-12 03:25:59 -0400 | [diff] [blame] | 1002 | # libidn is used for both libidn and libidn2 objects |
| 1003 | libidn = dependency('libidn2', |
| 1004 | required : want_libidn2 == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1005 | have = libidn.found() |
| 1006 | else |
| 1007 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1008 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1009 | conf.set10('HAVE_LIBIDN2', have) |
| 1010 | m4_defines += have ? ['-DHAVE_LIBIDN2'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1011 | |
| 1012 | want_libiptc = get_option('libiptc') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1013 | if want_libiptc != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1014 | libiptc = dependency('libiptc', |
| 1015 | required : want_libiptc == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1016 | have = libiptc.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1017 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1018 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1019 | libiptc = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1020 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1021 | conf.set10('HAVE_LIBIPTC', have) |
| 1022 | m4_defines += have ? ['-DHAVE_LIBIPTC'] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1023 | |
| 1024 | want_qrencode = get_option('qrencode') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1025 | if want_qrencode != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1026 | libqrencode = dependency('libqrencode', |
| 1027 | required : want_qrencode == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1028 | have = libqrencode.found() |
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 | libqrencode = [] |
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_QRENCODE', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1034 | |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1035 | want_gcrypt = get_option('gcrypt') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1036 | if want_gcrypt != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1037 | libgcrypt = cc.find_library('gcrypt', required : want_gcrypt == 'true') |
| 1038 | 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] | 1039 | have = libgcrypt.found() and libgpg_error.found() |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1040 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1041 | have = false |
| 1042 | endif |
| 1043 | if not have |
| 1044 | # 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] | 1045 | libgcrypt = [] |
| 1046 | libgpg_error = [] |
| 1047 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1048 | conf.set10('HAVE_GCRYPT', have) |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1049 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1050 | want_gnutls = get_option('gnutls') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1051 | if want_gnutls != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1052 | libgnutls = dependency('gnutls', |
| 1053 | version : '>= 3.1.4', |
| 1054 | required : want_gnutls == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1055 | have = libgnutls.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1056 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1057 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1058 | libgnutls = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1059 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1060 | conf.set10('HAVE_GNUTLS', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1061 | |
| 1062 | want_elfutils = get_option('elfutils') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1063 | if want_elfutils != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1064 | libdw = dependency('libdw', |
| 1065 | required : want_elfutils == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1066 | have = libdw.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1067 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1068 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1069 | libdw = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1070 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1071 | conf.set10('HAVE_ELFUTILS', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1072 | |
| 1073 | want_zlib = get_option('zlib') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1074 | if want_zlib != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1075 | libz = dependency('zlib', |
| 1076 | required : want_zlib == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1077 | have = libz.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1078 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1079 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1080 | libz = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1081 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1082 | conf.set10('HAVE_ZLIB', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1083 | |
| 1084 | want_bzip2 = get_option('bzip2') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1085 | if want_bzip2 != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1086 | libbzip2 = cc.find_library('bz2', |
| 1087 | required : want_bzip2 == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1088 | have = libbzip2.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1089 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1090 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1091 | libbzip2 = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1092 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1093 | conf.set10('HAVE_BZIP2', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1094 | |
| 1095 | want_xz = get_option('xz') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1096 | if want_xz != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1097 | libxz = dependency('liblzma', |
| 1098 | required : want_xz == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1099 | have = libxz.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1100 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1101 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1102 | libxz = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1103 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1104 | conf.set10('HAVE_XZ', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1105 | |
| 1106 | want_lz4 = get_option('lz4') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1107 | if want_lz4 != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1108 | liblz4 = dependency('liblz4', |
| 1109 | required : want_lz4 == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1110 | have = liblz4.found() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1111 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1112 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1113 | liblz4 = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1114 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1115 | conf.set10('HAVE_LZ4', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1116 | |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1117 | want_xkbcommon = get_option('xkbcommon') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1118 | if want_xkbcommon != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1119 | libxkbcommon = dependency('xkbcommon', |
| 1120 | version : '>= 0.3.0', |
| 1121 | required : want_xkbcommon == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1122 | have = libxkbcommon.found() |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1123 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1124 | have = false |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1125 | libxkbcommon = [] |
| 1126 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1127 | conf.set10('HAVE_XKBCOMMON', have) |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 1128 | |
Zbigniew Jędrzejewski-Szmek | c4c978a | 2018-01-12 05:47:17 +0100 | [diff] [blame] | 1129 | want_pcre2 = get_option('pcre2') |
| 1130 | if want_pcre2 != 'false' |
| 1131 | libpcre2 = dependency('libpcre2-8', |
| 1132 | required : want_pcre2 == 'true') |
| 1133 | have = libpcre2.found() |
| 1134 | else |
| 1135 | have = false |
| 1136 | libpcre2 = [] |
| 1137 | endif |
| 1138 | conf.set10('HAVE_PCRE2', have) |
| 1139 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1140 | want_glib = get_option('glib') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1141 | if want_glib != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1142 | libglib = dependency('glib-2.0', |
| 1143 | version : '>= 2.22.0', |
| 1144 | required : want_glib == 'true') |
| 1145 | libgobject = dependency('gobject-2.0', |
| 1146 | version : '>= 2.22.0', |
| 1147 | required : want_glib == 'true') |
| 1148 | libgio = dependency('gio-2.0', |
| 1149 | required : want_glib == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1150 | have = libglib.found() and libgobject.found() and libgio.found() |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1151 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1152 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1153 | libglib = [] |
| 1154 | libgobject = [] |
| 1155 | libgio = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1156 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1157 | conf.set10('HAVE_GLIB', have) |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1158 | |
| 1159 | want_dbus = get_option('dbus') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1160 | if want_dbus != 'false' and not fuzzer_build |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1161 | libdbus = dependency('dbus-1', |
| 1162 | version : '>= 1.3.2', |
| 1163 | required : want_dbus == 'true') |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1164 | have = libdbus.found() |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1165 | else |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1166 | have = false |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1167 | libdbus = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1168 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1169 | conf.set10('HAVE_DBUS', have) |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1170 | |
Yu Watanabe | 42303dc | 2017-06-18 05:22:32 +0900 | [diff] [blame] | 1171 | default_dnssec = get_option('default-dnssec') |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 1172 | if fuzzer_build |
Jonathan Rudenberg | b4081f3 | 2018-01-15 18:27:37 -0500 | [diff] [blame] | 1173 | default_dnssec = 'no' |
| 1174 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1175 | if default_dnssec != 'no' and conf.get('HAVE_GCRYPT') == 0 |
Yu Watanabe | 42303dc | 2017-06-18 05:22:32 +0900 | [diff] [blame] | 1176 | message('default-dnssec cannot be set to yes or allow-downgrade when gcrypt is disabled. Setting default-dnssec to no.') |
| 1177 | default_dnssec = 'no' |
| 1178 | endif |
| 1179 | conf.set('DEFAULT_DNSSEC_MODE', |
| 1180 | 'DNSSEC_' + default_dnssec.underscorify().to_upper()) |
| 1181 | substs.set('DEFAULT_DNSSEC_MODE', default_dnssec) |
| 1182 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1183 | want_importd = get_option('importd') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 1184 | if want_importd != 'false' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1185 | have = (conf.get('HAVE_LIBCURL') == 1 and |
| 1186 | conf.get('HAVE_ZLIB') == 1 and |
| 1187 | conf.get('HAVE_BZIP2') == 1 and |
| 1188 | conf.get('HAVE_XZ') == 1 and |
| 1189 | conf.get('HAVE_GCRYPT') == 1) |
| 1190 | if want_importd == 'true' and not have |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1191 | error('importd support was requested, but dependencies are not available') |
| 1192 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1193 | else |
| 1194 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1195 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1196 | conf.set10('ENABLE_IMPORTD', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1197 | |
| 1198 | want_remote = get_option('remote') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 1199 | if want_remote != 'false' |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1200 | have_deps = [conf.get('HAVE_MICROHTTPD') == 1, |
| 1201 | conf.get('HAVE_LIBCURL') == 1] |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1202 | # sd-j-remote requires µhttpd, and sd-j-upload requires libcurl, so |
| 1203 | # it's possible to build one without the other. Complain only if |
| 1204 | # support was explictly requested. The auxiliary files like sysusers |
| 1205 | # config should be installed when any of the programs are built. |
| 1206 | if want_remote == 'true' and not (have_deps[0] and have_deps[1]) |
| 1207 | error('remote support was requested, but dependencies are not available') |
| 1208 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1209 | have = have_deps[0] or have_deps[1] |
| 1210 | else |
| 1211 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1212 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1213 | conf.set10('ENABLE_REMOTE', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1214 | |
Zbigniew Jędrzejewski-Szmek | a9149d8 | 2017-10-03 13:15:27 +0200 | [diff] [blame] | 1215 | foreach term : ['utmp', |
| 1216 | 'hibernate', |
| 1217 | 'environment-d', |
| 1218 | 'binfmt', |
| 1219 | 'coredump', |
| 1220 | 'resolve', |
| 1221 | 'logind', |
| 1222 | 'hostnamed', |
| 1223 | 'localed', |
| 1224 | 'machined', |
| 1225 | 'networkd', |
| 1226 | 'timedated', |
| 1227 | 'timesyncd', |
| 1228 | 'myhostname', |
| 1229 | 'firstboot', |
| 1230 | 'randomseed', |
| 1231 | 'backlight', |
| 1232 | 'vconsole', |
| 1233 | 'quotacheck', |
| 1234 | 'sysusers', |
| 1235 | 'tmpfiles', |
| 1236 | 'hwdb', |
| 1237 | 'rfkill', |
| 1238 | 'ldconfig', |
| 1239 | 'efi', |
| 1240 | 'tpm', |
| 1241 | 'ima', |
| 1242 | 'smack', |
| 1243 | 'gshadow', |
| 1244 | 'idn', |
| 1245 | 'nss-systemd'] |
| 1246 | have = get_option(term) |
| 1247 | name = 'ENABLE_' + term.underscorify().to_upper() |
| 1248 | conf.set10(name, have) |
| 1249 | m4_defines += have ? ['-D' + name] : [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1250 | endforeach |
| 1251 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1252 | want_tests = get_option('tests') |
Zbigniew Jędrzejewski-Szmek | 572baca | 2017-04-08 01:55:38 -0400 | [diff] [blame] | 1253 | install_tests = get_option('install-tests') |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 1254 | slow_tests = get_option('slow-tests') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1255 | tests = [] |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 1256 | fuzzers = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1257 | |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 1258 | conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests) |
Zbigniew Jędrzejewski-Szmek | 00d82c8 | 2017-07-12 21:25:17 +0000 | [diff] [blame] | 1259 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1260 | ##################################################################### |
| 1261 | |
| 1262 | if get_option('efi') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1263 | efi_arch = host_machine.cpu_family() |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1264 | |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1265 | if efi_arch == 'x86' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1266 | EFI_MACHINE_TYPE_NAME = 'ia32' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1267 | gnu_efi_arch = 'ia32' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1268 | elif efi_arch == 'x86_64' |
| 1269 | EFI_MACHINE_TYPE_NAME = 'x64' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1270 | gnu_efi_arch = 'x86_64' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1271 | elif efi_arch == 'arm' |
| 1272 | EFI_MACHINE_TYPE_NAME = 'arm' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1273 | gnu_efi_arch = 'arm' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1274 | elif efi_arch == 'aarch64' |
| 1275 | EFI_MACHINE_TYPE_NAME = 'aa64' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1276 | gnu_efi_arch = 'aarch64' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1277 | else |
| 1278 | EFI_MACHINE_TYPE_NAME = '' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1279 | gnu_efi_arch = '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1280 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1281 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1282 | have = true |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1283 | 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] | 1284 | |
| 1285 | conf.set('SD_TPM_PCR', get_option('tpm-pcrindex').to_int()) |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1286 | else |
| 1287 | have = false |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1288 | endif |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1289 | conf.set10('ENABLE_EFI', have) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1290 | |
| 1291 | ##################################################################### |
| 1292 | |
| 1293 | config_h = configure_file( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1294 | output : 'config.h', |
| 1295 | configuration : conf) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1296 | |
| 1297 | includes = include_directories('src/basic', |
| 1298 | 'src/shared', |
| 1299 | 'src/systemd', |
| 1300 | 'src/journal', |
| 1301 | 'src/resolve', |
| 1302 | 'src/timesync', |
| 1303 | 'src/login', |
| 1304 | 'src/udev', |
| 1305 | 'src/libudev', |
| 1306 | 'src/core', |
| 1307 | 'src/libsystemd/sd-bus', |
| 1308 | 'src/libsystemd/sd-device', |
| 1309 | 'src/libsystemd/sd-hwdb', |
| 1310 | 'src/libsystemd/sd-id128', |
| 1311 | 'src/libsystemd/sd-netlink', |
| 1312 | 'src/libsystemd/sd-network', |
| 1313 | 'src/libsystemd-network', |
Zbigniew Jędrzejewski-Szmek | 2d4ceca | 2017-12-19 14:19:46 +0100 | [diff] [blame] | 1314 | '.') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1315 | |
| 1316 | add_project_arguments('-include', 'config.h', language : 'c') |
| 1317 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1318 | subdir('po') |
| 1319 | subdir('catalog') |
| 1320 | subdir('src/systemd') |
| 1321 | subdir('src/basic') |
| 1322 | subdir('src/libsystemd') |
| 1323 | subdir('src/libsystemd-network') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1324 | subdir('src/journal') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1325 | subdir('src/login') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1326 | |
| 1327 | libjournal_core = static_library( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1328 | 'journal-core', |
| 1329 | libjournal_core_sources, |
| 1330 | journald_gperf_c, |
| 1331 | include_directories : includes, |
| 1332 | install : false) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1333 | |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 1334 | libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1335 | libsystemd = shared_library( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1336 | 'systemd', |
Zbigniew Jędrzejewski-Szmek | 7f1ea2c | 2017-12-20 09:12:08 +0100 | [diff] [blame] | 1337 | 'src/systemd/sd-id128.h', # pick a header file at random to work around old meson bug |
Zbigniew Jędrzejewski-Szmek | 56d50ab | 2017-09-28 19:24:16 +0200 | [diff] [blame] | 1338 | version : libsystemd_version, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1339 | include_directories : includes, |
| 1340 | link_args : ['-shared', |
| 1341 | '-Wl,--version-script=' + libsystemd_sym_path], |
Zbigniew Jędrzejewski-Szmek | 34e221a | 2017-12-19 19:06:56 +0100 | [diff] [blame] | 1342 | link_with : [libbasic, |
| 1343 | libbasic_gcrypt], |
Zbigniew Jędrzejewski-Szmek | 5e3cec8 | 2017-12-19 19:38:43 +0100 | [diff] [blame] | 1344 | link_whole : [libsystemd_static, |
| 1345 | libjournal_client], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1346 | dependencies : [threads, |
| 1347 | librt, |
| 1348 | libxz, |
| 1349 | liblz4], |
| 1350 | link_depends : libsystemd_sym, |
| 1351 | install : true, |
| 1352 | install_dir : rootlibdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1353 | |
| 1354 | ############################################################ |
| 1355 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1356 | # binaries that have --help and are intended for use by humans, |
| 1357 | # usually, but not always, installed in /bin. |
| 1358 | public_programs = [] |
| 1359 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1360 | subdir('src/libudev') |
| 1361 | subdir('src/shared') |
| 1362 | subdir('src/core') |
| 1363 | subdir('src/udev') |
| 1364 | subdir('src/network') |
| 1365 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1366 | subdir('src/analyze') |
| 1367 | subdir('src/journal-remote') |
| 1368 | subdir('src/coredump') |
| 1369 | subdir('src/hostname') |
| 1370 | subdir('src/import') |
| 1371 | subdir('src/kernel-install') |
| 1372 | subdir('src/locale') |
| 1373 | subdir('src/machine') |
| 1374 | subdir('src/nspawn') |
| 1375 | subdir('src/resolve') |
| 1376 | subdir('src/timedate') |
| 1377 | subdir('src/timesync') |
| 1378 | subdir('src/vconsole') |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1379 | subdir('src/boot/efi') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1380 | |
| 1381 | subdir('src/test') |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 1382 | subdir('src/fuzz') |
Zbigniew Jędrzejewski-Szmek | 6b97bf2 | 2017-11-22 12:42:28 +0100 | [diff] [blame] | 1383 | subdir('rules') |
Zbigniew Jędrzejewski-Szmek | 4ff3f25 | 2017-04-13 20:47:20 -0400 | [diff] [blame] | 1384 | subdir('test') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1385 | |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1386 | ############################################################ |
| 1387 | |
| 1388 | # only static linking apart from libdl, to make sure that the |
| 1389 | # module is linked to all libraries that it uses. |
| 1390 | test_dlopen = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1391 | 'test-dlopen', |
| 1392 | test_dlopen_c, |
| 1393 | include_directories : includes, |
| 1394 | link_with : [libbasic], |
| 1395 | dependencies : [libdl]) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1396 | |
Zbigniew Jędrzejewski-Szmek | 08cf5b8 | 2017-10-03 12:23:55 +0200 | [diff] [blame] | 1397 | foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'], |
Waldemar Brodkorb | e7e11bb | 2017-06-24 19:30:26 +0200 | [diff] [blame] | 1398 | ['systemd', 'ENABLE_NSS_SYSTEMD'], |
Zbigniew Jędrzejewski-Szmek | 5486a31 | 2017-05-12 08:31:46 -0400 | [diff] [blame] | 1399 | ['mymachines', 'ENABLE_MACHINED'], |
Zbigniew Jędrzejewski-Szmek | 1ec57f3 | 2017-10-03 13:12:29 +0200 | [diff] [blame] | 1400 | ['resolve', 'ENABLE_RESOLVE']] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1401 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1402 | condition = tuple[1] == '' or conf.get(tuple[1]) == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1403 | if condition |
| 1404 | module = tuple[0] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1405 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1406 | sym = 'src/nss-@0@/nss-@0@.sym'.format(module) |
| 1407 | version_script_arg = join_paths(meson.current_source_dir(), sym) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1408 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1409 | nss = shared_library( |
| 1410 | 'nss_' + module, |
| 1411 | 'src/nss-@0@/nss-@0@.c'.format(module), |
| 1412 | version : '2', |
| 1413 | include_directories : includes, |
Lennart Poettering | b4b36f4 | 2017-12-12 20:13:16 +0100 | [diff] [blame] | 1414 | # Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned |
| 1415 | link_args : ['-Wl,-z,nodelete', |
| 1416 | '-shared', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1417 | '-Wl,--version-script=' + version_script_arg, |
| 1418 | '-Wl,--undefined'], |
Zbigniew Jędrzejewski-Szmek | 37e4d7a | 2017-12-19 11:35:01 +0100 | [diff] [blame] | 1419 | link_with : [libsystemd_static, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1420 | libbasic], |
| 1421 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 5486a31 | 2017-05-12 08:31:46 -0400 | [diff] [blame] | 1422 | librt], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1423 | link_depends : sym, |
| 1424 | install : true, |
| 1425 | install_dir : rootlibdir) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1426 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1427 | # We cannot use shared_module because it does not support version suffix. |
| 1428 | # Unfortunately shared_library insists on creating the symlink… |
| 1429 | meson.add_install_script('sh', '-c', |
| 1430 | 'rm $DESTDIR@0@/libnss_@1@.so' |
| 1431 | .format(rootlibdir, module)) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1432 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1433 | test('dlopen-nss_' + module, |
| 1434 | test_dlopen, |
| 1435 | args : [nss.full_path()]) # path to dlopen must include a slash |
| 1436 | endif |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1437 | endforeach |
| 1438 | |
| 1439 | ############################################################ |
| 1440 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1441 | executable('systemd', |
| 1442 | systemd_sources, |
| 1443 | include_directories : includes, |
| 1444 | link_with : [libcore, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1445 | libshared], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1446 | dependencies : [threads, |
| 1447 | librt, |
| 1448 | libseccomp, |
| 1449 | libselinux, |
Zbigniew Jędrzejewski-Szmek | f4ee10a | 2017-04-09 14:08:53 -0400 | [diff] [blame] | 1450 | libmount, |
| 1451 | libblkid], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1452 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1453 | install : true, |
| 1454 | install_dir : rootlibexecdir) |
| 1455 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1456 | exe = executable('systemd-analyze', |
| 1457 | systemd_analyze_sources, |
| 1458 | include_directories : includes, |
| 1459 | link_with : [libcore, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1460 | libshared], |
| 1461 | dependencies : [threads, |
| 1462 | librt, |
| 1463 | libseccomp, |
| 1464 | libselinux, |
| 1465 | libmount, |
| 1466 | libblkid], |
| 1467 | install_rpath : rootlibexecdir, |
| 1468 | install : true) |
| 1469 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1470 | |
| 1471 | executable('systemd-journald', |
| 1472 | systemd_journald_sources, |
| 1473 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1474 | link_with : [libjournal_core, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1475 | libshared], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1476 | dependencies : [threads, |
| 1477 | libxz, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1478 | liblz4, |
| 1479 | libselinux], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1480 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1481 | install : true, |
| 1482 | install_dir : rootlibexecdir) |
| 1483 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1484 | exe = executable('systemd-cat', |
| 1485 | systemd_cat_sources, |
| 1486 | include_directories : includes, |
| 1487 | link_with : [libjournal_core, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1488 | libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1489 | dependencies : [threads], |
| 1490 | install_rpath : rootlibexecdir, |
| 1491 | install : true) |
| 1492 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1493 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1494 | exe = executable('journalctl', |
| 1495 | journalctl_sources, |
| 1496 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1497 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1498 | dependencies : [threads, |
| 1499 | libqrencode, |
| 1500 | libxz, |
Zbigniew Jędrzejewski-Szmek | 6becf48 | 2018-01-12 07:55:45 +0100 | [diff] [blame] | 1501 | liblz4, |
| 1502 | libpcre2], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1503 | install_rpath : rootlibexecdir, |
| 1504 | install : true, |
| 1505 | install_dir : rootbindir) |
| 1506 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1507 | |
| 1508 | executable('systemd-getty-generator', |
| 1509 | 'src/getty-generator/getty-generator.c', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1510 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1511 | link_with : [libshared], |
| 1512 | install_rpath : rootlibexecdir, |
| 1513 | install : true, |
| 1514 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1515 | |
| 1516 | executable('systemd-debug-generator', |
| 1517 | 'src/debug-generator/debug-generator.c', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1518 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1519 | link_with : [libshared], |
| 1520 | install_rpath : rootlibexecdir, |
| 1521 | install : true, |
| 1522 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1523 | |
| 1524 | executable('systemd-fstab-generator', |
| 1525 | 'src/fstab-generator/fstab-generator.c', |
| 1526 | 'src/core/mount-setup.c', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1527 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1528 | link_with : [libshared], |
| 1529 | install_rpath : rootlibexecdir, |
| 1530 | install : true, |
| 1531 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1532 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1533 | if conf.get('ENABLE_ENVIRONMENT_D') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1534 | executable('30-systemd-environment-d-generator', |
| 1535 | 'src/environment-d-generator/environment-d-generator.c', |
| 1536 | include_directories : includes, |
| 1537 | link_with : [libshared], |
| 1538 | install_rpath : rootlibexecdir, |
| 1539 | install : true, |
| 1540 | install_dir : userenvgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 1541 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1542 | meson.add_install_script(meson_make_symlink, |
| 1543 | join_paths(sysconfdir, 'environment'), |
| 1544 | join_paths(environmentdir, '99-environment.conf')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1545 | endif |
| 1546 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1547 | if conf.get('ENABLE_HIBERNATE') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1548 | executable('systemd-hibernate-resume-generator', |
| 1549 | 'src/hibernate-resume/hibernate-resume-generator.c', |
| 1550 | include_directories : includes, |
| 1551 | link_with : [libshared], |
| 1552 | install_rpath : rootlibexecdir, |
| 1553 | install : true, |
| 1554 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1555 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1556 | executable('systemd-hibernate-resume', |
| 1557 | 'src/hibernate-resume/hibernate-resume.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1558 | include_directories : includes, |
| 1559 | link_with : [libshared], |
| 1560 | install_rpath : rootlibexecdir, |
| 1561 | install : true, |
| 1562 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1563 | endif |
| 1564 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1565 | if conf.get('HAVE_BLKID') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1566 | executable('systemd-gpt-auto-generator', |
| 1567 | 'src/gpt-auto-generator/gpt-auto-generator.c', |
| 1568 | 'src/basic/blkid-util.h', |
| 1569 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1570 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1571 | dependencies : libblkid, |
| 1572 | install_rpath : rootlibexecdir, |
| 1573 | install : true, |
| 1574 | install_dir : systemgeneratordir) |
| 1575 | |
| 1576 | exe = executable('systemd-dissect', |
| 1577 | 'src/dissect/dissect.c', |
| 1578 | include_directories : includes, |
| 1579 | link_with : [libshared], |
| 1580 | install_rpath : rootlibexecdir, |
| 1581 | install : true, |
| 1582 | install_dir : rootlibexecdir) |
| 1583 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1584 | endif |
| 1585 | |
Zbigniew Jędrzejewski-Szmek | 1ec57f3 | 2017-10-03 13:12:29 +0200 | [diff] [blame] | 1586 | if conf.get('ENABLE_RESOLVE') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1587 | executable('systemd-resolved', |
| 1588 | systemd_resolved_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1589 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 34e221a | 2017-12-19 19:06:56 +0100 | [diff] [blame] | 1590 | link_with : [libshared, |
Zbigniew Jędrzejewski-Szmek | 568a4ff | 2017-12-19 22:46:01 +0100 | [diff] [blame] | 1591 | libbasic_gcrypt, |
| 1592 | libsystemd_resolve_core], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1593 | dependencies : [threads, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1594 | libgpg_error, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1595 | libm, |
| 1596 | libidn], |
| 1597 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1598 | install : true, |
| 1599 | install_dir : rootlibexecdir) |
| 1600 | |
| 1601 | exe = executable('systemd-resolve', |
| 1602 | systemd_resolve_sources, |
| 1603 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 34e221a | 2017-12-19 19:06:56 +0100 | [diff] [blame] | 1604 | link_with : [libshared, |
Zbigniew Jędrzejewski-Szmek | 568a4ff | 2017-12-19 22:46:01 +0100 | [diff] [blame] | 1605 | libbasic_gcrypt, |
| 1606 | libsystemd_resolve_core], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1607 | dependencies : [threads, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1608 | libgpg_error, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1609 | libm, |
| 1610 | libidn], |
| 1611 | install_rpath : rootlibexecdir, |
| 1612 | install : true) |
| 1613 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1614 | endif |
| 1615 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1616 | if conf.get('ENABLE_LOGIND') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1617 | executable('systemd-logind', |
| 1618 | systemd_logind_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1619 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1620 | link_with : [liblogind_core, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1621 | libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1622 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1623 | libacl], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1624 | install_rpath : rootlibexecdir, |
| 1625 | install : true, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1626 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1627 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1628 | exe = executable('loginctl', |
| 1629 | loginctl_sources, |
| 1630 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1631 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1632 | dependencies : [threads, |
| 1633 | liblz4, |
| 1634 | libxz], |
| 1635 | install_rpath : rootlibexecdir, |
| 1636 | install : true, |
| 1637 | install_dir : rootbindir) |
| 1638 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1639 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1640 | exe = executable('systemd-inhibit', |
| 1641 | 'src/login/inhibit.c', |
| 1642 | include_directories : includes, |
| 1643 | link_with : [libshared], |
| 1644 | install_rpath : rootlibexecdir, |
| 1645 | install : true, |
| 1646 | install_dir : rootbindir) |
| 1647 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1648 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1649 | if conf.get('HAVE_PAM') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1650 | version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym) |
| 1651 | pam_systemd = shared_library( |
| 1652 | 'pam_systemd', |
| 1653 | pam_systemd_c, |
| 1654 | name_prefix : '', |
| 1655 | include_directories : includes, |
| 1656 | link_args : ['-shared', |
| 1657 | '-Wl,--version-script=' + version_script_arg], |
Zbigniew Jędrzejewski-Szmek | 37e4d7a | 2017-12-19 11:35:01 +0100 | [diff] [blame] | 1658 | link_with : [libsystemd_static, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1659 | libshared_static], |
| 1660 | dependencies : [threads, |
| 1661 | libpam, |
| 1662 | libpam_misc], |
| 1663 | link_depends : pam_systemd_sym, |
| 1664 | install : true, |
| 1665 | install_dir : pamlibdir) |
| 1666 | |
| 1667 | test('dlopen-pam_systemd', |
| 1668 | test_dlopen, |
| 1669 | args : [pam_systemd.full_path()]) # path to dlopen must include a slash |
| 1670 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1671 | endif |
| 1672 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1673 | if conf.get('HAVE_PAM') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1674 | executable('systemd-user-sessions', |
| 1675 | 'src/user-sessions/user-sessions.c', |
| 1676 | include_directories : includes, |
| 1677 | link_with : [libshared], |
| 1678 | install_rpath : rootlibexecdir, |
| 1679 | install : true, |
| 1680 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1681 | endif |
| 1682 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1683 | 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] | 1684 | exe = executable('bootctl', |
| 1685 | 'src/boot/bootctl.c', |
| 1686 | include_directories : includes, |
| 1687 | link_with : [libshared], |
| 1688 | dependencies : [libblkid], |
| 1689 | install_rpath : rootlibexecdir, |
| 1690 | install : true) |
| 1691 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1692 | endif |
| 1693 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1694 | exe = executable('systemd-socket-activate', 'src/activate/activate.c', |
| 1695 | include_directories : includes, |
| 1696 | link_with : [libshared], |
| 1697 | dependencies : [threads], |
| 1698 | install_rpath : rootlibexecdir, |
| 1699 | install : true) |
| 1700 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1701 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1702 | exe = executable('systemctl', 'src/systemctl/systemctl.c', |
| 1703 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1704 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1705 | dependencies : [threads, |
| 1706 | libcap, |
| 1707 | libselinux, |
| 1708 | libxz, |
| 1709 | liblz4], |
| 1710 | install_rpath : rootlibexecdir, |
| 1711 | install : true, |
| 1712 | install_dir : rootbindir) |
| 1713 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1714 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1715 | if conf.get('ENABLE_BACKLIGHT') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1716 | executable('systemd-backlight', |
| 1717 | 'src/backlight/backlight.c', |
| 1718 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1719 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1720 | install_rpath : rootlibexecdir, |
| 1721 | install : true, |
| 1722 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1723 | endif |
| 1724 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1725 | if conf.get('ENABLE_RFKILL') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1726 | executable('systemd-rfkill', |
| 1727 | 'src/rfkill/rfkill.c', |
| 1728 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1729 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1730 | install_rpath : rootlibexecdir, |
| 1731 | install : true, |
| 1732 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1733 | endif |
| 1734 | |
| 1735 | executable('systemd-system-update-generator', |
| 1736 | 'src/system-update-generator/system-update-generator.c', |
| 1737 | include_directories : includes, |
| 1738 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1739 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1740 | install : true, |
| 1741 | install_dir : systemgeneratordir) |
| 1742 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1743 | if conf.get('HAVE_LIBCRYPTSETUP') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1744 | executable('systemd-cryptsetup', |
| 1745 | 'src/cryptsetup/cryptsetup.c', |
| 1746 | include_directories : includes, |
| 1747 | link_with : [libshared], |
| 1748 | dependencies : [libcryptsetup], |
| 1749 | install_rpath : rootlibexecdir, |
| 1750 | install : true, |
| 1751 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1752 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1753 | executable('systemd-cryptsetup-generator', |
| 1754 | 'src/cryptsetup/cryptsetup-generator.c', |
| 1755 | include_directories : includes, |
| 1756 | link_with : [libshared], |
| 1757 | dependencies : [libcryptsetup], |
| 1758 | install_rpath : rootlibexecdir, |
| 1759 | install : true, |
| 1760 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1761 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1762 | executable('systemd-veritysetup', |
| 1763 | 'src/veritysetup/veritysetup.c', |
| 1764 | include_directories : includes, |
| 1765 | link_with : [libshared], |
| 1766 | dependencies : [libcryptsetup], |
| 1767 | install_rpath : rootlibexecdir, |
| 1768 | install : true, |
| 1769 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1770 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1771 | executable('systemd-veritysetup-generator', |
| 1772 | 'src/veritysetup/veritysetup-generator.c', |
| 1773 | include_directories : includes, |
| 1774 | link_with : [libshared], |
| 1775 | dependencies : [libcryptsetup], |
| 1776 | install_rpath : rootlibexecdir, |
| 1777 | install : true, |
| 1778 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1779 | endif |
| 1780 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1781 | if conf.get('HAVE_SYSV_COMPAT') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1782 | executable('systemd-sysv-generator', |
| 1783 | 'src/sysv-generator/sysv-generator.c', |
| 1784 | include_directories : includes, |
| 1785 | link_with : [libshared], |
| 1786 | install_rpath : rootlibexecdir, |
| 1787 | install : true, |
| 1788 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1789 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1790 | executable('systemd-rc-local-generator', |
| 1791 | 'src/rc-local-generator/rc-local-generator.c', |
| 1792 | include_directories : includes, |
| 1793 | link_with : [libshared], |
| 1794 | install_rpath : rootlibexecdir, |
| 1795 | install : true, |
| 1796 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1797 | endif |
| 1798 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1799 | if conf.get('ENABLE_HOSTNAMED') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1800 | executable('systemd-hostnamed', |
| 1801 | 'src/hostname/hostnamed.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1802 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1803 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1804 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1805 | install : true, |
| 1806 | install_dir : rootlibexecdir) |
| 1807 | |
| 1808 | exe = executable('hostnamectl', |
| 1809 | 'src/hostname/hostnamectl.c', |
| 1810 | include_directories : includes, |
| 1811 | link_with : [libshared], |
| 1812 | install_rpath : rootlibexecdir, |
| 1813 | install : true) |
| 1814 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1815 | endif |
| 1816 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1817 | if conf.get('ENABLE_LOCALED') == 1 |
| 1818 | if conf.get('HAVE_XKBCOMMON') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1819 | # logind will load libxkbcommon.so dynamically on its own |
| 1820 | deps = [libdl] |
| 1821 | else |
| 1822 | deps = [] |
| 1823 | endif |
Zbigniew Jędrzejewski-Szmek | 1eeb43f | 2017-04-13 19:37:14 -0400 | [diff] [blame] | 1824 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1825 | executable('systemd-localed', |
| 1826 | systemd_localed_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1827 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1828 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1829 | dependencies : deps, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1830 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1831 | install : true, |
| 1832 | install_dir : rootlibexecdir) |
| 1833 | |
| 1834 | exe = executable('localectl', |
| 1835 | localectl_sources, |
| 1836 | include_directories : includes, |
| 1837 | link_with : [libshared], |
| 1838 | install_rpath : rootlibexecdir, |
| 1839 | install : true) |
| 1840 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1841 | endif |
| 1842 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1843 | if conf.get('ENABLE_TIMEDATED') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1844 | executable('systemd-timedated', |
| 1845 | 'src/timedate/timedated.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1846 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1847 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1848 | install_rpath : rootlibexecdir, |
| 1849 | install : true, |
| 1850 | install_dir : rootlibexecdir) |
| 1851 | |
| 1852 | exe = executable('timedatectl', |
| 1853 | 'src/timedate/timedatectl.c', |
| 1854 | include_directories : includes, |
| 1855 | install_rpath : rootlibexecdir, |
| 1856 | link_with : [libshared], |
| 1857 | install : true) |
| 1858 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1859 | endif |
| 1860 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1861 | if conf.get('ENABLE_TIMESYNCD') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1862 | executable('systemd-timesyncd', |
| 1863 | systemd_timesyncd_sources, |
| 1864 | include_directories : includes, |
| 1865 | link_with : [libshared], |
| 1866 | dependencies : [threads, |
| 1867 | libm], |
| 1868 | install_rpath : rootlibexecdir, |
| 1869 | install : true, |
| 1870 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1871 | endif |
| 1872 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1873 | if conf.get('ENABLE_MACHINED') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1874 | executable('systemd-machined', |
| 1875 | systemd_machined_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1876 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1877 | link_with : [libmachine_core, |
| 1878 | libshared], |
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) |
| 1882 | |
| 1883 | exe = executable('machinectl', |
| 1884 | 'src/machine/machinectl.c', |
| 1885 | include_directories : includes, |
| 1886 | link_with : [libshared], |
| 1887 | dependencies : [threads, |
| 1888 | libxz, |
| 1889 | liblz4], |
| 1890 | install_rpath : rootlibexecdir, |
| 1891 | install : true, |
| 1892 | install_dir : rootbindir) |
| 1893 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1894 | endif |
| 1895 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1896 | if conf.get('ENABLE_IMPORTD') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1897 | executable('systemd-importd', |
| 1898 | systemd_importd_sources, |
| 1899 | include_directories : includes, |
| 1900 | link_with : [libshared], |
| 1901 | dependencies : [threads], |
| 1902 | install_rpath : rootlibexecdir, |
| 1903 | install : true, |
| 1904 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1905 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1906 | systemd_pull = executable('systemd-pull', |
| 1907 | systemd_pull_sources, |
| 1908 | include_directories : includes, |
| 1909 | link_with : [libshared], |
| 1910 | dependencies : [libcurl, |
| 1911 | libz, |
| 1912 | libbzip2, |
| 1913 | libxz, |
| 1914 | libgcrypt], |
| 1915 | install_rpath : rootlibexecdir, |
| 1916 | install : true, |
| 1917 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1918 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1919 | systemd_import = executable('systemd-import', |
| 1920 | systemd_import_sources, |
| 1921 | include_directories : includes, |
| 1922 | link_with : [libshared], |
| 1923 | dependencies : [libcurl, |
| 1924 | libz, |
| 1925 | libbzip2, |
| 1926 | libxz], |
| 1927 | install_rpath : rootlibexecdir, |
| 1928 | install : true, |
| 1929 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1930 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1931 | systemd_export = executable('systemd-export', |
| 1932 | systemd_export_sources, |
| 1933 | include_directories : includes, |
| 1934 | link_with : [libshared], |
| 1935 | dependencies : [libcurl, |
| 1936 | libz, |
| 1937 | libbzip2, |
| 1938 | libxz], |
| 1939 | install_rpath : rootlibexecdir, |
| 1940 | install : true, |
| 1941 | install_dir : rootlibexecdir) |
| 1942 | public_programs += [systemd_pull, systemd_import, systemd_export] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1943 | endif |
| 1944 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1945 | 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] | 1946 | exe = executable('systemd-journal-upload', |
| 1947 | systemd_journal_upload_sources, |
| 1948 | include_directories : includes, |
| 1949 | link_with : [libshared], |
| 1950 | dependencies : [threads, |
| 1951 | libcurl, |
| 1952 | libgnutls, |
| 1953 | libxz, |
| 1954 | liblz4], |
| 1955 | install_rpath : rootlibexecdir, |
| 1956 | install : true, |
| 1957 | install_dir : rootlibexecdir) |
| 1958 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1959 | endif |
| 1960 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1961 | 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] | 1962 | s_j_remote = executable('systemd-journal-remote', |
| 1963 | systemd_journal_remote_sources, |
| 1964 | include_directories : includes, |
| 1965 | link_with : [libshared], |
| 1966 | dependencies : [threads, |
| 1967 | libmicrohttpd, |
| 1968 | libgnutls, |
| 1969 | libxz, |
| 1970 | liblz4], |
| 1971 | install_rpath : rootlibexecdir, |
| 1972 | install : true, |
| 1973 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1974 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1975 | s_j_gatewayd = executable('systemd-journal-gatewayd', |
| 1976 | systemd_journal_gatewayd_sources, |
| 1977 | include_directories : includes, |
| 1978 | link_with : [libshared], |
| 1979 | dependencies : [threads, |
| 1980 | libmicrohttpd, |
| 1981 | libgnutls, |
| 1982 | libxz, |
| 1983 | liblz4], |
| 1984 | install_rpath : rootlibexecdir, |
| 1985 | install : true, |
| 1986 | install_dir : rootlibexecdir) |
| 1987 | public_programs += [s_j_remote, s_j_gatewayd] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1988 | endif |
| 1989 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 1990 | if conf.get('ENABLE_COREDUMP') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1991 | executable('systemd-coredump', |
| 1992 | systemd_coredump_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1993 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1994 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1995 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1996 | libacl, |
| 1997 | libdw, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1998 | libxz, |
| 1999 | liblz4], |
| 2000 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2001 | install : true, |
| 2002 | install_dir : rootlibexecdir) |
| 2003 | |
| 2004 | exe = executable('coredumpctl', |
| 2005 | coredumpctl_sources, |
| 2006 | include_directories : includes, |
| 2007 | link_with : [libshared], |
| 2008 | dependencies : [threads, |
| 2009 | libxz, |
| 2010 | liblz4], |
| 2011 | install_rpath : rootlibexecdir, |
| 2012 | install : true) |
| 2013 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2014 | endif |
| 2015 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2016 | if conf.get('ENABLE_BINFMT') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2017 | exe = executable('systemd-binfmt', |
| 2018 | 'src/binfmt/binfmt.c', |
| 2019 | include_directories : includes, |
| 2020 | link_with : [libshared], |
| 2021 | install_rpath : rootlibexecdir, |
| 2022 | install : true, |
| 2023 | install_dir : rootlibexecdir) |
| 2024 | public_programs += [exe] |
| 2025 | |
| 2026 | meson.add_install_script('sh', '-c', |
| 2027 | mkdir_p.format(binfmtdir)) |
| 2028 | meson.add_install_script('sh', '-c', |
| 2029 | mkdir_p.format(join_paths(sysconfdir, 'binfmt.d'))) |
| 2030 | endif |
| 2031 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2032 | if conf.get('ENABLE_VCONSOLE') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2033 | executable('systemd-vconsole-setup', |
| 2034 | 'src/vconsole/vconsole-setup.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2035 | include_directories : includes, |
| 2036 | link_with : [libshared], |
| 2037 | install_rpath : rootlibexecdir, |
| 2038 | install : true, |
| 2039 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2040 | endif |
| 2041 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2042 | if conf.get('ENABLE_RANDOMSEED') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2043 | executable('systemd-random-seed', |
| 2044 | 'src/random-seed/random-seed.c', |
| 2045 | include_directories : includes, |
| 2046 | link_with : [libshared], |
| 2047 | install_rpath : rootlibexecdir, |
| 2048 | install : true, |
| 2049 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2050 | endif |
| 2051 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2052 | if conf.get('ENABLE_FIRSTBOOT') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2053 | executable('systemd-firstboot', |
| 2054 | 'src/firstboot/firstboot.c', |
| 2055 | include_directories : includes, |
| 2056 | link_with : [libshared], |
| 2057 | dependencies : [libcrypt], |
| 2058 | install_rpath : rootlibexecdir, |
| 2059 | install : true, |
| 2060 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2061 | endif |
| 2062 | |
| 2063 | executable('systemd-remount-fs', |
| 2064 | 'src/remount-fs/remount-fs.c', |
| 2065 | 'src/core/mount-setup.c', |
| 2066 | 'src/core/mount-setup.h', |
| 2067 | include_directories : includes, |
| 2068 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 2069 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2070 | install : true, |
| 2071 | install_dir : rootlibexecdir) |
| 2072 | |
| 2073 | executable('systemd-machine-id-setup', |
| 2074 | 'src/machine-id-setup/machine-id-setup-main.c', |
| 2075 | 'src/core/machine-id-setup.c', |
| 2076 | 'src/core/machine-id-setup.h', |
| 2077 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2078 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 2079 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2080 | install : true, |
| 2081 | install_dir : rootbindir) |
| 2082 | |
| 2083 | executable('systemd-fsck', |
| 2084 | 'src/fsck/fsck.c', |
| 2085 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2086 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2087 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2088 | install : true, |
| 2089 | install_dir : rootlibexecdir) |
| 2090 | |
Zbigniew Jędrzejewski-Szmek | 80750ad | 2017-10-23 13:40:38 +0200 | [diff] [blame] | 2091 | executable('systemd-growfs', |
| 2092 | 'src/partition/growfs.c', |
| 2093 | include_directories : includes, |
| 2094 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | c34b75a | 2017-11-21 18:56:52 +0100 | [diff] [blame] | 2095 | dependencies : [libcryptsetup], |
Zbigniew Jędrzejewski-Szmek | 80750ad | 2017-10-23 13:40:38 +0200 | [diff] [blame] | 2096 | install_rpath : rootlibexecdir, |
| 2097 | install : true, |
| 2098 | install_dir : rootlibexecdir) |
| 2099 | |
Zbigniew Jędrzejewski-Szmek | b7f28ac | 2017-11-26 22:51:29 +0100 | [diff] [blame] | 2100 | executable('systemd-makefs', |
| 2101 | 'src/partition/makefs.c', |
| 2102 | include_directories : includes, |
| 2103 | link_with : [libshared], |
| 2104 | install_rpath : rootlibexecdir, |
| 2105 | install : true, |
| 2106 | install_dir : rootlibexecdir) |
| 2107 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2108 | executable('systemd-sleep', |
| 2109 | 'src/sleep/sleep.c', |
| 2110 | include_directories : includes, |
| 2111 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2112 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2113 | install : true, |
| 2114 | install_dir : rootlibexecdir) |
| 2115 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2116 | exe = executable('systemd-sysctl', |
| 2117 | 'src/sysctl/sysctl.c', |
| 2118 | include_directories : includes, |
| 2119 | link_with : [libshared], |
| 2120 | install_rpath : rootlibexecdir, |
| 2121 | install : true, |
| 2122 | install_dir : rootlibexecdir) |
| 2123 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2124 | |
| 2125 | executable('systemd-ac-power', |
| 2126 | 'src/ac-power/ac-power.c', |
| 2127 | include_directories : includes, |
| 2128 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2129 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2130 | install : true, |
| 2131 | install_dir : rootlibexecdir) |
| 2132 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2133 | exe = executable('systemd-detect-virt', |
| 2134 | 'src/detect-virt/detect-virt.c', |
| 2135 | include_directories : includes, |
| 2136 | link_with : [libshared], |
| 2137 | install_rpath : rootlibexecdir, |
| 2138 | install : true) |
| 2139 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2140 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2141 | exe = executable('systemd-delta', |
| 2142 | 'src/delta/delta.c', |
| 2143 | include_directories : includes, |
| 2144 | link_with : [libshared], |
| 2145 | install_rpath : rootlibexecdir, |
| 2146 | install : true) |
| 2147 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2148 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2149 | exe = executable('systemd-escape', |
| 2150 | 'src/escape/escape.c', |
| 2151 | include_directories : includes, |
| 2152 | link_with : [libshared], |
| 2153 | install_rpath : rootlibexecdir, |
| 2154 | install : true, |
| 2155 | install_dir : rootbindir) |
| 2156 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2157 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2158 | exe = executable('systemd-notify', |
| 2159 | 'src/notify/notify.c', |
| 2160 | include_directories : includes, |
| 2161 | link_with : [libshared], |
| 2162 | install_rpath : rootlibexecdir, |
| 2163 | install : true, |
| 2164 | install_dir : rootbindir) |
| 2165 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2166 | |
| 2167 | executable('systemd-volatile-root', |
| 2168 | 'src/volatile-root/volatile-root.c', |
| 2169 | include_directories : includes, |
| 2170 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2171 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2172 | install : true, |
| 2173 | install_dir : rootlibexecdir) |
| 2174 | |
| 2175 | executable('systemd-cgroups-agent', |
| 2176 | 'src/cgroups-agent/cgroups-agent.c', |
| 2177 | include_directories : includes, |
| 2178 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2179 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2180 | install : true, |
| 2181 | install_dir : rootlibexecdir) |
| 2182 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2183 | exe = executable('systemd-path', |
| 2184 | 'src/path/path.c', |
| 2185 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2186 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2187 | install_rpath : rootlibexecdir, |
| 2188 | install : true) |
| 2189 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2190 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2191 | exe = executable('systemd-ask-password', |
| 2192 | 'src/ask-password/ask-password.c', |
| 2193 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2194 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2195 | install_rpath : rootlibexecdir, |
| 2196 | install : true, |
| 2197 | install_dir : rootbindir) |
| 2198 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2199 | |
| 2200 | executable('systemd-reply-password', |
| 2201 | 'src/reply-password/reply-password.c', |
| 2202 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2203 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2204 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2205 | install : true, |
| 2206 | install_dir : rootlibexecdir) |
| 2207 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2208 | exe = executable('systemd-tty-ask-password-agent', |
| 2209 | 'src/tty-ask-password-agent/tty-ask-password-agent.c', |
| 2210 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2211 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2212 | install_rpath : rootlibexecdir, |
| 2213 | install : true, |
| 2214 | install_dir : rootbindir) |
| 2215 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2216 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2217 | exe = executable('systemd-cgls', |
| 2218 | 'src/cgls/cgls.c', |
| 2219 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2220 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2221 | install_rpath : rootlibexecdir, |
| 2222 | install : true) |
| 2223 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2224 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2225 | exe = executable('systemd-cgtop', |
| 2226 | 'src/cgtop/cgtop.c', |
| 2227 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2228 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2229 | install_rpath : rootlibexecdir, |
| 2230 | install : true) |
| 2231 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2232 | |
| 2233 | executable('systemd-initctl', |
| 2234 | 'src/initctl/initctl.c', |
| 2235 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2236 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2237 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2238 | install : true, |
| 2239 | install_dir : rootlibexecdir) |
| 2240 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2241 | exe = executable('systemd-mount', |
| 2242 | 'src/mount/mount-tool.c', |
| 2243 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 2244 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2245 | install_rpath : rootlibexecdir, |
| 2246 | install : true) |
| 2247 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2248 | |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 2249 | meson.add_install_script(meson_make_symlink, |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 2250 | 'systemd-mount', join_paths(bindir, 'systemd-umount')) |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 2251 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2252 | exe = executable('systemd-run', |
| 2253 | 'src/run/run.c', |
| 2254 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2255 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2256 | install_rpath : rootlibexecdir, |
| 2257 | install : true) |
| 2258 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2259 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2260 | exe = executable('systemd-stdio-bridge', |
| 2261 | 'src/stdio-bridge/stdio-bridge.c', |
| 2262 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2263 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2264 | install_rpath : rootlibexecdir, |
| 2265 | install : true) |
| 2266 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2267 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2268 | exe = executable('busctl', |
| 2269 | 'src/busctl/busctl.c', |
| 2270 | 'src/busctl/busctl-introspect.c', |
| 2271 | 'src/busctl/busctl-introspect.h', |
| 2272 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2273 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2274 | install_rpath : rootlibexecdir, |
| 2275 | install : true) |
| 2276 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2277 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2278 | if conf.get('ENABLE_SYSUSERS') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2279 | exe = executable('systemd-sysusers', |
| 2280 | 'src/sysusers/sysusers.c', |
| 2281 | include_directories : includes, |
| 2282 | link_with : [libshared], |
| 2283 | install_rpath : rootlibexecdir, |
| 2284 | install : true, |
| 2285 | install_dir : rootbindir) |
| 2286 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2287 | endif |
| 2288 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2289 | if conf.get('ENABLE_TMPFILES') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2290 | exe = executable('systemd-tmpfiles', |
| 2291 | 'src/tmpfiles/tmpfiles.c', |
| 2292 | include_directories : includes, |
| 2293 | link_with : [libshared], |
| 2294 | dependencies : [libacl], |
| 2295 | install_rpath : rootlibexecdir, |
| 2296 | install : true, |
| 2297 | install_dir : rootbindir) |
| 2298 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | d9daae5 | 2017-11-22 14:13:32 +0100 | [diff] [blame] | 2299 | |
| 2300 | test('test-systemd-tmpfiles', |
| 2301 | test_systemd_tmpfiles_py, |
| 2302 | args : exe.full_path()) |
| 2303 | # https://github.com/mesonbuild/meson/issues/2681 |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2304 | endif |
| 2305 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2306 | if conf.get('ENABLE_HWDB') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2307 | exe = executable('systemd-hwdb', |
| 2308 | 'src/hwdb/hwdb.c', |
| 2309 | 'src/libsystemd/sd-hwdb/hwdb-internal.h', |
| 2310 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 0c06b50 | 2017-12-19 20:54:46 +0100 | [diff] [blame] | 2311 | link_with : [libudev_static], |
Michael Biebl | 0da6f39 | 2017-04-21 18:32:14 +0200 | [diff] [blame] | 2312 | install_rpath : udev_rpath, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2313 | install : true, |
| 2314 | install_dir : rootbindir) |
| 2315 | public_programs += [exe] |
| 2316 | endif |
| 2317 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2318 | if conf.get('ENABLE_QUOTACHECK') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2319 | executable('systemd-quotacheck', |
| 2320 | 'src/quotacheck/quotacheck.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2321 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2322 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2323 | install_rpath : rootlibexecdir, |
| 2324 | install : true, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2325 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2326 | endif |
| 2327 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2328 | exe = executable('systemd-socket-proxyd', |
| 2329 | 'src/socket-proxy/socket-proxyd.c', |
| 2330 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2331 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2332 | dependencies : [threads], |
| 2333 | install_rpath : rootlibexecdir, |
| 2334 | install : true, |
| 2335 | install_dir : rootlibexecdir) |
| 2336 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2337 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2338 | exe = executable('systemd-udevd', |
| 2339 | systemd_udevd_sources, |
| 2340 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 5c72049 | 2017-02-22 23:13:22 -0500 | [diff] [blame] | 2341 | c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2342 | link_with : [libudev_core, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2343 | libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | 0c06b50 | 2017-12-19 20:54:46 +0100 | [diff] [blame] | 2344 | libudev_static], |
Zbigniew Jędrzejewski-Szmek | 3a30f21 | 2017-04-17 12:07:12 -0400 | [diff] [blame] | 2345 | dependencies : [threads, |
| 2346 | libkmod, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2347 | libidn, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2348 | libacl, |
| 2349 | libblkid], |
Zbigniew Jędrzejewski-Szmek | 1aec3ed | 2017-04-17 19:33:10 -0400 | [diff] [blame] | 2350 | install_rpath : udev_rpath, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2351 | install : true, |
| 2352 | install_dir : rootlibexecdir) |
| 2353 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2354 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2355 | exe = executable('udevadm', |
| 2356 | udevadm_sources, |
Franck Bui | 6671e81 | 2017-12-16 09:36:36 +0100 | [diff] [blame] | 2357 | c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2358 | include_directories : includes, |
| 2359 | link_with : [libudev_core, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2360 | libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | 0c06b50 | 2017-12-19 20:54:46 +0100 | [diff] [blame] | 2361 | libudev_static], |
Zbigniew Jędrzejewski-Szmek | 3a30f21 | 2017-04-17 12:07:12 -0400 | [diff] [blame] | 2362 | dependencies : [threads, |
| 2363 | libkmod, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2364 | libidn, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2365 | libacl, |
| 2366 | libblkid], |
Zbigniew Jędrzejewski-Szmek | 1aec3ed | 2017-04-17 19:33:10 -0400 | [diff] [blame] | 2367 | install_rpath : udev_rpath, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2368 | install : true, |
| 2369 | install_dir : rootbindir) |
| 2370 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2371 | |
| 2372 | executable('systemd-shutdown', |
| 2373 | systemd_shutdown_sources, |
| 2374 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 2375 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2376 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2377 | install : true, |
| 2378 | install_dir : rootlibexecdir) |
| 2379 | |
| 2380 | executable('systemd-update-done', |
| 2381 | 'src/update-done/update-done.c', |
| 2382 | include_directories : includes, |
| 2383 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2384 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2385 | install : true, |
| 2386 | install_dir : rootlibexecdir) |
| 2387 | |
| 2388 | executable('systemd-update-utmp', |
| 2389 | 'src/update-utmp/update-utmp.c', |
| 2390 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2391 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2392 | dependencies : [libaudit], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2393 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2394 | install : true, |
| 2395 | install_dir : rootlibexecdir) |
| 2396 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2397 | if conf.get('HAVE_KMOD') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2398 | executable('systemd-modules-load', |
| 2399 | 'src/modules-load/modules-load.c', |
| 2400 | include_directories : includes, |
| 2401 | link_with : [libshared], |
| 2402 | dependencies : [libkmod], |
| 2403 | install_rpath : rootlibexecdir, |
| 2404 | install : true, |
| 2405 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 2406 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2407 | meson.add_install_script('sh', '-c', |
| 2408 | mkdir_p.format(modulesloaddir)) |
| 2409 | meson.add_install_script('sh', '-c', |
| 2410 | mkdir_p.format(join_paths(sysconfdir, 'modules-load.d'))) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2411 | endif |
| 2412 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2413 | exe = executable('systemd-nspawn', |
| 2414 | systemd_nspawn_sources, |
| 2415 | 'src/core/mount-setup.c', # FIXME: use a variable? |
| 2416 | 'src/core/mount-setup.h', |
| 2417 | 'src/core/loopback-setup.c', |
| 2418 | 'src/core/loopback-setup.h', |
| 2419 | include_directories : [includes, include_directories('src/nspawn')], |
Zbigniew Jędrzejewski-Szmek | 0bc9115 | 2017-04-27 13:39:54 -0400 | [diff] [blame] | 2420 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2421 | dependencies : [libacl, |
| 2422 | libblkid, |
| 2423 | libseccomp, |
| 2424 | libselinux], |
| 2425 | install_rpath : rootlibexecdir, |
| 2426 | install : true) |
| 2427 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2428 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2429 | if conf.get('ENABLE_NETWORKD') == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2430 | executable('systemd-networkd', |
| 2431 | systemd_networkd_sources, |
| 2432 | include_directories : includes, |
| 2433 | link_with : [libnetworkd_core, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2434 | libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | 0c06b50 | 2017-12-19 20:54:46 +0100 | [diff] [blame] | 2435 | libudev_static, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2436 | libshared], |
Zbigniew Jędrzejewski-Szmek | 4b57a27 | 2017-06-21 06:05:15 -0400 | [diff] [blame] | 2437 | dependencies : [threads], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2438 | install_rpath : rootlibexecdir, |
| 2439 | install : true, |
| 2440 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2441 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2442 | executable('systemd-networkd-wait-online', |
| 2443 | systemd_networkd_wait_online_sources, |
| 2444 | include_directories : includes, |
| 2445 | link_with : [libnetworkd_core, |
| 2446 | libshared], |
| 2447 | install_rpath : rootlibexecdir, |
| 2448 | install : true, |
| 2449 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2450 | |
Felipe Sateler | dcfe072 | 2017-08-21 09:48:41 -0300 | [diff] [blame] | 2451 | exe = executable('networkctl', |
| 2452 | networkctl_sources, |
| 2453 | include_directories : includes, |
| 2454 | link_with : [libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2455 | libshared], |
Felipe Sateler | dcfe072 | 2017-08-21 09:48:41 -0300 | [diff] [blame] | 2456 | install_rpath : rootlibexecdir, |
| 2457 | install : true, |
| 2458 | install_dir : rootbindir) |
| 2459 | public_programs += [exe] |
| 2460 | endif |
Zbigniew Jędrzejewski-Szmek | e821f6a | 2017-12-07 10:44:43 +0100 | [diff] [blame] | 2461 | |
| 2462 | executable('systemd-sulogin-shell', |
| 2463 | ['src/sulogin-shell/sulogin-shell.c'], |
| 2464 | include_directories : includes, |
| 2465 | link_with : [libshared], |
| 2466 | install_rpath : rootlibexecdir, |
| 2467 | install : true, |
| 2468 | install_dir : rootlibexecdir) |
| 2469 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2470 | ############################################################ |
| 2471 | |
| 2472 | foreach tuple : tests |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2473 | sources = tuple[0] |
| 2474 | link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] |
| 2475 | dependencies = tuple[2] |
| 2476 | condition = tuple.length() >= 4 ? tuple[3] : '' |
| 2477 | type = tuple.length() >= 5 ? tuple[4] : '' |
| 2478 | defs = tuple.length() >= 6 ? tuple[5] : [] |
| 2479 | incs = tuple.length() >= 7 ? tuple[6] : includes |
| 2480 | timeout = 30 |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2481 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2482 | name = sources[0].split('/')[-1].split('.')[0] |
| 2483 | if type.startswith('timeout=') |
| 2484 | timeout = type.split('=')[1].to_int() |
| 2485 | type = '' |
| 2486 | endif |
Adam Duskett | 08318a2 | 2018-01-15 06:25:46 -0500 | [diff] [blame] | 2487 | if want_tests == 'false' |
| 2488 | message('Not compiling @0@ because tests is set to false'.format(name)) |
| 2489 | elif condition == '' or conf.get(condition) == 1 |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2490 | exe = executable( |
| 2491 | name, |
| 2492 | sources, |
| 2493 | include_directories : incs, |
| 2494 | link_with : link_with, |
| 2495 | dependencies : dependencies, |
| 2496 | c_args : defs, |
| 2497 | install_rpath : rootlibexecdir, |
Michael Biebl | 7cdd978 | 2017-06-23 03:23:30 +0200 | [diff] [blame] | 2498 | install : install_tests, |
| 2499 | install_dir : join_paths(testsdir, type)) |
Zbigniew Jędrzejewski-Szmek | 572baca | 2017-04-08 01:55:38 -0400 | [diff] [blame] | 2500 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2501 | if type == 'manual' |
| 2502 | message('@0@ is a manual test'.format(name)) |
| 2503 | elif type == 'unsafe' and want_tests != 'unsafe' |
| 2504 | message('@0@ is an unsafe test'.format(name)) |
| 2505 | else |
| 2506 | test(name, exe, |
| 2507 | env : test_env, |
| 2508 | timeout : timeout) |
| 2509 | endif |
| 2510 | else |
| 2511 | message('Not compiling @0@ because @1@ is not true'.format(name, condition)) |
| 2512 | endif |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2513 | endforeach |
| 2514 | |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 2515 | test_libsystemd_sym = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2516 | 'test-libsystemd-sym', |
| 2517 | test_libsystemd_sym_c, |
| 2518 | include_directories : includes, |
| 2519 | link_with : [libsystemd], |
| 2520 | install : install_tests, |
| 2521 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 2522 | test('test-libsystemd-sym', |
| 2523 | test_libsystemd_sym) |
| 2524 | |
Zbigniew Jędrzejewski-Szmek | e0bec52 | 2017-04-10 15:20:42 -0400 | [diff] [blame] | 2525 | test_libudev_sym = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2526 | 'test-libudev-sym', |
| 2527 | test_libudev_sym_c, |
| 2528 | include_directories : includes, |
| 2529 | c_args : ['-Wno-deprecated-declarations'], |
| 2530 | link_with : [libudev], |
| 2531 | install : install_tests, |
| 2532 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | e0bec52 | 2017-04-10 15:20:42 -0400 | [diff] [blame] | 2533 | test('test-libudev-sym', |
| 2534 | test_libudev_sym) |
| 2535 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2536 | ############################################################ |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2537 | |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 2538 | fuzzer_exes = [] |
| 2539 | |
| 2540 | foreach tuple : fuzzers |
| 2541 | sources = tuple[0] |
| 2542 | link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] |
| 2543 | dependencies = tuple[2] |
| 2544 | defs = tuple.length() >= 4 ? tuple[3] : [] |
| 2545 | incs = tuple.length() >= 5 ? tuple[4] : includes |
| 2546 | |
Jonathan Rudenberg | 31e57a3 | 2018-01-16 10:25:43 -0500 | [diff] [blame] | 2547 | if fuzzer_build |
Jonathan Rudenberg | 7db7d5b | 2018-01-13 19:51:07 -0500 | [diff] [blame] | 2548 | dependencies += fuzzing_engine |
| 2549 | else |
| 2550 | sources += 'src/fuzz/fuzz-main.c' |
| 2551 | endif |
| 2552 | |
| 2553 | name = sources[0].split('/')[-1].split('.')[0] |
| 2554 | |
| 2555 | fuzzer_exes += executable( |
| 2556 | name, |
| 2557 | sources, |
| 2558 | include_directories : [incs, include_directories('src/fuzz')], |
| 2559 | link_with : link_with, |
| 2560 | dependencies : dependencies, |
| 2561 | c_args : defs, |
| 2562 | install : false) |
| 2563 | endforeach |
| 2564 | |
| 2565 | run_target('fuzzers', |
| 2566 | depends : fuzzer_exes, |
| 2567 | command : ['true']) |
| 2568 | |
| 2569 | ############################################################ |
| 2570 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2571 | make_directive_index_py = find_program('tools/make-directive-index.py') |
| 2572 | 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] | 2573 | xml_helper_py = find_program('tools/xml_helper.py') |
Zbigniew Jędrzejewski-Szmek | abba22c | 2017-04-15 00:40:59 -0400 | [diff] [blame] | 2574 | hwdb_update_sh = find_program('tools/meson-hwdb-update.sh') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2575 | |
| 2576 | subdir('units') |
| 2577 | subdir('sysctl.d') |
| 2578 | subdir('sysusers.d') |
| 2579 | subdir('tmpfiles.d') |
Zbigniew Jędrzejewski-Szmek | e783f95 | 2017-11-23 13:23:42 +0100 | [diff] [blame] | 2580 | subdir('presets') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2581 | subdir('hwdb') |
| 2582 | subdir('network') |
| 2583 | subdir('man') |
| 2584 | subdir('shell-completion/bash') |
| 2585 | subdir('shell-completion/zsh') |
| 2586 | subdir('docs/sysvinit') |
| 2587 | subdir('docs/var-log') |
| 2588 | |
| 2589 | # FIXME: figure out if the warning is true: |
| 2590 | # https://github.com/mesonbuild/meson/wiki/Reference-manual#install_subdir |
| 2591 | install_subdir('factory/etc', |
| 2592 | install_dir : factorydir) |
| 2593 | |
| 2594 | |
| 2595 | install_data('xorg/50-systemd-user.sh', |
| 2596 | install_dir : xinitrcdir) |
Dimitri John Ledkov | 582faeb | 2017-08-02 13:41:18 +0100 | [diff] [blame] | 2597 | install_data('modprobe.d/systemd.conf', |
| 2598 | install_dir : modprobedir) |
Lennart Poettering | f09eb76 | 2018-02-26 11:48:46 +0100 | [diff] [blame^] | 2599 | install_data('LICENSE.GPL2', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2600 | 'LICENSE.LGPL2.1', |
Lennart Poettering | f09eb76 | 2018-02-26 11:48:46 +0100 | [diff] [blame^] | 2601 | 'NEWS', |
| 2602 | 'README', |
| 2603 | 'doc/CODING_STYLE', |
| 2604 | 'doc/DISTRO_PORTING', |
| 2605 | 'doc/ENVIRONMENT.md', |
| 2606 | 'doc/HACKING', |
| 2607 | 'doc/TRANSIENT-SETTINGS.md', |
| 2608 | 'doc/TRANSLATORS', |
| 2609 | 'doc/UIDS-GIDS.md', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2610 | 'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION', |
| 2611 | install_dir : docdir) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2612 | |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 2613 | meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir)) |
| 2614 | meson.add_install_script('sh', '-c', 'touch $DESTDIR@0@'.format(prefixdir)) |
| 2615 | |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2616 | ############################################################ |
| 2617 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2618 | meson_check_help = find_program('tools/meson-check-help.sh') |
| 2619 | |
| 2620 | foreach exec : public_programs |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2621 | name = exec.full_path().split('/')[-1] |
| 2622 | test('check-help-' + name, |
| 2623 | meson_check_help, |
| 2624 | args : [exec.full_path()]) |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2625 | endforeach |
| 2626 | |
| 2627 | ############################################################ |
| 2628 | |
Zbigniew Jędrzejewski-Szmek | b68dfb9 | 2018-01-19 17:54:30 +1100 | [diff] [blame] | 2629 | prev = '' |
| 2630 | foreach p : fuzz_regression_tests |
| 2631 | a = p.split('/')[-3] |
| 2632 | b = p.split('/')[-2] |
| 2633 | c = p.split('/')[-1] |
| 2634 | |
| 2635 | if a == 'address' |
| 2636 | build = sanitize_address |
| 2637 | else |
| 2638 | error('unknown sanitizer @0@'.format(a)) |
| 2639 | endif |
| 2640 | |
| 2641 | name = '@1@:@0@'.format(a, b) |
| 2642 | |
| 2643 | if name != prev |
| 2644 | if want_tests == 'false' |
| 2645 | message('Not compiling @0@ because tests is set to false'.format(name)) |
| 2646 | elif not sanitizers.contains(a) |
| 2647 | message('Not compiling @0@ because @1@ sanitizer is not available'.format(name, a)) |
| 2648 | elif slow_tests |
| 2649 | exe = custom_target( |
| 2650 | name, |
| 2651 | output : name, |
| 2652 | depends : build, |
| 2653 | command : [env, 'ln', '-fs', |
| 2654 | join_paths(build.full_path(), b), |
| 2655 | '@OUTPUT@'], |
| 2656 | build_by_default : true) |
| 2657 | else |
| 2658 | message('Not compiling @0@ because slow-tests is set to false'.format(name)) |
| 2659 | endif |
| 2660 | endif |
| 2661 | prev = name |
| 2662 | |
| 2663 | if want_tests != 'false' and slow_tests |
| 2664 | test(c, env, args : [exe.full_path(), |
| 2665 | join_paths(meson.source_root(), |
| 2666 | 'test/fuzz-regressions', |
| 2667 | p)]) |
| 2668 | endif |
| 2669 | endforeach |
| 2670 | |
| 2671 | ############################################################ |
| 2672 | |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 2673 | if git.found() |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2674 | all_files = run_command( |
| 2675 | git, |
Davide Cavalca | 450b60b | 2017-08-30 08:04:53 -0700 | [diff] [blame] | 2676 | ['--git-dir=@0@/.git'.format(meson.current_source_dir()), |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2677 | 'ls-files', |
| 2678 | ':/*.[ch]']) |
| 2679 | all_files = files(all_files.stdout().split()) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2680 | |
userwithuid | e85a690 | 2017-08-09 13:41:44 +0000 | [diff] [blame] | 2681 | custom_target( |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 2682 | 'tags', |
userwithuid | e85a690 | 2017-08-09 13:41:44 +0000 | [diff] [blame] | 2683 | output : 'tags', |
Zbigniew Jędrzejewski-Szmek | 25a8210 | 2018-01-26 16:15:17 +0100 | [diff] [blame] | 2684 | command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files) |
userwithuid | e85a690 | 2017-08-09 13:41:44 +0000 | [diff] [blame] | 2685 | custom_target( |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 2686 | 'ctags', |
userwithuid | e85a690 | 2017-08-09 13:41:44 +0000 | [diff] [blame] | 2687 | output : 'ctags', |
Zbigniew Jędrzejewski-Szmek | 25a8210 | 2018-01-26 16:15:17 +0100 | [diff] [blame] | 2688 | command : [env, 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2689 | endif |
Zbigniew Jędrzejewski-Szmek | 177929c | 2017-04-15 00:16:23 -0400 | [diff] [blame] | 2690 | |
| 2691 | if git.found() |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2692 | 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] | 2693 | run_target( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2694 | 'git-contrib', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2695 | command : [meson_git_contrib_sh]) |
Zbigniew Jędrzejewski-Szmek | 177929c | 2017-04-15 00:16:23 -0400 | [diff] [blame] | 2696 | endif |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 2697 | |
| 2698 | if git.found() |
| 2699 | git_head = run_command( |
| 2700 | git, |
Davide Cavalca | 450b60b | 2017-08-30 08:04:53 -0700 | [diff] [blame] | 2701 | ['--git-dir=@0@/.git'.format(meson.current_source_dir()), |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 2702 | 'rev-parse', 'HEAD']).stdout().strip() |
| 2703 | git_head_short = run_command( |
| 2704 | git, |
Davide Cavalca | 450b60b | 2017-08-30 08:04:53 -0700 | [diff] [blame] | 2705 | ['--git-dir=@0@/.git'.format(meson.current_source_dir()), |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 2706 | 'rev-parse', '--short=7', 'HEAD']).stdout().strip() |
| 2707 | |
| 2708 | run_target( |
| 2709 | 'git-snapshot', |
| 2710 | command : ['git', 'archive', |
Davide Cavalca | 450b60b | 2017-08-30 08:04:53 -0700 | [diff] [blame] | 2711 | '-o', '@0@/systemd-@1@.tar.gz'.format(meson.current_source_dir(), |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 2712 | git_head_short), |
| 2713 | '--prefix', 'systemd-@0@/'.format(git_head), |
| 2714 | 'HEAD']) |
| 2715 | endif |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2716 | |
| 2717 | ############################################################ |
| 2718 | |
Lennart Poettering | 51b1386 | 2017-12-20 12:51:14 +0100 | [diff] [blame] | 2719 | meson_check_api_docs_sh = find_program('tools/meson-check-api-docs.sh') |
| 2720 | run_target( |
| 2721 | 'check-api-docs', |
| 2722 | depends : [man, libsystemd, libudev], |
| 2723 | command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()]) |
| 2724 | |
| 2725 | ############################################################ |
| 2726 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2727 | status = [ |
| 2728 | '@0@ @1@'.format(meson.project_name(), meson.project_version()), |
| 2729 | |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 2730 | 'prefix directory: @0@'.format(prefixdir), |
| 2731 | 'rootprefix directory: @0@'.format(rootprefixdir), |
| 2732 | 'sysconf directory: @0@'.format(sysconfdir), |
| 2733 | 'include directory: @0@'.format(includedir), |
| 2734 | 'lib directory: @0@'.format(libdir), |
| 2735 | 'rootlib directory: @0@'.format(rootlibdir), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2736 | 'SysV init scripts: @0@'.format(sysvinit_path), |
| 2737 | 'SysV rc?.d directories: @0@'.format(sysvrcnd_path), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 2738 | 'PAM modules directory: @0@'.format(pamlibdir), |
| 2739 | 'PAM configuration directory: @0@'.format(pamconfdir), |
| 2740 | 'RPM macros directory: @0@'.format(rpmmacrosdir), |
| 2741 | 'modprobe.d directory: @0@'.format(modprobedir), |
| 2742 | 'D-Bus policy directory: @0@'.format(dbuspolicydir), |
| 2743 | 'D-Bus session directory: @0@'.format(dbussessionservicedir), |
| 2744 | 'D-Bus system directory: @0@'.format(dbussystemservicedir), |
| 2745 | 'bash completions directory: @0@'.format(bashcompletiondir), |
| 2746 | 'zsh completions directory: @0@'.format(zshcompletiondir), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2747 | 'extra start script: @0@'.format(get_option('rc-local')), |
| 2748 | 'extra stop script: @0@'.format(get_option('halt-local')), |
| 2749 | 'debug shell: @0@ @ @1@'.format(get_option('debug-shell'), |
| 2750 | get_option('debug-tty')), |
| 2751 | 'TTY GID: @0@'.format(tty_gid), |
Ikey Doherty | 84786b8 | 2017-12-03 12:28:23 +0000 | [diff] [blame] | 2752 | 'users GID: @0@'.format(users_gid), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2753 | 'maximum system UID: @0@'.format(system_uid_max), |
| 2754 | 'maximum system GID: @0@'.format(system_gid_max), |
Lennart Poettering | 87d5e4f | 2017-12-02 12:48:31 +0100 | [diff] [blame] | 2755 | 'minimum dynamic UID: @0@'.format(dynamic_uid_min), |
| 2756 | 'maximum dynamic UID: @0@'.format(dynamic_uid_max), |
| 2757 | 'minimum container UID base: @0@'.format(container_uid_base_min), |
| 2758 | 'maximum container UID base: @0@'.format(container_uid_base_max), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2759 | '/dev/kvm access mode: @0@'.format(get_option('dev-kvm-mode')), |
Tom Stellard | 4e15a73 | 2017-10-31 08:46:24 -0700 | [diff] [blame] | 2760 | 'render group access mode: @0@'.format(get_option('group-render-mode')), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 2761 | 'certificate root directory: @0@'.format(get_option('certificate-root')), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2762 | 'support URL: @0@'.format(support_url), |
Lennart Poettering | afde457 | 2017-12-05 11:00:24 +0100 | [diff] [blame] | 2763 | 'nobody user name: @0@'.format(nobody_user), |
| 2764 | 'nobody group name: @0@'.format(nobody_group), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2765 | 'fallback hostname: @0@'.format(get_option('fallback-hostname')), |
Zbigniew Jędrzejewski-Szmek | 5248e7e | 2017-07-11 02:15:08 -0400 | [diff] [blame] | 2766 | 'symbolic gateway hostnames: @0@'.format(', '.join(gateway_hostnames)), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2767 | |
| 2768 | 'default DNSSEC mode: @0@'.format(default_dnssec), |
| 2769 | 'default cgroup hierarchy: @0@'.format(default_hierarchy), |
| 2770 | 'default KillUserProcesses setting: @0@'.format(kill_user_processes)] |
| 2771 | |
| 2772 | alt_dns_servers = '\n '.join(dns_servers.split(' ')) |
| 2773 | alt_ntp_servers = '\n '.join(ntp_servers.split(' ')) |
| 2774 | status += [ |
| 2775 | 'default DNS servers: @0@'.format(alt_dns_servers), |
| 2776 | 'default NTP servers: @0@'.format(alt_ntp_servers)] |
| 2777 | |
| 2778 | alt_time_epoch = run_command('date', '-Is', '-u', '-d', |
| 2779 | '@@0@'.format(time_epoch)).stdout().strip() |
| 2780 | status += [ |
| 2781 | 'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)] |
| 2782 | |
| 2783 | # TODO: |
| 2784 | # CFLAGS: ${OUR_CFLAGS} ${CFLAGS} |
| 2785 | # CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} |
| 2786 | # LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} |
| 2787 | |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2788 | if conf.get('ENABLE_EFI') == 1 |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2789 | status += [ |
| 2790 | 'efi arch: @0@'.format(efi_arch)] |
| 2791 | |
| 2792 | if have_gnu_efi |
| 2793 | status += [ |
| 2794 | 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME), |
| 2795 | 'EFI CC @0@'.format(efi_cc), |
Yu Watanabe | 359b496 | 2017-11-25 20:35:24 +0900 | [diff] [blame] | 2796 | 'EFI lib directory: @0@'.format(efi_libdir), |
| 2797 | 'EFI lds directory: @0@'.format(efi_ldsdir), |
| 2798 | 'EFI include directory: @0@'.format(efi_incdir)] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2799 | endif |
| 2800 | endif |
| 2801 | |
| 2802 | found = [] |
| 2803 | missing = [] |
| 2804 | |
| 2805 | foreach tuple : [ |
| 2806 | ['libcryptsetup'], |
| 2807 | ['PAM'], |
| 2808 | ['AUDIT'], |
| 2809 | ['IMA'], |
| 2810 | ['AppArmor'], |
| 2811 | ['SELinux'], |
| 2812 | ['SECCOMP'], |
| 2813 | ['SMACK'], |
| 2814 | ['zlib'], |
| 2815 | ['xz'], |
| 2816 | ['lz4'], |
| 2817 | ['bzip2'], |
| 2818 | ['ACL'], |
| 2819 | ['gcrypt'], |
| 2820 | ['qrencode'], |
| 2821 | ['microhttpd'], |
| 2822 | ['gnutls'], |
| 2823 | ['libcurl'], |
Zbigniew Jędrzejewski-Szmek | d1bf567 | 2017-06-16 09:16:28 -0400 | [diff] [blame] | 2824 | ['idn'], |
Zbigniew Jędrzejewski-Szmek | 87057e2 | 2017-05-09 21:56:34 -0400 | [diff] [blame] | 2825 | ['libidn2'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2826 | ['libidn'], |
Waldemar Brodkorb | e7e11bb | 2017-06-24 19:30:26 +0200 | [diff] [blame] | 2827 | ['nss-systemd'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2828 | ['libiptc'], |
| 2829 | ['elfutils'], |
| 2830 | ['binfmt'], |
| 2831 | ['vconsole'], |
| 2832 | ['quotacheck'], |
| 2833 | ['tmpfiles'], |
| 2834 | ['environment.d'], |
| 2835 | ['sysusers'], |
| 2836 | ['firstboot'], |
| 2837 | ['randomseed'], |
| 2838 | ['backlight'], |
| 2839 | ['rfkill'], |
| 2840 | ['logind'], |
| 2841 | ['machined'], |
| 2842 | ['importd'], |
| 2843 | ['hostnamed'], |
| 2844 | ['timedated'], |
| 2845 | ['timesyncd'], |
| 2846 | ['localed'], |
| 2847 | ['networkd'], |
Yu Watanabe | a7456af | 2017-10-06 16:33:21 +0900 | [diff] [blame] | 2848 | ['resolve'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2849 | ['coredump'], |
| 2850 | ['polkit'], |
| 2851 | ['legacy pkla', install_polkit_pkla], |
| 2852 | ['efi'], |
| 2853 | ['gnu-efi', have_gnu_efi], |
| 2854 | ['kmod'], |
| 2855 | ['xkbcommon'], |
Zbigniew Jędrzejewski-Szmek | c4c978a | 2018-01-12 05:47:17 +0100 | [diff] [blame] | 2856 | ['pcre2'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2857 | ['blkid'], |
| 2858 | ['dbus'], |
| 2859 | ['glib'], |
Zbigniew Jędrzejewski-Szmek | 08cf5b8 | 2017-10-03 12:23:55 +0200 | [diff] [blame] | 2860 | ['nss-myhostname', conf.get('ENABLE_MYHOSTNAME') == 1], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2861 | ['hwdb'], |
| 2862 | ['tpm'], |
| 2863 | ['man pages', want_man], |
| 2864 | ['html pages', want_html], |
| 2865 | ['man page indices', want_man and have_lxml], |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2866 | ['split /usr', conf.get('HAVE_SPLIT_USR') == 1], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2867 | ['SysV compat'], |
| 2868 | ['utmp'], |
| 2869 | ['ldconfig'], |
| 2870 | ['hibernate'], |
| 2871 | ['adm group', get_option('adm-group')], |
| 2872 | ['wheel group', get_option('wheel-group')], |
Franck Bui | b14e1b4 | 2017-05-09 14:02:37 +0200 | [diff] [blame] | 2873 | ['gshadow'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2874 | ['debug hashmap'], |
| 2875 | ['debug mmap cache'], |
| 2876 | ] |
| 2877 | |
| 2878 | cond = tuple.get(1, '') |
| 2879 | if cond == '' |
| 2880 | ident1 = 'HAVE_' + tuple[0].underscorify().to_upper() |
| 2881 | ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper() |
Zbigniew Jędrzejewski-Szmek | 349cc4a | 2017-10-03 10:41:51 +0200 | [diff] [blame] | 2882 | 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] | 2883 | endif |
| 2884 | if cond |
| 2885 | found += [tuple[0]] |
| 2886 | else |
| 2887 | missing += [tuple[0]] |
| 2888 | endif |
| 2889 | endforeach |
| 2890 | |
| 2891 | status += [ |
Zbigniew Jędrzejewski-Szmek | 9d39c1b | 2017-07-26 14:14:44 -0400 | [diff] [blame] | 2892 | '', |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2893 | 'enabled features: @0@'.format(', '.join(found)), |
Zbigniew Jędrzejewski-Szmek | 9d39c1b | 2017-07-26 14:14:44 -0400 | [diff] [blame] | 2894 | '', |
| 2895 | 'disabled features: @0@'.format(', '.join(missing)), |
| 2896 | ''] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2897 | message('\n '.join(status)) |
Zbigniew Jędrzejewski-Szmek | 9a8e64b | 2017-11-28 21:46:53 +0100 | [diff] [blame] | 2898 | |
| 2899 | if rootprefixdir != rootprefix_default |
| 2900 | message('WARNING:\n' + |
| 2901 | ' Note that the installation prefix was changed to "@0@".\n'.format(rootprefixdir) + |
| 2902 | ' systemd used fixed names for unit file directories and other paths, so anything\n' + |
| 2903 | ' except the default ("@0@") is strongly discouraged.'.format(rootprefix_default)) |
| 2904 | endif |