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