diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-12-29 13:08:27 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-12-29 13:08:27 -0500 |
commit | 22818c1449823d8de5430f734da38d1eae943417 (patch) | |
tree | fc9740afe696794b9ccf2112294ed7a65771108a /aclocal.m4 | |
parent | f4f5e1c2b8fa4539e367e1f48774183d349184c5 (diff) | |
download | bash-22818c1449823d8de5430f734da38d1eae943417.tar.gz |
commit bash-20110520 snapshot
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -1698,7 +1698,6 @@ AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP)) AC_CHECK_FUNC(mbsnrtowcs, AC_DEFINE(HAVE_MBSNRTOWCS)) AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) - AC_REPLACE_FUNCS(mbschr) AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB)) @@ -1763,6 +1762,33 @@ if test $bash_cv_type_wint_t = yes; then AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here]) fi +dnl check for broken wcwidth +AC_CACHE_CHECK([for wcwidth broken with unicode combining characters], +bash_cv_wcwidth_broken, +[AC_TRY_RUN([ +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> + +#include <locale.h> +#include <wchar.h> + +main(c, v) +int c; +char **v; +{ + int w; + + setlocale(LC_ALL, "en_US.UTF-8"); + w = wcwidth (0x0301); + exit (w == 0); /* exit 0 if wcwidth broken */ +} +], +bash_cv_wcwidth_broken=yes, bash_cv_wcwdith_broken=no)]) +if test $bash_cv_wcwidth_broken = yes; then + AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken]) +fi + if test "$am_cv_func_iconv" = yes; then OLDLIBS="$LIBS" LIBS="$LIBS $LIBICONV" |