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