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