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