From 973ae30e7c4f7a1afb385dd3d8eeea178f981445 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Mon, 8 Jul 2024 13:24:39 +0200 Subject: fix deprecated prototypes --- src/include/meson.build | 61 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) (limited to 'src/include/meson.build') diff --git a/src/include/meson.build b/src/include/meson.build index 3677692..ca8c752 100644 --- a/src/include/meson.build +++ b/src/include/meson.build @@ -1,3 +1,58 @@ +config = configuration_data() +cc = meson.get_compiler('c') + +if cc.has_member('struct sockaddr', 'sa_len', prefix : '#include ') + config.set('HASSALEN', true) +endif + +if cc.has_function('getspnam', prefix : '#include ') + config.set('HASGETSPNAM', true) +elif cc.has_function('getuserpw', prefix : '#include ') + config.set('HASGETUSERPW', true) +endif + +if cc.has_function('mkfifo', prefix : '#include ') + config.set('HASMKFIFO', true) +endif + +if cc.has_header('utmp.h') + config.set('HASUTMP', true) +endif + +if idn2_dep.found() + config.set('IDN2', true) +endif + +auto_qmail = run_command('head', '-n1', + meson.project_source_root() / 'conf-home', check : true).stdout().strip() +config.set('auto_qmail', auto_qmail) + +config.set('auto_usera', 'alias') + +config.set('auto_split', get_option('split')) +config.set('auto_patrn', get_option('patrn')) +config.set('auto_spawn', get_option('spawn')) + +user_groups = [ + 'alias', 'qmaild', 'qmaill', 'qmailp', 'qmailq', 'qmailr', 'qmails', + 'sqmail', 'nofiles', +] + +foreach id : user_groups + config.set(id, get_option(id)) +endforeach + +sqmail_hdrs_subdir = 'sqmail' + +configure_file( + configuration : config, + input : 'fehsqm-config.h.in', + output : 'fehsqm-config.h', + install_dir : get_option('includedir') / sqmail_hdrs_subdir, + install_tag : 'devel') + +add_project_arguments('-DUSE_CONFIG', language : 'c') + sqmail_hdrs = [ 'base64.h', 'commands.h', @@ -42,6 +97,7 @@ sqmail_hdrs = [ 'sha1.h', 'sha256.h', 'smtpdlog.h', + 'spawn.h', 'spf.h', 'srs2.h', 'strset.h', @@ -52,10 +108,9 @@ sqmail_hdrs = [ 'tls_timeoutio.h', 'token822.h', 'trigger.h', - 'triggerpull.h', 'wildmat.h', ] -sqmail_hdrs_subdir = 'sqmail' - install_headers(sqmail_hdrs, subdir : sqmail_hdrs_subdir) + +inc = include_directories('.') -- cgit v1.2.3