~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/wcwidth.m4

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# wcwidth.m4 serial 20
2
 
dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 
1
# wcwidth.m4 serial 23
 
2
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
18
18
  AC_CHECK_HEADERS_ONCE([wchar.h])
19
19
  AC_CHECK_FUNCS_ONCE([wcwidth])
20
20
 
21
 
  AC_CHECK_DECLS([wcwidth], [], [], [
 
21
  AC_CHECK_DECLS([wcwidth], [], [], [[
22
22
/* AIX 3.2.5 declares wcwidth in <string.h>. */
23
23
#include <string.h>
24
24
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29
29
#include <stdio.h>
30
30
#include <time.h>
31
31
#include <wchar.h>
32
 
])
 
32
]])
33
33
  if test $ac_cv_have_decl_wcwidth != yes; then
34
34
    HAVE_DECL_WCWIDTH=0
35
35
  fi
36
36
 
37
37
  if test $ac_cv_func_wcwidth = yes; then
38
38
    HAVE_WCWIDTH=1
39
 
    dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
 
39
    dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
 
40
    dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
40
41
    dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
41
42
    dnl This leads to bugs in 'ls' (coreutils).
42
43
    AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
69
70
    {
70
71
      if (wcwidth (0x0301) > 0)
71
72
        result |= 1;
 
73
      if (wcwidth (0x05B0) > 0)
 
74
        result |= 2;
72
75
      if (wcwidth (0x200B) > 0)
73
 
        result |= 2;
 
76
        result |= 4;
74
77
    }
75
78
  return result;
76
79
}]])],