diff options
Diffstat (limited to 'gl/m4/gettext.m4')
-rw-r--r-- | gl/m4/gettext.m4 | 58 |
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) |
2 | dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl 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 | |||
35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't | 35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't |
36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. | 36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. |
37 | dnl INTLDIR is used to find the intl libraries. If empty, | 37 | dnl INTLDIR is used to find the intl libraries. If empty, |
38 | dnl the value `$(top_builddir)/intl/' is used. | 38 | dnl the value '$(top_builddir)/intl/' is used. |
39 | dnl | 39 | dnl |
40 | dnl The result of the configuration is one of three cases: | 40 | dnl The result of the configuration is one of three cases: |
41 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled | 41 | dnl 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 |
162 | extern int _nl_msg_cat_cntr; | 165 | extern int _nl_msg_cat_cntr; |
163 | extern int *_nl_domain_bindings;], | 166 | extern int *_nl_domain_bindings; |
164 | [bindtextdomain ("", ""); | 167 | ]], |
165 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], | 168 | [[ |
169 | bindtextdomain ("", ""); | ||
170 | return * 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 |
188 | extern int _nl_msg_cat_cntr; | 197 | extern int _nl_msg_cat_cntr; |
189 | extern | 198 | extern |
190 | #ifdef __cplusplus | 199 | #ifdef __cplusplus |
191 | "C" | 200 | "C" |
192 | #endif | 201 | #endif |
193 | const char *_nl_expand_alias (const char *);], | 202 | const char *_nl_expand_alias (const char *); |
194 | [bindtextdomain ("", ""); | 203 | ]], |
195 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 204 | [[ |
205 | bindtextdomain ("", ""); | ||
206 | return * 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 |
203 | extern int _nl_msg_cat_cntr; | 218 | extern int _nl_msg_cat_cntr; |
204 | extern | 219 | extern |
205 | #ifdef __cplusplus | 220 | #ifdef __cplusplus |
206 | "C" | 221 | "C" |
207 | #endif | 222 | #endif |
208 | const char *_nl_expand_alias (const char *);], | 223 | const char *_nl_expand_alias (const char *); |
209 | [bindtextdomain ("", ""); | 224 | ]], |
210 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 225 | [[ |
211 | [LIBINTL="$LIBINTL $LIBICONV" | 226 | bindtextdomain ("", ""); |
212 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | 227 | return * 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"]) |