summaryrefslogtreecommitdiff
path: root/lib/util/charset/wscript_configure
blob: 804c2663f640cc361c22a2446615eab1ae2c8c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python

# rather strangely, we need to look for libiconv before checking libc
# as the external libiconv can use a macro to override iconv_open to libiconv_open
# and then we may find the wrong iconv.h later due to other packages looking
# in /usr/local
# We check for the lib iconv when building a shared lib has some compiler/linker
# managed to link when specifying -liconv a executable even if there is no
# libiconv.so or libiconv.a

conf.CHECK_LIB(libs="iconv", shlib=True)

#HP-UX can use libiconv as an add-on package, which has #define iconv_open libiconv_open
if (conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=False, headers='iconv.h') or
    conf.CHECK_FUNCS_IN('libiconv_open', 'iconv', checklibc=False, headers='iconv.h') or 
    conf.CHECK_FUNCS('iconv_open', headers='iconv.h')):
    
    conf.DEFINE('HAVE_NATIVE_ICONV', 1)