From b81d399aa6d9e2bdbb9db0efa8109c41aad4d025 Mon Sep 17 00:00:00 2001 From: "Timur I. Bakeyev" Date: Mon, 31 May 2021 02:49:20 +0200 Subject: [PATCH 18/28] Add configuration option that allows to choose alternative mDNS implementation dns_sd library. Signed-off-by: Timur I. Bakeyev --- source3/wscript | 12 ++++++++++++ source3/wscript_build | 2 ++ 2 files changed, 14 insertions(+) diff --git a/source3/wscript b/source3/wscript index 2121b8b6510..6209472c6c8 100644 --- a/source3/wscript +++ b/source3/wscript @@ -70,6 +70,7 @@ def options(opt): opt.samba_add_onoff_option('sendfile-support', default=None) opt.samba_add_onoff_option('utmp') opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable") + opt.samba_add_onoff_option('dnssd', with_name="enable", without_name="disable") opt.samba_add_onoff_option('iconv') opt.samba_add_onoff_option('acl-support') opt.samba_add_onoff_option('syslog') @@ -855,6 +856,17 @@ msg.msg_accrightslen = sizeof(fd); conf.SET_TARGET_TYPE('avahi-common', 'EMPTY') conf.SET_TARGET_TYPE('avahi-client', 'EMPTY') + if Options.options.with_dnssd: + conf.env.with_dnssd = True + if not conf.CHECK_HEADERS('dns_sd.h'): + conf.env.with_dnssd = False + if not conf.CHECK_FUNCS_IN('DNSServiceRegister', 'dns_sd'): + conf.env.with_dnssd = False + if conf.env.with_dnssd: + conf.DEFINE('WITH_DNSSD_SUPPORT', 1) + else: + conf.SET_TARGET_TYPE('dns_sd', 'EMPTY') + if Options.options.with_iconv: conf.env.with_iconv = True if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'): diff --git a/source3/wscript_build b/source3/wscript_build index 5cf965dc45d..edd7985e648 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -709,6 +709,7 @@ bld.SAMBA3_LIBRARY('smbd_base', samba3core param_service AVAHI + dns_sd PROFILE LOCKING LIBADS_SERVER @@ -1128,6 +1129,7 @@ bld.SAMBA3_BINARY('client/smbclient', msrpc3 RPC_NDR_SRVSVC cli_smb_common + dns_sd archive ''') -- 2.37.1