summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-05-28 15:56:32 +0200
committerKai Blin <kai@samba.org>2010-05-30 23:29:39 +0200
commit209555ef09bf57aa79f164f6e85a16e5b4977609 (patch)
tree777650d823ecb44371f930853cac9dc8bc1f637b /source3/wscript
parent04d251a8476b8cf267667fc108f2f8c213fceb54 (diff)
downloadsamba-209555ef09bf57aa79f164f6e85a16e5b4977609.tar.gz
samba-209555ef09bf57aa79f164f6e85a16e5b4977609.tar.bz2
samba-209555ef09bf57aa79f164f6e85a16e5b4977609.zip
s3-waf: support avahi builds
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index d0c80dc073..a011a52433 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -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