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