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