]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/journal/meson.build
journalctl: make pcre2 a dlopen() dependency
[thirdparty/systemd.git] / src / journal / meson.build
CommitLineData
3a726fcd 1# SPDX-License-Identifier: LGPL-2.1+
3a726fcd 2
5e3cec87 3journal_client_sources = files('''
37efbbd8
ZJS
4 audit-type.c
5 audit-type.h
6 catalog.c
7 catalog.h
8 compress.c
9 compress.h
10 journal-def.h
11 journal-file.c
12 journal-file.h
13 journal-send.c
14 journal-vacuum.c
15 journal-vacuum.h
16 journal-verify.c
17 journal-verify.h
18 lookup3.c
19 lookup3.h
20 mmap-cache.c
21 mmap-cache.h
22 sd-journal.c
5c23128d
ZJS
23'''.split())
24
349cc4a5 25if conf.get('HAVE_GCRYPT') == 1
5e3cec87 26 journal_client_sources += files('''
76c87410
MB
27 journal-authenticate.c
28 journal-authenticate.h
29 fsprg.c
30 fsprg.h
31 '''.split())
76c87410
MB
32endif
33
5c23128d
ZJS
34############################################################
35
36audit_type_includes = [config_h,
18bf324a 37 missing_audit_h,
5c23128d 38 'linux/audit.h']
349cc4a5 39if conf.get('HAVE_AUDIT') == 1
37efbbd8 40 audit_type_includes += 'libaudit.h'
5c23128d
ZJS
41endif
42
43generate_audit_type_list = find_program('generate-audit_type-list.sh')
44audit_type_list_txt = custom_target(
37efbbd8
ZJS
45 'audit_type-list.txt',
46 output : 'audit_type-list.txt',
47 command : [generate_audit_type_list, cpp] + audit_type_includes,
48 capture : true)
5c23128d
ZJS
49
50audit_type_to_name = custom_target(
37efbbd8
ZJS
51 'audit_type-to-name.h',
52 input : ['audit_type-to-name.awk', audit_type_list_txt],
53 output : 'audit_type-to-name.h',
54 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
55 capture : true)
5c23128d 56
5e3cec87
ZJS
57journal_client_sources += [audit_type_to_name]
58
59libjournal_client = static_library(
60 'journal-client',
61 journal_client_sources,
62 include_directories : includes,
63 c_args : ['-fvisibility=default'])
09cef4e7 64
5c23128d
ZJS
65############################################################
66
5c23128d 67libjournal_core_sources = files('''
22e3a02b
LP
68 journald-audit.c
69 journald-audit.h
37efbbd8
ZJS
70 journald-console.c
71 journald-console.h
22e3a02b
LP
72 journald-context.c
73 journald-context.h
74 journald-kmsg.c
75 journald-kmsg.h
37efbbd8
ZJS
76 journald-native.c
77 journald-native.h
37efbbd8
ZJS
78 journald-rate-limit.c
79 journald-rate-limit.h
22e3a02b
LP
80 journald-server.c
81 journald-server.h
82 journald-stream.c
83 journald-stream.h
84 journald-syslog.c
85 journald-syslog.h
86 journald-wall.c
87 journald-wall.h
37efbbd8 88 journal-internal.h
5c23128d
ZJS
89'''.split())
90
91systemd_journald_sources = files('''
37efbbd8
ZJS
92 journald.c
93 journald-server.h
5c23128d
ZJS
94'''.split())
95
96journald_gperf_c = custom_target(
37efbbd8
ZJS
97 'journald-gperf.c',
98 input : 'journald-gperf.gperf',
99 output : 'journald-gperf.c',
100 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d
ZJS
101
102systemd_cat_sources = files('cat.c')
103
9200bb30
LP
104journalctl_sources = files('''
105 journalctl.c
106 pcre2-dlopen.c
107 pcre2-dlopen.h
108'''.split())
5c23128d 109
349cc4a5 110if conf.get('HAVE_QRENCODE') == 1
37efbbd8
ZJS
111 journalctl_sources += files('journal-qrcode.c',
112 'journal-qrcode.h')
5c23128d
ZJS
113endif
114
115install_data('journald.conf',
116 install_dir : pkgsysconfdir)
f6e49d4e 117
6ed5ef98 118if get_option('create-log-dirs')
37efbbd8
ZJS
119 meson.add_install_script(
120 'sh', '-c',
6ed5ef98 121 mkdir_p.format('/var/log/journal'))
37efbbd8
ZJS
122 meson.add_install_script(
123 'sh', '-c',
6ed5ef98
ZJS
124 '''chown 0:0 $DESTDIR/var/log/journal &&
125 chmod 755 $DESTDIR/var/log/journal || :''')
126 if get_option('adm-group')
127 meson.add_install_script(
128 'sh', '-c',
129 'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
130 endif
131 if get_option('wheel-group')
132 meson.add_install_script(
133 'sh', '-c',
134 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
135 endif
f6e49d4e 136endif