annotate m4/iconv_open.m4 @ 17632:86af85d364e1 default tip

unistd: port readlink to Mac OS X 10.3.9 * lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work around self-include problem in Mac OS X 10.3.9 when combined with readlink module. Problem reported by Klaus Zietler in <http://bugs.gnu.org/16825>.
author Paul Eggert <eggert@penguin.cs.ucla.edu>
date Tue, 25 Feb 2014 11:16:27 -0800
parents 344018b6e5d7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14981
f557c357cfc4 iconv_open: Move AC_LIBOBJ invocations to module description.
Bruno Haible <bruno@clisp.org>
parents: 14980
diff changeset
1 # iconv_open.m4 serial 14
17587
344018b6e5d7 maint: update copyright
Eric Blake <eblake@redhat.com>
parents: 17249
diff changeset
2 dnl Copyright (C) 2007-2014 Free Software Foundation, Inc.
8603
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_ICONV_OPEN],
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 [
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_REQUIRE([AM_ICONV])
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_REQUIRE([AC_CANONICAL_HOST])
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 AC_REQUIRE([gl_ICONV_H_DEFAULTS])
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 if test "$am_cv_func_iconv" = yes; then
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
13 dnl Provide the <iconv.h> override, for the sake of the C++ aliases.
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
14 gl_REPLACE_ICONV_H
8603
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 dnl Test whether iconv_open accepts standardized encoding names.
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 dnl We know that GNU libiconv and GNU libc do.
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 AC_EGREP_CPP([gnu_iconv], [
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 #include <iconv.h>
13885
87a95303747f Port to uClibc.
Bruno Haible <bruno@clisp.org>
parents: 13579
diff changeset
19 #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
8603
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 gnu_iconv
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #endif
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 ], [gl_func_iconv_gnu=yes], [gl_func_iconv_gnu=no])
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 if test $gl_func_iconv_gnu = no; then
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 iconv_flavor=
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 case "$host_os" in
11910
32fc3a6c4499 Work around iconv_open problem on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
26 aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
32fc3a6c4499 Work around iconv_open problem on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
27 irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
32fc3a6c4499 Work around iconv_open problem on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
28 hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
32fc3a6c4499 Work around iconv_open problem on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
29 osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
32fc3a6c4499 Work around iconv_open problem on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11007
diff changeset
30 solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
8603
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 esac
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 if test -n "$iconv_flavor"; then
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor],
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 [Define to a symbolic name denoting the flavor of iconv_open()
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 implementation.])
9341
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 8603
diff changeset
36 gl_REPLACE_ICONV_OPEN
8603
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 fi
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 fi
14980
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
39 m4_ifdef([gl_FUNC_ICONV_OPEN_UTF_SUPPORT], [
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
40 gl_FUNC_ICONV_OPEN_UTF_SUPPORT
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
41 if test $gl_cv_func_iconv_supports_utf = no; then
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
42 REPLACE_ICONV_UTF=1
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
43 AC_DEFINE([REPLACE_ICONV_UTF], [1],
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
44 [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.])
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
45 REPLACE_ICONV=1
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
46 gl_REPLACE_ICONV_OPEN
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
47 fi
8894cea69a3b iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
48 ])
8603
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 fi
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 ])
4aea800039c0 New module 'iconv_open'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51
9341
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 8603
diff changeset
52 AC_DEFUN([gl_REPLACE_ICONV_OPEN],
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 8603
diff changeset
53 [
10500
7d66f23909d8 Avoid assigning ICONV_H in two different files. Fixes a bug.
Bruno Haible <bruno@clisp.org>
parents: 9348
diff changeset
54 gl_REPLACE_ICONV_H
9341
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 8603
diff changeset
55 REPLACE_ICONV_OPEN=1
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 8603
diff changeset
56 ])