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