summaryrefslogtreecommitdiff
path: root/source4/lib/charset/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/charset/SConscript')
-rw-r--r--source4/lib/charset/SConscript66
1 files changed, 0 insertions, 66 deletions
diff --git a/source4/lib/charset/SConscript b/source4/lib/charset/SConscript
deleted file mode 100644
index 9bc474ff48..0000000000
--- a/source4/lib/charset/SConscript
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-# tastes like -*- python -*-
-
-Import('hostenv')
-
-def _CheckIconvPath(context,path):
- # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
- # those with the standalone portable libiconv installed).
- if path:
- context.Message("checking for iconv in " + path + " ... ")
- context.env.Append(LIBPATH=path)
- else:
- context.Message("checking for iconv in default path ... ")
-
- for l in [None,'giconv','iconv']:
- for h in ['giconv.h','iconv.h']:
- if l:
- context.env['LIBS'] = [l]
- if context.TryLink("""
-#include <stdlib.h>
-#include <%s>
-
-int main()
-{
- iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);
- return 0;
-}""" % h, '.c'):
- context.Result(1)
- return True
-
- context.Result(0)
- return False
-
-def CheckIconv(context):
- look_dirs = [None, '/usr','/usr/local','/sw']
-
- for p in look_dirs:
- if _CheckIconvPath(context,p):
- break
-
- if context.TryRun("""
-#include <iconv.h>
-main() {
- iconv_t cd = iconv_open("ASCII", "UCS-2LE");
- if (cd == 0 || cd == (iconv_t)-1) return -1;
- return 0;
-}
-""", '.c'):
- return (1,[])
-
- return (0,[])
-
-if hostenv['configure']:
- conf = hostenv.Configure( custom_tests = { 'CheckIconv' : CheckIconv })
- (have_iconv,iconv) = conf.CheckIconv()
- conf.Finish()
-
- if not have_iconv:
- print "Install iconv for better charset compatibility"
-else:
- iconv = [] # FIXME
-
-charset = hostenv.Library('charset',['iconv.c','charcnv.c',iconv])
-Export('charset')