summaryrefslogtreecommitdiffstats
path: root/gl/m4/iconv.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/iconv.m4')
-rw-r--r--gl/m4/iconv.m430
1 files changed, 15 insertions, 15 deletions
diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4
index 66bc76f..3cc6268 100644
--- a/gl/m4/iconv.m4
+++ b/gl/m4/iconv.m4
@@ -1,5 +1,5 @@
1# iconv.m4 serial AM6 (gettext-0.17) 1# iconv.m4 serial AM7 (gettext-0.18)
2dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2007-2009 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -34,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK],
34 am_save_CPPFLAGS="$CPPFLAGS" 34 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36 36
37 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ 37 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
38 am_cv_func_iconv="no, consider installing GNU libiconv" 38 am_cv_func_iconv="no, consider installing GNU libiconv"
39 am_cv_lib_iconv=no 39 am_cv_lib_iconv=no
40 AC_TRY_LINK([#include <stdlib.h> 40 AC_TRY_LINK([#include <stdlib.h>
@@ -42,7 +42,7 @@ AC_DEFUN([AM_ICONV_LINK],
42 [iconv_t cd = iconv_open("",""); 42 [iconv_t cd = iconv_open("","");
43 iconv(cd,NULL,NULL,NULL,NULL); 43 iconv(cd,NULL,NULL,NULL,NULL);
44 iconv_close(cd);], 44 iconv_close(cd);],
45 am_cv_func_iconv=yes) 45 [am_cv_func_iconv=yes])
46 if test "$am_cv_func_iconv" != yes; then 46 if test "$am_cv_func_iconv" != yes; then
47 am_save_LIBS="$LIBS" 47 am_save_LIBS="$LIBS"
48 LIBS="$LIBS $LIBICONV" 48 LIBS="$LIBS $LIBICONV"
@@ -51,13 +51,13 @@ AC_DEFUN([AM_ICONV_LINK],
51 [iconv_t cd = iconv_open("",""); 51 [iconv_t cd = iconv_open("","");
52 iconv(cd,NULL,NULL,NULL,NULL); 52 iconv(cd,NULL,NULL,NULL,NULL);
53 iconv_close(cd);], 53 iconv_close(cd);],
54 am_cv_lib_iconv=yes 54 [am_cv_lib_iconv=yes]
55 am_cv_func_iconv=yes) 55 [am_cv_func_iconv=yes])
56 LIBS="$am_save_LIBS" 56 LIBS="$am_save_LIBS"
57 fi 57 fi
58 ]) 58 ])
59 if test "$am_cv_func_iconv" = yes; then 59 if test "$am_cv_func_iconv" = yes; then
60 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ 60 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
61 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. 61 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
62 am_save_LIBS="$LIBS" 62 am_save_LIBS="$LIBS"
63 if test $am_cv_lib_iconv = yes; then 63 if test $am_cv_lib_iconv = yes; then
@@ -134,7 +134,7 @@ int main ()
134 am_func_iconv=no am_cv_lib_iconv=no 134 am_func_iconv=no am_cv_lib_iconv=no
135 fi 135 fi
136 if test "$am_func_iconv" = yes; then 136 if test "$am_func_iconv" = yes; then
137 AC_DEFINE(HAVE_ICONV, 1, 137 AC_DEFINE([HAVE_ICONV], [1],
138 [Define if you have the iconv() function and it works.]) 138 [Define if you have the iconv() function and it works.])
139 fi 139 fi
140 if test "$am_cv_lib_iconv" = yes; then 140 if test "$am_cv_lib_iconv" = yes; then
@@ -147,8 +147,8 @@ int main ()
147 LIBICONV= 147 LIBICONV=
148 LTLIBICONV= 148 LTLIBICONV=
149 fi 149 fi
150 AC_SUBST(LIBICONV) 150 AC_SUBST([LIBICONV])
151 AC_SUBST(LTLIBICONV) 151 AC_SUBST([LTLIBICONV])
152]) 152])
153 153
154AC_DEFUN([AM_ICONV], 154AC_DEFUN([AM_ICONV],
@@ -156,7 +156,7 @@ AC_DEFUN([AM_ICONV],
156 AM_ICONV_LINK 156 AM_ICONV_LINK
157 if test "$am_cv_func_iconv" = yes; then 157 if test "$am_cv_func_iconv" = yes; then
158 AC_MSG_CHECKING([for iconv declaration]) 158 AC_MSG_CHECKING([for iconv declaration])
159 AC_CACHE_VAL(am_cv_proto_iconv, [ 159 AC_CACHE_VAL([am_cv_proto_iconv], [
160 AC_TRY_COMPILE([ 160 AC_TRY_COMPILE([
161#include <stdlib.h> 161#include <stdlib.h>
162#include <iconv.h> 162#include <iconv.h>
@@ -169,12 +169,12 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
169#else 169#else
170size_t iconv(); 170size_t iconv();
171#endif 171#endif
172], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 172], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
173 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 173 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
174 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 174 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
175 AC_MSG_RESULT([$]{ac_t:- 175 AC_MSG_RESULT([${ac_t:-
176 }[$]am_cv_proto_iconv) 176 }$am_cv_proto_iconv])
177 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 177 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
178 [Define as const if the declaration of iconv() needs const.]) 178 [Define as const if the declaration of iconv() needs const.])
179 fi 179 fi
180]) 180])