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')) |
Zbigniew Jędrzejewski-Szmek | 5248e7e | 2017-07-11 02:15:08 -0400 | [diff] [blame] | 548 | conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname')) |
| 549 | gateway_hostnames = ['_gateway'] + (conf.get('ENABLE_COMPAT_GATEWAY_HOSTNAME') == 1 ? ['gateway'] : []) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 550 | |
| 551 | default_hierarchy = get_option('default-hierarchy') |
| 552 | conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy, |
| 553 | description : 'default cgroup hierarchy as string') |
| 554 | if default_hierarchy == 'legacy' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 555 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_NONE') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 556 | elif default_hierarchy == 'hybrid' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 557 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_SYSTEMD') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 558 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 559 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_ALL') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 560 | endif |
| 561 | |
| 562 | time_epoch = get_option('time-epoch') |
| 563 | if time_epoch == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 564 | NEWS = files('NEWS') |
| 565 | time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 566 | endif |
| 567 | time_epoch = time_epoch.to_int() |
| 568 | conf.set('TIME_EPOCH', time_epoch) |
| 569 | |
| 570 | system_uid_max = get_option('system-uid-max') |
| 571 | if system_uid_max == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 572 | system_uid_max = run_command( |
| 573 | awk, |
| 574 | 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }', |
| 575 | '/etc/login.defs').stdout() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 576 | endif |
| 577 | system_uid_max = system_uid_max.to_int() |
| 578 | conf.set('SYSTEM_UID_MAX', system_uid_max) |
| 579 | substs.set('systemuidmax', system_uid_max) |
Zbigniew Jędrzejewski-Szmek | 7572aa8 | 2017-04-24 21:46:40 -0400 | [diff] [blame] | 580 | message('maximum system UID is @0@'.format(system_uid_max)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 581 | |
| 582 | conf.set_quoted('NOBODY_USER_NAME', get_option('nobody-user')) |
| 583 | conf.set_quoted('NOBODY_GROUP_NAME', get_option('nobody-group')) |
| 584 | |
| 585 | system_gid_max = get_option('system-gid-max') |
| 586 | if system_gid_max == '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 587 | system_gid_max = run_command( |
| 588 | awk, |
| 589 | 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }', |
| 590 | '/etc/login.defs').stdout() |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 591 | endif |
| 592 | system_gid_max = system_gid_max.to_int() |
| 593 | conf.set('SYSTEM_GID_MAX', system_gid_max) |
| 594 | substs.set('systemgidmax', system_gid_max) |
Zbigniew Jędrzejewski-Szmek | 7572aa8 | 2017-04-24 21:46:40 -0400 | [diff] [blame] | 595 | message('maximum system GID is @0@'.format(system_gid_max)) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 596 | |
| 597 | tty_gid = get_option('tty-gid') |
| 598 | conf.set('TTY_GID', tty_gid) |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 599 | substs.set('TTY_GID', tty_gid) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 600 | |
| 601 | if get_option('adm-group') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 602 | m4_defines += ['-DENABLE_ADM_GROUP'] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 603 | endif |
| 604 | |
| 605 | if get_option('wheel-group') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 606 | m4_defines += ['-DENABLE_WHEEL_GROUP'] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 607 | endif |
| 608 | |
| 609 | substs.set('DEV_KVM_MODE', get_option('dev-kvm-mode')) |
| 610 | |
Zbigniew Jędrzejewski-Szmek | 2a4c156 | 2017-04-12 19:54:33 -0400 | [diff] [blame] | 611 | kill_user_processes = get_option('default-kill-user-processes') |
| 612 | conf.set10('KILL_USER_PROCESSES', kill_user_processes) |
| 613 | substs.set('KILL_USER_PROCESSES', kill_user_processes ? 'yes' : 'no') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 614 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 615 | dns_servers = get_option('dns-servers') |
| 616 | conf.set_quoted('DNS_SERVERS', dns_servers) |
| 617 | substs.set('DNS_SERVERS', dns_servers) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 618 | |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 619 | ntp_servers = get_option('ntp-servers') |
| 620 | conf.set_quoted('NTP_SERVERS', ntp_servers) |
| 621 | substs.set('NTP_SERVERS', ntp_servers) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 622 | |
| 623 | conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) |
| 624 | |
Zbigniew Jędrzejewski-Szmek | 3131bfe | 2017-04-10 19:06:45 -0400 | [diff] [blame] | 625 | substs.set('SUSHELL', get_option('debug-shell')) |
| 626 | substs.set('DEBUGTTY', get_option('debug-tty')) |
| 627 | |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 628 | debug = get_option('debug') |
| 629 | if debug != '' |
| 630 | foreach name : debug.split(',') |
| 631 | if name == 'hashmap' |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 632 | conf.set('ENABLE_DEBUG_HASHMAP', true) |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 633 | elif name == 'mmap-cache' |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 634 | conf.set('ENABLE_DEBUG_MMAP_CACHE', true) |
Zbigniew Jędrzejewski-Szmek | 671677d | 2017-04-27 20:51:34 -0400 | [diff] [blame] | 635 | else |
| 636 | message('unknown debug option "@0@", ignoring'.format(name)) |
| 637 | endif |
| 638 | endforeach |
| 639 | endif |
| 640 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 641 | ##################################################################### |
| 642 | |
| 643 | threads = dependency('threads') |
| 644 | librt = cc.find_library('rt') |
| 645 | libm = cc.find_library('m') |
| 646 | libdl = cc.find_library('dl') |
| 647 | libcrypt = cc.find_library('crypt') |
| 648 | |
Zbigniew Jędrzejewski-Szmek | 1800cc8 | 2017-04-27 01:30:30 -0400 | [diff] [blame] | 649 | libcap = dependency('libcap', required : false) |
| 650 | if not libcap.found() |
| 651 | # Compat with Ubuntu 14.04 which ships libcap w/o .pc file |
| 652 | libcap = cc.find_library('cap') |
| 653 | endif |
| 654 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 655 | libmount = dependency('mount', |
| 656 | version : '>= 2.27') |
| 657 | |
| 658 | want_seccomp = get_option('seccomp') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 659 | if want_seccomp != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 660 | libseccomp = dependency('libseccomp', |
Zbigniew Jędrzejewski-Szmek | 9f0e9c0 | 2017-04-27 10:05:18 -0400 | [diff] [blame] | 661 | version : '>= 2.3.1', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 662 | required : want_seccomp == 'true') |
| 663 | if libseccomp.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 664 | conf.set('HAVE_SECCOMP', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 665 | m4_defines += ['-DHAVE_SECCOMP'] |
| 666 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 667 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 668 | libseccomp = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 669 | endif |
| 670 | |
| 671 | want_selinux = get_option('selinux') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 672 | if want_selinux != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 673 | libselinux = dependency('libselinux', |
| 674 | version : '>= 2.1.9', |
| 675 | required : want_selinux == 'true') |
| 676 | if libselinux.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 677 | conf.set('HAVE_SELINUX', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 678 | m4_defines += ['-DHAVE_SELINUX'] |
| 679 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 680 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 681 | libselinux = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 682 | endif |
| 683 | |
| 684 | want_apparmor = get_option('apparmor') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 685 | if want_apparmor != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 686 | libapparmor = dependency('libapparmor', |
| 687 | required : want_apparmor == 'true') |
| 688 | if libapparmor.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 689 | conf.set('HAVE_APPARMOR', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 690 | m4_defines += ['-DHAVE_APPARMOR'] |
| 691 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 692 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 693 | libapparmor = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 694 | endif |
| 695 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 696 | smack_run_label = get_option('smack-run-label') |
| 697 | if smack_run_label != '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 698 | conf.set_quoted('SMACK_RUN_LABEL', smack_run_label) |
| 699 | m4_defines += ['-DHAVE_SMACK_RUN_LABEL'] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 700 | endif |
| 701 | |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 702 | want_polkit = get_option('polkit') |
| 703 | install_polkit = false |
| 704 | install_polkit_pkla = false |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 705 | if want_polkit != 'false' |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 706 | conf.set('ENABLE_POLKIT', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 707 | install_polkit = true |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 708 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 709 | libpolkit = dependency('polkit-gobject-1', |
| 710 | required : false) |
| 711 | if libpolkit.found() and libpolkit.version().version_compare('< 0.106') |
| 712 | message('Old polkit detected, will install pkla files') |
| 713 | install_polkit_pkla = true |
| 714 | endif |
Zbigniew Jędrzejewski-Szmek | 3ca0cb7 | 2017-04-12 19:09:26 -0400 | [diff] [blame] | 715 | endif |
| 716 | |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 717 | want_acl = get_option('acl') |
| 718 | if want_acl != 'false' |
| 719 | libacl = cc.find_library('acl', required : want_acl == 'true') |
| 720 | if libacl.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 721 | conf.set('HAVE_ACL', true) |
Zbigniew Jędrzejewski-Szmek | 36f0387 | 2017-04-21 13:53:59 -0400 | [diff] [blame] | 722 | m4_defines += ['-DHAVE_ACL'] |
| 723 | endif |
| 724 | else |
| 725 | libacl = [] |
| 726 | endif |
| 727 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 728 | want_audit = get_option('audit') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 729 | if want_audit != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 730 | libaudit = dependency('audit', required : want_audit == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 731 | conf.set('HAVE_AUDIT', libaudit.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 732 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 733 | libaudit = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 734 | endif |
| 735 | |
| 736 | want_blkid = get_option('blkid') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 737 | if want_blkid != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 738 | libblkid = dependency('blkid', required : want_blkid == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 739 | conf.set('HAVE_BLKID', libblkid.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 740 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 741 | libblkid = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 742 | endif |
| 743 | |
| 744 | want_kmod = get_option('kmod') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 745 | if want_kmod != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 746 | libkmod = dependency('libkmod', |
| 747 | version : '>= 15', |
| 748 | required : want_kmod == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 749 | conf.set('HAVE_KMOD', libkmod.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 750 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 751 | libkmod = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 752 | endif |
| 753 | |
| 754 | want_pam = get_option('pam') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 755 | if want_pam != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 756 | libpam = cc.find_library('pam', required : want_pam == 'true') |
| 757 | libpam_misc = cc.find_library('pam_misc', required : want_pam == 'true') |
| 758 | if libpam.found() and libpam_misc.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 759 | conf.set('HAVE_PAM', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 760 | m4_defines += ['-DHAVE_PAM'] |
| 761 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 762 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 763 | libpam = [] |
| 764 | libpam_misc = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 765 | endif |
| 766 | |
| 767 | want_microhttpd = get_option('microhttpd') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 768 | if want_microhttpd != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 769 | libmicrohttpd = dependency('libmicrohttpd', |
| 770 | version : '>= 0.9.33', |
| 771 | required : want_microhttpd == 'true') |
| 772 | if libmicrohttpd.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 773 | conf.set('HAVE_MICROHTTPD', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 774 | m4_defines += ['-DHAVE_MICROHTTPD'] |
| 775 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 776 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 777 | libmicrohttpd = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 778 | endif |
| 779 | |
| 780 | want_libcryptsetup = get_option('libcryptsetup') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 781 | if want_libcryptsetup != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 782 | libcryptsetup = dependency('libcryptsetup', |
| 783 | version : '>= 1.6.0', |
| 784 | required : want_libcryptsetup == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 785 | conf.set('HAVE_LIBCRYPTSETUP', libcryptsetup.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 786 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 787 | libcryptsetup = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 788 | endif |
| 789 | |
| 790 | want_libcurl = get_option('libcurl') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 791 | if want_libcurl != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 792 | libcurl = dependency('libcurl', |
| 793 | version : '>= 7.32.0', |
| 794 | required : want_libcurl == 'true') |
| 795 | if libcurl.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 796 | conf.set('HAVE_LIBCURL', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 797 | m4_defines += ['-DHAVE_LIBCURL'] |
| 798 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 799 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 800 | libcurl = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 801 | endif |
| 802 | |
| 803 | want_libidn = get_option('libidn') |
Zbigniew Jędrzejewski-Szmek | 87057e2 | 2017-05-09 21:56:34 -0400 | [diff] [blame] | 804 | want_libidn2 = get_option('libidn2') |
| 805 | if want_libidn == 'true' and want_libidn2 == 'true' |
| 806 | error('libidn and libidn2 cannot be requested simultaneously') |
| 807 | endif |
| 808 | |
Zbigniew Jędrzejewski-Szmek | 7f7ab22 | 2017-07-12 03:25:59 -0400 | [diff] [blame] | 809 | if want_libidn != 'false' and want_libidn2 != 'true' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 810 | libidn = dependency('libidn', |
| 811 | required : want_libidn == 'true') |
| 812 | if libidn.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 813 | conf.set('HAVE_LIBIDN', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 814 | m4_defines += ['-DHAVE_LIBIDN'] |
| 815 | endif |
Zbigniew Jędrzejewski-Szmek | 7f7ab22 | 2017-07-12 03:25:59 -0400 | [diff] [blame] | 816 | else |
| 817 | libidn = [] |
| 818 | endif |
| 819 | if not conf.get('HAVE_LIBIDN', false) and want_libidn2 != 'false' |
| 820 | # libidn is used for both libidn and libidn2 objects |
| 821 | libidn = dependency('libidn2', |
| 822 | required : want_libidn2 == 'true') |
| 823 | if libidn.found() |
| 824 | conf.set('HAVE_LIBIDN2', true) |
| 825 | m4_defines += ['-DHAVE_LIBIDN2'] |
| 826 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 827 | endif |
| 828 | |
| 829 | want_libiptc = get_option('libiptc') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 830 | if want_libiptc != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 831 | libiptc = dependency('libiptc', |
| 832 | required : want_libiptc == 'true') |
| 833 | if libiptc.found() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 834 | conf.set('HAVE_LIBIPTC', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 835 | m4_defines += ['-DHAVE_LIBIPTC'] |
| 836 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 837 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 838 | libiptc = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 839 | endif |
| 840 | |
| 841 | want_qrencode = get_option('qrencode') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 842 | if want_qrencode != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 843 | libqrencode = dependency('libqrencode', |
| 844 | required : want_qrencode == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 845 | conf.set('HAVE_QRENCODE', libqrencode.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 846 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 847 | libqrencode = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 848 | endif |
| 849 | |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 850 | want_gcrypt = get_option('gcrypt') |
| 851 | if want_gcrypt != 'false' |
| 852 | libgcrypt = cc.find_library('gcrypt', required : want_gcrypt == 'true') |
| 853 | libgpg_error = cc.find_library('gpg-error', required : want_gcrypt == 'true') |
| 854 | |
| 855 | have_deps = libgcrypt.found() and libgpg_error.found() |
| 856 | conf.set('HAVE_GCRYPT', have_deps) |
| 857 | if not have_deps |
| 858 | # link to neither of the libs if one is not found |
| 859 | libgcrypt = [] |
| 860 | libgpg_error = [] |
| 861 | endif |
| 862 | else |
| 863 | libgcrypt = [] |
| 864 | libgpg_error = [] |
| 865 | endif |
| 866 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 867 | want_gnutls = get_option('gnutls') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 868 | if want_gnutls != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 869 | libgnutls = dependency('gnutls', |
| 870 | version : '>= 3.1.4', |
| 871 | required : want_gnutls == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 872 | conf.set('HAVE_GNUTLS', libgnutls.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 873 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 874 | libgnutls = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 875 | endif |
| 876 | |
| 877 | want_elfutils = get_option('elfutils') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 878 | if want_elfutils != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 879 | libdw = dependency('libdw', |
| 880 | required : want_elfutils == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 881 | conf.set('HAVE_ELFUTILS', libdw.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 882 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 883 | libdw = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 884 | endif |
| 885 | |
| 886 | want_zlib = get_option('zlib') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 887 | if want_zlib != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 888 | libz = dependency('zlib', |
| 889 | required : want_zlib == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 890 | conf.set('HAVE_ZLIB', libz.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 891 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 892 | libz = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 893 | endif |
| 894 | |
| 895 | want_bzip2 = get_option('bzip2') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 896 | if want_bzip2 != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 897 | libbzip2 = cc.find_library('bz2', |
| 898 | required : want_bzip2 == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 899 | conf.set('HAVE_BZIP2', libbzip2.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 900 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 901 | libbzip2 = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 902 | endif |
| 903 | |
| 904 | want_xz = get_option('xz') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 905 | if want_xz != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 906 | libxz = dependency('liblzma', |
| 907 | required : want_xz == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 908 | conf.set('HAVE_XZ', libxz.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 909 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 910 | libxz = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 911 | endif |
| 912 | |
| 913 | want_lz4 = get_option('lz4') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 914 | if want_lz4 != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 915 | liblz4 = dependency('liblz4', |
| 916 | required : want_lz4 == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 917 | conf.set('HAVE_LZ4', liblz4.found()) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 918 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 919 | liblz4 = [] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 920 | endif |
| 921 | |
Zbigniew Jędrzejewski-Szmek | a44fb60 | 2017-07-26 14:08:46 -0400 | [diff] [blame] | 922 | want_xkbcommon = get_option('xkbcommon') |
| 923 | if want_xkbcommon != 'false' |
| 924 | libxkbcommon = dependency('xkbcommon', |
| 925 | version : '>= 0.3.0', |
| 926 | required : want_xkbcommon == 'true') |
| 927 | conf.set('HAVE_XKBCOMMON', libxkbcommon.found()) |
| 928 | else |
| 929 | libxkbcommon = [] |
| 930 | endif |
| 931 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 932 | want_glib = get_option('glib') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 933 | if want_glib != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 934 | libglib = dependency('glib-2.0', |
| 935 | version : '>= 2.22.0', |
| 936 | required : want_glib == 'true') |
| 937 | libgobject = dependency('gobject-2.0', |
| 938 | version : '>= 2.22.0', |
| 939 | required : want_glib == 'true') |
| 940 | libgio = dependency('gio-2.0', |
| 941 | required : want_glib == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 942 | have = libglib.found() and libgobject.found() and libgio.found() |
| 943 | conf.set('HAVE_GLIB', have) |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 944 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 945 | libglib = [] |
| 946 | libgobject = [] |
| 947 | libgio = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 948 | endif |
| 949 | |
| 950 | want_dbus = get_option('dbus') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 951 | if want_dbus != 'false' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 952 | libdbus = dependency('dbus-1', |
| 953 | version : '>= 1.3.2', |
| 954 | required : want_dbus == 'true') |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 955 | conf.set('HAVE_DBUS', libdbus.found()) |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 956 | else |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 957 | libdbus = [] |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 958 | endif |
| 959 | |
Yu Watanabe | 42303dc | 2017-06-18 05:22:32 +0900 | [diff] [blame] | 960 | default_dnssec = get_option('default-dnssec') |
| 961 | if default_dnssec != 'no' and not conf.get('HAVE_GCRYPT', false) |
| 962 | message('default-dnssec cannot be set to yes or allow-downgrade when gcrypt is disabled. Setting default-dnssec to no.') |
| 963 | default_dnssec = 'no' |
| 964 | endif |
| 965 | conf.set('DEFAULT_DNSSEC_MODE', |
| 966 | 'DNSSEC_' + default_dnssec.underscorify().to_upper()) |
| 967 | substs.set('DEFAULT_DNSSEC_MODE', default_dnssec) |
| 968 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 969 | want_importd = get_option('importd') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 970 | if want_importd != 'false' |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 971 | have_deps = (conf.get('HAVE_LIBCURL', false) and |
| 972 | conf.get('HAVE_ZLIB', false) and |
| 973 | conf.get('HAVE_BZIP2', false) and |
| 974 | conf.get('HAVE_XZ', false) and |
| 975 | conf.get('HAVE_GCRYPT', false)) |
| 976 | conf.set('ENABLE_IMPORTD', have_deps) |
| 977 | if want_importd == 'true' and not have_deps |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 978 | error('importd support was requested, but dependencies are not available') |
| 979 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 980 | endif |
| 981 | |
| 982 | want_remote = get_option('remote') |
Zbigniew Jędrzejewski-Szmek | 4390be3 | 2017-04-13 20:30:07 -0400 | [diff] [blame] | 983 | if want_remote != 'false' |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 984 | have_deps = [conf.get('HAVE_MICROHTTPD', false), |
| 985 | conf.get('HAVE_LIBCURL', false)] |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 986 | # sd-j-remote requires µhttpd, and sd-j-upload requires libcurl, so |
| 987 | # it's possible to build one without the other. Complain only if |
| 988 | # support was explictly requested. The auxiliary files like sysusers |
| 989 | # config should be installed when any of the programs are built. |
| 990 | if want_remote == 'true' and not (have_deps[0] and have_deps[1]) |
| 991 | error('remote support was requested, but dependencies are not available') |
| 992 | endif |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 993 | 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] | 994 | endif |
| 995 | |
| 996 | foreach pair : [['utmp', 'HAVE_UTMP'], |
| 997 | ['hibernate', 'ENABLE_HIBERNATE'], |
| 998 | ['environment-d', 'ENABLE_ENVIRONMENT_D'], |
| 999 | ['binfmt', 'ENABLE_BINFMT'], |
| 1000 | ['coredump', 'ENABLE_COREDUMP'], |
| 1001 | ['resolve', 'ENABLE_RESOLVED'], |
| 1002 | ['logind', 'ENABLE_LOGIND'], |
| 1003 | ['hostnamed', 'ENABLE_HOSTNAMED'], |
| 1004 | ['localed', 'ENABLE_LOCALED'], |
| 1005 | ['machined', 'ENABLE_MACHINED'], |
| 1006 | ['networkd', 'ENABLE_NETWORKD'], |
| 1007 | ['timedated', 'ENABLE_TIMEDATED'], |
| 1008 | ['timesyncd', 'ENABLE_TIMESYNCD'], |
| 1009 | ['myhostname', 'HAVE_MYHOSTNAME'], |
| 1010 | ['firstboot', 'ENABLE_FIRSTBOOT'], |
| 1011 | ['randomseed', 'ENABLE_RANDOMSEED'], |
| 1012 | ['backlight', 'ENABLE_BACKLIGHT'], |
| 1013 | ['vconsole', 'ENABLE_VCONSOLE'], |
| 1014 | ['quotacheck', 'ENABLE_QUOTACHECK'], |
| 1015 | ['sysusers', 'ENABLE_SYSUSERS'], |
| 1016 | ['tmpfiles', 'ENABLE_TMPFILES'], |
| 1017 | ['hwdb', 'ENABLE_HWDB'], |
| 1018 | ['rfkill', 'ENABLE_RFKILL'], |
| 1019 | ['ldconfig', 'ENABLE_LDCONFIG'], |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1020 | ['efi', 'ENABLE_EFI'], |
Zbigniew Jędrzejewski-Szmek | 18b9ad1 | 2017-07-13 09:31:47 -0400 | [diff] [blame] | 1021 | ['tpm', 'ENABLE_TPM'], |
Zbigniew Jędrzejewski-Szmek | 2895c8e | 2017-04-13 19:45:05 -0400 | [diff] [blame] | 1022 | ['ima', 'HAVE_IMA'], |
Zbigniew Jędrzejewski-Szmek | 5464ec8 | 2017-04-24 19:28:04 -0400 | [diff] [blame] | 1023 | ['smack', 'HAVE_SMACK'], |
Franck Bui | b14e1b4 | 2017-05-09 14:02:37 +0200 | [diff] [blame] | 1024 | ['gshadow', 'ENABLE_GSHADOW'], |
Zbigniew Jędrzejewski-Szmek | d1bf567 | 2017-06-16 09:16:28 -0400 | [diff] [blame] | 1025 | ['idn', 'ENABLE_IDN'], |
Waldemar Brodkorb | e7e11bb | 2017-06-24 19:30:26 +0200 | [diff] [blame] | 1026 | ['nss-systemd', 'ENABLE_NSS_SYSTEMD'], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1027 | ] |
| 1028 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1029 | if get_option(pair[0]) |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1030 | conf.set(pair[1], true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1031 | m4_defines += ['-D' + pair[1]] |
| 1032 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1033 | endforeach |
| 1034 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1035 | want_tests = get_option('tests') |
Zbigniew Jędrzejewski-Szmek | 572baca | 2017-04-08 01:55:38 -0400 | [diff] [blame] | 1036 | install_tests = get_option('install-tests') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1037 | tests = [] |
| 1038 | |
Zbigniew Jędrzejewski-Szmek | 00d82c8 | 2017-07-12 21:25:17 +0000 | [diff] [blame] | 1039 | conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', get_option('slow-tests')) |
| 1040 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1041 | ##################################################################### |
| 1042 | |
| 1043 | if get_option('efi') |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1044 | efi_arch = host_machine.cpu_family() |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1045 | |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1046 | if efi_arch == 'x86' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1047 | EFI_MACHINE_TYPE_NAME = 'ia32' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1048 | gnu_efi_arch = 'ia32' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1049 | elif efi_arch == 'x86_64' |
| 1050 | EFI_MACHINE_TYPE_NAME = 'x64' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1051 | gnu_efi_arch = 'x86_64' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1052 | elif efi_arch == 'arm' |
| 1053 | EFI_MACHINE_TYPE_NAME = 'arm' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1054 | gnu_efi_arch = 'arm' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1055 | elif efi_arch == 'aarch64' |
| 1056 | EFI_MACHINE_TYPE_NAME = 'aa64' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1057 | gnu_efi_arch = 'aarch64' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1058 | else |
| 1059 | EFI_MACHINE_TYPE_NAME = '' |
Zbigniew Jędrzejewski-Szmek | 6800fe7 | 2017-04-19 22:57:52 -0400 | [diff] [blame] | 1060 | gnu_efi_arch = '' |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1061 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1062 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1063 | conf.set('ENABLE_EFI', true) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1064 | 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] | 1065 | |
| 1066 | 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] | 1067 | endif |
| 1068 | |
| 1069 | ##################################################################### |
| 1070 | |
| 1071 | config_h = configure_file( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1072 | output : 'config.h', |
| 1073 | configuration : conf) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1074 | |
| 1075 | includes = include_directories('src/basic', |
| 1076 | 'src/shared', |
| 1077 | 'src/systemd', |
| 1078 | 'src/journal', |
| 1079 | 'src/resolve', |
| 1080 | 'src/timesync', |
| 1081 | 'src/login', |
| 1082 | 'src/udev', |
| 1083 | 'src/libudev', |
| 1084 | 'src/core', |
| 1085 | 'src/libsystemd/sd-bus', |
| 1086 | 'src/libsystemd/sd-device', |
| 1087 | 'src/libsystemd/sd-hwdb', |
| 1088 | 'src/libsystemd/sd-id128', |
| 1089 | 'src/libsystemd/sd-netlink', |
| 1090 | 'src/libsystemd/sd-network', |
| 1091 | 'src/libsystemd-network', |
| 1092 | ) |
| 1093 | |
| 1094 | add_project_arguments('-include', 'config.h', language : 'c') |
| 1095 | |
| 1096 | gcrypt_util_sources = files('src/shared/gcrypt-util.h', |
| 1097 | 'src/shared/gcrypt-util.c') |
| 1098 | |
| 1099 | subdir('po') |
| 1100 | subdir('catalog') |
| 1101 | subdir('src/systemd') |
| 1102 | subdir('src/basic') |
| 1103 | subdir('src/libsystemd') |
| 1104 | subdir('src/libsystemd-network') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1105 | subdir('src/journal') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1106 | subdir('src/login') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1107 | |
| 1108 | libjournal_core = static_library( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1109 | 'journal-core', |
| 1110 | libjournal_core_sources, |
| 1111 | journald_gperf_c, |
| 1112 | include_directories : includes, |
| 1113 | install : false) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1114 | |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 1115 | 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] | 1116 | libsystemd = shared_library( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1117 | 'systemd', |
| 1118 | libsystemd_internal_sources, |
| 1119 | journal_internal_sources, |
Lennart Poettering | 4309172 | 2017-06-27 23:11:26 +0200 | [diff] [blame] | 1120 | version : '0.19.0', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1121 | include_directories : includes, |
| 1122 | link_args : ['-shared', |
| 1123 | '-Wl,--version-script=' + libsystemd_sym_path], |
| 1124 | link_with : [libbasic], |
| 1125 | dependencies : [threads, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1126 | libgcrypt, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1127 | librt, |
| 1128 | libxz, |
| 1129 | liblz4], |
| 1130 | link_depends : libsystemd_sym, |
| 1131 | install : true, |
| 1132 | install_dir : rootlibdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1133 | |
| 1134 | ############################################################ |
| 1135 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1136 | # binaries that have --help and are intended for use by humans, |
| 1137 | # usually, but not always, installed in /bin. |
| 1138 | public_programs = [] |
| 1139 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1140 | subdir('src/libudev') |
| 1141 | subdir('src/shared') |
| 1142 | subdir('src/core') |
| 1143 | subdir('src/udev') |
| 1144 | subdir('src/network') |
| 1145 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1146 | subdir('src/analyze') |
| 1147 | subdir('src/journal-remote') |
| 1148 | subdir('src/coredump') |
| 1149 | subdir('src/hostname') |
| 1150 | subdir('src/import') |
| 1151 | subdir('src/kernel-install') |
| 1152 | subdir('src/locale') |
| 1153 | subdir('src/machine') |
| 1154 | subdir('src/nspawn') |
| 1155 | subdir('src/resolve') |
| 1156 | subdir('src/timedate') |
| 1157 | subdir('src/timesync') |
| 1158 | subdir('src/vconsole') |
Zbigniew Jędrzejewski-Szmek | 4e4ab1c | 2017-04-10 12:37:52 -0400 | [diff] [blame] | 1159 | subdir('src/sulogin-shell') |
Zbigniew Jędrzejewski-Szmek | b710072 | 2017-04-12 15:05:55 -0400 | [diff] [blame] | 1160 | subdir('src/boot/efi') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1161 | |
| 1162 | subdir('src/test') |
Zbigniew Jędrzejewski-Szmek | 4ff3f25 | 2017-04-13 20:47:20 -0400 | [diff] [blame] | 1163 | subdir('test') |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 1164 | |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1165 | ############################################################ |
| 1166 | |
| 1167 | # only static linking apart from libdl, to make sure that the |
| 1168 | # module is linked to all libraries that it uses. |
| 1169 | test_dlopen = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1170 | 'test-dlopen', |
| 1171 | test_dlopen_c, |
| 1172 | include_directories : includes, |
| 1173 | link_with : [libbasic], |
| 1174 | dependencies : [libdl]) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1175 | |
Zbigniew Jędrzejewski-Szmek | 5486a31 | 2017-05-12 08:31:46 -0400 | [diff] [blame] | 1176 | foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME'], |
Waldemar Brodkorb | e7e11bb | 2017-06-24 19:30:26 +0200 | [diff] [blame] | 1177 | ['systemd', 'ENABLE_NSS_SYSTEMD'], |
Zbigniew Jędrzejewski-Szmek | 5486a31 | 2017-05-12 08:31:46 -0400 | [diff] [blame] | 1178 | ['mymachines', 'ENABLE_MACHINED'], |
| 1179 | ['resolve', 'ENABLE_RESOLVED']] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1180 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1181 | condition = tuple[1] == '' or conf.get(tuple[1], false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1182 | if condition |
| 1183 | module = tuple[0] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1184 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1185 | sym = 'src/nss-@0@/nss-@0@.sym'.format(module) |
| 1186 | version_script_arg = join_paths(meson.current_source_dir(), sym) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1187 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1188 | nss = shared_library( |
| 1189 | 'nss_' + module, |
| 1190 | 'src/nss-@0@/nss-@0@.c'.format(module), |
| 1191 | version : '2', |
| 1192 | include_directories : includes, |
| 1193 | link_args : ['-shared', |
| 1194 | '-Wl,--version-script=' + version_script_arg, |
| 1195 | '-Wl,--undefined'], |
| 1196 | link_with : [libsystemd_internal, |
| 1197 | libbasic], |
| 1198 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 5486a31 | 2017-05-12 08:31:46 -0400 | [diff] [blame] | 1199 | librt], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1200 | link_depends : sym, |
| 1201 | install : true, |
| 1202 | install_dir : rootlibdir) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1203 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1204 | # We cannot use shared_module because it does not support version suffix. |
| 1205 | # Unfortunately shared_library insists on creating the symlink… |
| 1206 | meson.add_install_script('sh', '-c', |
| 1207 | 'rm $DESTDIR@0@/libnss_@1@.so' |
| 1208 | .format(rootlibdir, module)) |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1209 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1210 | test('dlopen-nss_' + module, |
| 1211 | test_dlopen, |
| 1212 | args : [nss.full_path()]) # path to dlopen must include a slash |
| 1213 | endif |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1214 | endforeach |
| 1215 | |
| 1216 | ############################################################ |
| 1217 | |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1218 | executable('systemd', |
| 1219 | systemd_sources, |
| 1220 | include_directories : includes, |
| 1221 | link_with : [libcore, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1222 | libshared], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1223 | dependencies : [threads, |
| 1224 | librt, |
| 1225 | libseccomp, |
| 1226 | libselinux, |
Zbigniew Jędrzejewski-Szmek | f4ee10a | 2017-04-09 14:08:53 -0400 | [diff] [blame] | 1227 | libmount, |
| 1228 | libblkid], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1229 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1230 | install : true, |
| 1231 | install_dir : rootlibexecdir) |
| 1232 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1233 | exe = executable('systemd-analyze', |
| 1234 | systemd_analyze_sources, |
| 1235 | include_directories : includes, |
| 1236 | link_with : [libcore, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1237 | libshared], |
| 1238 | dependencies : [threads, |
| 1239 | librt, |
| 1240 | libseccomp, |
| 1241 | libselinux, |
| 1242 | libmount, |
| 1243 | libblkid], |
| 1244 | install_rpath : rootlibexecdir, |
| 1245 | install : true) |
| 1246 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1247 | |
| 1248 | executable('systemd-journald', |
| 1249 | systemd_journald_sources, |
| 1250 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1251 | link_with : [libjournal_core, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1252 | libshared], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1253 | dependencies : [threads, |
| 1254 | libxz, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1255 | liblz4, |
| 1256 | libselinux], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1257 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1258 | install : true, |
| 1259 | install_dir : rootlibexecdir) |
| 1260 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1261 | exe = executable('systemd-cat', |
| 1262 | systemd_cat_sources, |
| 1263 | include_directories : includes, |
| 1264 | link_with : [libjournal_core, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1265 | libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1266 | dependencies : [threads], |
| 1267 | install_rpath : rootlibexecdir, |
| 1268 | install : true) |
| 1269 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1270 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1271 | exe = executable('journalctl', |
| 1272 | journalctl_sources, |
| 1273 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1274 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1275 | dependencies : [threads, |
| 1276 | libqrencode, |
| 1277 | libxz, |
| 1278 | liblz4], |
| 1279 | install_rpath : rootlibexecdir, |
| 1280 | install : true, |
| 1281 | install_dir : rootbindir) |
| 1282 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1283 | |
| 1284 | executable('systemd-getty-generator', |
| 1285 | 'src/getty-generator/getty-generator.c', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1286 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1287 | link_with : [libshared], |
| 1288 | install_rpath : rootlibexecdir, |
| 1289 | install : true, |
| 1290 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1291 | |
| 1292 | executable('systemd-debug-generator', |
| 1293 | 'src/debug-generator/debug-generator.c', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1294 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1295 | link_with : [libshared], |
| 1296 | install_rpath : rootlibexecdir, |
| 1297 | install : true, |
| 1298 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1299 | |
| 1300 | executable('systemd-fstab-generator', |
| 1301 | 'src/fstab-generator/fstab-generator.c', |
| 1302 | 'src/core/mount-setup.c', |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1303 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1304 | link_with : [libshared], |
| 1305 | install_rpath : rootlibexecdir, |
| 1306 | install : true, |
| 1307 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1308 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1309 | if conf.get('ENABLE_ENVIRONMENT_D', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1310 | executable('30-systemd-environment-d-generator', |
| 1311 | 'src/environment-d-generator/environment-d-generator.c', |
| 1312 | include_directories : includes, |
| 1313 | link_with : [libshared], |
| 1314 | install_rpath : rootlibexecdir, |
| 1315 | install : true, |
| 1316 | install_dir : userenvgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 1317 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1318 | meson.add_install_script(meson_make_symlink, |
| 1319 | join_paths(sysconfdir, 'environment'), |
| 1320 | join_paths(environmentdir, '99-environment.conf')) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1321 | endif |
| 1322 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1323 | if conf.get('ENABLE_HIBERNATE', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1324 | executable('systemd-hibernate-resume-generator', |
| 1325 | 'src/hibernate-resume/hibernate-resume-generator.c', |
| 1326 | include_directories : includes, |
| 1327 | link_with : [libshared], |
| 1328 | install_rpath : rootlibexecdir, |
| 1329 | install : true, |
| 1330 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1331 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1332 | executable('systemd-hibernate-resume', |
| 1333 | 'src/hibernate-resume/hibernate-resume.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1334 | include_directories : includes, |
| 1335 | link_with : [libshared], |
| 1336 | install_rpath : rootlibexecdir, |
| 1337 | install : true, |
| 1338 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1339 | endif |
| 1340 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1341 | if conf.get('HAVE_BLKID', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1342 | executable('systemd-gpt-auto-generator', |
| 1343 | 'src/gpt-auto-generator/gpt-auto-generator.c', |
| 1344 | 'src/basic/blkid-util.h', |
| 1345 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1346 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1347 | dependencies : libblkid, |
| 1348 | install_rpath : rootlibexecdir, |
| 1349 | install : true, |
| 1350 | install_dir : systemgeneratordir) |
| 1351 | |
| 1352 | exe = executable('systemd-dissect', |
| 1353 | 'src/dissect/dissect.c', |
| 1354 | include_directories : includes, |
| 1355 | link_with : [libshared], |
| 1356 | install_rpath : rootlibexecdir, |
| 1357 | install : true, |
| 1358 | install_dir : rootlibexecdir) |
| 1359 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1360 | endif |
| 1361 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1362 | if conf.get('ENABLE_RESOLVED', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1363 | executable('systemd-resolved', |
| 1364 | systemd_resolved_sources, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1365 | gcrypt_util_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1366 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1367 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1368 | dependencies : [threads, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1369 | libgcrypt, |
| 1370 | libgpg_error, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1371 | libm, |
| 1372 | libidn], |
| 1373 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1374 | install : true, |
| 1375 | install_dir : rootlibexecdir) |
| 1376 | |
| 1377 | exe = executable('systemd-resolve', |
| 1378 | systemd_resolve_sources, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1379 | gcrypt_util_sources, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1380 | include_directories : includes, |
| 1381 | link_with : [libshared], |
| 1382 | dependencies : [threads, |
Michael Biebl | 76c8741 | 2017-04-21 23:45:54 +0200 | [diff] [blame] | 1383 | libgcrypt, |
| 1384 | libgpg_error, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1385 | libm, |
| 1386 | libidn], |
| 1387 | install_rpath : rootlibexecdir, |
| 1388 | install : true) |
| 1389 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1390 | endif |
| 1391 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1392 | if conf.get('ENABLE_LOGIND', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1393 | executable('systemd-logind', |
| 1394 | systemd_logind_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1395 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1396 | link_with : [liblogind_core, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1397 | libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1398 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1399 | libacl], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1400 | install_rpath : rootlibexecdir, |
| 1401 | install : true, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1402 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1403 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1404 | exe = executable('loginctl', |
| 1405 | loginctl_sources, |
| 1406 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1407 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1408 | dependencies : [threads, |
| 1409 | liblz4, |
| 1410 | libxz], |
| 1411 | install_rpath : rootlibexecdir, |
| 1412 | install : true, |
| 1413 | install_dir : rootbindir) |
| 1414 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1415 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1416 | exe = executable('systemd-inhibit', |
| 1417 | 'src/login/inhibit.c', |
| 1418 | include_directories : includes, |
| 1419 | link_with : [libshared], |
| 1420 | install_rpath : rootlibexecdir, |
| 1421 | install : true, |
| 1422 | install_dir : rootbindir) |
| 1423 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 83b6af3 | 2017-04-14 20:10:28 -0400 | [diff] [blame] | 1424 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1425 | if conf.get('HAVE_PAM', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1426 | version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym) |
| 1427 | pam_systemd = shared_library( |
| 1428 | 'pam_systemd', |
| 1429 | pam_systemd_c, |
| 1430 | name_prefix : '', |
| 1431 | include_directories : includes, |
| 1432 | link_args : ['-shared', |
| 1433 | '-Wl,--version-script=' + version_script_arg], |
| 1434 | link_with : [libsystemd_internal, |
| 1435 | libshared_static], |
| 1436 | dependencies : [threads, |
| 1437 | libpam, |
| 1438 | libpam_misc], |
| 1439 | link_depends : pam_systemd_sym, |
| 1440 | install : true, |
| 1441 | install_dir : pamlibdir) |
| 1442 | |
| 1443 | test('dlopen-pam_systemd', |
| 1444 | test_dlopen, |
| 1445 | args : [pam_systemd.full_path()]) # path to dlopen must include a slash |
| 1446 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1447 | endif |
| 1448 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1449 | if conf.get('HAVE_PAM', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1450 | executable('systemd-user-sessions', |
| 1451 | 'src/user-sessions/user-sessions.c', |
| 1452 | include_directories : includes, |
| 1453 | link_with : [libshared], |
| 1454 | install_rpath : rootlibexecdir, |
| 1455 | install : true, |
| 1456 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1457 | endif |
| 1458 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1459 | 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] | 1460 | exe = executable('bootctl', |
| 1461 | 'src/boot/bootctl.c', |
| 1462 | include_directories : includes, |
| 1463 | link_with : [libshared], |
| 1464 | dependencies : [libblkid], |
| 1465 | install_rpath : rootlibexecdir, |
| 1466 | install : true) |
| 1467 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1468 | endif |
| 1469 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1470 | exe = executable('systemd-socket-activate', 'src/activate/activate.c', |
| 1471 | include_directories : includes, |
| 1472 | link_with : [libshared], |
| 1473 | dependencies : [threads], |
| 1474 | install_rpath : rootlibexecdir, |
| 1475 | install : true) |
| 1476 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1477 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1478 | exe = executable('systemctl', 'src/systemctl/systemctl.c', |
| 1479 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1480 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1481 | dependencies : [threads, |
| 1482 | libcap, |
| 1483 | libselinux, |
| 1484 | libxz, |
| 1485 | liblz4], |
| 1486 | install_rpath : rootlibexecdir, |
| 1487 | install : true, |
| 1488 | install_dir : rootbindir) |
| 1489 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1490 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1491 | if conf.get('ENABLE_BACKLIGHT', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1492 | executable('systemd-backlight', |
| 1493 | 'src/backlight/backlight.c', |
| 1494 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1495 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1496 | install_rpath : rootlibexecdir, |
| 1497 | install : true, |
| 1498 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1499 | endif |
| 1500 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1501 | if conf.get('ENABLE_RFKILL', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1502 | executable('systemd-rfkill', |
| 1503 | 'src/rfkill/rfkill.c', |
| 1504 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 1505 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1506 | install_rpath : rootlibexecdir, |
| 1507 | install : true, |
| 1508 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1509 | endif |
| 1510 | |
| 1511 | executable('systemd-system-update-generator', |
| 1512 | 'src/system-update-generator/system-update-generator.c', |
| 1513 | include_directories : includes, |
| 1514 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1515 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1516 | install : true, |
| 1517 | install_dir : systemgeneratordir) |
| 1518 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1519 | if conf.get('HAVE_LIBCRYPTSETUP', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1520 | executable('systemd-cryptsetup', |
| 1521 | 'src/cryptsetup/cryptsetup.c', |
| 1522 | include_directories : includes, |
| 1523 | link_with : [libshared], |
| 1524 | dependencies : [libcryptsetup], |
| 1525 | install_rpath : rootlibexecdir, |
| 1526 | install : true, |
| 1527 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1528 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1529 | executable('systemd-cryptsetup-generator', |
| 1530 | 'src/cryptsetup/cryptsetup-generator.c', |
| 1531 | include_directories : includes, |
| 1532 | link_with : [libshared], |
| 1533 | dependencies : [libcryptsetup], |
| 1534 | install_rpath : rootlibexecdir, |
| 1535 | install : true, |
| 1536 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1537 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1538 | executable('systemd-veritysetup', |
| 1539 | 'src/veritysetup/veritysetup.c', |
| 1540 | include_directories : includes, |
| 1541 | link_with : [libshared], |
| 1542 | dependencies : [libcryptsetup], |
| 1543 | install_rpath : rootlibexecdir, |
| 1544 | install : true, |
| 1545 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1546 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1547 | executable('systemd-veritysetup-generator', |
| 1548 | 'src/veritysetup/veritysetup-generator.c', |
| 1549 | include_directories : includes, |
| 1550 | link_with : [libshared], |
| 1551 | dependencies : [libcryptsetup], |
| 1552 | install_rpath : rootlibexecdir, |
| 1553 | install : true, |
| 1554 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1555 | endif |
| 1556 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1557 | if conf.get('HAVE_SYSV_COMPAT', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1558 | executable('systemd-sysv-generator', |
| 1559 | 'src/sysv-generator/sysv-generator.c', |
| 1560 | include_directories : includes, |
| 1561 | link_with : [libshared], |
| 1562 | install_rpath : rootlibexecdir, |
| 1563 | install : true, |
| 1564 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1565 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1566 | executable('systemd-rc-local-generator', |
| 1567 | 'src/rc-local-generator/rc-local-generator.c', |
| 1568 | include_directories : includes, |
| 1569 | link_with : [libshared], |
| 1570 | install_rpath : rootlibexecdir, |
| 1571 | install : true, |
| 1572 | install_dir : systemgeneratordir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1573 | endif |
| 1574 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1575 | if conf.get('ENABLE_HOSTNAMED', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1576 | executable('systemd-hostnamed', |
| 1577 | 'src/hostname/hostnamed.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1578 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1579 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1580 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1581 | install : true, |
| 1582 | install_dir : rootlibexecdir) |
| 1583 | |
| 1584 | exe = executable('hostnamectl', |
| 1585 | 'src/hostname/hostnamectl.c', |
| 1586 | include_directories : includes, |
| 1587 | link_with : [libshared], |
| 1588 | install_rpath : rootlibexecdir, |
| 1589 | install : true) |
| 1590 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1591 | endif |
| 1592 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1593 | if conf.get('ENABLE_LOCALED', false) |
| 1594 | if conf.get('HAVE_XKBCOMMON', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1595 | # logind will load libxkbcommon.so dynamically on its own |
| 1596 | deps = [libdl] |
| 1597 | else |
| 1598 | deps = [] |
| 1599 | endif |
Zbigniew Jędrzejewski-Szmek | 1eeb43f | 2017-04-13 19:37:14 -0400 | [diff] [blame] | 1600 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1601 | executable('systemd-localed', |
| 1602 | systemd_localed_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1603 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1604 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1605 | dependencies : deps, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1606 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1607 | install : true, |
| 1608 | install_dir : rootlibexecdir) |
| 1609 | |
| 1610 | exe = executable('localectl', |
| 1611 | localectl_sources, |
| 1612 | include_directories : includes, |
| 1613 | link_with : [libshared], |
| 1614 | install_rpath : rootlibexecdir, |
| 1615 | install : true) |
| 1616 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1617 | endif |
| 1618 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1619 | if conf.get('ENABLE_TIMEDATED', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1620 | executable('systemd-timedated', |
| 1621 | 'src/timedate/timedated.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1622 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1623 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1624 | install_rpath : rootlibexecdir, |
| 1625 | install : true, |
| 1626 | install_dir : rootlibexecdir) |
| 1627 | |
| 1628 | exe = executable('timedatectl', |
| 1629 | 'src/timedate/timedatectl.c', |
| 1630 | include_directories : includes, |
| 1631 | install_rpath : rootlibexecdir, |
| 1632 | link_with : [libshared], |
| 1633 | install : true) |
| 1634 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1635 | endif |
| 1636 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1637 | if conf.get('ENABLE_TIMESYNCD', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1638 | executable('systemd-timesyncd', |
| 1639 | systemd_timesyncd_sources, |
| 1640 | include_directories : includes, |
| 1641 | link_with : [libshared], |
| 1642 | dependencies : [threads, |
| 1643 | libm], |
| 1644 | install_rpath : rootlibexecdir, |
| 1645 | install : true, |
| 1646 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1647 | endif |
| 1648 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1649 | if conf.get('ENABLE_MACHINED', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1650 | executable('systemd-machined', |
| 1651 | systemd_machined_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1652 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1653 | link_with : [libmachine_core, |
| 1654 | libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1655 | install_rpath : rootlibexecdir, |
| 1656 | install : true, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1657 | install_dir : rootlibexecdir) |
| 1658 | |
| 1659 | exe = executable('machinectl', |
| 1660 | 'src/machine/machinectl.c', |
| 1661 | include_directories : includes, |
| 1662 | link_with : [libshared], |
| 1663 | dependencies : [threads, |
| 1664 | libxz, |
| 1665 | liblz4], |
| 1666 | install_rpath : rootlibexecdir, |
| 1667 | install : true, |
| 1668 | install_dir : rootbindir) |
| 1669 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1670 | endif |
| 1671 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1672 | if conf.get('ENABLE_IMPORTD', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1673 | executable('systemd-importd', |
| 1674 | systemd_importd_sources, |
| 1675 | include_directories : includes, |
| 1676 | link_with : [libshared], |
| 1677 | dependencies : [threads], |
| 1678 | install_rpath : rootlibexecdir, |
| 1679 | install : true, |
| 1680 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1681 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1682 | systemd_pull = executable('systemd-pull', |
| 1683 | systemd_pull_sources, |
| 1684 | include_directories : includes, |
| 1685 | link_with : [libshared], |
| 1686 | dependencies : [libcurl, |
| 1687 | libz, |
| 1688 | libbzip2, |
| 1689 | libxz, |
| 1690 | libgcrypt], |
| 1691 | install_rpath : rootlibexecdir, |
| 1692 | install : true, |
| 1693 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1694 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1695 | systemd_import = executable('systemd-import', |
| 1696 | systemd_import_sources, |
| 1697 | include_directories : includes, |
| 1698 | link_with : [libshared], |
| 1699 | dependencies : [libcurl, |
| 1700 | libz, |
| 1701 | libbzip2, |
| 1702 | libxz], |
| 1703 | install_rpath : rootlibexecdir, |
| 1704 | install : true, |
| 1705 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1706 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1707 | systemd_export = executable('systemd-export', |
| 1708 | systemd_export_sources, |
| 1709 | include_directories : includes, |
| 1710 | link_with : [libshared], |
| 1711 | dependencies : [libcurl, |
| 1712 | libz, |
| 1713 | libbzip2, |
| 1714 | libxz], |
| 1715 | install_rpath : rootlibexecdir, |
| 1716 | install : true, |
| 1717 | install_dir : rootlibexecdir) |
| 1718 | public_programs += [systemd_pull, systemd_import, systemd_export] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1719 | endif |
| 1720 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1721 | 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] | 1722 | exe = executable('systemd-journal-upload', |
| 1723 | systemd_journal_upload_sources, |
| 1724 | include_directories : includes, |
| 1725 | link_with : [libshared], |
| 1726 | dependencies : [threads, |
| 1727 | libcurl, |
| 1728 | libgnutls, |
| 1729 | libxz, |
| 1730 | liblz4], |
| 1731 | install_rpath : rootlibexecdir, |
| 1732 | install : true, |
| 1733 | install_dir : rootlibexecdir) |
| 1734 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1735 | endif |
| 1736 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1737 | 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] | 1738 | s_j_remote = executable('systemd-journal-remote', |
| 1739 | systemd_journal_remote_sources, |
| 1740 | include_directories : includes, |
| 1741 | link_with : [libshared], |
| 1742 | dependencies : [threads, |
| 1743 | libmicrohttpd, |
| 1744 | libgnutls, |
| 1745 | libxz, |
| 1746 | liblz4], |
| 1747 | install_rpath : rootlibexecdir, |
| 1748 | install : true, |
| 1749 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1750 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1751 | s_j_gatewayd = executable('systemd-journal-gatewayd', |
| 1752 | systemd_journal_gatewayd_sources, |
| 1753 | include_directories : includes, |
| 1754 | link_with : [libshared], |
| 1755 | dependencies : [threads, |
| 1756 | libmicrohttpd, |
| 1757 | libgnutls, |
| 1758 | libxz, |
| 1759 | liblz4], |
| 1760 | install_rpath : rootlibexecdir, |
| 1761 | install : true, |
| 1762 | install_dir : rootlibexecdir) |
| 1763 | public_programs += [s_j_remote, s_j_gatewayd] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1764 | endif |
| 1765 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1766 | if conf.get('ENABLE_COREDUMP', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1767 | executable('systemd-coredump', |
| 1768 | systemd_coredump_sources, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1769 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1770 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1771 | dependencies : [threads, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1772 | libacl, |
| 1773 | libdw, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1774 | libxz, |
| 1775 | liblz4], |
| 1776 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1777 | install : true, |
| 1778 | install_dir : rootlibexecdir) |
| 1779 | |
| 1780 | exe = executable('coredumpctl', |
| 1781 | coredumpctl_sources, |
| 1782 | include_directories : includes, |
| 1783 | link_with : [libshared], |
| 1784 | dependencies : [threads, |
| 1785 | libxz, |
| 1786 | liblz4], |
| 1787 | install_rpath : rootlibexecdir, |
| 1788 | install : true) |
| 1789 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1790 | endif |
| 1791 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1792 | if conf.get('ENABLE_BINFMT', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1793 | exe = executable('systemd-binfmt', |
| 1794 | 'src/binfmt/binfmt.c', |
| 1795 | include_directories : includes, |
| 1796 | link_with : [libshared], |
| 1797 | install_rpath : rootlibexecdir, |
| 1798 | install : true, |
| 1799 | install_dir : rootlibexecdir) |
| 1800 | public_programs += [exe] |
| 1801 | |
| 1802 | meson.add_install_script('sh', '-c', |
| 1803 | mkdir_p.format(binfmtdir)) |
| 1804 | meson.add_install_script('sh', '-c', |
| 1805 | mkdir_p.format(join_paths(sysconfdir, 'binfmt.d'))) |
| 1806 | endif |
| 1807 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1808 | if conf.get('ENABLE_VCONSOLE', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1809 | executable('systemd-vconsole-setup', |
| 1810 | 'src/vconsole/vconsole-setup.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1811 | include_directories : includes, |
| 1812 | link_with : [libshared], |
| 1813 | install_rpath : rootlibexecdir, |
| 1814 | install : true, |
| 1815 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1816 | endif |
| 1817 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1818 | if conf.get('ENABLE_RANDOMSEED', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1819 | executable('systemd-random-seed', |
| 1820 | 'src/random-seed/random-seed.c', |
| 1821 | include_directories : includes, |
| 1822 | link_with : [libshared], |
| 1823 | install_rpath : rootlibexecdir, |
| 1824 | install : true, |
| 1825 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1826 | endif |
| 1827 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 1828 | if conf.get('ENABLE_FIRSTBOOT', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 1829 | executable('systemd-firstboot', |
| 1830 | 'src/firstboot/firstboot.c', |
| 1831 | include_directories : includes, |
| 1832 | link_with : [libshared], |
| 1833 | dependencies : [libcrypt], |
| 1834 | install_rpath : rootlibexecdir, |
| 1835 | install : true, |
| 1836 | install_dir : rootbindir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1837 | endif |
| 1838 | |
| 1839 | executable('systemd-remount-fs', |
| 1840 | 'src/remount-fs/remount-fs.c', |
| 1841 | 'src/core/mount-setup.c', |
| 1842 | 'src/core/mount-setup.h', |
| 1843 | include_directories : includes, |
| 1844 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1845 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1846 | install : true, |
| 1847 | install_dir : rootlibexecdir) |
| 1848 | |
| 1849 | executable('systemd-machine-id-setup', |
| 1850 | 'src/machine-id-setup/machine-id-setup-main.c', |
| 1851 | 'src/core/machine-id-setup.c', |
| 1852 | 'src/core/machine-id-setup.h', |
| 1853 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1854 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | b2fc583 | 2017-04-10 18:13:00 -0400 | [diff] [blame] | 1855 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1856 | install : true, |
| 1857 | install_dir : rootbindir) |
| 1858 | |
| 1859 | executable('systemd-fsck', |
| 1860 | 'src/fsck/fsck.c', |
| 1861 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1862 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1863 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1864 | install : true, |
| 1865 | install_dir : rootlibexecdir) |
| 1866 | |
| 1867 | executable('systemd-sleep', |
| 1868 | 'src/sleep/sleep.c', |
| 1869 | include_directories : includes, |
| 1870 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1871 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1872 | install : true, |
| 1873 | install_dir : rootlibexecdir) |
| 1874 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1875 | exe = executable('systemd-sysctl', |
| 1876 | 'src/sysctl/sysctl.c', |
| 1877 | include_directories : includes, |
| 1878 | link_with : [libshared], |
| 1879 | install_rpath : rootlibexecdir, |
| 1880 | install : true, |
| 1881 | install_dir : rootlibexecdir) |
| 1882 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1883 | |
| 1884 | executable('systemd-ac-power', |
| 1885 | 'src/ac-power/ac-power.c', |
| 1886 | include_directories : includes, |
| 1887 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1888 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1889 | install : true, |
| 1890 | install_dir : rootlibexecdir) |
| 1891 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1892 | exe = executable('systemd-detect-virt', |
| 1893 | 'src/detect-virt/detect-virt.c', |
| 1894 | include_directories : includes, |
| 1895 | link_with : [libshared], |
| 1896 | install_rpath : rootlibexecdir, |
| 1897 | install : true) |
| 1898 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1899 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1900 | exe = executable('systemd-delta', |
| 1901 | 'src/delta/delta.c', |
| 1902 | include_directories : includes, |
| 1903 | link_with : [libshared], |
| 1904 | install_rpath : rootlibexecdir, |
| 1905 | install : true) |
| 1906 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1907 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1908 | exe = executable('systemd-escape', |
| 1909 | 'src/escape/escape.c', |
| 1910 | include_directories : includes, |
| 1911 | link_with : [libshared], |
| 1912 | install_rpath : rootlibexecdir, |
| 1913 | install : true, |
| 1914 | install_dir : rootbindir) |
| 1915 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1916 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1917 | exe = executable('systemd-notify', |
| 1918 | 'src/notify/notify.c', |
| 1919 | include_directories : includes, |
| 1920 | link_with : [libshared], |
| 1921 | install_rpath : rootlibexecdir, |
| 1922 | install : true, |
| 1923 | install_dir : rootbindir) |
| 1924 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1925 | |
| 1926 | executable('systemd-volatile-root', |
| 1927 | 'src/volatile-root/volatile-root.c', |
| 1928 | include_directories : includes, |
| 1929 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1930 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1931 | install : true, |
| 1932 | install_dir : rootlibexecdir) |
| 1933 | |
| 1934 | executable('systemd-cgroups-agent', |
| 1935 | 'src/cgroups-agent/cgroups-agent.c', |
| 1936 | include_directories : includes, |
| 1937 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1938 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1939 | install : true, |
| 1940 | install_dir : rootlibexecdir) |
| 1941 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1942 | exe = executable('systemd-path', |
| 1943 | 'src/path/path.c', |
| 1944 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1945 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1946 | install_rpath : rootlibexecdir, |
| 1947 | install : true) |
| 1948 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1949 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1950 | exe = executable('systemd-ask-password', |
| 1951 | 'src/ask-password/ask-password.c', |
| 1952 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1953 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1954 | install_rpath : rootlibexecdir, |
| 1955 | install : true, |
| 1956 | install_dir : rootbindir) |
| 1957 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1958 | |
| 1959 | executable('systemd-reply-password', |
| 1960 | 'src/reply-password/reply-password.c', |
| 1961 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1962 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1963 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1964 | install : true, |
| 1965 | install_dir : rootlibexecdir) |
| 1966 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1967 | exe = executable('systemd-tty-ask-password-agent', |
| 1968 | 'src/tty-ask-password-agent/tty-ask-password-agent.c', |
| 1969 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1970 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1971 | install_rpath : rootlibexecdir, |
| 1972 | install : true, |
| 1973 | install_dir : rootbindir) |
| 1974 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1975 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1976 | exe = executable('systemd-cgls', |
| 1977 | 'src/cgls/cgls.c', |
| 1978 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1979 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1980 | install_rpath : rootlibexecdir, |
| 1981 | install : true) |
| 1982 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1983 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1984 | exe = executable('systemd-cgtop', |
| 1985 | 'src/cgtop/cgtop.c', |
| 1986 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1987 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 1988 | install_rpath : rootlibexecdir, |
| 1989 | install : true) |
| 1990 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1991 | |
| 1992 | executable('systemd-initctl', |
| 1993 | 'src/initctl/initctl.c', |
| 1994 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 1995 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 1996 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 1997 | install : true, |
| 1998 | install_dir : rootlibexecdir) |
| 1999 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2000 | exe = executable('systemd-mount', |
| 2001 | 'src/mount/mount-tool.c', |
| 2002 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 2003 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2004 | install_rpath : rootlibexecdir, |
| 2005 | install : true) |
| 2006 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2007 | |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 2008 | meson.add_install_script(meson_make_symlink, |
Michael Biebl | e17e5ba | 2017-04-13 10:30:56 -0400 | [diff] [blame] | 2009 | 'systemd-mount', join_paths(bindir, 'systemd-umount')) |
Zbigniew Jędrzejewski-Szmek | 7b76fce | 2017-04-09 23:55:50 -0400 | [diff] [blame] | 2010 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2011 | exe = executable('systemd-run', |
| 2012 | 'src/run/run.c', |
| 2013 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2014 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2015 | install_rpath : rootlibexecdir, |
| 2016 | install : true) |
| 2017 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2018 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2019 | exe = executable('systemd-stdio-bridge', |
| 2020 | 'src/stdio-bridge/stdio-bridge.c', |
| 2021 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2022 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2023 | install_rpath : rootlibexecdir, |
| 2024 | install : true) |
| 2025 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2026 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2027 | exe = executable('busctl', |
| 2028 | 'src/busctl/busctl.c', |
| 2029 | 'src/busctl/busctl-introspect.c', |
| 2030 | 'src/busctl/busctl-introspect.h', |
| 2031 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2032 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2033 | install_rpath : rootlibexecdir, |
| 2034 | install : true) |
| 2035 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2036 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2037 | if conf.get('ENABLE_SYSUSERS', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2038 | exe = executable('systemd-sysusers', |
| 2039 | 'src/sysusers/sysusers.c', |
| 2040 | include_directories : includes, |
| 2041 | link_with : [libshared], |
| 2042 | install_rpath : rootlibexecdir, |
| 2043 | install : true, |
| 2044 | install_dir : rootbindir) |
| 2045 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2046 | endif |
| 2047 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2048 | if conf.get('ENABLE_TMPFILES', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2049 | exe = executable('systemd-tmpfiles', |
| 2050 | 'src/tmpfiles/tmpfiles.c', |
| 2051 | include_directories : includes, |
| 2052 | link_with : [libshared], |
| 2053 | dependencies : [libacl], |
| 2054 | install_rpath : rootlibexecdir, |
| 2055 | install : true, |
| 2056 | install_dir : rootbindir) |
| 2057 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2058 | endif |
| 2059 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2060 | if conf.get('ENABLE_HWDB', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2061 | exe = executable('systemd-hwdb', |
| 2062 | 'src/hwdb/hwdb.c', |
| 2063 | 'src/libsystemd/sd-hwdb/hwdb-internal.h', |
| 2064 | include_directories : includes, |
Michael Biebl | 0da6f39 | 2017-04-21 18:32:14 +0200 | [diff] [blame] | 2065 | link_with : [libudev_internal], |
| 2066 | install_rpath : udev_rpath, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2067 | install : true, |
| 2068 | install_dir : rootbindir) |
| 2069 | public_programs += [exe] |
| 2070 | endif |
| 2071 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2072 | if conf.get('ENABLE_QUOTACHECK', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2073 | executable('systemd-quotacheck', |
| 2074 | 'src/quotacheck/quotacheck.c', |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2075 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2076 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2077 | install_rpath : rootlibexecdir, |
| 2078 | install : true, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2079 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2080 | endif |
| 2081 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2082 | exe = executable('systemd-socket-proxyd', |
| 2083 | 'src/socket-proxy/socket-proxyd.c', |
| 2084 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2085 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2086 | dependencies : [threads], |
| 2087 | install_rpath : rootlibexecdir, |
| 2088 | install : true, |
| 2089 | install_dir : rootlibexecdir) |
| 2090 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2091 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2092 | exe = executable('systemd-udevd', |
| 2093 | systemd_udevd_sources, |
| 2094 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | 5c72049 | 2017-02-22 23:13:22 -0500 | [diff] [blame] | 2095 | c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2096 | link_with : [libudev_core, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2097 | libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | 1aec3ed | 2017-04-17 19:33:10 -0400 | [diff] [blame] | 2098 | libudev_internal], |
Zbigniew Jędrzejewski-Szmek | 3a30f21 | 2017-04-17 12:07:12 -0400 | [diff] [blame] | 2099 | dependencies : [threads, |
| 2100 | libkmod, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2101 | libidn, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2102 | libacl, |
| 2103 | libblkid], |
Zbigniew Jędrzejewski-Szmek | 1aec3ed | 2017-04-17 19:33:10 -0400 | [diff] [blame] | 2104 | install_rpath : udev_rpath, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2105 | install : true, |
| 2106 | install_dir : rootlibexecdir) |
| 2107 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2108 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2109 | exe = executable('udevadm', |
| 2110 | udevadm_sources, |
| 2111 | include_directories : includes, |
| 2112 | link_with : [libudev_core, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2113 | libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | 1aec3ed | 2017-04-17 19:33:10 -0400 | [diff] [blame] | 2114 | libudev_internal], |
Zbigniew Jędrzejewski-Szmek | 3a30f21 | 2017-04-17 12:07:12 -0400 | [diff] [blame] | 2115 | dependencies : [threads, |
| 2116 | libkmod, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2117 | libidn, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2118 | libacl, |
| 2119 | libblkid], |
Zbigniew Jędrzejewski-Szmek | 1aec3ed | 2017-04-17 19:33:10 -0400 | [diff] [blame] | 2120 | install_rpath : udev_rpath, |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2121 | install : true, |
| 2122 | install_dir : rootbindir) |
| 2123 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2124 | |
| 2125 | executable('systemd-shutdown', |
| 2126 | systemd_shutdown_sources, |
| 2127 | include_directories : includes, |
Michael Biebl | 34ce0a5 | 2017-04-25 20:19:54 +0200 | [diff] [blame] | 2128 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2129 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2130 | install : true, |
| 2131 | install_dir : rootlibexecdir) |
| 2132 | |
| 2133 | executable('systemd-update-done', |
| 2134 | 'src/update-done/update-done.c', |
| 2135 | include_directories : includes, |
| 2136 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2137 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2138 | install : true, |
| 2139 | install_dir : rootlibexecdir) |
| 2140 | |
| 2141 | executable('systemd-update-utmp', |
| 2142 | 'src/update-utmp/update-utmp.c', |
| 2143 | include_directories : includes, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2144 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2145 | dependencies : [libaudit], |
Zbigniew Jędrzejewski-Szmek | 421f001 | 2017-04-12 12:02:30 -0400 | [diff] [blame] | 2146 | install_rpath : rootlibexecdir, |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2147 | install : true, |
| 2148 | install_dir : rootlibexecdir) |
| 2149 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2150 | if conf.get('HAVE_KMOD', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2151 | executable('systemd-modules-load', |
| 2152 | 'src/modules-load/modules-load.c', |
| 2153 | include_directories : includes, |
| 2154 | link_with : [libshared], |
| 2155 | dependencies : [libkmod], |
| 2156 | install_rpath : rootlibexecdir, |
| 2157 | install : true, |
| 2158 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 2159 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2160 | meson.add_install_script('sh', '-c', |
| 2161 | mkdir_p.format(modulesloaddir)) |
| 2162 | meson.add_install_script('sh', '-c', |
| 2163 | mkdir_p.format(join_paths(sysconfdir, 'modules-load.d'))) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2164 | endif |
| 2165 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2166 | exe = executable('systemd-nspawn', |
| 2167 | systemd_nspawn_sources, |
| 2168 | 'src/core/mount-setup.c', # FIXME: use a variable? |
| 2169 | 'src/core/mount-setup.h', |
| 2170 | 'src/core/loopback-setup.c', |
| 2171 | 'src/core/loopback-setup.h', |
| 2172 | include_directories : [includes, include_directories('src/nspawn')], |
Zbigniew Jędrzejewski-Szmek | 0bc9115 | 2017-04-27 13:39:54 -0400 | [diff] [blame] | 2173 | link_with : [libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2174 | dependencies : [libacl, |
| 2175 | libblkid, |
| 2176 | libseccomp, |
| 2177 | libselinux], |
| 2178 | install_rpath : rootlibexecdir, |
| 2179 | install : true) |
| 2180 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2181 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2182 | if conf.get('ENABLE_NETWORKD', false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2183 | executable('systemd-networkd', |
| 2184 | systemd_networkd_sources, |
| 2185 | include_directories : includes, |
| 2186 | link_with : [libnetworkd_core, |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2187 | libsystemd_network, |
| 2188 | libudev_internal, |
| 2189 | libshared], |
Zbigniew Jędrzejewski-Szmek | 4b57a27 | 2017-06-21 06:05:15 -0400 | [diff] [blame] | 2190 | dependencies : [threads], |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2191 | install_rpath : rootlibexecdir, |
| 2192 | install : true, |
| 2193 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2194 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2195 | executable('systemd-networkd-wait-online', |
| 2196 | systemd_networkd_wait_online_sources, |
| 2197 | include_directories : includes, |
| 2198 | link_with : [libnetworkd_core, |
| 2199 | libshared], |
| 2200 | install_rpath : rootlibexecdir, |
| 2201 | install : true, |
| 2202 | install_dir : rootlibexecdir) |
Zbigniew Jędrzejewski-Szmek | f0bd7cc | 2017-04-12 12:14:30 -0400 | [diff] [blame] | 2203 | endif |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2204 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2205 | exe = executable('networkctl', |
| 2206 | networkctl_sources, |
| 2207 | include_directories : includes, |
| 2208 | link_with : [libsystemd_network, |
Zbigniew Jędrzejewski-Szmek | aac2605 | 2017-04-14 18:49:47 -0400 | [diff] [blame] | 2209 | libshared], |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2210 | install_rpath : rootlibexecdir, |
| 2211 | install : true, |
| 2212 | install_dir : rootbindir) |
| 2213 | public_programs += [exe] |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2214 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2215 | ############################################################ |
| 2216 | |
| 2217 | foreach tuple : tests |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2218 | sources = tuple[0] |
| 2219 | link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] |
| 2220 | dependencies = tuple[2] |
| 2221 | condition = tuple.length() >= 4 ? tuple[3] : '' |
| 2222 | type = tuple.length() >= 5 ? tuple[4] : '' |
| 2223 | defs = tuple.length() >= 6 ? tuple[5] : [] |
| 2224 | incs = tuple.length() >= 7 ? tuple[6] : includes |
| 2225 | timeout = 30 |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2226 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2227 | name = sources[0].split('/')[-1].split('.')[0] |
| 2228 | if type.startswith('timeout=') |
| 2229 | timeout = type.split('=')[1].to_int() |
| 2230 | type = '' |
| 2231 | endif |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2232 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2233 | if condition == '' or conf.get(condition, false) |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2234 | exe = executable( |
| 2235 | name, |
| 2236 | sources, |
| 2237 | include_directories : incs, |
| 2238 | link_with : link_with, |
| 2239 | dependencies : dependencies, |
| 2240 | c_args : defs, |
| 2241 | install_rpath : rootlibexecdir, |
Michael Biebl | 7cdd978 | 2017-06-23 03:23:30 +0200 | [diff] [blame] | 2242 | install : install_tests, |
| 2243 | install_dir : join_paths(testsdir, type)) |
Zbigniew Jędrzejewski-Szmek | 572baca | 2017-04-08 01:55:38 -0400 | [diff] [blame] | 2244 | |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2245 | if type == 'manual' |
| 2246 | message('@0@ is a manual test'.format(name)) |
| 2247 | elif type == 'unsafe' and want_tests != 'unsafe' |
| 2248 | message('@0@ is an unsafe test'.format(name)) |
| 2249 | else |
| 2250 | test(name, exe, |
| 2251 | env : test_env, |
| 2252 | timeout : timeout) |
| 2253 | endif |
| 2254 | else |
| 2255 | message('Not compiling @0@ because @1@ is not true'.format(name, condition)) |
| 2256 | endif |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2257 | endforeach |
| 2258 | |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 2259 | test_libsystemd_sym = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2260 | 'test-libsystemd-sym', |
| 2261 | test_libsystemd_sym_c, |
| 2262 | include_directories : includes, |
| 2263 | link_with : [libsystemd], |
| 2264 | install : install_tests, |
| 2265 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | 37ab1a2 | 2017-04-10 14:13:40 -0400 | [diff] [blame] | 2266 | test('test-libsystemd-sym', |
| 2267 | test_libsystemd_sym) |
| 2268 | |
Zbigniew Jędrzejewski-Szmek | e0bec52 | 2017-04-10 15:20:42 -0400 | [diff] [blame] | 2269 | test_libudev_sym = executable( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2270 | 'test-libudev-sym', |
| 2271 | test_libudev_sym_c, |
| 2272 | include_directories : includes, |
| 2273 | c_args : ['-Wno-deprecated-declarations'], |
| 2274 | link_with : [libudev], |
| 2275 | install : install_tests, |
| 2276 | install_dir : testsdir) |
Zbigniew Jędrzejewski-Szmek | e0bec52 | 2017-04-10 15:20:42 -0400 | [diff] [blame] | 2277 | test('test-libudev-sym', |
| 2278 | test_libudev_sym) |
| 2279 | |
Zbigniew Jędrzejewski-Szmek | 69e9642 | 2017-04-07 00:19:09 -0400 | [diff] [blame] | 2280 | ############################################################ |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2281 | |
| 2282 | make_directive_index_py = find_program('tools/make-directive-index.py') |
| 2283 | 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] | 2284 | xml_helper_py = find_program('tools/xml_helper.py') |
Zbigniew Jędrzejewski-Szmek | abba22c | 2017-04-15 00:40:59 -0400 | [diff] [blame] | 2285 | hwdb_update_sh = find_program('tools/meson-hwdb-update.sh') |
Zbigniew Jędrzejewski-Szmek | 5c23128 | 2017-04-04 23:03:47 -0400 | [diff] [blame] | 2286 | |
| 2287 | subdir('units') |
| 2288 | subdir('sysctl.d') |
| 2289 | subdir('sysusers.d') |
| 2290 | subdir('tmpfiles.d') |
| 2291 | subdir('rules') |
| 2292 | subdir('hwdb') |
| 2293 | subdir('network') |
| 2294 | subdir('man') |
| 2295 | subdir('shell-completion/bash') |
| 2296 | subdir('shell-completion/zsh') |
| 2297 | subdir('docs/sysvinit') |
| 2298 | subdir('docs/var-log') |
| 2299 | |
| 2300 | # FIXME: figure out if the warning is true: |
| 2301 | # https://github.com/mesonbuild/meson/wiki/Reference-manual#install_subdir |
| 2302 | install_subdir('factory/etc', |
| 2303 | install_dir : factorydir) |
| 2304 | |
| 2305 | |
| 2306 | install_data('xorg/50-systemd-user.sh', |
| 2307 | install_dir : xinitrcdir) |
| 2308 | install_data('system-preset/90-systemd.preset', |
| 2309 | install_dir : systempresetdir) |
| 2310 | install_data('README', |
| 2311 | 'NEWS', |
| 2312 | 'CODING_STYLE', |
| 2313 | 'DISTRO_PORTING', |
| 2314 | 'ENVIRONMENT.md', |
| 2315 | 'LICENSE.GPL2', |
| 2316 | 'LICENSE.LGPL2.1', |
| 2317 | 'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION', |
| 2318 | install_dir : docdir) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2319 | |
Zbigniew Jędrzejewski-Szmek | 94e75a5 | 2017-04-09 23:55:05 -0400 | [diff] [blame] | 2320 | meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir)) |
| 2321 | meson.add_install_script('sh', '-c', 'touch $DESTDIR@0@'.format(prefixdir)) |
| 2322 | |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2323 | ############################################################ |
| 2324 | |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2325 | meson_check_help = find_program('tools/meson-check-help.sh') |
| 2326 | |
| 2327 | foreach exec : public_programs |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2328 | name = exec.full_path().split('/')[-1] |
| 2329 | test('check-help-' + name, |
| 2330 | meson_check_help, |
| 2331 | args : [exec.full_path()]) |
Zbigniew Jędrzejewski-Szmek | 005a29f | 2017-04-13 11:52:05 -0400 | [diff] [blame] | 2332 | endforeach |
| 2333 | |
| 2334 | ############################################################ |
| 2335 | |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 2336 | if git.found() |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2337 | all_files = run_command( |
| 2338 | git, |
| 2339 | ['--git-dir=@0@/.git'.format(meson.source_root()), |
| 2340 | 'ls-files', |
| 2341 | ':/*.[ch]']) |
| 2342 | all_files = files(all_files.stdout().split()) |
Zbigniew Jędrzejewski-Szmek | d68b342 | 2017-04-06 14:33:27 -0400 | [diff] [blame] | 2343 | |
Zbigniew Jędrzejewski-Szmek | 341b892 | 2017-05-30 19:56:12 -0400 | [diff] [blame] | 2344 | run_target( |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 2345 | 'tags', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2346 | input : all_files, |
Zbigniew Jędrzejewski-Szmek | 0700e8b | 2017-07-03 12:42:29 -0400 | [diff] [blame] | 2347 | command : ['env', 'etags', '-o', '@0@/TAGS'.format(meson.source_root())] + all_files) |
| 2348 | run_target( |
| 2349 | 'ctags', |
| 2350 | input : all_files, |
| 2351 | 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] | 2352 | endif |
Zbigniew Jędrzejewski-Szmek | 177929c | 2017-04-15 00:16:23 -0400 | [diff] [blame] | 2353 | |
| 2354 | if git.found() |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2355 | 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] | 2356 | run_target( |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2357 | 'git-contrib', |
Zbigniew Jędrzejewski-Szmek | 37efbbd | 2017-04-17 19:25:00 -0400 | [diff] [blame] | 2358 | command : [meson_git_contrib_sh]) |
Zbigniew Jędrzejewski-Szmek | 177929c | 2017-04-15 00:16:23 -0400 | [diff] [blame] | 2359 | endif |
Zbigniew Jędrzejewski-Szmek | dd6ab3d | 2017-04-24 19:28:05 -0400 | [diff] [blame] | 2360 | |
| 2361 | if git.found() |
| 2362 | git_head = run_command( |
| 2363 | git, |
| 2364 | ['--git-dir=@0@/.git'.format(meson.source_root()), |
| 2365 | 'rev-parse', 'HEAD']).stdout().strip() |
| 2366 | git_head_short = run_command( |
| 2367 | git, |
| 2368 | ['--git-dir=@0@/.git'.format(meson.source_root()), |
| 2369 | 'rev-parse', '--short=7', 'HEAD']).stdout().strip() |
| 2370 | |
| 2371 | run_target( |
| 2372 | 'git-snapshot', |
| 2373 | command : ['git', 'archive', |
| 2374 | '-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(), |
| 2375 | git_head_short), |
| 2376 | '--prefix', 'systemd-@0@/'.format(git_head), |
| 2377 | 'HEAD']) |
| 2378 | endif |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2379 | |
| 2380 | ############################################################ |
| 2381 | |
| 2382 | status = [ |
| 2383 | '@0@ @1@'.format(meson.project_name(), meson.project_version()), |
| 2384 | |
| 2385 | 'prefix: @0@'.format(prefixdir), |
| 2386 | 'rootprefix: @0@'.format(rootprefixdir), |
| 2387 | 'sysconf dir: @0@'.format(sysconfdir), |
| 2388 | 'includedir: @0@'.format(includedir), |
| 2389 | 'lib dir: @0@'.format(libdir), |
| 2390 | 'rootlib dir: @0@'.format(rootlibdir), |
| 2391 | 'SysV init scripts: @0@'.format(sysvinit_path), |
| 2392 | 'SysV rc?.d directories: @0@'.format(sysvrcnd_path), |
| 2393 | 'PAM modules dir: @0@'.format(pamlibdir), |
| 2394 | 'PAM configuration dir: @0@'.format(pamconfdir), |
| 2395 | 'RPM macros dir: @0@'.format(rpmmacrosdir), |
| 2396 | 'D-Bus policy dir: @0@'.format(dbuspolicydir), |
| 2397 | 'D-Bus session dir: @0@'.format(dbussessionservicedir), |
| 2398 | 'D-Bus system dir: @0@'.format(dbussystemservicedir), |
| 2399 | 'bash completions dir: @0@'.format(bashcompletiondir), |
| 2400 | 'zsh completions dir: @0@'.format(zshcompletiondir), |
| 2401 | 'extra start script: @0@'.format(get_option('rc-local')), |
| 2402 | 'extra stop script: @0@'.format(get_option('halt-local')), |
| 2403 | 'debug shell: @0@ @ @1@'.format(get_option('debug-shell'), |
| 2404 | get_option('debug-tty')), |
| 2405 | 'TTY GID: @0@'.format(tty_gid), |
| 2406 | 'maximum system UID: @0@'.format(system_uid_max), |
| 2407 | 'maximum system GID: @0@'.format(system_gid_max), |
| 2408 | '/dev/kvm access mode: @0@'.format(get_option('dev-kvm-mode')), |
| 2409 | 'certificate root: @0@'.format(get_option('certificate-root')), |
| 2410 | 'support URL: @0@'.format(support_url), |
| 2411 | 'nobody user name: @0@'.format(get_option('nobody-user')), |
| 2412 | 'nobody group name: @0@'.format(get_option('nobody-group')), |
| 2413 | 'fallback hostname: @0@'.format(get_option('fallback-hostname')), |
Zbigniew Jędrzejewski-Szmek | 5248e7e | 2017-07-11 02:15:08 -0400 | [diff] [blame] | 2414 | 'symbolic gateway hostnames: @0@'.format(', '.join(gateway_hostnames)), |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2415 | |
| 2416 | 'default DNSSEC mode: @0@'.format(default_dnssec), |
| 2417 | 'default cgroup hierarchy: @0@'.format(default_hierarchy), |
| 2418 | 'default KillUserProcesses setting: @0@'.format(kill_user_processes)] |
| 2419 | |
| 2420 | alt_dns_servers = '\n '.join(dns_servers.split(' ')) |
| 2421 | alt_ntp_servers = '\n '.join(ntp_servers.split(' ')) |
| 2422 | status += [ |
| 2423 | 'default DNS servers: @0@'.format(alt_dns_servers), |
| 2424 | 'default NTP servers: @0@'.format(alt_ntp_servers)] |
| 2425 | |
| 2426 | alt_time_epoch = run_command('date', '-Is', '-u', '-d', |
| 2427 | '@@0@'.format(time_epoch)).stdout().strip() |
| 2428 | status += [ |
| 2429 | 'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)] |
| 2430 | |
| 2431 | # TODO: |
| 2432 | # CFLAGS: ${OUR_CFLAGS} ${CFLAGS} |
| 2433 | # CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} |
| 2434 | # LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} |
| 2435 | |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2436 | if conf.get('ENABLE_EFI', false) |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2437 | status += [ |
| 2438 | 'efi arch: @0@'.format(efi_arch)] |
| 2439 | |
| 2440 | if have_gnu_efi |
| 2441 | status += [ |
| 2442 | 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME), |
| 2443 | 'EFI CC @0@'.format(efi_cc), |
| 2444 | 'EFI libdir: @0@'.format(efi_libdir), |
| 2445 | 'EFI ldsdir: @0@'.format(efi_ldsdir), |
| 2446 | 'EFI includedir: @0@'.format(efi_incdir)] |
| 2447 | endif |
| 2448 | endif |
| 2449 | |
| 2450 | found = [] |
| 2451 | missing = [] |
| 2452 | |
| 2453 | foreach tuple : [ |
| 2454 | ['libcryptsetup'], |
| 2455 | ['PAM'], |
| 2456 | ['AUDIT'], |
| 2457 | ['IMA'], |
| 2458 | ['AppArmor'], |
| 2459 | ['SELinux'], |
| 2460 | ['SECCOMP'], |
| 2461 | ['SMACK'], |
| 2462 | ['zlib'], |
| 2463 | ['xz'], |
| 2464 | ['lz4'], |
| 2465 | ['bzip2'], |
| 2466 | ['ACL'], |
| 2467 | ['gcrypt'], |
| 2468 | ['qrencode'], |
| 2469 | ['microhttpd'], |
| 2470 | ['gnutls'], |
| 2471 | ['libcurl'], |
Zbigniew Jędrzejewski-Szmek | d1bf567 | 2017-06-16 09:16:28 -0400 | [diff] [blame] | 2472 | ['idn'], |
Zbigniew Jędrzejewski-Szmek | 87057e2 | 2017-05-09 21:56:34 -0400 | [diff] [blame] | 2473 | ['libidn2'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2474 | ['libidn'], |
Waldemar Brodkorb | e7e11bb | 2017-06-24 19:30:26 +0200 | [diff] [blame] | 2475 | ['nss-systemd'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2476 | ['libiptc'], |
| 2477 | ['elfutils'], |
| 2478 | ['binfmt'], |
| 2479 | ['vconsole'], |
| 2480 | ['quotacheck'], |
| 2481 | ['tmpfiles'], |
| 2482 | ['environment.d'], |
| 2483 | ['sysusers'], |
| 2484 | ['firstboot'], |
| 2485 | ['randomseed'], |
| 2486 | ['backlight'], |
| 2487 | ['rfkill'], |
| 2488 | ['logind'], |
| 2489 | ['machined'], |
| 2490 | ['importd'], |
| 2491 | ['hostnamed'], |
| 2492 | ['timedated'], |
| 2493 | ['timesyncd'], |
| 2494 | ['localed'], |
| 2495 | ['networkd'], |
| 2496 | ['resolved'], |
| 2497 | ['coredump'], |
| 2498 | ['polkit'], |
| 2499 | ['legacy pkla', install_polkit_pkla], |
| 2500 | ['efi'], |
| 2501 | ['gnu-efi', have_gnu_efi], |
| 2502 | ['kmod'], |
| 2503 | ['xkbcommon'], |
| 2504 | ['blkid'], |
| 2505 | ['dbus'], |
| 2506 | ['glib'], |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2507 | ['nss-myhostname', conf.get('HAVE_MYHOSTNAME', false)], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2508 | ['hwdb'], |
| 2509 | ['tpm'], |
| 2510 | ['man pages', want_man], |
| 2511 | ['html pages', want_html], |
| 2512 | ['man page indices', want_man and have_lxml], |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2513 | ['split /usr', conf.get('HAVE_SPLIT_USR', false)], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2514 | ['SysV compat'], |
| 2515 | ['utmp'], |
| 2516 | ['ldconfig'], |
| 2517 | ['hibernate'], |
| 2518 | ['adm group', get_option('adm-group')], |
| 2519 | ['wheel group', get_option('wheel-group')], |
Franck Bui | b14e1b4 | 2017-05-09 14:02:37 +0200 | [diff] [blame] | 2520 | ['gshadow'], |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2521 | ['debug hashmap'], |
| 2522 | ['debug mmap cache'], |
| 2523 | ] |
| 2524 | |
| 2525 | cond = tuple.get(1, '') |
| 2526 | if cond == '' |
| 2527 | ident1 = 'HAVE_' + tuple[0].underscorify().to_upper() |
| 2528 | ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper() |
Zbigniew Jędrzejewski-Szmek | 2c201c2 | 2017-04-27 21:13:08 -0400 | [diff] [blame] | 2529 | cond = conf.get(ident1, false) or conf.get(ident2, false) |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2530 | endif |
| 2531 | if cond |
| 2532 | found += [tuple[0]] |
| 2533 | else |
| 2534 | missing += [tuple[0]] |
| 2535 | endif |
| 2536 | endforeach |
| 2537 | |
| 2538 | status += [ |
Zbigniew Jędrzejewski-Szmek | 9d39c1b | 2017-07-26 14:14:44 -0400 | [diff] [blame] | 2539 | '', |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2540 | 'enabled features: @0@'.format(', '.join(found)), |
Zbigniew Jędrzejewski-Szmek | 9d39c1b | 2017-07-26 14:14:44 -0400 | [diff] [blame] | 2541 | '', |
| 2542 | 'disabled features: @0@'.format(', '.join(missing)), |
| 2543 | ''] |
Zbigniew Jędrzejewski-Szmek | 829257d | 2017-04-27 20:54:52 -0400 | [diff] [blame] | 2544 | message('\n '.join(status)) |