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