summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/charset/wscript_configure12
-rw-r--r--lib/util/wscript_configure11
2 files changed, 5 insertions, 18 deletions
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
index 4dbb46d0fb..0322bea446 100644
--- a/lib/util/charset/wscript_configure
+++ b/lib/util/charset/wscript_configure
@@ -1,10 +1,2 @@
-conf.CHECK_HEADERS('iconv.h')
-
-conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=True)
-
-conf.CHECK_CODE('''
- iconv_t cd = iconv_open("ASCII","UCS-2LE");
- if (cd == 0 || cd == (iconv_t)-1) return -1;
- ''',
- define='HAVE_NATIVE_ICONV')
-
+if conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=True, headers='iconv.h'):
+ conf.DEFINE('HAVE_NATIVE_ICONV', 1)
diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
index 44c73dac7a..eb38aa8bde 100644
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -1,15 +1,12 @@
-conf.CHECK_HEADERS('execinfo.h')
-
# backtrace could be in libexecinfo or in libc
-conf.CHECK_FUNCS_IN('backtrace', 'execinfo', checklibc=True)
+conf.CHECK_FUNCS_IN('backtrace', 'execinfo', checklibc=True, headers='execinfo.h')
conf.CHECK_FUNCS('sigprocmask sigblock sigaction')
-conf.CHECK_HEADERS('sys/attributes.h attr/xattr.h sys/xattr.h')
-conf.CHECK_FUNCS_IN('flistxattr', 'attr', checklibc=True)
+conf.CHECK_FUNCS_IN('flistxattr', 'attr', checklibc=True, headers='sys/attributes.h attr/xattr.h sys/xattr.h')
-conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE')
+conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')
conf.CHECK_CODE('getxattr(NULL, NULL, NULL, 0, 0, 0)',
define='XATTR_ADDITIONAL_OPTIONS')
@@ -17,8 +14,6 @@ conf.CHECK_CODE('getxattr(NULL, NULL, NULL, 0, 0, 0)',
if conf.CONFIG_SET('HAVE_FLISTXATTR'):
conf.DEFINE('HAVE_XATTR_SUPPORT', 1)
-conf.CHECK_HEADERS('sys/statvfs.h')
-
conf.CHECK_CODE('struct statvfs64 fsd; exit(statvfs64 (".", &fsd))',
define='STAT_STATVFS64',
headers='unistd.h sys/types.h sys/statvfs.h',