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