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