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