William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 1 | # Create config.h with constants that use to come from autoconf. |
| 2 | conf_data = configuration_data() |
| 3 | conf_data.set('error_cap', get_option('error_cap')) |
| 4 | conf_data.set('error_info_cap', get_option('error_info_cap')) |
| 5 | conf_data.set('rsyslog_server_conf', get_option('rsyslog_server_conf')) |
Lakshmi Yadlapati | 0387a74 | 2024-07-01 17:04:37 -0500 | [diff] [blame] | 6 | |
Patrick Williams | 6eb96bf | 2024-11-05 14:59:52 -0500 | [diff] [blame] | 7 | lg2_commit_strategy = get_option('lg2_commit_strategy') |
| 8 | conf_data.set( |
| 9 | 'lg2_commit_dbus', |
| 10 | lg2_commit_strategy == 'dbus' or lg2_commit_strategy == 'both' ? 'true' : 'false', |
| 11 | ) |
| 12 | conf_data.set( |
| 13 | 'lg2_commit_journal', |
| 14 | lg2_commit_strategy == 'journal' or lg2_commit_strategy == 'both' ? 'true' : 'false', |
| 15 | ) |
| 16 | |
Lakshmi Yadlapati | 0387a74 | 2024-07-01 17:04:37 -0500 | [diff] [blame] | 17 | cxx = meson.get_compiler('cpp') |
| 18 | if cxx.has_header('poll.h') |
| 19 | add_project_arguments('-DPLDM_HAS_POLL=1', language: 'cpp') |
| 20 | endif |
| 21 | |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 22 | conf_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 Williams | 6eb96bf | 2024-11-05 14:59:52 -0500 | [diff] [blame] | 28 | ), |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 29 | ) |