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