]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/journal-remote/meson.build
dynamically load compression libraries
[thirdparty/systemd.git] / src / journal-remote / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 systemd_journal_upload_sources = files(
4 'journal-upload-journal.c',
5 'journal-upload.c',
6 )
7
8 libsystemd_journal_remote_sources = files(
9 'journal-remote-parse.c',
10 'journal-remote-write.c',
11 'journal-remote.c',
12 )
13
14 if conf.get('HAVE_MICROHTTPD') == 1
15 libsystemd_journal_remote_sources += files(
16 'microhttpd-util.c',
17 )
18 endif
19
20 libsystemd_journal_remote = static_library(
21 'systemd-journal-remote',
22 libsystemd_journal_remote_sources,
23 include_directories : includes,
24 dependencies : [libgnutls,
25 liblz4_cflags,
26 libmicrohttpd,
27 libxz_cflags,
28 threads,
29 userspace],
30 build_by_default : false)
31
32 systemd_journal_remote_sources = files('journal-remote-main.c')
33
34 systemd_journal_gatewayd_sources = files(
35 'journal-gatewayd.c',
36 'microhttpd-util.c',
37 )
38
39 common_deps = [
40 libgnutls,
41 liblz4_cflags,
42 libxz_cflags,
43 libzstd_cflags,
44 threads,
45 ]
46
47 executables += [
48 libexec_template + {
49 'name' : 'systemd-journal-upload',
50 'public' : true,
51 'conditions' : [
52 'ENABLE_REMOTE',
53 'HAVE_LIBCURL',
54 ],
55 'sources' : systemd_journal_upload_sources,
56 'dependencies' : common_deps + [libcurl],
57 },
58 libexec_template + {
59 'name' : 'systemd-journal-remote',
60 'public' : true,
61 'conditions' : [
62 'ENABLE_REMOTE',
63 'HAVE_MICROHTTPD',
64 ],
65 'sources' : systemd_journal_remote_sources,
66 'link_with' : [
67 libshared,
68 libsystemd_journal_remote,
69 ],
70 'dependencies' : common_deps + [libmicrohttpd],
71 },
72 libexec_template + {
73 'name' : 'systemd-journal-gatewayd',
74 'public' : true,
75 'conditions' : [
76 'ENABLE_REMOTE',
77 'HAVE_MICROHTTPD',
78 ],
79 'sources' : systemd_journal_gatewayd_sources,
80 'dependencies' : common_deps + [libmicrohttpd],
81 },
82 fuzz_template + {
83 'sources' : files('fuzz-journal-remote.c'),
84 'link_with' : [
85 libshared,
86 libsystemd_journal_remote,
87 ],
88 },
89 ]
90
91 in_files = [
92 ['journal-upload.conf',
93 conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 and install_sysconfdir_samples],
94 ['journal-remote.conf',
95 conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1 and install_sysconfdir_samples]]
96
97 foreach tuple : in_files
98 file = tuple[0]
99 custom_target(
100 file,
101 input : file + '.in',
102 output: file,
103 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
104 install : tuple[1],
105 install_dir : pkgconfigfiledir)
106 endforeach
107
108 if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
109 install_data('browse.html',
110 install_dir : pkgdatadir / 'gatewayd')
111
112 if get_option('create-log-dirs')
113 install_emptydir('/var/log/journal/remote',
114 install_mode : 'rwxr-xr-x')
115 endif
116 endif