summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-07 23:16:48 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:45 +1000
commit2ea4fd66339017c72578a9b44944e96ab6464e64 (patch)
tree4ce0aa637f062f4a00ca88e1a664437fbf949178
parent12c46d90552e7c51a4c0757cae7ee48b93aeec9d (diff)
downloadsamba-2ea4fd66339017c72578a9b44944e96ab6464e64.tar.gz
samba-2ea4fd66339017c72578a9b44944e96ab6464e64.tar.bz2
samba-2ea4fd66339017c72578a9b44944e96ab6464e64.zip
build: iconv checks
-rw-r--r--lib/util/charset/wscript_configure10
-rw-r--r--source4/wscript1
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
new file mode 100644
index 0000000000..f076bc0680
--- /dev/null
+++ b/lib/util/charset/wscript_configure
@@ -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')
+
diff --git a/source4/wscript b/source4/wscript
index 38bf29c99a..25a64c89d9 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -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)