X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fwcwidth.m4;h=5d4081397b5d904323248cd33b612dd1b87a5c63;hb=f16415c07025fdec551dfc1dc7275c2a88819d44;hp=dbcc231be4c0ab1f1a8088205c7ee85fb0c3a9fa;hpb=e5c4538ab6673e3f3f66fd1ad715c201cf34907c;p=gnulib.git diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4 index dbcc231be..5d4081397 100644 --- a/m4/wcwidth.m4 +++ b/m4/wcwidth.m4 @@ -1,4 +1,4 @@ -# wcwidth.m4 serial 19 +# wcwidth.m4 serial 21 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH], AC_CHECK_HEADERS_ONCE([wchar.h]) AC_CHECK_FUNCS_ONCE([wcwidth]) - AC_CHECK_DECLS([wcwidth], [], [], [ + AC_CHECK_DECLS([wcwidth], [], [], [[ /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before @@ -29,12 +29,13 @@ AC_DEFUN([gl_FUNC_WCWIDTH], #include #include #include -]) +]]) if test $ac_cv_have_decl_wcwidth != yes; then HAVE_DECL_WCWIDTH=0 fi if test $ac_cv_func_wcwidth = yes; then + HAVE_WCWIDTH=1 dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. dnl This leads to bugs in 'ls' (coreutils). @@ -89,9 +90,8 @@ changequote([,])dnl *yes) ;; *no) REPLACE_WCWIDTH=1 ;; esac - fi - if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then - AC_LIBOBJ([wcwidth]) + else + HAVE_WCWIDTH=0 fi dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not dnl have the wcwidth function, then it does not declare it.