s3-waf: Add check for iconv
authorKai Blin <kai@samba.org>
Tue, 15 Jun 2010 04:53:11 +0000 (06:53 +0200)
committerKai Blin <kai@samba.org>
Thu, 17 Jun 2010 06:09:49 +0000 (08:09 +0200)
source3/wscript
source3/wscript_build

index 01d20d484830191cca7bbc1fe2b3fe068859c603..9bbedeae79b35882c1e7f4d3c3274ce67398230b 100644 (file)
@@ -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
index 47a330aa87b837e73f1061e9238bc912166e60b8..0915a6aa19d3137f92e157a38b435e01ef6472fd 100644 (file)
@@ -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',