]>
Commit | Line | Data |
---|---|---|
5c23128d ZJS |
1 | # -*- mode: meson -*- |
2 | ||
3 | project('systemd', 'c', | |
4 | version : '233', | |
5 | license : 'LGPLv2+', | |
6 | default_options: [ | |
7 | 'c_std=gnu99', | |
8 | 'prefix=/usr', | |
9 | 'sysconfdir=/etc', | |
10 | 'localstatedir=/var', | |
11 | ], | |
12 | meson_version : '>= 0.39.1', | |
13 | ) | |
14 | ||
15 | # We need the same data in three different formats, ugh! | |
16 | # Also, for hysterical reasons, we use different variable | |
17 | # names, sometimes. Not all variables are included in every | |
18 | # set. Ugh, ugh, ugh! | |
19 | conf = configuration_data() | |
20 | conf.set_quoted('PACKAGE_STRING', meson.project_name() + ' ' + meson.project_version()) | |
21 | conf.set_quoted('PACKAGE_VERSION', meson.project_version()) | |
22 | ||
23 | substs = configuration_data() | |
24 | substs.set('PACKAGE_URL', 'https://www.freedesktop.org/wiki/Software/systemd') | |
25 | substs.set('PACKAGE_VERSION', meson.project_version()) | |
26 | ||
27 | m4_defines = [] | |
28 | ||
29 | ##################################################################### | |
30 | ||
31 | if get_option('split-usr') | |
32 | conf.set('HAVE_SPLIT_USR', 1) | |
33 | rootprefixdir = '/' | |
34 | else | |
35 | rootprefixdir = '/usr' | |
36 | endif | |
37 | ||
38 | sysvinit_path = get_option('sysvinit-path') | |
39 | sysvrcnd_path = get_option('sysvrcnd-path') | |
40 | if sysvinit_path != '' or sysvrcnd_path != '' | |
41 | conf.set('HAVE_SYSV_COMPAT', 1, | |
42 | description : 'SysV init scripts and rcN.d links are supported') | |
43 | endif | |
44 | ||
45 | # join_paths ignore the preceding arguments if an absolute component is | |
46 | # encountered, so this should canonicalize various paths when they are | |
47 | # absolute or relative. | |
48 | prefixdir = get_option('prefix') | |
49 | if not prefixdir.startswith('/') | |
50 | error('Prefix is not absolute: "@0@"'.format(prefixdir)) | |
51 | endif | |
52 | bindir = join_paths(prefixdir, get_option('bindir')) | |
53 | libdir = join_paths(prefixdir, get_option('libdir')) | |
54 | sysconfdir = join_paths(prefixdir, get_option('sysconfdir')) | |
55 | includedir = join_paths(prefixdir, get_option('includedir')) | |
56 | datadir = join_paths(prefixdir, get_option('datadir')) | |
57 | localstatedir = join_paths('/', get_option('localstatedir')) | |
58 | ||
59 | rootbindir = join_paths(rootprefixdir, 'bin') | |
60 | rootlibexecdir = join_paths(rootprefixdir, 'lib/systemd') | |
61 | ||
62 | rootlibdir = get_option('rootlibdir') | |
63 | if rootlibdir == '' | |
64 | rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1]) | |
65 | endif | |
66 | ||
67 | # Dirs of external packages | |
68 | pkgconfigdatadir = datadir + '/pkgconfig' | |
69 | pkgconfiglibdir = libdir + '/pkgconfig' | |
70 | polkitpolicydir = datadir + '/polkit-1/actions' | |
71 | polkitrulesdir = datadir + '/polkit-1/rules.d' | |
72 | polkitpkladir = localstatedir + '/lib/polkit-1/localauthority/10-vendor.d' | |
73 | varlogdir = localstatedir + '/log' | |
74 | xinitrcdir = sysconfdir + '/X11/xinit/xinitrc.d' | |
75 | rpmmacrosdir = get_option('rpmmacrosdir') | |
76 | ||
77 | # Our own paths | |
78 | pkgdatadir = datadir + '/systemd' | |
79 | environmentdir = prefixdir + '/lib/environment.d' | |
80 | pkgsysconfdir = sysconfdir + '/systemd' | |
81 | userunitdir = prefixdir + '/lib/systemd/user' | |
82 | userpresetdir = prefixdir + '/lib/systemd/user-preset' | |
83 | tmpfilesdir = prefixdir + '/lib/tmpfiles.d' | |
84 | sysusersdir = prefixdir + '/lib/sysusers.d' | |
85 | sysctldir = prefixdir + '/lib/sysctl.d' | |
86 | binfmtdir = prefixdir + '/lib/binfmt.d' | |
87 | modulesloaddir = prefixdir + '/lib/modules-load.d' | |
88 | networkdir = rootprefixdir + '/lib/systemd/network' | |
89 | pkgincludedir = includedir + '/systemd' | |
90 | systemgeneratordir = rootlibexecdir + '/system-generators' | |
91 | usergeneratordir = prefixdir + '/lib/systemd/user-generators' | |
92 | systemenvgeneratordir = prefixdir + '/lib/systemd/system-environment-generators' | |
93 | userenvgeneratordir = prefixdir + '/lib/systemd/user-environment-generators' | |
94 | systemshutdowndir = rootlibexecdir + '/system-shutdown' | |
95 | systemsleepdir = rootlibexecdir + '/system-sleep' | |
96 | systemunitdir = rootprefixdir + '/lib/systemd/system' | |
97 | systempresetdir = rootprefixdir + '/lib/systemd/system-preset' | |
98 | udevlibexecdir = rootprefixdir + '/lib/udev' | |
99 | udevhomedir = udevlibexecdir + '' | |
100 | udevrulesdir = udevlibexecdir + '/rules.d' | |
101 | udevhwdbdir = udevlibexecdir + '/hwdb.d' | |
102 | catalogdir = prefixdir + '/lib/systemd/catalog' | |
103 | kernelinstalldir = prefixdir + '/lib/kernel/install.d' | |
104 | factorydir = datadir + '/factory' | |
105 | docdir = datadir + '/doc/systemd' | |
106 | bootlibdir = prefixdir + '/lib/systemd/boot/efi' | |
107 | testsdir = prefixdir + '/lib/systemd/tests' | |
108 | systemdstatedir = localstatedir + '/lib/systemd' | |
109 | catalogstatedir = systemdstatedir + '/catalog' | |
110 | ||
111 | dbuspolicydir = get_option('dbuspolicydir') | |
112 | if dbuspolicydir == '' | |
113 | dbuspolicydir = datadir + '/dbus-1/system.d' | |
114 | endif | |
115 | ||
116 | dbussessionservicedir = get_option('dbussessionservicedir') | |
117 | if dbussessionservicedir == '' | |
118 | dbussessionservicedir = datadir + '/dbus-1/services' | |
119 | endif | |
120 | ||
121 | dbussystemservicedir = get_option('dbussystemservicedir') | |
122 | if dbussystemservicedir == '' | |
123 | dbussystemservicedir = datadir + '/dbus-1/system-services' | |
124 | endif | |
125 | ||
126 | pamlibdir = get_option('pamlibdir') | |
127 | if pamlibdir == '' | |
128 | pamlibdir = rootlibdir + '/security' | |
129 | endif | |
130 | ||
131 | pamconfdir = get_option('pamconfdir') | |
132 | if pamconfdir == '' | |
133 | pamconfdir = sysconfdir + '/pam.d' | |
134 | endif | |
135 | ||
136 | conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir) | |
137 | conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', pkgsysconfdir + '/system') | |
138 | conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir) | |
139 | conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) | |
140 | conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) | |
141 | conf.set_quoted('USER_CONFIG_UNIT_PATH', pkgsysconfdir + '/user') | |
142 | conf.set_quoted('USER_DATA_UNIT_PATH', userunitdir) | |
143 | conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root')) | |
144 | conf.set_quoted('CATALOG_DATABASE', catalogstatedir + '/database') | |
145 | conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH', rootlibexecdir + '/systemd-cgroups-agent') | |
146 | conf.set_quoted('SYSTEMD_BINARY_PATH', rootlibexecdir + '/systemd') | |
147 | conf.set_quoted('SYSTEMD_FSCK_PATH', rootlibexecdir + '/systemd-fsck') | |
148 | conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', rootlibexecdir + '/systemd-shutdown') | |
149 | conf.set_quoted('SYSTEMD_SLEEP_BINARY_PATH', rootlibexecdir + '/systemd-sleep') | |
150 | conf.set_quoted('SYSTEMCTL_BINARY_PATH', rootbindir + '/systemctl') | |
151 | conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', rootbindir + '/systemd-tty-ask-password-agent') | |
152 | conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', bindir + '/systemd-stdio-bridge') | |
153 | conf.set_quoted('ROOTPREFIX', rootprefixdir) | |
154 | conf.set_quoted('RANDOM_SEED_DIR', localstatedir + '/lib/systemd/') | |
155 | conf.set_quoted('RANDOM_SEED', localstatedir + '/lib/systemd/random-seed') | |
156 | conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', rootlibexecdir + '/systemd-cryptsetup') | |
157 | conf.set_quoted('SYSTEM_GENERATOR_PATH', systemgeneratordir) | |
158 | conf.set_quoted('USER_GENERATOR_PATH', usergeneratordir) | |
159 | conf.set_quoted('SYSTEM_ENV_GENERATOR_PATH', systemenvgeneratordir) | |
160 | conf.set_quoted('USER_ENV_GENERATOR_PATH', userenvgeneratordir) | |
161 | conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir) | |
162 | conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir) | |
163 | conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', pkgdatadir + '/kbd-model-map') | |
164 | conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', pkgdatadir + '/language-fallback-map') | |
165 | conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir) | |
166 | conf.set_quoted('POLKIT_AGENT_BINARY_PATH', bindir + '/pkttyagent') | |
167 | conf.set_quoted('LIBDIR', libdir) | |
168 | conf.set_quoted('ROOTLIBDIR', rootlibdir) | |
169 | conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir) | |
170 | conf.set_quoted('BOOTLIBDIR', bootlibdir) | |
171 | conf.set_quoted('SYSTEMD_PULL_PATH', rootlibexecdir + '/systemd-pull') | |
172 | conf.set_quoted('SYSTEMD_IMPORT_PATH', rootlibexecdir + '/systemd-import') | |
173 | conf.set_quoted('SYSTEMD_EXPORT_PATH', rootlibexecdir + '/systemd-export') | |
174 | conf.set_quoted('VENDOR_KEYRING_PATH', rootlibexecdir + '/import-pubring.gpg') | |
175 | conf.set_quoted('USER_KEYRING_PATH', pkgsysconfdir + '/import-pubring.gpg') | |
176 | conf.set_quoted('DOCUMENT_ROOT', pkgdatadir + '/gatewayd') | |
177 | ||
178 | conf.set_quoted('ABS_BUILD_DIR', meson.build_root()) | |
179 | conf.set_quoted('ABS_SRC_DIR', meson.source_root()) | |
180 | ||
181 | substs.set('prefix', prefixdir) | |
182 | substs.set('pkgsysconfdir', pkgsysconfdir) | |
183 | substs.set('rootlibexecdir', rootlibexecdir) | |
184 | substs.set('systemunitdir', systemunitdir) | |
185 | substs.set('userunitdir', userunitdir) | |
186 | substs.set('systempresetdir', systempresetdir) | |
187 | substs.set('userpresetdir', userpresetdir) | |
188 | substs.set('udevhwdbdir', udevhwdbdir) | |
189 | substs.set('udevrulesdir', udevrulesdir) | |
190 | substs.set('catalogdir', catalogdir) | |
191 | substs.set('tmpfilesdir', tmpfilesdir) | |
192 | substs.set('sysusersdir', sysusersdir) | |
193 | substs.set('sysctldir', sysctldir) | |
194 | substs.set('binfmtdir', binfmtdir) | |
195 | substs.set('modulesloaddir', modulesloaddir) | |
196 | substs.set('systemgeneratordir', systemgeneratordir) | |
197 | substs.set('usergeneratordir', usergeneratordir) | |
198 | substs.set('systemenvgeneratordir', systemenvgeneratordir) | |
199 | substs.set('userenvgeneratordir', userenvgeneratordir) | |
200 | substs.set('systemshutdowndir', systemshutdowndir) | |
201 | substs.set('systemsleepdir', systemsleepdir) | |
202 | ||
203 | ##################################################################### | |
204 | ||
205 | cc = meson.get_compiler('c') | |
206 | pkgconfig = import('pkgconfig') | |
207 | ||
208 | foreach arg : ['-Wundef', | |
209 | '-Wlogical-op', | |
210 | '-Wmissing-include-dirs', | |
211 | '-Wold-style-definition', | |
212 | '-Wpointer-arith', | |
213 | '-Winit-self', | |
214 | '-Wdeclaration-after-statement', | |
215 | '-Wfloat-equal', | |
216 | '-Wsuggest-attribute=noreturn', | |
217 | '-Werror=missing-prototypes', | |
218 | '-Werror=implicit-function-declaration', | |
219 | '-Werror=missing-declarations', | |
220 | '-Werror=return-type', | |
221 | '-Werror=incompatible-pointer-types', | |
222 | '-Werror=format=2', | |
223 | '-Wstrict-prototypes', | |
224 | '-Wredundant-decls', | |
225 | '-Wmissing-noreturn', | |
226 | '-Wshadow', | |
227 | '-Wendif-labels', | |
228 | '-Wstrict-aliasing=2', | |
229 | '-Wwrite-strings', | |
230 | '-Wno-unused-parameter', | |
231 | '-Wno-missing-field-initializers', | |
232 | '-Wno-unused-result', | |
233 | '-Wno-format-signedness', | |
234 | '-Werror=overflow', | |
235 | '-Wdate-time', | |
236 | '-Wnested-externs', | |
237 | '-ffast-math', | |
238 | '-fno-common', | |
239 | '-fdiagnostics-show-option', | |
240 | '-fno-strict-aliasing', | |
241 | '-fvisibility=hidden', | |
242 | '-fstack-protector', | |
243 | '-fstack-protector-strong', | |
244 | '-fPIE', | |
245 | '--param=ssp-buffer-size=4', | |
246 | ] | |
247 | if cc.has_argument(arg) | |
248 | add_project_arguments(arg, language : 'c') | |
249 | endif | |
250 | endforeach | |
251 | ||
252 | if cc.compiles(' | |
253 | #include <time.h> | |
254 | #include <inttypes.h> | |
255 | typedef uint64_t usec_t; | |
256 | usec_t now(clockid_t clock); | |
257 | int main(void) { | |
258 | struct timespec now; | |
259 | return 0; | |
260 | } | |
261 | ') | |
262 | # TODO: message? | |
263 | add_project_arguments('-Werror=shadow', language : 'c') | |
264 | endif | |
265 | ||
266 | if cc.get_id() == 'clang' | |
267 | foreach arg : ['-Wno-typedef-redefinition', | |
268 | '-Wno-gnu-variable-sized-type-not-at-end', | |
269 | ] | |
270 | if cc.has_argument(arg) | |
271 | add_project_arguments(arg, language : 'c') | |
272 | endif | |
273 | endforeach | |
274 | endif | |
275 | ||
276 | # --as-needed and --no-undefined are provided by meson by default, | |
277 | # run mesonconf to see what is enabled | |
278 | foreach arg : ['-Wl,-z,relro', | |
279 | '-Wl,-z,now', | |
280 | '-pie', | |
281 | '-Wl,-fuse-ld=gold', | |
282 | ] | |
283 | if cc.has_argument(arg) | |
284 | add_project_link_arguments(arg, language : 'c') | |
285 | endif | |
286 | endforeach | |
287 | ||
288 | ##################################################################### | |
289 | # compilation result tests | |
290 | ||
291 | conf.set('_GNU_SOURCE', 1) | |
292 | conf.set('__SANE_USERSPACE_TYPES__', 1) | |
293 | ||
294 | conf.set('SIZEOF_PID_T', cc.sizeof('pid_t', prefix : '#include <sys/types.h>')) | |
295 | conf.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include <sys/types.h>')) | |
296 | conf.set('SIZEOF_GID_T', cc.sizeof('gid_t', prefix : '#include <sys/types.h>')) | |
297 | conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>')) | |
298 | conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>')) | |
299 | conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>')) | |
300 | conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>')) | |
301 | ||
302 | decl_headers = ''' | |
303 | #include <uchar.h> | |
304 | #include <linux/ethtool.h> | |
305 | ''' | |
306 | # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail | |
307 | ||
308 | foreach decl : ['char16_t', | |
309 | 'char32_t', | |
310 | 'key_serial_t', | |
311 | 'struct ethtool_link_settings', | |
312 | ] | |
313 | if cc.sizeof(decl, prefix : decl_headers) > 0 | |
314 | # We get -1 if the size cannot be determined | |
315 | conf.set('HAVE_' + decl.underscorify().to_upper(), 1) | |
316 | endif | |
317 | endforeach | |
318 | ||
319 | foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'], | |
320 | ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'], | |
321 | ['IFLA_VRF_TABLE', 'linux/if_link.h'], | |
322 | ['IFLA_MACVLAN_FLAGS', 'linux/if_link.h'], | |
323 | ['IFLA_IPVLAN_MODE', 'linux/if_link.h'], | |
324 | ['IFLA_PHYS_PORT_ID', 'linux/if_link.h'], | |
325 | ['IFLA_BOND_AD_INFO', 'linux/if_link.h'], | |
326 | ['IFLA_VLAN_PROTOCOL', 'linux/if_link.h'], | |
327 | ['IFLA_VXLAN_REMCSUM_NOPARTIAL', 'linux/if_link.h'], | |
328 | ['IFLA_VXLAN_GPE', 'linux/if_link.h'], | |
329 | # if_tunnel.h is buggy and cannot be included on its own | |
330 | ['IFLA_VTI_REMOTE', 'linux/if_tunnel.h', '#include <net/if.h>'], | |
331 | ['IFLA_IPTUN_ENCAP_DPORT', 'linux/if_tunnel.h', '#include <net/if.h>'], | |
332 | ['IFLA_GRE_ENCAP_DPORT', 'linux/if_tunnel.h', '#include <net/if.h>'], | |
333 | ['IFLA_BRIDGE_VLAN_INFO', 'linux/if_bridge.h'], | |
334 | ['IFLA_BRPORT_PROXYARP', 'linux/if_link.h'], | |
335 | ['IFLA_BRPORT_LEARNING_SYNC', 'linux/if_link.h'], | |
336 | ['IFLA_BR_VLAN_DEFAULT_PVID', 'linux/if_link.h'], | |
337 | ['NDA_IFINDEX', 'linux/neighbour.h'], | |
338 | ['IFA_FLAGS', 'linux/if_addr.h'], | |
339 | ['LO_FLAGS_PARTSCAN', 'linux/loop.h'], | |
340 | ] | |
341 | prefix = decl.length() > 2 ? decl[2] : '' | |
342 | have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix) | |
343 | conf.set10('HAVE_DECL_' + decl[0], have) | |
344 | endforeach | |
345 | ||
346 | skip = false | |
347 | foreach ident : ['secure_getenv', '__secure_getenv'] | |
348 | if not skip and cc.has_function(ident) | |
349 | conf.set('HAVE_' + ident.to_upper(), 1) | |
350 | skip = true | |
351 | endif | |
352 | endforeach | |
353 | ||
354 | foreach ident : [ | |
355 | ['memfd_create', '''#include <sys/memfd.h>'''], | |
356 | ['gettid', '''#include <sys/types.h>'''], | |
357 | ['pivot_root', '''#include <stdlib.h>'''], # no known header declares pivot_root | |
358 | ['name_to_handle_at', '''#define _GNU_SOURCE | |
359 | #include <sys/types.h> | |
360 | #include <sys/stat.h> | |
361 | #include <fcntl.h>'''], | |
362 | ['setns', '''#define _GNU_SOURCE | |
363 | #include <sched.h>'''], | |
364 | ['getrandom', '''#include <sys/random.h>'''], | |
365 | ['renameat2', '''#include <stdio.h>'''], | |
366 | ['kcmp', '''#include <linux/kcmp.h>'''], | |
367 | ['keyctl', '''#include <sys/types.h> | |
368 | #include <keyutils.h>'''], | |
369 | ['copy_file_range', '''#include <sys/syscall.h> | |
370 | #include <unistd.h>'''], | |
371 | ['explicit_bzero' , '''#include <strings.h>'''], | |
372 | ] | |
373 | ||
374 | have = cc.has_function(ident[0], prefix : ident[1]) | |
375 | conf.set10('HAVE_DECL_' + ident[0].to_upper(), have) | |
376 | endforeach | |
377 | ||
378 | ##################################################################### | |
379 | ||
380 | sed = find_program('sed') | |
381 | grep = find_program('grep') | |
382 | awk = find_program('awk') | |
78b68dcb | 383 | m4 = find_program('/usr/bin/m4') |
5c23128d ZJS |
384 | stat = find_program('stat') |
385 | ||
386 | # if -Dxxx-path option is found, use that. Otherwise, check in $PATH, | |
387 | # /usr/sbin, /sbin, and fall back to the default from middle column. | |
388 | progs = [['telinit', '/lib/sysvinit/telinit'], | |
389 | ['quotaon', '/usr/sbin/quotaon' ], | |
390 | ['quotacheck', '/usr/sbin/quotacheck' ], | |
391 | ['kill', '/usr/bin/kill' ], | |
392 | ['kmod', '/usr/bin/kmod' ], | |
393 | ['kexec', '/usr/sbin/kexec' ], | |
394 | ['sulogin', '/usr/sbin/sulogin' ], | |
395 | ['mount', '/usr/bin/mount', 'MOUNT_PATH'], | |
396 | ['umount', '/usr/bin/umount', 'UMOUNT_PATH'], | |
397 | ['loadkeys', '/usr/bin/loadkeys', 'KBD_LOADKEYS'], | |
398 | ['setfont', '/usr/bin/setfont', 'KBD_SETFONT'], | |
399 | ] | |
400 | foreach prog : progs | |
401 | path = get_option(prog[0] + '-path') | |
402 | if path != '' | |
403 | message('Using @1@ for @0@'.format(prog[0], path)) | |
404 | else | |
405 | exe = find_program(prog[0], '/usr/sbin/' + prog[0], '/sbin/' + prog[0], required: false) | |
406 | path = exe.found() ? exe.path() : prog[1] | |
407 | endif | |
408 | name = prog.length() > 2 ? prog[2] : prog[0].to_upper() | |
409 | conf.set_quoted(name, path) | |
410 | endforeach | |
411 | ||
412 | # TODO: add ln --relative check | |
413 | # AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) | |
414 | ||
415 | ############################################################ | |
416 | ||
417 | gperf = find_program('gperf') | |
418 | ||
419 | gperf_test_format = ''' | |
420 | #include <string.h> | |
421 | const char * in_word_set(const char *, @0@); | |
422 | @1@ | |
423 | ''' | |
424 | gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C' | |
425 | gperf_snippet = run_command('sh', '-c', gperf_snippet_format.format(gperf.path())) | |
426 | gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout()) | |
427 | if cc.compiles(gperf_test) | |
428 | gperf_len_type = 'size_t' | |
429 | else | |
430 | gperf_test = gperf_test_format.format('unsigned', gperf_snippet.stdout()) | |
431 | if cc.compiles(gperf_test) | |
432 | gperf_len_type = 'unsigned' | |
433 | else | |
434 | error('unable to determine gperf len type') | |
435 | endif | |
436 | endif | |
437 | message('gperf len type is @0@'.format(gperf_len_type)) | |
438 | conf.set('GPERF_LEN_TYPE', gperf_len_type, description : 'The type of gperf "len" parameter') | |
439 | ||
440 | ############################################################ | |
441 | ||
442 | if not cc.has_header('sys/capability.h') | |
443 | error('POSIX caps headers not found') | |
444 | endif | |
445 | foreach header : ['linux/btrfs.h', | |
446 | 'linux/memfd.h', | |
447 | 'linux/vm_sockets.h', | |
448 | 'valgrind/memcheck.h', | |
449 | 'valgrind/valgrind.h', | |
450 | ] | |
451 | if cc.has_header(header) | |
452 | conf.set('HAVE_' + header.underscorify().to_upper(), 1) | |
453 | endif | |
454 | endforeach | |
455 | ||
456 | ############################################################ | |
457 | ||
458 | conf.set_quoted('FALLBACK_HOSTNAME', get_option('fallback-hostname')) | |
459 | ||
460 | default_hierarchy = get_option('default-hierarchy') | |
461 | conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy, | |
462 | description : 'default cgroup hierarchy as string') | |
463 | if default_hierarchy == 'legacy' | |
464 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_NONE') | |
465 | elif default_hierarchy == 'hybrid' | |
466 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_SYSTEMD') | |
467 | else | |
468 | conf.set('DEFAULT_HIERARCHY', 'CGROUP_UNIFIED_ALL') | |
469 | endif | |
470 | ||
471 | time_epoch = get_option('time-epoch') | |
472 | if time_epoch == '' | |
473 | NEWS = files('NEWS') | |
474 | time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout() | |
475 | endif | |
476 | time_epoch = time_epoch.to_int() | |
477 | conf.set('TIME_EPOCH', time_epoch) | |
478 | ||
479 | system_uid_max = get_option('system-uid-max') | |
480 | if system_uid_max == '' | |
481 | system_uid_max = run_command( | |
482 | awk, | |
483 | 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }', | |
484 | '/etc/login.defs').stdout() | |
485 | endif | |
486 | system_uid_max = system_uid_max.to_int() | |
487 | conf.set('SYSTEM_UID_MAX', system_uid_max) | |
488 | substs.set('systemuidmax', system_uid_max) | |
489 | message('Maximum system UID is @0@'.format(system_uid_max)) | |
490 | ||
491 | conf.set_quoted('NOBODY_USER_NAME', get_option('nobody-user')) | |
492 | conf.set_quoted('NOBODY_GROUP_NAME', get_option('nobody-group')) | |
493 | ||
494 | system_gid_max = get_option('system-gid-max') | |
495 | if system_gid_max == '' | |
496 | system_gid_max = run_command( | |
497 | awk, | |
498 | 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }', | |
499 | '/etc/login.defs').stdout() | |
500 | endif | |
501 | system_gid_max = system_gid_max.to_int() | |
502 | conf.set('SYSTEM_GID_MAX', system_gid_max) | |
503 | substs.set('systemgidmax', system_gid_max) | |
504 | message('Maximum system GID is @0@'.format(system_gid_max)) | |
505 | ||
506 | tty_gid = get_option('tty-gid') | |
507 | conf.set('TTY_GID', tty_gid) | |
508 | m4_defines += ['-DTTY_GID=' + tty_gid] | |
509 | ||
510 | if get_option('adm-group') | |
511 | m4_defines += ['-DENABLE_ADM_GROUP'] | |
512 | endif | |
513 | ||
514 | if get_option('wheel-group') | |
515 | m4_defines += ['-DENABLE_WHEEL_GROUP'] | |
516 | endif | |
517 | ||
518 | substs.set('DEV_KVM_MODE', get_option('dev-kvm-mode')) | |
519 | ||
520 | conf.set10('KILL_USER_PROCESSES', get_option('default-kill-user-processes')) | |
521 | ||
522 | default_dnssec = get_option('default-dnssec') | |
523 | conf.set('DEFAULT_DNSSEC_MODE', | |
524 | 'DNSSEC_' + default_dnssec.underscorify().to_upper()) | |
525 | ||
526 | conf.set_quoted('DNS_SERVERS', get_option('dns-servers')) | |
527 | ||
528 | conf.set_quoted('NTP_SERVERS', get_option('ntp-servers')) | |
529 | ||
530 | conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) | |
531 | ||
532 | ##################################################################### | |
533 | ||
534 | threads = dependency('threads') | |
535 | librt = cc.find_library('rt') | |
536 | libm = cc.find_library('m') | |
537 | libdl = cc.find_library('dl') | |
538 | libcrypt = cc.find_library('crypt') | |
539 | ||
540 | libcap = dependency('libcap') | |
541 | libmount = dependency('mount', | |
542 | version : '>= 2.27') | |
543 | ||
544 | want_seccomp = get_option('seccomp') | |
545 | if want_seccomp != 'no' | |
546 | libseccomp = dependency('libseccomp', | |
547 | required : want_seccomp == 'yes') | |
548 | if libseccomp.found() | |
549 | conf.set('HAVE_SECCOMP', 1) | |
550 | m4_defines += ['-DHAVE_SECCOMP'] | |
551 | endif | |
552 | else | |
553 | libseccomp = [] | |
554 | endif | |
555 | ||
556 | want_selinux = get_option('selinux') | |
557 | if want_selinux != 'no' | |
558 | libselinux = dependency('libselinux', | |
559 | version : '>= 2.1.9', | |
560 | required : want_selinux == 'yes') | |
561 | if libselinux.found() | |
562 | conf.set('HAVE_SELINUX', 1) | |
563 | m4_defines += ['-DHAVE_SELINUX'] | |
564 | endif | |
565 | else | |
566 | libselinux = [] | |
567 | endif | |
568 | ||
569 | want_apparmor = get_option('apparmor') | |
570 | if want_apparmor != 'no' | |
571 | libapparmor = dependency('libapparmor', | |
572 | required : want_apparmor == 'yes') | |
573 | if libapparmor.found() | |
574 | conf.set('HAVE_APPARMOR', 1) | |
575 | m4_defines += ['-DHAVE_APPARMOR'] | |
576 | endif | |
577 | else | |
578 | libapparmor = [] | |
579 | endif | |
580 | ||
581 | want_smack = get_option('smack') | |
582 | if want_smack != 'no' | |
583 | libsmack = dependency('libsmack', | |
584 | required : want_smack == 'yes') | |
585 | if libsmack.found() | |
586 | conf.set('HAVE_SMACK', 1) | |
587 | m4_defines += ['-DHAVE_SMACK'] | |
588 | endif | |
589 | else | |
590 | libsmack = [] | |
591 | endif | |
592 | ||
593 | smack_run_label = get_option('smack-run-label') | |
594 | if smack_run_label != '' | |
595 | conf.set_quoted('SMACK_RUN_LABEL', smack_run_label) | |
596 | m4_defines += ['-DHAVE_SMACK_RUN_LABEL'] | |
597 | endif | |
598 | ||
599 | want_audit = get_option('audit') | |
600 | if want_audit != 'no' | |
601 | libaudit = dependency('audit', required : want_audit == 'yes') | |
602 | if libaudit.found() | |
603 | conf.set('HAVE_AUDIT', 1) | |
604 | endif | |
605 | else | |
606 | libaudit = [] | |
607 | endif | |
608 | ||
609 | want_blkid = get_option('blkid') | |
610 | if want_blkid != 'no' | |
611 | libblkid = dependency('blkid', required : want_blkid == 'yes') | |
612 | if libblkid.found() | |
613 | conf.set('HAVE_BLKID', 1) | |
614 | endif | |
615 | else | |
616 | libblkid = [] | |
617 | endif | |
618 | ||
619 | want_kmod = get_option('kmod') | |
620 | if want_kmod != 'no' | |
621 | libkmod = dependency('libkmod', | |
622 | version : '>= 15', | |
623 | required : want_kmod == 'yes') | |
624 | if libkmod.found() | |
625 | conf.set('HAVE_KMOD', 1) | |
626 | endif | |
627 | else | |
628 | libkmod = [] | |
629 | endif | |
630 | ||
631 | want_pam = get_option('pam') | |
632 | if want_pam != 'no' | |
633 | libpam = cc.find_library('pam', required : want_pam == 'yes') | |
634 | libpam_misc = cc.find_library('pam_misc', required : want_pam == 'yes') | |
635 | if libpam.found() and libpam_misc.found() | |
636 | conf.set('HAVE_PAM', 1) | |
637 | m4_defines += ['-DHAVE_PAM'] | |
638 | endif | |
639 | else | |
640 | libpam = [] | |
641 | libpam_misc = [] | |
642 | endif | |
643 | ||
644 | want_microhttpd = get_option('microhttpd') | |
645 | if want_microhttpd != 'no' | |
646 | libmicrohttpd = dependency('libmicrohttpd', | |
647 | version : '>= 0.9.33', | |
648 | required : want_microhttpd == 'yes') | |
649 | if libmicrohttpd.found() | |
650 | conf.set('HAVE_MICROHTTPD', 1) | |
651 | m4_defines += ['-DHAVE_MICROHTTPD'] | |
652 | endif | |
653 | else | |
654 | libmicrohttpd = [] | |
655 | endif | |
656 | ||
657 | want_libcryptsetup = get_option('libcryptsetup') | |
658 | if want_libcryptsetup != 'no' | |
659 | libcryptsetup = dependency('libcryptsetup', | |
660 | version : '>= 1.6.0', | |
661 | required : want_libcryptsetup == 'yes') | |
662 | if libcryptsetup.found() | |
663 | conf.set('HAVE_LIBCRYPTSETUP', 1) | |
664 | endif | |
665 | else | |
666 | libcryptsetup = [] | |
667 | endif | |
668 | ||
669 | want_libcurl = get_option('libcurl') | |
670 | if want_libcurl != 'no' | |
671 | libcurl = dependency('libcurl', | |
672 | version : '>= 7.32.0', | |
673 | required : want_libcurl == 'yes') | |
674 | if libcurl.found() | |
675 | conf.set('HAVE_LIBCURL', 1) | |
676 | m4_defines += ['-DHAVE_LIBCURL'] | |
677 | endif | |
678 | else | |
679 | libcurl = [] | |
680 | endif | |
681 | ||
682 | want_libidn = get_option('libidn') | |
683 | if want_libidn != 'no' | |
684 | libidn = dependency('libidn', | |
685 | required : want_libidn == 'yes') | |
686 | if libidn.found() | |
687 | conf.set('HAVE_LIBIDN', 1) | |
688 | m4_defines += ['-DHAVE_LIBIDN'] | |
689 | endif | |
690 | else | |
691 | libidn = [] | |
692 | endif | |
693 | ||
694 | want_libiptc = get_option('libiptc') | |
695 | if want_libiptc != 'no' | |
696 | libiptc = dependency('libiptc', | |
697 | required : want_libiptc == 'yes') | |
698 | if libiptc.found() | |
699 | conf.set('HAVE_LIBIPTC', 1) | |
700 | m4_defines += ['-DHAVE_LIBIPTC'] | |
701 | endif | |
702 | else | |
703 | libiptc = [] | |
704 | endif | |
705 | ||
706 | want_qrencode = get_option('qrencode') | |
707 | if want_qrencode != 'no' | |
708 | libqrencode = dependency('libqrencode', | |
709 | required : want_qrencode == 'yes') | |
710 | if libqrencode.found() | |
711 | conf.set('HAVE_QRENCODE', 1) | |
712 | endif | |
713 | else | |
714 | libqrencode = [] | |
715 | endif | |
716 | ||
717 | want_gnutls = get_option('gnutls') | |
718 | if want_gnutls != 'no' | |
719 | libgnutls = dependency('gnutls', | |
720 | version : '>= 3.1.4', | |
721 | required : want_gnutls == 'yes') | |
722 | if libgnutls.found() | |
723 | conf.set('HAVE_GNUTLS', 1) | |
724 | endif | |
725 | else | |
726 | libgnutls = [] | |
727 | endif | |
728 | ||
729 | want_elfutils = get_option('elfutils') | |
730 | if want_elfutils != 'no' | |
731 | libdw = dependency('libdw', | |
732 | required : want_elfutils == 'yes') | |
733 | if libdw.found() | |
734 | conf.set('HAVE_ELFUTILS', 1) | |
735 | endif | |
736 | else | |
737 | libdw = [] | |
738 | endif | |
739 | ||
740 | want_zlib = get_option('zlib') | |
741 | if want_zlib != 'no' | |
742 | libz = dependency('zlib', | |
743 | required : want_zlib == 'yes') | |
744 | if libz.found() | |
745 | conf.set('HAVE_ZLIB', 1) | |
746 | endif | |
747 | else | |
748 | libz = [] | |
749 | endif | |
750 | ||
751 | want_bzip2 = get_option('bzip2') | |
752 | if want_bzip2 != 'no' | |
753 | libbzip2 = cc.find_library('bz2', | |
754 | required : want_bzip2 == 'yes') | |
755 | if libbzip2.found() | |
756 | conf.set('HAVE_BZIP2', 1) | |
757 | endif | |
758 | else | |
759 | libbzip2 = [] | |
760 | endif | |
761 | ||
762 | want_xz = get_option('xz') | |
763 | if want_xz != 'no' | |
764 | libxz = dependency('liblzma', | |
765 | required : want_xz == 'yes') | |
766 | if libxz.found() | |
767 | conf.set('HAVE_XZ', 1) | |
768 | endif | |
769 | else | |
770 | libxz = [] | |
771 | endif | |
772 | ||
773 | want_lz4 = get_option('lz4') | |
774 | if want_lz4 != 'no' | |
775 | liblz4 = dependency('liblz4', | |
776 | required : want_lz4 == 'yes') | |
777 | if liblz4.found() | |
778 | conf.set('HAVE_LZ4', 1) | |
779 | endif | |
780 | else | |
781 | liblz4 = [] | |
782 | endif | |
783 | ||
784 | libacl = cc.find_library('acl', required : false) | |
785 | if libacl.found() | |
786 | conf.set('HAVE_ACL', 1) | |
787 | m4_defines += ['-DHAVE_ACL'] | |
788 | endif | |
789 | ||
790 | want_libgcrypt = get_option('libgcrypt') | |
791 | if want_libgcrypt != 'no' | |
792 | libgcrypt = cc.find_library('gcrypt', required : want_libgcrypt == 'yes') | |
793 | if libgcrypt.found() | |
794 | conf.set('HAVE_LIBGCRYPT', 1) | |
795 | endif | |
796 | else | |
797 | libgcrypt = [] | |
798 | endif | |
799 | ||
800 | want_importd = get_option('importd') | |
801 | if want_importd != 'no' | |
802 | have_deps = (conf.get('HAVE_LIBCURL', 0) == 1 and | |
803 | conf.get('HAVE_ZLIB', 0) == 1 and | |
804 | conf.get('HAVE_BZIP2', 0) == 1 and | |
805 | conf.get('HAVE_XZ', 0) == 1 and | |
806 | conf.get('HAVE_LZ4', 0) == 1) | |
807 | if have_deps | |
808 | conf.set('ENABLE_IMPORTD', 1) | |
809 | elif want_importd == 'yes' | |
810 | error('importd support was requested, but dependencies are not available') | |
811 | endif | |
812 | endif | |
813 | ||
814 | want_remote = get_option('remote') | |
815 | if want_remote != 'no' | |
816 | have_deps = [conf.get('HAVE_MICROHTTPD', 0) == 1, | |
817 | conf.get('HAVE_LIBCURL', 0) == 1] | |
818 | # sd-j-remote requires µhttpd, and sd-j-upload requires libcurl, so | |
819 | # it's possible to build one without the other. Complain only if | |
820 | # support was explictly requested. The auxiliary files like sysusers | |
821 | # config should be installed when any of the programs are built. | |
822 | if want_remote == 'yes' and not (have_deps[0] and have_deps[1]) | |
823 | error('remote support was requested, but dependencies are not available') | |
824 | endif | |
825 | if have_deps[0] or have_deps[1] | |
826 | conf.set('ENABLE_REMOTE', 1) | |
827 | endif | |
828 | endif | |
829 | ||
830 | foreach pair : [['utmp', 'HAVE_UTMP'], | |
831 | ['hibernate', 'ENABLE_HIBERNATE'], | |
832 | ['environment-d', 'ENABLE_ENVIRONMENT_D'], | |
833 | ['binfmt', 'ENABLE_BINFMT'], | |
834 | ['coredump', 'ENABLE_COREDUMP'], | |
835 | ['resolve', 'ENABLE_RESOLVED'], | |
836 | ['logind', 'ENABLE_LOGIND'], | |
837 | ['hostnamed', 'ENABLE_HOSTNAMED'], | |
838 | ['localed', 'ENABLE_LOCALED'], | |
839 | ['machined', 'ENABLE_MACHINED'], | |
840 | ['networkd', 'ENABLE_NETWORKD'], | |
841 | ['timedated', 'ENABLE_TIMEDATED'], | |
842 | ['timesyncd', 'ENABLE_TIMESYNCD'], | |
843 | ['myhostname', 'HAVE_MYHOSTNAME'], | |
844 | ['firstboot', 'ENABLE_FIRSTBOOT'], | |
845 | ['randomseed', 'ENABLE_RANDOMSEED'], | |
846 | ['backlight', 'ENABLE_BACKLIGHT'], | |
847 | ['vconsole', 'ENABLE_VCONSOLE'], | |
848 | ['quotacheck', 'ENABLE_QUOTACHECK'], | |
849 | ['sysusers', 'ENABLE_SYSUSERS'], | |
850 | ['tmpfiles', 'ENABLE_TMPFILES'], | |
851 | ['hwdb', 'ENABLE_HWDB'], | |
852 | ['rfkill', 'ENABLE_RFKILL'], | |
853 | ['ldconfig', 'ENABLE_LDCONFIG'], | |
854 | ] | |
855 | ||
856 | if get_option(pair[0]) | |
857 | conf.set(pair[1], 1) | |
858 | endif | |
859 | endforeach | |
860 | ||
861 | ##################################################################### | |
862 | ||
863 | if get_option('efi') | |
864 | efi_arch = host_machine.cpu_family() # TODO: check this works at all | |
865 | if efi_arch == 'ia32' | |
866 | EFI_MACHINE_TYPE_NAME = 'ia32' | |
867 | elif efi_arch == 'x86_64' | |
868 | EFI_MACHINE_TYPE_NAME = 'x64' | |
869 | elif efi_arch == 'aarch64' | |
870 | EFI_MACHINE_TYPE_NAME = 'x64' | |
871 | else | |
872 | EFI_MACHINE_TYPE_NAME = efi_arch | |
873 | endif | |
874 | ||
875 | conf.set('ENABLE_EFI', 1) | |
876 | conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME) | |
877 | endif | |
878 | ||
879 | ##################################################################### | |
880 | ||
881 | config_h = configure_file( | |
882 | output : 'config.h', | |
883 | configuration : conf) | |
884 | ||
885 | includes = include_directories('src/basic', | |
886 | 'src/shared', | |
887 | 'src/systemd', | |
888 | 'src/journal', | |
889 | 'src/resolve', | |
890 | 'src/timesync', | |
891 | 'src/login', | |
892 | 'src/udev', | |
893 | 'src/libudev', | |
894 | 'src/core', | |
895 | 'src/libsystemd/sd-bus', | |
896 | 'src/libsystemd/sd-device', | |
897 | 'src/libsystemd/sd-hwdb', | |
898 | 'src/libsystemd/sd-id128', | |
899 | 'src/libsystemd/sd-netlink', | |
900 | 'src/libsystemd/sd-network', | |
901 | 'src/libsystemd-network', | |
902 | ) | |
903 | ||
904 | add_project_arguments('-include', 'config.h', language : 'c') | |
905 | ||
906 | gcrypt_util_sources = files('src/shared/gcrypt-util.h', | |
907 | 'src/shared/gcrypt-util.c') | |
908 | ||
909 | subdir('po') | |
910 | subdir('catalog') | |
911 | subdir('src/systemd') | |
912 | subdir('src/basic') | |
913 | subdir('src/libsystemd') | |
914 | subdir('src/libsystemd-network') | |
915 | subdir('src/analyze') | |
916 | subdir('src/coredump') | |
917 | subdir('src/hostname') | |
918 | subdir('src/import') | |
919 | subdir('src/journal') | |
920 | subdir('src/journal-remote') | |
921 | subdir('src/kernel-install') | |
922 | subdir('src/locale') | |
923 | subdir('src/login') | |
924 | subdir('src/machine') | |
925 | subdir('src/nspawn') | |
926 | subdir('src/resolve') | |
927 | subdir('src/timedate') | |
928 | subdir('src/timesync') | |
929 | subdir('src/vconsole') | |
930 | ||
931 | libjournal_core = static_library( | |
932 | 'journal-core', | |
933 | libjournal_core_sources, | |
934 | journald_gperf_c, | |
935 | include_directories : includes, | |
936 | link_with : [libbasic, | |
937 | libsystemd_internal, | |
938 | libsystemd_journal_internal], | |
939 | install : false) | |
940 | ||
941 | libsystemd = shared_library( | |
942 | 'systemd', | |
943 | libsystemd_internal_sources, | |
944 | version : '0.18.0', | |
945 | include_directories : includes, | |
946 | link_args : ['-shared', | |
947 | '-Wl,--version-script=' + libsystemd_sym], | |
948 | link_with : [libbasic, | |
949 | libsystemd_internal, | |
950 | libsystemd_journal_internal], | |
951 | dependencies : [threads], | |
952 | install : true, | |
953 | install_dir : rootlibdir) | |
954 | ||
955 | ############################################################ | |
956 | ||
957 | foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []], | |
958 | ['systemd', '', []], | |
959 | ['mymachines', 'ENABLE_MACHINED', []], | |
960 | ['resolve', 'ENABLE_RESOLVED', [libdl]]] | |
961 | ||
962 | condition = tuple[1] == '' or conf.get(tuple[1], 0) == 1 | |
963 | if condition | |
964 | module = tuple[0] | |
965 | extra_deps = tuple[2] | |
966 | ||
967 | sym = meson.current_source_dir() + '/src/nss-@0@/nss-@0@.sym'.format(module) | |
968 | ||
969 | shared_library( | |
970 | 'nss_' + module, | |
971 | 'src/nss-@0@/nss-@0@.c'.format(module), | |
972 | version : '2', | |
973 | include_directories : includes, | |
974 | link_args : ['-shared', | |
975 | '-Wl,--version-script=' + sym, | |
976 | '-Wl,--undefined'], | |
977 | link_with : [libsystemd_internal, | |
978 | libbasic], | |
979 | dependencies : [threads, | |
980 | librt] + extra_deps, | |
981 | install : true, | |
982 | install_dir : rootlibdir) | |
983 | endif | |
984 | endforeach | |
985 | ||
986 | ############################################################ | |
987 | ||
988 | subdir('src/libudev') | |
989 | subdir('src/shared') | |
990 | subdir('src/core') | |
991 | subdir('src/udev') | |
992 | subdir('src/network') | |
993 | ||
994 | executable('systemd', | |
995 | systemd_sources, | |
996 | include_directories : includes, | |
997 | link_with : [libcore, | |
998 | libshared], | |
999 | dependencies : [threads, | |
1000 | librt, | |
1001 | libseccomp, | |
1002 | libselinux, | |
1003 | libmount], | |
1004 | install : true, | |
1005 | install_dir : rootlibexecdir) | |
1006 | ||
1007 | executable('systemd-analyze', | |
1008 | systemd_analyze_sources, | |
1009 | include_directories : includes, | |
1010 | link_with : [libcore, | |
1011 | libshared], | |
1012 | dependencies : [threads, | |
1013 | librt, | |
1014 | libseccomp, | |
1015 | libselinux, | |
1016 | libmount], | |
1017 | install : true) | |
1018 | ||
1019 | executable('systemd-journald', | |
1020 | systemd_journald_sources, | |
1021 | include_directories : includes, | |
1022 | link_with : [libsystemd_journal_internal, | |
1023 | libjournal_core, | |
1024 | libshared, | |
1025 | libudev], | |
1026 | dependencies : [threads, | |
1027 | libxz, | |
1028 | liblz4], | |
1029 | install : true, | |
1030 | install_dir : rootlibexecdir) | |
1031 | ||
1032 | executable('systemd-cat', | |
1033 | systemd_cat_sources, | |
1034 | include_directories : includes, | |
1035 | link_with : [libjournal_core, | |
1036 | libshared, | |
1037 | libudev], | |
1038 | dependencies : [threads], | |
1039 | install : true) | |
1040 | ||
1041 | executable('journalctl', | |
1042 | journalctl_sources, | |
1043 | include_directories : includes, | |
1044 | link_with : [libshared, | |
1045 | libudev], | |
1046 | dependencies : [threads, | |
1047 | libqrencode, | |
1048 | libxz, | |
1049 | liblz4], | |
1050 | install : true, | |
1051 | install_dir : rootbindir) | |
1052 | ||
1053 | executable('systemd-getty-generator', | |
1054 | 'src/getty-generator/getty-generator.c', | |
1055 | install : true, | |
1056 | install_dir : systemgeneratordir, | |
1057 | include_directories : includes, | |
1058 | link_with : [libshared]) | |
1059 | ||
1060 | executable('systemd-debug-generator', | |
1061 | 'src/debug-generator/debug-generator.c', | |
1062 | install : true, | |
1063 | install_dir : systemgeneratordir, | |
1064 | include_directories : includes, | |
1065 | link_with : [libshared]) | |
1066 | ||
1067 | executable('systemd-fstab-generator', | |
1068 | 'src/fstab-generator/fstab-generator.c', | |
1069 | 'src/core/mount-setup.c', | |
1070 | install : true, | |
1071 | install_dir : systemgeneratordir, | |
1072 | include_directories : includes, | |
1073 | link_with : [libshared]) | |
1074 | ||
1075 | if conf.get('ENABLE_ENVIRONMENT_D', 0) == 1 | |
1076 | executable('30-systemd-environment-d-generator', | |
1077 | 'src/environment-d-generator/environment-d-generator.c', | |
1078 | install : true, | |
1079 | install_dir : userenvgeneratordir, | |
1080 | include_directories : includes, | |
1081 | link_with : [libshared]) | |
1082 | endif | |
1083 | ||
1084 | if conf.get('ENABLE_HIBERNATE', 0) == 1 | |
1085 | executable('systemd-hibernate-resume-generator', | |
1086 | 'src/hibernate-resume/hibernate-resume-generator.c', | |
1087 | include_directories : includes, | |
1088 | link_with : [libshared], | |
1089 | install : true, | |
1090 | install_dir : systemgeneratordir) | |
1091 | ||
1092 | executable('systemd-hibernate-resume', | |
1093 | 'src/hibernate-resume/hibernate-resume.c', | |
1094 | include_directories : includes, | |
1095 | link_with : [libshared], | |
1096 | install : true, | |
1097 | install_dir : rootlibexecdir) | |
1098 | endif | |
1099 | ||
1100 | if conf.get('HAVE_BLKID', 0) == 1 | |
1101 | executable('systemd-gpt-auto-generator', | |
1102 | 'src/gpt-auto-generator/gpt-auto-generator.c', | |
1103 | 'src/basic/blkid-util.h', | |
1104 | install : true, | |
1105 | install_dir : systemgeneratordir, | |
1106 | include_directories : includes, | |
1107 | link_with : libshared, | |
1108 | dependencies : libblkid) | |
1109 | ||
1110 | executable('systemd-dissect', | |
1111 | 'src/dissect/dissect.c', | |
1112 | include_directories : includes, | |
1113 | link_with : [libshared], | |
1114 | install : true, | |
1115 | install_dir : rootlibexecdir) | |
1116 | endif | |
1117 | ||
1118 | if conf.get('ENABLE_RESOLVED', 0) == 1 | |
1119 | executable('systemd-resolved', | |
1120 | systemd_resolved_sources, | |
1121 | include_directories : includes, | |
1122 | link_with : [libshared, | |
1123 | ], | |
1124 | dependencies : [threads, | |
1125 | libm, | |
1126 | libidn], | |
1127 | install : true, | |
1128 | install_dir : rootlibexecdir) | |
1129 | ||
1130 | executable('systemd-resolve', | |
1131 | systemd_resolve_sources, | |
1132 | include_directories : includes, | |
1133 | link_with : [libshared, | |
1134 | ], | |
1135 | dependencies : [threads, | |
1136 | libm, | |
1137 | libidn], | |
1138 | install : true) | |
1139 | endif | |
1140 | ||
1141 | if conf.get('ENABLE_LOGIND', 0) == 1 | |
1142 | executable('systemd-logind', | |
1143 | systemd_logind_sources, | |
1144 | include_directories : includes, | |
1145 | link_with : [liblogind_core, | |
1146 | libshared], | |
1147 | dependencies : [threads, | |
1148 | libacl], | |
1149 | install : true, | |
1150 | install_dir : rootlibexecdir) | |
1151 | ||
1152 | executable('loginctl', | |
1153 | loginctl_sources, | |
1154 | include_directories : includes, | |
1155 | link_with : [libshared], | |
1156 | dependencies : [threads, | |
1157 | liblz4, | |
1158 | libxz], | |
1159 | install : true, | |
1160 | install_dir : rootbindir) | |
1161 | ||
1162 | executable('systemd-inhibit', | |
1163 | 'src/login/inhibit.c', | |
1164 | include_directories : includes, | |
1165 | link_with : [libshared], | |
1166 | install : true, | |
1167 | install_dir : rootbindir) | |
1168 | ||
1169 | if conf.get('HAVE_PAM', 0) == 1 | |
1170 | shared_library( | |
1171 | 'pam_systemd', | |
1172 | pam_systemd_c, | |
1173 | name_prefix : '', | |
1174 | include_directories : includes, | |
1175 | link_args : ['-shared', | |
1176 | '-Wl,--version-script=' + pam_systemd_sym], | |
1177 | link_with : [libshared], | |
1178 | dependencies : [libpam, | |
1179 | libpam_misc], | |
1180 | install : true, | |
1181 | install_dir : pamlibdir) | |
1182 | endif | |
1183 | endif | |
1184 | ||
1185 | if conf.get('HAVE_PAM', 0) == 1 | |
1186 | executable('systemd-user-sessions', | |
1187 | 'src/user-sessions/user-sessions.c', | |
1188 | include_directories : includes, | |
1189 | link_with : [libshared], | |
1190 | install : true, | |
1191 | install_dir : rootlibexecdir) | |
1192 | endif | |
1193 | ||
1194 | if conf.get('ENABLE_EFI', 0) == 1 | |
1195 | executable('bootctl', | |
1196 | 'src/boot/bootctl.c', | |
1197 | include_directories : includes, | |
1198 | link_with : [libshared], | |
1199 | dependencies : [libblkid], | |
1200 | install : true) | |
1201 | endif | |
1202 | ||
1203 | executable('systemd-socket-activate', 'src/activate/activate.c', | |
1204 | include_directories : includes, | |
1205 | link_with : [libshared], | |
1206 | dependencies : [threads], | |
1207 | install : true) | |
1208 | ||
1209 | executable('systemctl', 'src/systemctl/systemctl.c', | |
1210 | include_directories : includes, | |
1211 | link_with : [libshared], | |
1212 | dependencies : [threads, | |
1213 | libcap, | |
1214 | libselinux, | |
1215 | libxz, | |
1216 | liblz4], | |
1217 | install : true, | |
1218 | install_dir : rootbindir) | |
1219 | ||
1220 | if conf.get('ENABLE_BACKLIGHT', 0) == 1 | |
1221 | executable('systemd-backlight', | |
1222 | 'src/backlight/backlight.c', | |
1223 | include_directories : includes, | |
1224 | link_with : [libshared], | |
1225 | install : true, | |
1226 | install_dir : rootlibexecdir) | |
1227 | endif | |
1228 | ||
1229 | if conf.get('ENABLE_RFKILL', 0) == 1 | |
1230 | executable('systemd-rfkill', | |
1231 | 'src/rfkill/rfkill.c', | |
1232 | include_directories : includes, | |
1233 | link_with : [libshared], | |
1234 | install : true, | |
1235 | install_dir : rootlibexecdir) | |
1236 | endif | |
1237 | ||
1238 | executable('systemd-system-update-generator', | |
1239 | 'src/system-update-generator/system-update-generator.c', | |
1240 | include_directories : includes, | |
1241 | link_with : [libshared], | |
1242 | install : true, | |
1243 | install_dir : systemgeneratordir) | |
1244 | ||
1245 | if conf.get('HAVE_LIBCRYPTSETUP', 0) == 1 | |
1246 | executable('systemd-cryptsetup', | |
1247 | 'src/cryptsetup/cryptsetup.c', | |
1248 | include_directories : includes, | |
1249 | link_with : [libshared], | |
1250 | dependencies : [libcryptsetup], | |
1251 | install : true, | |
1252 | install_dir : rootlibexecdir) | |
1253 | ||
1254 | executable('systemd-cryptsetup-generator', | |
1255 | 'src/cryptsetup/cryptsetup-generator.c', | |
1256 | include_directories : includes, | |
1257 | link_with : [libshared], | |
1258 | dependencies : [libcryptsetup], | |
1259 | install : true, | |
1260 | install_dir : systemgeneratordir) | |
1261 | ||
1262 | executable('systemd-veritysetup', | |
1263 | 'src/veritysetup/veritysetup.c', | |
1264 | include_directories : includes, | |
1265 | link_with : [libshared], | |
1266 | dependencies : [libcryptsetup], | |
1267 | install : true, | |
1268 | install_dir : rootlibexecdir) | |
1269 | ||
1270 | executable('systemd-veritysetup-generator', | |
1271 | 'src/veritysetup/veritysetup-generator.c', | |
1272 | include_directories : includes, | |
1273 | link_with : [libshared], | |
1274 | dependencies : [libcryptsetup], | |
1275 | install : true, | |
1276 | install_dir : systemgeneratordir) | |
1277 | endif | |
1278 | ||
1279 | if conf.get('HAVE_SYSV_COMPAT', 0) == 1 | |
1280 | executable('systemd-sysv-generator', | |
1281 | 'src/sysv-generator/sysv-generator.c', | |
1282 | include_directories : includes, | |
1283 | link_with : [libshared], | |
1284 | install : true, | |
1285 | install_dir : systemgeneratordir) | |
1286 | ||
1287 | executable('systemd-rc-local-generator', | |
1288 | 'src/rc-local-generator/rc-local-generator.c', | |
1289 | include_directories : includes, | |
1290 | link_with : [libshared], | |
1291 | install : true, | |
1292 | install_dir : systemgeneratordir) | |
1293 | endif | |
1294 | ||
1295 | if conf.get('ENABLE_HOSTNAMED', 0) == 1 | |
1296 | executable('systemd-hostnamed', | |
1297 | 'src/hostname/hostnamed.c', | |
1298 | include_directories : includes, | |
1299 | link_with : [libshared], | |
1300 | install : true, | |
1301 | install_dir : rootlibexecdir) | |
1302 | ||
1303 | executable('hostnamectl', | |
1304 | 'src/hostname/hostnamectl.c', | |
1305 | include_directories : includes, | |
1306 | link_with : [libshared], | |
1307 | install : true) | |
1308 | endif | |
1309 | ||
1310 | if conf.get('ENABLE_LOCALED', 0) == 1 | |
1311 | executable('systemd-localed', | |
1312 | systemd_localed_sources, | |
1313 | include_directories : includes, | |
1314 | link_with : [libshared], | |
1315 | dependencies : [libdl], | |
1316 | install : true, | |
1317 | install_dir : rootlibexecdir) | |
1318 | ||
1319 | executable('localectl', | |
1320 | localectl_sources, | |
1321 | include_directories : includes, | |
1322 | link_with : [libshared], | |
1323 | install : true) | |
1324 | endif | |
1325 | ||
1326 | if conf.get('ENABLE_TIMEDATED', 0) == 1 | |
1327 | executable('systemd-timedated', | |
1328 | 'src/timedate/timedated.c', | |
1329 | include_directories : includes, | |
1330 | link_with : [libshared], | |
1331 | install : true, | |
1332 | install_dir : rootlibexecdir) | |
1333 | ||
1334 | executable('timedatectl', | |
1335 | 'src/timedate/timedatectl.c', | |
1336 | include_directories : includes, | |
1337 | link_with : [libshared], | |
1338 | install : true) | |
1339 | endif | |
1340 | ||
1341 | if conf.get('ENABLE_TIMESYNCD', 0) == 1 | |
1342 | executable('systemd-timesyncd', | |
1343 | systemd_timesyncd_sources, | |
1344 | include_directories : includes, | |
1345 | link_with : [libshared], | |
1346 | dependencies : [threads, | |
1347 | libm], | |
1348 | install : true, | |
1349 | install_dir : rootlibexecdir) | |
1350 | endif | |
1351 | ||
1352 | if conf.get('ENABLE_MACHINED', 0) == 1 | |
1353 | executable('systemd-machined', | |
1354 | systemd_machined_sources, | |
1355 | include_directories : includes, | |
1356 | link_with : [libmachine_core, | |
1357 | libshared], | |
1358 | install : true, | |
1359 | install_dir : rootlibexecdir) | |
1360 | ||
1361 | executable('machinectl', | |
1362 | 'src/machine/machinectl.c', | |
1363 | include_directories : includes, | |
1364 | link_with : [libshared], | |
1365 | dependencies : [threads, | |
1366 | libxz, | |
1367 | liblz4], | |
1368 | install : true, | |
1369 | install_dir : rootbindir) | |
1370 | endif | |
1371 | ||
1372 | if conf.get('ENABLE_IMPORTD', 0) == 1 | |
1373 | executable('systemd-importd', | |
1374 | systemd_importd_sources, | |
1375 | include_directories : includes, | |
1376 | link_with : [libshared], | |
1377 | install : true, | |
1378 | install_dir : rootlibexecdir) | |
1379 | ||
1380 | executable('systemd-pull', | |
1381 | systemd_pull_sources, | |
1382 | include_directories : includes, | |
1383 | link_with : [libshared], | |
1384 | dependencies : [libcurl, | |
1385 | libz, | |
1386 | libbzip2, | |
1387 | libxz, | |
1388 | libgcrypt], | |
1389 | install : true, | |
1390 | install_dir : rootlibexecdir) | |
1391 | ||
1392 | executable('systemd-import', | |
1393 | systemd_import_sources, | |
1394 | include_directories : includes, | |
1395 | link_with : [libshared], | |
1396 | dependencies : [libcurl, | |
1397 | libz, | |
1398 | libbzip2, | |
1399 | libxz], | |
1400 | install : true, | |
1401 | install_dir : rootlibexecdir) | |
1402 | ||
1403 | executable('systemd-export', | |
1404 | systemd_export_sources, | |
1405 | include_directories : includes, | |
1406 | link_with : [libshared], | |
1407 | dependencies : [libcurl, | |
1408 | libz, | |
1409 | libbzip2, | |
1410 | libxz], | |
1411 | install : true, | |
1412 | install_dir : rootlibexecdir) | |
1413 | endif | |
1414 | ||
1415 | if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_LIBCURL', 0) == 1 | |
1416 | executable('systemd-journal-upload', | |
1417 | systemd_journal_upload_sources, | |
1418 | include_directories : includes, | |
1419 | link_with : [libshared], | |
1420 | dependencies : [threads, | |
1421 | libcurl, | |
1422 | libgnutls, | |
1423 | libxz, | |
1424 | liblz4], | |
1425 | install : true, | |
1426 | install_dir : rootlibexecdir) | |
1427 | endif | |
1428 | ||
1429 | if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1 | |
1430 | executable('systemd-journal-remote', | |
1431 | systemd_journal_remote_sources, | |
1432 | include_directories : includes, | |
1433 | link_with : [libshared], | |
1434 | dependencies : [threads, | |
1435 | libmicrohttpd, | |
1436 | libgnutls, | |
1437 | libxz, | |
1438 | liblz4], | |
1439 | install : true, | |
1440 | install_dir : rootlibexecdir) | |
1441 | ||
1442 | executable('systemd-journal-gatewayd', | |
1443 | systemd_journal_gatewayd_sources, | |
1444 | include_directories : includes, | |
1445 | link_with : [libshared], | |
1446 | dependencies : [threads, | |
1447 | libmicrohttpd, | |
1448 | libgnutls, | |
1449 | libxz, | |
1450 | liblz4], | |
1451 | install : true, | |
1452 | install_dir : rootlibexecdir) | |
1453 | endif | |
1454 | ||
1455 | if conf.get('ENABLE_COREDUMP', 0) == 1 | |
1456 | executable('systemd-coredump', | |
1457 | systemd_coredump_sources, | |
1458 | include_directories : includes, | |
1459 | link_with : [libshared], | |
1460 | dependencies : [threads, | |
1461 | libacl, | |
1462 | libdw, | |
1463 | libxz, | |
1464 | liblz4], | |
1465 | install : true, | |
1466 | install_dir : rootlibexecdir) | |
1467 | ||
1468 | executable('coredumpctl', | |
1469 | coredumpctl_sources, | |
1470 | include_directories : includes, | |
1471 | link_with : [libshared], | |
1472 | dependencies : [threads, | |
1473 | libxz, | |
1474 | liblz4], | |
1475 | install : true) | |
1476 | endif | |
1477 | ||
1478 | if conf.get('ENABLE_BINFMT', 0) == 1 | |
1479 | executable('systemd-binfmt', | |
1480 | 'src/binfmt/binfmt.c', | |
1481 | include_directories : includes, | |
1482 | link_with : [libshared], | |
1483 | install : true, | |
1484 | install_dir : rootlibexecdir) | |
1485 | endif | |
1486 | ||
1487 | if conf.get('ENABLE_VCONSOLE', 0) == 1 | |
1488 | executable('systemd-vconsole-setup', | |
1489 | 'src/vconsole/vconsole-setup.c', | |
1490 | include_directories : includes, | |
1491 | link_with : [libshared], | |
1492 | install : true, | |
1493 | install_dir : rootlibexecdir) | |
1494 | endif | |
1495 | ||
1496 | if conf.get('ENABLE_RANDOMSEED', 0) == 1 | |
1497 | executable('systemd-random-seed', | |
1498 | 'src/random-seed/random-seed.c', | |
1499 | include_directories : includes, | |
1500 | link_with : [libshared], | |
1501 | install : true, | |
1502 | install_dir : rootlibexecdir) | |
1503 | endif | |
1504 | ||
1505 | if conf.get('ENABLE_FIRSTBOOT', 0) == 1 | |
1506 | executable('systemd-firstboot', | |
1507 | 'src/firstboot/firstboot.c', | |
1508 | include_directories : includes, | |
1509 | link_with : [libshared], | |
1510 | dependencies : [libcrypt], | |
1511 | install : true, | |
1512 | install_dir : rootbindir) | |
1513 | endif | |
1514 | ||
1515 | executable('systemd-remount-fs', | |
1516 | 'src/remount-fs/remount-fs.c', | |
1517 | 'src/core/mount-setup.c', | |
1518 | 'src/core/mount-setup.h', | |
1519 | include_directories : includes, | |
1520 | link_with : [libshared], | |
1521 | install : true, | |
1522 | install_dir : rootlibexecdir) | |
1523 | ||
1524 | executable('systemd-machine-id-setup', | |
1525 | 'src/machine-id-setup/machine-id-setup-main.c', | |
1526 | 'src/core/machine-id-setup.c', | |
1527 | 'src/core/machine-id-setup.h', | |
1528 | include_directories : includes, | |
1529 | link_with : [libshared], | |
1530 | install : true, | |
1531 | install_dir : rootbindir) | |
1532 | ||
1533 | executable('systemd-fsck', | |
1534 | 'src/fsck/fsck.c', | |
1535 | include_directories : includes, | |
1536 | link_with : [libshared], | |
1537 | install : true, | |
1538 | install_dir : rootlibexecdir) | |
1539 | ||
1540 | executable('systemd-sleep', | |
1541 | 'src/sleep/sleep.c', | |
1542 | include_directories : includes, | |
1543 | link_with : [libshared], | |
1544 | install : true, | |
1545 | install_dir : rootlibexecdir) | |
1546 | ||
1547 | executable('systemd-sysctl', | |
1548 | 'src/sysctl/sysctl.c', | |
1549 | include_directories : includes, | |
1550 | link_with : [libshared], | |
1551 | install : true, | |
1552 | install_dir : rootlibexecdir) | |
1553 | ||
1554 | executable('systemd-ac-power', | |
1555 | 'src/ac-power/ac-power.c', | |
1556 | include_directories : includes, | |
1557 | link_with : [libshared], | |
1558 | install : true, | |
1559 | install_dir : rootlibexecdir) | |
1560 | ||
1561 | executable('systemd-detect-virt', | |
1562 | 'src/detect-virt/detect-virt.c', | |
1563 | include_directories : includes, | |
1564 | link_with : [libshared], | |
1565 | install : true) | |
1566 | ||
1567 | executable('systemd-delta', | |
1568 | 'src/delta/delta.c', | |
1569 | include_directories : includes, | |
1570 | link_with : [libshared], | |
1571 | install : true) | |
1572 | ||
1573 | executable('systemd-escape', | |
1574 | 'src/escape/escape.c', | |
1575 | include_directories : includes, | |
1576 | link_with : [libshared], | |
1577 | install : true, | |
1578 | install_dir : rootbindir) | |
1579 | ||
1580 | executable('systemd-notify', | |
1581 | 'src/notify/notify.c', | |
1582 | include_directories : includes, | |
1583 | link_with : [libshared], | |
1584 | install : true, | |
1585 | install_dir : rootbindir) | |
1586 | ||
1587 | executable('systemd-volatile-root', | |
1588 | 'src/volatile-root/volatile-root.c', | |
1589 | include_directories : includes, | |
1590 | link_with : [libshared], | |
1591 | install : true, | |
1592 | install_dir : rootlibexecdir) | |
1593 | ||
1594 | executable('systemd-cgroups-agent', | |
1595 | 'src/cgroups-agent/cgroups-agent.c', | |
1596 | include_directories : includes, | |
1597 | link_with : [libshared], | |
1598 | install : true, | |
1599 | install_dir : rootlibexecdir) | |
1600 | ||
1601 | executable('systemd-path', | |
1602 | 'src/path/path.c', | |
1603 | include_directories : includes, | |
1604 | link_with : [libshared], | |
1605 | install : true) | |
1606 | ||
1607 | executable('systemd-ask-password', | |
1608 | 'src/ask-password/ask-password.c', | |
1609 | include_directories : includes, | |
1610 | link_with : [libshared], | |
1611 | install : true, | |
1612 | install_dir : rootbindir) | |
1613 | ||
1614 | executable('systemd-reply-password', | |
1615 | 'src/reply-password/reply-password.c', | |
1616 | include_directories : includes, | |
1617 | link_with : [libshared], | |
1618 | install : true, | |
1619 | install_dir : rootlibexecdir) | |
1620 | ||
1621 | executable('systemd-tty-ask-password-agent', | |
1622 | 'src/tty-ask-password-agent/tty-ask-password-agent.c', | |
1623 | include_directories : includes, | |
1624 | link_with : [libshared], | |
1625 | install : true, | |
1626 | install_dir : rootbindir) | |
1627 | ||
1628 | executable('systemd-cgls', | |
1629 | 'src/cgls/cgls.c', | |
1630 | include_directories : includes, | |
1631 | link_with : [libshared], | |
1632 | install : true) | |
1633 | ||
1634 | executable('systemd-cgtop', | |
1635 | 'src/cgtop/cgtop.c', | |
1636 | include_directories : includes, | |
1637 | link_with : [libshared], | |
1638 | install : true) | |
1639 | ||
1640 | executable('systemd-initctl', | |
1641 | 'src/initctl/initctl.c', | |
1642 | include_directories : includes, | |
1643 | link_with : [libshared], | |
1644 | install : true, | |
1645 | install_dir : rootlibexecdir) | |
1646 | ||
1647 | executable('systemd-mount', | |
1648 | 'src/mount/mount-tool.c', | |
1649 | include_directories : includes, | |
1650 | link_with : [libshared], | |
1651 | install : true) | |
1652 | ||
1653 | executable('systemd-run', | |
1654 | 'src/run/run.c', | |
1655 | include_directories : includes, | |
1656 | link_with : [libshared], | |
1657 | install : true) | |
1658 | ||
1659 | executable('systemd-stdio-bridge', | |
1660 | 'src/stdio-bridge/stdio-bridge.c', | |
1661 | include_directories : includes, | |
1662 | link_with : [libshared], | |
1663 | install : true) | |
1664 | ||
1665 | executable('busctl', | |
1666 | 'src/busctl/busctl.c', | |
1667 | 'src/busctl/busctl-introspect.c', | |
1668 | 'src/busctl/busctl-introspect.h', | |
1669 | include_directories : includes, | |
1670 | link_with : [libshared], | |
1671 | install : true) | |
1672 | ||
1673 | if conf.get('ENABLE_SYSUSERS', 0) == 1 | |
1674 | executable('systemd-sysusers', | |
1675 | 'src/sysusers/sysusers.c', | |
1676 | include_directories : includes, | |
1677 | link_with : [libshared], | |
1678 | install : true, | |
1679 | install_dir : rootbindir) | |
1680 | endif | |
1681 | ||
1682 | if conf.get('ENABLE_TMPFILES', 0) == 1 | |
1683 | executable('systemd-tmpfiles', | |
1684 | 'src/tmpfiles/tmpfiles.c', | |
1685 | include_directories : includes, | |
1686 | link_with : [libshared], | |
1687 | dependencies : [libacl], | |
1688 | install : true, | |
1689 | install_dir : rootbindir) | |
1690 | endif | |
1691 | ||
1692 | if conf.get('ENABLE_HWDB', 0) == 1 | |
1693 | executable('systemd-hwdb', | |
1694 | 'src/hwdb/hwdb.c', | |
1695 | 'src/libsystemd/sd-hwdb/hwdb-internal.h', | |
1696 | include_directories : includes, | |
1697 | link_with : [libshared], | |
1698 | install : true, | |
1699 | install_dir : rootbindir) | |
1700 | endif | |
1701 | ||
1702 | if conf.get('ENABLE_QUOTACHECK', 0) == 1 | |
1703 | executable('systemd-quotacheck', | |
1704 | 'src/quotacheck/quotacheck.c', | |
1705 | include_directories : includes, | |
1706 | link_with : [libshared], | |
1707 | install : true, | |
1708 | install_dir : rootlibexecdir) | |
1709 | endif | |
1710 | ||
1711 | executable('systemd-socket-proxyd', | |
1712 | 'src/socket-proxy/socket-proxyd.c', | |
1713 | include_directories : includes, | |
1714 | link_with : [libshared, | |
1715 | libsystemd], | |
1716 | dependencies : [threads], | |
1717 | install : true, | |
1718 | install_dir : rootlibexecdir) | |
1719 | ||
1720 | executable('systemd-udevd', | |
1721 | systemd_udevd_sources, | |
1722 | include_directories : includes, | |
1723 | link_with : [libudev_core, | |
1724 | libudev_internal, | |
1725 | libsystemd_network, | |
1726 | libshared], | |
1727 | dependencies : [libkmod, | |
1728 | libidn, | |
1729 | libacl], | |
1730 | install : true, | |
1731 | install_dir : rootlibexecdir) | |
1732 | ||
1733 | executable('udevadm', | |
1734 | udevadm_sources, | |
1735 | include_directories : includes, | |
1736 | link_with : [libudev_core, | |
1737 | libudev_internal, | |
1738 | libsystemd_network, | |
1739 | libshared], | |
1740 | dependencies : [libkmod, | |
1741 | libidn, | |
1742 | libacl], | |
1743 | install : true, | |
1744 | install_dir : rootbindir) | |
1745 | ||
1746 | executable('systemd-shutdown', | |
1747 | systemd_shutdown_sources, | |
1748 | include_directories : includes, | |
1749 | link_with : [libshared], | |
1750 | install : true, | |
1751 | install_dir : rootlibexecdir) | |
1752 | ||
1753 | executable('systemd-update-done', | |
1754 | 'src/update-done/update-done.c', | |
1755 | include_directories : includes, | |
1756 | link_with : [libshared], | |
1757 | install : true, | |
1758 | install_dir : rootlibexecdir) | |
1759 | ||
1760 | executable('systemd-update-utmp', | |
1761 | 'src/update-utmp/update-utmp.c', | |
1762 | include_directories : includes, | |
1763 | link_with : [libshared], | |
1764 | dependencies : [libaudit], | |
1765 | install : true, | |
1766 | install_dir : rootlibexecdir) | |
1767 | ||
1768 | if conf.get('HAVE_KMOD', 0) == 1 | |
1769 | executable('systemd-modules-load', | |
1770 | 'src/modules-load/modules-load.c', | |
1771 | include_directories : includes, | |
1772 | link_with : [libshared], | |
1773 | dependencies : [libkmod], | |
1774 | install : true, | |
1775 | install_dir : rootlibexecdir) | |
1776 | endif | |
1777 | ||
1778 | executable('systemd-nspawn', | |
1779 | systemd_nspawn_sources, | |
1780 | 'src/core/mount-setup.c', # FIXME: use a variable? | |
1781 | 'src/core/mount-setup.h', | |
1782 | 'src/core/loopback-setup.c', | |
1783 | 'src/core/loopback-setup.h', | |
1784 | include_directories : [includes, include_directories('src/nspawn')], | |
1785 | link_with : [libfirewall, | |
1786 | libshared], | |
1787 | dependencies : [libacl, | |
1788 | libblkid, | |
1789 | libseccomp, | |
1790 | libselinux], | |
1791 | install : true) | |
1792 | ||
1793 | executable('systemd-networkd', | |
1794 | systemd_networkd_sources, | |
1795 | include_directories : includes, | |
1796 | link_with : [libnetworkd_core, | |
1797 | libfirewall, | |
1798 | libsystemd_network, | |
1799 | libudev_internal, | |
1800 | libshared], | |
1801 | install : true, | |
1802 | install_dir : rootlibexecdir) | |
1803 | ||
1804 | executable('systemd-networkd-wait-online', | |
1805 | systemd_networkd_wait_online_sources, | |
1806 | include_directories : includes, | |
1807 | link_with : [libnetworkd_core, | |
1808 | libshared], | |
1809 | install : true, | |
1810 | install_dir : rootlibexecdir) | |
1811 | ||
1812 | executable('networkctl', | |
1813 | networkctl_sources, | |
1814 | include_directories : includes, | |
1815 | link_with : [libsystemd_network, | |
1816 | libshared], | |
1817 | install : true, | |
1818 | install_dir : rootbindir) | |
1819 | ||
1820 | executable('test-sizeof', 'src/test/test-sizeof.c', | |
1821 | include_directories : includes) | |
1822 | ||
1823 | make_directive_index_py = find_program('tools/make-directive-index.py') | |
1824 | make_man_index_py = find_program('tools/make-man-index.py') | |
1825 | ||
1826 | subdir('units') | |
1827 | subdir('sysctl.d') | |
1828 | subdir('sysusers.d') | |
1829 | subdir('tmpfiles.d') | |
1830 | subdir('rules') | |
1831 | subdir('hwdb') | |
1832 | subdir('network') | |
1833 | subdir('man') | |
1834 | subdir('shell-completion/bash') | |
1835 | subdir('shell-completion/zsh') | |
1836 | subdir('docs/sysvinit') | |
1837 | subdir('docs/var-log') | |
1838 | ||
1839 | # FIXME: figure out if the warning is true: | |
1840 | # https://github.com/mesonbuild/meson/wiki/Reference-manual#install_subdir | |
1841 | install_subdir('factory/etc', | |
1842 | install_dir : factorydir) | |
1843 | ||
1844 | ||
1845 | install_data('xorg/50-systemd-user.sh', | |
1846 | install_dir : xinitrcdir) | |
1847 | install_data('system-preset/90-systemd.preset', | |
1848 | install_dir : systempresetdir) | |
1849 | install_data('README', | |
1850 | 'NEWS', | |
1851 | 'CODING_STYLE', | |
1852 | 'DISTRO_PORTING', | |
1853 | 'ENVIRONMENT.md', | |
1854 | 'LICENSE.GPL2', | |
1855 | 'LICENSE.LGPL2.1', | |
1856 | 'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION', | |
1857 | install_dir : docdir) |