summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-06-15 06:53:11 +0200
committerKai Blin <kai@samba.org>2010-06-17 08:09:49 +0200
commit83ad437a9cf9f0ed36ea0e72282020e9330f8c88 (patch)
tree925bf788a913e4cfa8ee5bd9ba875341bac723e9
parent7a1c24705dba06753a693a3dbee93d473726d05a (diff)
downloadsamba-83ad437a9cf9f0ed36ea0e72282020e9330f8c88.tar.gz
s3-waf: Add check for iconv
-rw-r--r--source3/wscript8
-rw-r--r--source3/wscript_build2
2 files changed, 9 insertions, 1 deletions
diff --git a/source3/wscript b/source3/wscript
index 01d20d48483..9bbedeae79b 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -49,6 +49,7 @@ def set_options(opt):
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")
+ opt.SAMBA3_ADD_OPTION('iconv')
def configure(conf):
@@ -578,6 +579,13 @@ return 0;
conf.SET_TARGET_TYPE('avahi-common', 'EMPTY')
conf.SET_TARGET_TYPE('avahi-client', 'EMPTY')
+ if Options.options.with_iconv:
+ conf.env.with_iconv = True
+ if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'):
+ conf.env.with_iconv = False
+ if conf.env.with_iconv:
+ conf.DEFINE('HAVE_ICONV', 1)
+
# FIXME: these should be tests for features, but the old build system just
# checks for OSes.
import sys
diff --git a/source3/wscript_build b/source3/wscript_build
index 47a330aa87b..0915a6aa19d 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -891,7 +891,7 @@ bld.SAMBA_SUBSYSTEM('KRBCLIENT',
bld.SAMBA_SUBSYSTEM('LIBS',
source=LIB_SRC,
- deps='NSS_WRAPPER',
+ deps='NSS_WRAPPER iconv',
vars=locals())
bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',