diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-05-07 19:26:10 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-05-07 09:27:50 +0300 |
| commit | 23941735df4d535e88a9a1d22bdf6c0c1fdf9cca (patch) | |
| tree | 90328dc90e1ce31abdc56c8c104a0ddff1b4b97d /meson.build | |
| parent | b36e492d29eed332d074a221317849b5e78abbd7 (diff) | |
logging: rework a bit, maybe support syslog
Seems journal logging fails on NetBSD (no surprise), but has some
unwanted/not-fully-understood side-effects.
In any case, outside Linux there's no use in even trying to use
journald; so we don't do that anymore.
Add conditional support for syslog (requires glib 2.80).
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 718d68f..265c4a8 100644 --- a/meson.build +++ b/meson.build @@ -203,6 +203,23 @@ if xapver.version_compare('>= 1.4.23') config_h_data.set('HAVE_XAPIAN_FLAG_NGRAMS', 1) endif +host_system = host_machine.system() +# +# soft dependencies +# + + +# logging + +# if we're on a linux machine, perhaps there's systemd/journald. +# otherwise, we don't bother. +if host_machine.system() == 'linux' + config_h_data.set('MAYBE_USE_JOURNAL', 1) +endif +if cc.has_function('g_log_writer_syslog',dependencies: glib_dep) + config_h_data.set('MAYBE_USE_SYSLOG', 1) +endif + # optionally, use Compact Language Detector2 if we can find it. cld2_dep = meson.get_compiler('cpp').find_library('cld2', required: get_option('cld2')) if not get_option('cld2').disabled() and cld2_dep.found() @@ -211,7 +228,7 @@ else message('CLD2 not found or disabled; no support for language detection') endif -# soft dependencies +# guile guile_dep = dependency('guile-3.0', required: get_option('guile')) # allow for a custom guile-extension-dir if guile_dep.found() |
