blob: 946ec3910d5c8460476eb95337e71303db6c9430 [file] [log] [blame]
William A. Kennington IIIe0538842021-06-11 02:01:58 -07001# Create config.h with constants that use to come from autoconf.
2conf_data = configuration_data()
3conf_data.set('error_cap', get_option('error_cap'))
4conf_data.set('error_info_cap', get_option('error_info_cap'))
5conf_data.set('rsyslog_server_conf', get_option('rsyslog_server_conf'))
Lakshmi Yadlapati0387a742024-07-01 17:04:37 -05006
Patrick Williams6eb96bf2024-11-05 14:59:52 -05007lg2_commit_strategy = get_option('lg2_commit_strategy')
8conf_data.set(
9 'lg2_commit_dbus',
10 lg2_commit_strategy == 'dbus' or lg2_commit_strategy == 'both' ? 'true' : 'false',
11)
12conf_data.set(
13 'lg2_commit_journal',
14 lg2_commit_strategy == 'journal' or lg2_commit_strategy == 'both' ? 'true' : 'false',
15)
16
Lakshmi Yadlapati0387a742024-07-01 17:04:37 -050017cxx = meson.get_compiler('cpp')
18if cxx.has_header('poll.h')
19 add_project_arguments('-DPLDM_HAS_POLL=1', language: 'cpp')
20endif
21
William A. Kennington IIIe0538842021-06-11 02:01:58 -070022conf_h_dep = declare_dependency(
23 include_directories: include_directories('.'),
24 sources: configure_file(
25 input: 'config.h.meson',
26 output: 'config.h',
27 configuration: conf_data,
Patrick Williams6eb96bf2024-11-05 14:59:52 -050028 ),
William A. Kennington IIIe0538842021-06-11 02:01:58 -070029)