summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-07-14 10:59:09 +1000
committerDarren Tucker <dtucker@zip.com.au>2016-07-14 10:59:09 +1000
commita2333584170a565adf4f209586772ef8053b10b8 (patch)
tree37e1f144bdabc09b1ce89c2e6fe603bc8845e7c2 /configure.ac
parent8aaec7050614494014c47510b7e94daf6e644c62 (diff)
Add compat code for missing wcwidth.
If we don't have wcwidth force fallback implementations of nl_langinfo and mbtowc. Based on advice from Ingo Schwarze.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 005a9ead..f6c44b87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1721,7 +1721,6 @@ AC_CHECK_FUNCS([ \
inet_ntop \
innetgr \
login_getcapbool \
- mblen \
md5_crypt \
memmove \
memset_s \
@@ -1789,6 +1788,12 @@ AC_CHECK_FUNCS([ \
warn \
])
+dnl Wide character support. Linux man page says it needs _XOPEN_SOURCE.
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
+AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
+CFLAGS="$saved_CFLAGS"
+
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[ #include <ctype.h> ]],