From 0d9a73472439cab26d2d33adea88aa193fea6951 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 8 Mar 2017 00:16:47 -0800 Subject: [PATCH] pull in the nl_langinfo & wcwidth modules from gnulib These functions aren't available on mingw toolchains, so include the gnulib modules so we can fall back on them. --- autogen.sh | 2 ++ configure.ac | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autogen.sh b/autogen.sh index 92e69b7a..617705cf 100755 --- a/autogen.sh +++ b/autogen.sh @@ -12,6 +12,7 @@ modules=" isblank iswblank lstat + nl_langinfo regex sigaction snprintf-posix @@ -23,6 +24,7 @@ modules=" vsnprintf-posix wchar wctype-h + wcwidth " # Make sure the local gnulib git repo is up-to-date. diff --git a/configure.ac b/configure.ac index f22b3233..14891cab 100644 --- a/configure.ac +++ b/configure.ac @@ -469,7 +469,7 @@ int main(void) dnl Checks for functions. if test "x$enable_utf8" != xno; then - AC_CHECK_FUNCS(iswalnum iswpunct iswspace nl_langinfo mblen mbstowcs mbtowc wctomb wcwidth) + AC_CHECK_FUNCS(iswalnum iswpunct iswspace mblen mbstowcs mbtowc wctomb) fi dnl Checks for typedefs, structures, and compiler characteristics. @@ -564,13 +564,11 @@ if test "x$enable_utf8" != xno && \ test x$ac_cv_func_iswalnum = xyes && \ test x$ac_cv_func_iswpunct = xyes && \ (test x$ac_cv_func_iswblank = xyes || test x$ac_cv_func_iswspace = xyes) && \ - test x$ac_cv_func_nl_langinfo = xyes && \ test x$ac_cv_func_mblen = xyes && \ test x$ac_cv_func_mbstowcs = xyes && \ test x$ac_cv_func_mbtowc = xyes && \ - test x$ac_cv_func_wctomb = xyes && \ - test x$ac_cv_func_wcwidth = xyes; then - AC_DEFINE(ENABLE_UTF8, 1, [Define this if your system has sufficient UTF-8 support (a wide curses library, iswalnum(), iswpunct(), iswblank() or iswspace(), nl_langinfo, mblen(), mbstowcs(), mbtowc(), wctomb(), and wcwidth()).]) + test x$ac_cv_func_wctomb = xyes; then + AC_DEFINE(ENABLE_UTF8, 1, [Define this if your system has sufficient UTF-8 support.]) else if test "x$enable_utf8" = xyes; then AC_MSG_ERROR([