summaryrefslogtreecommitdiff
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 005a9ead5..f6c44b874 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1721,7 +1721,6 @@ AC_CHECK_FUNCS([ \
1721 inet_ntop \ 1721 inet_ntop \
1722 innetgr \ 1722 innetgr \
1723 login_getcapbool \ 1723 login_getcapbool \
1724 mblen \
1725 md5_crypt \ 1724 md5_crypt \
1726 memmove \ 1725 memmove \
1727 memset_s \ 1726 memset_s \
@@ -1789,6 +1788,12 @@ AC_CHECK_FUNCS([ \
1789 warn \ 1788 warn \
1790]) 1789])
1791 1790
1791dnl Wide character support. Linux man page says it needs _XOPEN_SOURCE.
1792saved_CFLAGS="$CFLAGS"
1793CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
1794AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
1795CFLAGS="$saved_CFLAGS"
1796
1792AC_LINK_IFELSE( 1797AC_LINK_IFELSE(
1793 [AC_LANG_PROGRAM( 1798 [AC_LANG_PROGRAM(
1794 [[ #include <ctype.h> ]], 1799 [[ #include <ctype.h> ]],