1 # iconv_open.m4 serial 1
2 dnl Copyright (C) 2007 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_ICONV_OPEN],
10 AC_REQUIRE([AC_CANONICAL_HOST])
11 AC_REQUIRE([gl_ICONV_H_DEFAULTS])
12 if test "$am_cv_func_iconv" = yes; then
13 dnl Test whether iconv_open accepts standardized encoding names.
14 dnl We know that GNU libiconv and GNU libc do.
15 AC_EGREP_CPP([gnu_iconv], [
17 #if defined _LIBICONV_VERSION || defined __GLIBC__
20 ], [gl_func_iconv_gnu=yes], [gl_func_iconv_gnu=no])
21 if test $gl_func_iconv_gnu = no; then
24 aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
25 irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
26 hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
27 osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
29 if test -n "$iconv_flavor"; then
30 AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor],
31 [Define to a symbolic name denoting the flavor of iconv_open()
34 AC_LIBOBJ([iconv_open])