summaryrefslogtreecommitdiffstats
path: root/gl/m4/gettext.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/gettext.m4')
-rw-r--r--gl/m4/gettext.m458
1 files changed, 38 insertions, 20 deletions
diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4
index f84e6a5d..8d1f0665 100644
--- a/gl/m4/gettext.m4
+++ b/gl/m4/gettext.m4
@@ -1,5 +1,5 @@
1# gettext.m4 serial 63 (gettext-0.18) 1# gettext.m4 serial 66 (gettext-0.18.2)
2dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2013 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.
@@ -35,7 +35,7 @@ dnl will be ignored. If NEEDSYMBOL is specified and is
35dnl 'need-formatstring-macros', then GNU gettext implementations that don't 35dnl 'need-formatstring-macros', then GNU gettext implementations that don't
36dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 36dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
37dnl INTLDIR is used to find the intl libraries. If empty, 37dnl INTLDIR is used to find the intl libraries. If empty,
38dnl the value `$(top_builddir)/intl/' is used. 38dnl the value '$(top_builddir)/intl/' is used.
39dnl 39dnl
40dnl The result of the configuration is one of three cases: 40dnl The result of the configuration is one of three cases:
41dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 41dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
@@ -97,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
97 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 97 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
98 ]) 98 ])
99 99
100 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. 100 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
101 gt_INTL_MACOSX 101 gt_INTL_MACOSX
102 102
103 dnl Set USE_NLS. 103 dnl Set USE_NLS.
@@ -157,12 +157,18 @@ changequote([,])dnl
157 fi 157 fi
158 158
159 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], 159 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
160 [AC_TRY_LINK([#include <libintl.h> 160 [AC_LINK_IFELSE(
161 [AC_LANG_PROGRAM(
162 [[
163#include <libintl.h>
161$gt_revision_test_code 164$gt_revision_test_code
162extern int _nl_msg_cat_cntr; 165extern int _nl_msg_cat_cntr;
163extern int *_nl_domain_bindings;], 166extern int *_nl_domain_bindings;
164 [bindtextdomain ("", ""); 167 ]],
165return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], 168 [[
169bindtextdomain ("", "");
170return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
171 ]])],
166 [eval "$gt_func_gnugettext_libc=yes"], 172 [eval "$gt_func_gnugettext_libc=yes"],
167 [eval "$gt_func_gnugettext_libc=no"])]) 173 [eval "$gt_func_gnugettext_libc=no"])])
168 174
@@ -183,35 +189,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
183 gt_save_LIBS="$LIBS" 189 gt_save_LIBS="$LIBS"
184 LIBS="$LIBS $LIBINTL" 190 LIBS="$LIBS $LIBINTL"
185 dnl Now see whether libintl exists and does not depend on libiconv. 191 dnl Now see whether libintl exists and does not depend on libiconv.
186 AC_TRY_LINK([#include <libintl.h> 192 AC_LINK_IFELSE(
193 [AC_LANG_PROGRAM(
194 [[
195#include <libintl.h>
187$gt_revision_test_code 196$gt_revision_test_code
188extern int _nl_msg_cat_cntr; 197extern int _nl_msg_cat_cntr;
189extern 198extern
190#ifdef __cplusplus 199#ifdef __cplusplus
191"C" 200"C"
192#endif 201#endif
193const char *_nl_expand_alias (const char *);], 202const char *_nl_expand_alias (const char *);
194 [bindtextdomain ("", ""); 203 ]],
195return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 204 [[
205bindtextdomain ("", "");
206return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
207 ]])],
196 [eval "$gt_func_gnugettext_libintl=yes"], 208 [eval "$gt_func_gnugettext_libintl=yes"],
197 [eval "$gt_func_gnugettext_libintl=no"]) 209 [eval "$gt_func_gnugettext_libintl=no"])
198 dnl Now see whether libintl exists and depends on libiconv. 210 dnl Now see whether libintl exists and depends on libiconv.
199 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then 211 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
200 LIBS="$LIBS $LIBICONV" 212 LIBS="$LIBS $LIBICONV"
201 AC_TRY_LINK([#include <libintl.h> 213 AC_LINK_IFELSE(
214 [AC_LANG_PROGRAM(
215 [[
216#include <libintl.h>
202$gt_revision_test_code 217$gt_revision_test_code
203extern int _nl_msg_cat_cntr; 218extern int _nl_msg_cat_cntr;
204extern 219extern
205#ifdef __cplusplus 220#ifdef __cplusplus
206"C" 221"C"
207#endif 222#endif
208const char *_nl_expand_alias (const char *);], 223const char *_nl_expand_alias (const char *);
209 [bindtextdomain ("", ""); 224 ]],
210return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 225 [[
211 [LIBINTL="$LIBINTL $LIBICONV" 226bindtextdomain ("", "");
212 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 227return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
213 eval "$gt_func_gnugettext_libintl=yes" 228 ]])],
214 ]) 229 [LIBINTL="$LIBINTL $LIBICONV"
230 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
231 eval "$gt_func_gnugettext_libintl=yes"
232 ])
215 fi 233 fi
216 CPPFLAGS="$gt_save_CPPFLAGS" 234 CPPFLAGS="$gt_save_CPPFLAGS"
217 LIBS="$gt_save_LIBS"]) 235 LIBS="$gt_save_LIBS"])