build: iconv checks
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Mar 2010 12:16:48 +0000 (23:16 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:45 +0000 (20:26 +1000)
lib/util/charset/wscript_configure [new file with mode: 0644]
source4/wscript

diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
new file mode 100644 (file)
index 0000000..f076bc0
--- /dev/null
@@ -0,0 +1,10 @@
+conf.CHECK_HEADERS('iconv.h')
+
+conf.CHECK_FUNCS_IN('iconv_open', 'iconv')
+
+conf.CHECK_CODE('''
+                   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+                   if (cd == 0 || cd == (iconv_t)-1) return -1;
+                ''',
+                define='HAVE_NATIVE_ICONV')
+
index 38bf29c99a9b0d983982f2f2d2c8f05f4d99416b..25a64c89d91b25f17a9d42164cb4429721a29ecf 100644 (file)
@@ -28,6 +28,7 @@ def configure(conf):
     conf.sub_config('ntvfs/sysdep')
     conf.sub_config('../lib/util')
     conf.sub_config('../lib/zlib')
+    conf.sub_config('../lib/util/charset')
     conf.sub_config('auth')
 
     conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)