mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3-waf: support avahi builds
This commit is contained in:
parent
04d251a847
commit
209555ef09
@ -48,6 +48,7 @@ def set_options(opt):
|
||||
opt.SAMBA3_ADD_OPTION('sendfile-support')
|
||||
opt.SAMBA3_ADD_OPTION('utmp')
|
||||
opt.SAMBA3_ADD_OPTION('pthreadpool', with_name="enable", without_name="disable")
|
||||
opt.SAMBA3_ADD_OPTION('avahi', with_name="enable", without_name="disable")
|
||||
|
||||
|
||||
def configure(conf):
|
||||
@ -532,6 +533,17 @@ return 0;
|
||||
msg="Checking whether pututline returns pointer")
|
||||
conf.DEFINE('WITH_UTMP', 1)
|
||||
|
||||
if Options.options.with_avahi:
|
||||
conf.env.with_avahi = True
|
||||
if not conf.CHECK_HEADERS('avahi-common/watch.h avahi-client/client.h'): conf.env.with_avahi = False
|
||||
if not conf.CHECK_FUNCS_IN('avahi_client_new', 'avahi-client'): conf.env.with_avahi = False
|
||||
if not conf.CHECK_FUNCS_IN('avahi_strerror', 'avahi-common'): conf.env.with_avahi = False
|
||||
if conf.env.with_avahi:
|
||||
conf.DEFINE('WITH_AVAHI_SUPPORT', 1)
|
||||
else:
|
||||
conf.SET_TARGET_TYPE('avahi-common', 'EMPTY')
|
||||
conf.SET_TARGET_TYPE('avahi-client', 'EMPTY')
|
||||
|
||||
# FIXME: these should be tests for features, but the old build system just
|
||||
# checks for OSes.
|
||||
import sys
|
||||
|
@ -23,7 +23,7 @@ AFS_SRC = 'lib/afs.c'
|
||||
|
||||
AFS_SETTOKEN_SRC = 'lib/afs_settoken.c'
|
||||
|
||||
AVAHI_SRC = '' # TODO: fix
|
||||
AVAHI_SRC = 'lib/avahi.c smbd/avahi_register.c'
|
||||
|
||||
SERVER_MUTEX_SRC = 'lib/server_mutex.c'
|
||||
|
||||
@ -715,7 +715,7 @@ SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
|
||||
${PROFILE_SRC} ${PRINTBACKEND_SRC}
|
||||
${OPLOCK_SRC} ${NOTIFY_SRC} ${FNAME_UTIL_SRC}
|
||||
${LIBMSRPC_SRC}
|
||||
${LIBMSRPC_GEN_SRC} ${AVAHI_SRC} ${LIBADS_SRC}
|
||||
${LIBMSRPC_GEN_SRC} ${LIBADS_SRC}
|
||||
${LIBADS_SERVER_SRC} ${REG_FULL_SRC}
|
||||
${BUILDOPT_SRC}
|
||||
${LIBNET_SRC} ${LIBSMBCONF_SRC}
|
||||
@ -851,6 +851,10 @@ bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
|
||||
deps='talloc',
|
||||
local_include=False)
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('AVAHI',
|
||||
source=AVAHI_SRC,
|
||||
enabled=bld.env.with_avahi)
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('GROUPDB',
|
||||
source=GROUPDB_SRC)
|
||||
|
||||
@ -919,7 +923,7 @@ bld.SAMBA_BINARY('smbd/smbd',
|
||||
source=SMBD_SRC,
|
||||
deps='''tdb DYNCONFIG tevent dl krb5 ldap gssapi gssapi_krb5
|
||||
NSS_WRAPPER LIBWBCLIENT crypt nsl cups cap resolv ZLIB PASSDB
|
||||
PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT''',
|
||||
PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI''',
|
||||
install_path='${SBINDIR}',
|
||||
vars=locals())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user