mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
77c1747f21
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Tue Dec 14 20:55:17 CET 2010 on sn-devel-104
22 lines
904 B
Python
22 lines
904 B
Python
#!/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)
|
|
|
|
if (conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=False, headers='iconv.h') or
|
|
conf.CHECK_FUNCS('iconv_open', headers='iconv.h')):
|
|
if conf.env['HAVE_LIBICONV']:
|
|
if conf.CHECK_FUNCS('mbrtowc', headers='wchar.h'):
|
|
conf.DEFINE('HAVE_NATIVE_ICONV', 1)
|
|
elif conf.env.LIB_ICONV:
|
|
del conf.env['LIB_ICONV']
|
|
else:
|
|
conf.DEFINE('HAVE_NATIVE_ICONV', 1)
|