diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-06-06 00:09:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-06-06 00:09:36 +0000 |
commit | b0243863149acde9e42b25688c7c2959830e69a9 (patch) | |
tree | b0aa28cf6e13bb45f3bbaccbc89ff453443a9794 /m4 | |
parent | generated file config/ylwrap (diff) | |
download | elfutils-b0243863149acde9e42b25688c7c2959830e69a9.tar.gz elfutils-b0243863149acde9e42b25688c7c2959830e69a9.tar.bz2 elfutils-b0243863149acde9e42b25688c7c2959830e69a9.tar.xz |
Prepare for 0.128 release.
Minor fixes.
Update gettext files to 0.16.1.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ChangeLog | 6 | ||||
-rw-r--r-- | m4/gettext.m4 | 452 | ||||
-rw-r--r-- | m4/iconv.m4 | 8 | ||||
-rw-r--r-- | m4/progtest.m4 | 79 |
4 files changed, 207 insertions, 338 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog index 112c9c7b..4622cf6e 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog | |||
@@ -1,3 +1,9 @@ | |||
1 | 2007-06-05 Ulrich Drepper <drepper@redhat.com> | ||
2 | |||
3 | * gettext.m4: Update from gettext 0.16.1. | ||
4 | * iconv.m4: Likewise. | ||
5 | * progtest.m4: Likewise. | ||
6 | |||
1 | 2005-02-15 Ulrich Drepper <drepper@redhat.com> | 7 | 2005-02-15 Ulrich Drepper <drepper@redhat.com> |
2 | 8 | ||
3 | * Makefile.am (EXTRA_DIST): Remove glibc21.m4, intdiv0.m4, | 9 | * Makefile.am (EXTRA_DIST): Remove glibc21.m4, intdiv0.m4, |
diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 0b758a67..91c345e9 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 | |||
@@ -1,10 +1,8 @@ | |||
1 | # gettext.m4 serial 16 (gettext-0.11.4) | 1 | # gettext.m4 serial 59 (gettext-0.16.1) |
2 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. |
3 | dnl This file is free software, distributed under the terms of the GNU | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl General Public License. As a special exception to the GNU General | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl Public License, this file may be distributed as part of a program | 5 | dnl with or without modifications, as long as this notice is preserved. |
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
8 | dnl | 6 | dnl |
9 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can can be used in projects which are not available under |
10 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
@@ -17,7 +15,7 @@ dnl They are *not* in the public domain. | |||
17 | 15 | ||
18 | dnl Authors: | 16 | dnl Authors: |
19 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
20 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. |
21 | 19 | ||
22 | dnl Macro to add for using GNU gettext. | 20 | dnl Macro to add for using GNU gettext. |
23 | 21 | ||
@@ -65,8 +63,13 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | 63 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | 64 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
67 | ])])])]) | 65 | ])])])]) |
68 | define(gt_included_intl, ifelse([$1], [external], [no], [yes])) | 66 | define([gt_included_intl], |
69 | define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) | 67 | ifelse([$1], [external], |
68 | ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), | ||
69 | [yes])) | ||
70 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) | ||
71 | gt_NEEDS_INIT | ||
72 | AM_GNU_GETTEXT_NEED([$2]) | ||
70 | 73 | ||
71 | AC_REQUIRE([AM_PO_SUBDIRS])dnl | 74 | AC_REQUIRE([AM_PO_SUBDIRS])dnl |
72 | ifelse(gt_included_intl, yes, [ | 75 | ifelse(gt_included_intl, yes, [ |
@@ -80,7 +83,7 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
80 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | 83 | dnl Sometimes libintl requires libiconv, so first search for libiconv. |
81 | dnl Ideally we would do this search only after the | 84 | dnl Ideally we would do this search only after the |
82 | dnl if test "$USE_NLS" = "yes"; then | 85 | dnl if test "$USE_NLS" = "yes"; then |
83 | dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then | 86 | dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then |
84 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT | 87 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT |
85 | dnl the configure script would need to contain the same shell code | 88 | dnl the configure script would need to contain the same shell code |
86 | dnl again, outside any 'if'. There are two solutions: | 89 | dnl again, outside any 'if'. There are two solutions: |
@@ -92,13 +95,11 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
92 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | 95 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
93 | ]) | 96 | ]) |
94 | 97 | ||
95 | AC_MSG_CHECKING([whether NLS is requested]) | 98 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. |
96 | dnl Default is enabled NLS | 99 | gt_INTL_MACOSX |
97 | AC_ARG_ENABLE(nls, | 100 | |
98 | [ --disable-nls do not use Native Language Support], | 101 | dnl Set USE_NLS. |
99 | USE_NLS=$enableval, USE_NLS=yes) | 102 | AC_REQUIRE([AM_NLS]) |
100 | AC_MSG_RESULT($USE_NLS) | ||
101 | AC_SUBST(USE_NLS) | ||
102 | 103 | ||
103 | ifelse(gt_included_intl, yes, [ | 104 | ifelse(gt_included_intl, yes, [ |
104 | BUILD_INCLUDED_LIBINTL=no | 105 | BUILD_INCLUDED_LIBINTL=no |
@@ -108,6 +109,15 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
108 | LTLIBINTL= | 109 | LTLIBINTL= |
109 | POSUB= | 110 | POSUB= |
110 | 111 | ||
112 | dnl Add a version number to the cache macros. | ||
113 | case " $gt_needs " in | ||
114 | *" need-formatstring-macros "*) gt_api_version=3 ;; | ||
115 | *" need-ngettext "*) gt_api_version=2 ;; | ||
116 | *) gt_api_version=1 ;; | ||
117 | esac | ||
118 | gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" | ||
119 | gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" | ||
120 | |||
111 | dnl If we use NLS figure out what method | 121 | dnl If we use NLS figure out what method |
112 | if test "$USE_NLS" = "yes"; then | 122 | if test "$USE_NLS" = "yes"; then |
113 | gt_use_preinstalled_gnugettext=no | 123 | gt_use_preinstalled_gnugettext=no |
@@ -126,28 +136,35 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
126 | dnl to use. If GNU gettext is available we use this. Else we have | 136 | dnl to use. If GNU gettext is available we use this. Else we have |
127 | dnl to fall back to GNU NLS library. | 137 | dnl to fall back to GNU NLS library. |
128 | 138 | ||
129 | dnl Add a version number to the cache macros. | 139 | if test $gt_api_version -ge 3; then |
130 | define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) | 140 | gt_revision_test_code=' |
131 | define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) | 141 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION |
132 | define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) | ||
133 | |||
134 | AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, | ||
135 | [AC_TRY_LINK([#include <libintl.h> | ||
136 | ]ifelse([$2], [need-formatstring-macros], | ||
137 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
138 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | 142 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) |
139 | #endif | 143 | #endif |
140 | changequote(,)dnl | 144 | changequote(,)dnl |
141 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | 145 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
142 | changequote([,])dnl | 146 | changequote([,])dnl |
143 | ], [])[extern int _nl_msg_cat_cntr; | 147 | ' |
148 | else | ||
149 | gt_revision_test_code= | ||
150 | fi | ||
151 | if test $gt_api_version -ge 2; then | ||
152 | gt_expression_test_code=' + * ngettext ("", "", 0)' | ||
153 | else | ||
154 | gt_expression_test_code= | ||
155 | fi | ||
156 | |||
157 | AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], | ||
158 | [AC_TRY_LINK([#include <libintl.h> | ||
159 | $gt_revision_test_code | ||
160 | extern int _nl_msg_cat_cntr; | ||
144 | extern int *_nl_domain_bindings;], | 161 | extern int *_nl_domain_bindings;], |
145 | [bindtextdomain ("", ""); | 162 | [bindtextdomain ("", ""); |
146 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], | 163 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], |
147 | gt_cv_func_gnugettext_libc=yes, | 164 | [eval "$gt_func_gnugettext_libc=yes"], |
148 | gt_cv_func_gnugettext_libc=no)]) | 165 | [eval "$gt_func_gnugettext_libc=no"])]) |
149 | 166 | ||
150 | if test "$gt_cv_func_gnugettext_libc" != "yes"; then | 167 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then |
151 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | 168 | dnl Sometimes libintl requires libiconv, so first search for libiconv. |
152 | ifelse(gt_included_intl, yes, , [ | 169 | ifelse(gt_included_intl, yes, , [ |
153 | AM_ICONV_LINK | 170 | AM_ICONV_LINK |
@@ -158,52 +175,40 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
158 | dnl even if libiconv doesn't exist. | 175 | dnl even if libiconv doesn't exist. |
159 | AC_LIB_LINKFLAGS_BODY([intl]) | 176 | AC_LIB_LINKFLAGS_BODY([intl]) |
160 | AC_CACHE_CHECK([for GNU gettext in libintl], | 177 | AC_CACHE_CHECK([for GNU gettext in libintl], |
161 | gt_cv_func_gnugettext_libintl, | 178 | [$gt_func_gnugettext_libintl], |
162 | [gt_save_CPPFLAGS="$CPPFLAGS" | 179 | [gt_save_CPPFLAGS="$CPPFLAGS" |
163 | CPPFLAGS="$CPPFLAGS $INCINTL" | 180 | CPPFLAGS="$CPPFLAGS $INCINTL" |
164 | gt_save_LIBS="$LIBS" | 181 | gt_save_LIBS="$LIBS" |
165 | LIBS="$LIBS $LIBINTL" | 182 | LIBS="$LIBS $LIBINTL" |
166 | dnl Now see whether libintl exists and does not depend on libiconv. | 183 | dnl Now see whether libintl exists and does not depend on libiconv. |
167 | AC_TRY_LINK([#include <libintl.h> | 184 | AC_TRY_LINK([#include <libintl.h> |
168 | ]ifelse([$2], [need-formatstring-macros], | 185 | $gt_revision_test_code |
169 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | 186 | extern int _nl_msg_cat_cntr; |
170 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
171 | #endif | ||
172 | changequote(,)dnl | ||
173 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
174 | changequote([,])dnl | ||
175 | ], [])[extern int _nl_msg_cat_cntr; | ||
176 | extern | 187 | extern |
177 | #ifdef __cplusplus | 188 | #ifdef __cplusplus |
178 | "C" | 189 | "C" |
179 | #endif | 190 | #endif |
180 | const char *_nl_expand_alias ();], | 191 | const char *_nl_expand_alias (const char *);], |
181 | [bindtextdomain ("", ""); | 192 | [bindtextdomain ("", ""); |
182 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], | 193 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], |
183 | gt_cv_func_gnugettext_libintl=yes, | 194 | [eval "$gt_func_gnugettext_libintl=yes"], |
184 | gt_cv_func_gnugettext_libintl=no) | 195 | [eval "$gt_func_gnugettext_libintl=no"]) |
185 | dnl Now see whether libintl exists and depends on libiconv. | 196 | dnl Now see whether libintl exists and depends on libiconv. |
186 | if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then | 197 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then |
187 | LIBS="$LIBS $LIBICONV" | 198 | LIBS="$LIBS $LIBICONV" |
188 | AC_TRY_LINK([#include <libintl.h> | 199 | AC_TRY_LINK([#include <libintl.h> |
189 | ]ifelse([$2], [need-formatstring-macros], | 200 | $gt_revision_test_code |
190 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | 201 | extern int _nl_msg_cat_cntr; |
191 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
192 | #endif | ||
193 | changequote(,)dnl | ||
194 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
195 | changequote([,])dnl | ||
196 | ], [])[extern int _nl_msg_cat_cntr; | ||
197 | extern | 202 | extern |
198 | #ifdef __cplusplus | 203 | #ifdef __cplusplus |
199 | "C" | 204 | "C" |
200 | #endif | 205 | #endif |
201 | const char *_nl_expand_alias ();], | 206 | const char *_nl_expand_alias (const char *);], |
202 | [bindtextdomain ("", ""); | 207 | [bindtextdomain ("", ""); |
203 | return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], | 208 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], |
204 | [LIBINTL="$LIBINTL $LIBICONV" | 209 | [LIBINTL="$LIBINTL $LIBICONV" |
205 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | 210 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" |
206 | gt_cv_func_gnugettext_libintl=yes | 211 | eval "$gt_func_gnugettext_libintl=yes" |
207 | ]) | 212 | ]) |
208 | fi | 213 | fi |
209 | CPPFLAGS="$gt_save_CPPFLAGS" | 214 | CPPFLAGS="$gt_save_CPPFLAGS" |
@@ -214,9 +219,10 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
214 | dnl use it. But if this macro is used in GNU gettext, and GNU | 219 | dnl use it. But if this macro is used in GNU gettext, and GNU |
215 | dnl gettext is already preinstalled in libintl, we update this | 220 | dnl gettext is already preinstalled in libintl, we update this |
216 | dnl libintl. (Cf. the install rule in intl/Makefile.in.) | 221 | dnl libintl. (Cf. the install rule in intl/Makefile.in.) |
217 | if test "$gt_cv_func_gnugettext_libc" = "yes" \ | 222 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ |
218 | || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ | 223 | || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ |
219 | && test "$PACKAGE" != gettext; }; then | 224 | && test "$PACKAGE" != gettext-runtime \ |
225 | && test "$PACKAGE" != gettext-tools; }; then | ||
220 | gt_use_preinstalled_gnugettext=yes | 226 | gt_use_preinstalled_gnugettext=yes |
221 | else | 227 | else |
222 | dnl Reset the values set by searching for libintl. | 228 | dnl Reset the values set by searching for libintl. |
@@ -235,14 +241,14 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
235 | 241 | ||
236 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | 242 | if test "$nls_cv_use_gnu_gettext" = "yes"; then |
237 | dnl Mark actions used to generate GNU NLS library. | 243 | dnl Mark actions used to generate GNU NLS library. |
238 | INTLOBJS="\$(GETTOBJS)" | ||
239 | BUILD_INCLUDED_LIBINTL=yes | 244 | BUILD_INCLUDED_LIBINTL=yes |
240 | USE_INCLUDED_LIBINTL=yes | 245 | USE_INCLUDED_LIBINTL=yes |
241 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" | 246 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" |
242 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" | 247 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" |
243 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | 248 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
244 | fi | 249 | fi |
245 | 250 | ||
251 | CATOBJEXT= | ||
246 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | 252 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
247 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | 253 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
248 | dnl Mark actions to use GNU gettext tools. | 254 | dnl Mark actions to use GNU gettext tools. |
@@ -250,6 +256,15 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
250 | fi | 256 | fi |
251 | ]) | 257 | ]) |
252 | 258 | ||
259 | if test -n "$INTL_MACOSX_LIBS"; then | ||
260 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
261 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
262 | dnl Some extra flags are needed during linking. | ||
263 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" | ||
264 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" | ||
265 | fi | ||
266 | fi | ||
267 | |||
253 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | 268 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
254 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | 269 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
255 | AC_DEFINE(ENABLE_NLS, 1, | 270 | AC_DEFINE(ENABLE_NLS, 1, |
@@ -260,10 +275,26 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
260 | fi | 275 | fi |
261 | fi | 276 | fi |
262 | 277 | ||
278 | AC_MSG_CHECKING([whether to use NLS]) | ||
279 | AC_MSG_RESULT([$USE_NLS]) | ||
280 | if test "$USE_NLS" = "yes"; then | ||
281 | AC_MSG_CHECKING([where the gettext function comes from]) | ||
282 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
283 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | ||
284 | gt_source="external libintl" | ||
285 | else | ||
286 | gt_source="libc" | ||
287 | fi | ||
288 | else | ||
289 | gt_source="included intl directory" | ||
290 | fi | ||
291 | AC_MSG_RESULT([$gt_source]) | ||
292 | fi | ||
293 | |||
263 | if test "$USE_NLS" = "yes"; then | 294 | if test "$USE_NLS" = "yes"; then |
264 | 295 | ||
265 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | 296 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then |
266 | if test "$gt_cv_func_gnugettext_libintl" = "yes"; then | 297 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then |
267 | AC_MSG_CHECKING([how to link with libintl]) | 298 | AC_MSG_CHECKING([how to link with libintl]) |
268 | AC_MSG_RESULT([$LIBINTL]) | 299 | AC_MSG_RESULT([$LIBINTL]) |
269 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) | 300 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) |
@@ -283,7 +314,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
283 | ifelse(gt_included_intl, yes, [ | 314 | ifelse(gt_included_intl, yes, [ |
284 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL | 315 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL |
285 | dnl to 'yes' because some of the testsuite requires it. | 316 | dnl to 'yes' because some of the testsuite requires it. |
286 | if test "$PACKAGE" = gettext; then | 317 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then |
287 | BUILD_INCLUDED_LIBINTL=yes | 318 | BUILD_INCLUDED_LIBINTL=yes |
288 | fi | 319 | fi |
289 | 320 | ||
@@ -291,7 +322,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
291 | AC_SUBST(BUILD_INCLUDED_LIBINTL) | 322 | AC_SUBST(BUILD_INCLUDED_LIBINTL) |
292 | AC_SUBST(USE_INCLUDED_LIBINTL) | 323 | AC_SUBST(USE_INCLUDED_LIBINTL) |
293 | AC_SUBST(CATOBJEXT) | 324 | AC_SUBST(CATOBJEXT) |
294 | AC_SUBST(INTLOBJS) | ||
295 | 325 | ||
296 | dnl For backward compatibility. Some configure.ins may be using this. | 326 | dnl For backward compatibility. Some configure.ins may be using this. |
297 | nls_cv_header_intl= | 327 | nls_cv_header_intl= |
@@ -309,6 +339,13 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
309 | GENCAT=gencat | 339 | GENCAT=gencat |
310 | AC_SUBST(GENCAT) | 340 | AC_SUBST(GENCAT) |
311 | 341 | ||
342 | dnl For backward compatibility. Some Makefiles may be using this. | ||
343 | INTLOBJS= | ||
344 | if test "$USE_INCLUDED_LIBINTL" = yes; then | ||
345 | INTLOBJS="\$(GETTOBJS)" | ||
346 | fi | ||
347 | AC_SUBST(INTLOBJS) | ||
348 | |||
312 | dnl Enable libtool support if the surrounding package wishes it. | 349 | dnl Enable libtool support if the surrounding package wishes it. |
313 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | 350 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix |
314 | AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) | 351 | AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) |
@@ -325,261 +362,56 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", | |||
325 | ]) | 362 | ]) |
326 | 363 | ||
327 | 364 | ||
328 | dnl Checks for all prerequisites of the po subdirectory, | 365 | dnl Checks for special options needed on MacOS X. |
329 | dnl except for USE_NLS. | 366 | dnl Defines INTL_MACOSX_LIBS. |
330 | AC_DEFUN([AM_PO_SUBDIRS], | 367 | AC_DEFUN([gt_INTL_MACOSX], |
331 | [ | 368 | [ |
332 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | 369 | dnl Check for API introduced in MacOS X 10.2. |
333 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 370 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], |
334 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl | 371 | gt_cv_func_CFPreferencesCopyAppValue, |
335 | 372 | [gt_save_LIBS="$LIBS" | |
336 | dnl Perform the following tests also if --disable-nls has been given, | 373 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" |
337 | dnl because they are needed for "make dist" to work. | 374 | AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], |
338 | 375 | [CFPreferencesCopyAppValue(NULL, NULL)], | |
339 | dnl Search for GNU msgfmt in the PATH. | 376 | [gt_cv_func_CFPreferencesCopyAppValue=yes], |
340 | dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. | 377 | [gt_cv_func_CFPreferencesCopyAppValue=no]) |
341 | dnl The second test excludes FreeBSD msgfmt. | 378 | LIBS="$gt_save_LIBS"]) |
342 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | 379 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then |
343 | [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && | 380 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, |
344 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | 381 | [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) |
345 | :) | ||
346 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | ||
347 | |||
348 | dnl Search for GNU xgettext 0.11 or newer in the PATH. | ||
349 | dnl The first test excludes Solaris xgettext and early GNU xgettext versions. | ||
350 | dnl The second test excludes FreeBSD xgettext. | ||
351 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | ||
352 | [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && | ||
353 | (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
354 | :) | ||
355 | dnl Remove leftover from FreeBSD xgettext call. | ||
356 | rm -f messages.po | ||
357 | |||
358 | dnl Search for GNU msgmerge 0.11 or newer in the PATH. | ||
359 | AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, | ||
360 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) | ||
361 | |||
362 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | ||
363 | dnl Test whether we really found GNU msgfmt. | ||
364 | if test "$GMSGFMT" != ":"; then | ||
365 | dnl If it is no GNU msgfmt we define it as : so that the | ||
366 | dnl Makefiles still can work. | ||
367 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && | ||
368 | (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | ||
369 | : ; | ||
370 | else | ||
371 | GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` | ||
372 | AC_MSG_RESULT( | ||
373 | [found $GMSGFMT program is not GNU msgfmt; ignore it]) | ||
374 | GMSGFMT=":" | ||
375 | fi | ||
376 | fi | 382 | fi |
377 | 383 | dnl Check for API introduced in MacOS X 10.3. | |
378 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | 384 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, |
379 | dnl Test whether we really found GNU xgettext. | 385 | [gt_save_LIBS="$LIBS" |
380 | if test "$XGETTEXT" != ":"; then | 386 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" |
381 | dnl If it is no GNU xgettext we define it as : so that the | 387 | AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], |
382 | dnl Makefiles still can work. | 388 | [gt_cv_func_CFLocaleCopyCurrent=yes], |
383 | if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && | 389 | [gt_cv_func_CFLocaleCopyCurrent=no]) |
384 | (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | 390 | LIBS="$gt_save_LIBS"]) |
385 | : ; | 391 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then |
386 | else | 392 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, |
387 | AC_MSG_RESULT( | 393 | [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) |
388 | [found xgettext program is not GNU xgettext; ignore it]) | ||
389 | XGETTEXT=":" | ||
390 | fi | ||
391 | dnl Remove leftover from FreeBSD xgettext call. | ||
392 | rm -f messages.po | ||
393 | fi | 394 | fi |
394 | 395 | INTL_MACOSX_LIBS= | |
395 | AC_OUTPUT_COMMANDS([ | 396 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then |
396 | for ac_file in $CONFIG_FILES; do | 397 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" |
397 | # Support "outfile[:infile[:infile...]]" | 398 | fi |
398 | case "$ac_file" in | 399 | AC_SUBST([INTL_MACOSX_LIBS]) |
399 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | ||
400 | esac | ||
401 | # PO directories have a Makefile.in generated from Makefile.in.in. | ||
402 | case "$ac_file" in */Makefile.in) | ||
403 | # Adjust a relative srcdir. | ||
404 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | ||
405 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | ||
406 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | ||
407 | # In autoconf-2.13 it is called $ac_given_srcdir. | ||
408 | # In autoconf-2.50 it is called $srcdir. | ||
409 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | ||
410 | case "$ac_given_srcdir" in | ||
411 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | ||
412 | /*) top_srcdir="$ac_given_srcdir" ;; | ||
413 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | ||
414 | esac | ||
415 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | ||
416 | rm -f "$ac_dir/POTFILES" | ||
417 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | ||
418 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | ||
419 | # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend | ||
420 | # on $ac_dir but don't depend on user-specified configuration | ||
421 | # parameters. | ||
422 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | ||
423 | # The LINGUAS file contains the set of available languages. | ||
424 | if test -n "$ALL_LINGUAS"; then | ||
425 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | ||
426 | fi | ||
427 | ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ||
428 | # Hide the ALL_LINGUAS assigment from automake. | ||
429 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | ||
430 | fi | ||
431 | case "$ac_given_srcdir" in | ||
432 | .) srcdirpre= ;; | ||
433 | *) srcdirpre='$(srcdir)/' ;; | ||
434 | esac | ||
435 | POFILES= | ||
436 | GMOFILES= | ||
437 | UPDATEPOFILES= | ||
438 | DUMMYPOFILES= | ||
439 | for lang in $ALL_LINGUAS; do | ||
440 | POFILES="$POFILES $srcdirpre$lang.po" | ||
441 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | ||
442 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | ||
443 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | ||
444 | done | ||
445 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | ||
446 | # environment variable. | ||
447 | INST_LINGUAS= | ||
448 | if test -n "$ALL_LINGUAS"; then | ||
449 | for presentlang in $ALL_LINGUAS; do | ||
450 | useit=no | ||
451 | if test "%UNSET%" != "$LINGUAS"; then | ||
452 | desiredlanguages="$LINGUAS" | ||
453 | else | ||
454 | desiredlanguages="$ALL_LINGUAS" | ||
455 | fi | ||
456 | for desiredlang in $desiredlanguages; do | ||
457 | # Use the presentlang catalog if desiredlang is | ||
458 | # a. equal to presentlang, or | ||
459 | # b. a variant of presentlang (because in this case, | ||
460 | # presentlang can be used as a fallback for messages | ||
461 | # which are not translated in the desiredlang catalog). | ||
462 | case "$desiredlang" in | ||
463 | "$presentlang"*) useit=yes;; | ||
464 | esac | ||
465 | done | ||
466 | if test $useit = yes; then | ||
467 | INST_LINGUAS="$INST_LINGUAS $presentlang" | ||
468 | fi | ||
469 | done | ||
470 | fi | ||
471 | CATALOGS= | ||
472 | if test -n "$INST_LINGUAS"; then | ||
473 | for lang in $INST_LINGUAS; do | ||
474 | CATALOGS="$CATALOGS $lang.gmo" | ||
475 | done | ||
476 | fi | ||
477 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | ||
478 | sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | ||
479 | for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do | ||
480 | if test -f "$f"; then | ||
481 | case "$f" in | ||
482 | *.orig | *.bak | *~) ;; | ||
483 | *) cat "$f" >> "$ac_dir/Makefile" ;; | ||
484 | esac | ||
485 | fi | ||
486 | done | ||
487 | fi | ||
488 | ;; | ||
489 | esac | ||
490 | done], | ||
491 | [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute | ||
492 | # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it | ||
493 | # from automake. | ||
494 | eval 'ALL_LINGUAS''="$ALL_LINGUAS"' | ||
495 | # Capture the value of LINGUAS because we need it to compute CATALOGS. | ||
496 | LINGUAS="${LINGUAS-%UNSET%}" | ||
497 | ]) | ||
498 | ]) | 400 | ]) |
499 | 401 | ||
500 | 402 | ||
501 | dnl Checks for all prerequisites of the intl subdirectory, | 403 | dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. |
502 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | 404 | m4_define([gt_NEEDS_INIT], |
503 | dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | ||
504 | AC_DEFUN([AM_INTL_SUBDIR], | ||
505 | [ | 405 | [ |
506 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 406 | m4_divert_text([DEFAULTS], [gt_needs=]) |
507 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl | 407 | m4_define([gt_NEEDS_INIT], []) |
508 | AC_REQUIRE([AC_PROG_CC])dnl | ||
509 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
510 | AC_REQUIRE([AC_PROG_RANLIB])dnl | ||
511 | AC_REQUIRE([AC_ISC_POSIX])dnl | ||
512 | AC_REQUIRE([AC_HEADER_STDC])dnl | ||
513 | AC_REQUIRE([AC_C_CONST])dnl | ||
514 | AC_REQUIRE([AC_C_INLINE])dnl | ||
515 | AC_REQUIRE([AC_TYPE_OFF_T])dnl | ||
516 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | ||
517 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | ||
518 | AC_REQUIRE([AC_FUNC_MMAP])dnl | ||
519 | AC_REQUIRE([jm_GLIBC21])dnl | ||
520 | AC_REQUIRE([gt_INTDIV0])dnl | ||
521 | AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl | ||
522 | AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl | ||
523 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | ||
524 | |||
525 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | ||
526 | stdlib.h string.h unistd.h sys/param.h]) | ||
527 | AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ | ||
528 | geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ | ||
529 | strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) | ||
530 | |||
531 | AM_ICONV | ||
532 | AM_LANGINFO_CODESET | ||
533 | if test $ac_cv_header_locale_h = yes; then | ||
534 | AM_LC_MESSAGES | ||
535 | fi | ||
536 | |||
537 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | ||
538 | dnl because plural.y uses bison specific features. It requires at least | ||
539 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't | ||
540 | dnl compile. | ||
541 | dnl bison is only needed for the maintainer (who touches plural.y). But in | ||
542 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | ||
543 | dnl the rule in general Makefile. Now, some people carelessly touch the | ||
544 | dnl files or have a broken "make" program, hence the plural.c rule will | ||
545 | dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not | ||
546 | dnl present or too old. | ||
547 | AC_CHECK_PROGS([INTLBISON], [bison]) | ||
548 | if test -z "$INTLBISON"; then | ||
549 | ac_verc_fail=yes | ||
550 | else | ||
551 | dnl Found it, now check the version. | ||
552 | AC_MSG_CHECKING([version of bison]) | ||
553 | changequote(<<,>>)dnl | ||
554 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | ||
555 | case $ac_prog_version in | ||
556 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | ||
557 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | ||
558 | changequote([,])dnl | ||
559 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | ||
560 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | ||
561 | esac | ||
562 | AC_MSG_RESULT([$ac_prog_version]) | ||
563 | fi | ||
564 | if test $ac_verc_fail = yes; then | ||
565 | INTLBISON=: | ||
566 | fi | ||
567 | ]) | 408 | ]) |
568 | 409 | ||
569 | 410 | ||
570 | AC_DEFUN([AM_MKINSTALLDIRS], | 411 | dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) |
412 | AC_DEFUN([AM_GNU_GETTEXT_NEED], | ||
571 | [ | 413 | [ |
572 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly | 414 | m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) |
573 | dnl find the mkinstalldirs script in another subdir but $(top_srcdir). | ||
574 | dnl Try to locate is. | ||
575 | MKINSTALLDIRS= | ||
576 | if test -n "$ac_aux_dir"; then | ||
577 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | ||
578 | fi | ||
579 | if test -z "$MKINSTALLDIRS"; then | ||
580 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | ||
581 | fi | ||
582 | AC_SUBST(MKINSTALLDIRS) | ||
583 | ]) | 415 | ]) |
584 | 416 | ||
585 | 417 | ||
diff --git a/m4/iconv.m4 b/m4/iconv.m4 index c5f35798..654c4158 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 | |||
@@ -1,10 +1,8 @@ | |||
1 | # iconv.m4 serial AM4 (gettext-0.11.3) | 1 | # iconv.m4 serial AM4 (gettext-0.11.3) |
2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. |
3 | dnl This file is free software, distributed under the terms of the GNU | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl General Public License. As a special exception to the GNU General | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl Public License, this file may be distributed as part of a program | 5 | dnl with or without modifications, as long as this notice is preserved. |
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
8 | 6 | ||
9 | dnl From Bruno Haible. | 7 | dnl From Bruno Haible. |
10 | 8 | ||
diff --git a/m4/progtest.m4 b/m4/progtest.m4 index 443c8e30..a56365cd 100644 --- a/m4/progtest.m4 +++ b/m4/progtest.m4 | |||
@@ -1,10 +1,8 @@ | |||
1 | # progtest.m4 serial 2 (gettext-0.10.40) | 1 | # progtest.m4 serial 4 (gettext-0.14.2) |
2 | dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. |
3 | dnl This file is free software, distributed under the terms of the GNU | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl General Public License. As a special exception to the GNU General | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl Public License, this file may be distributed as part of a program | 5 | dnl with or without modifications, as long as this notice is preserved. |
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
8 | dnl | 6 | dnl |
9 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can can be used in projects which are not available under |
10 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
@@ -18,36 +16,71 @@ dnl They are *not* in the public domain. | |||
18 | dnl Authors: | 16 | dnl Authors: |
19 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. |
20 | 18 | ||
19 | AC_PREREQ(2.50) | ||
20 | |||
21 | # Search path for a program which passes the given test. | 21 | # Search path for a program which passes the given test. |
22 | 22 | ||
23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, | 23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | 24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], | 25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], |
26 | [# Extract the first word of "$2", so it can be a program name with args. | 26 | [ |
27 | # Prepare PATH_SEPARATOR. | ||
28 | # The user is always right. | ||
29 | if test "${PATH_SEPARATOR+set}" != set; then | ||
30 | echo "#! /bin/sh" >conf$$.sh | ||
31 | echo "exit 0" >>conf$$.sh | ||
32 | chmod +x conf$$.sh | ||
33 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | ||
34 | PATH_SEPARATOR=';' | ||
35 | else | ||
36 | PATH_SEPARATOR=: | ||
37 | fi | ||
38 | rm -f conf$$.sh | ||
39 | fi | ||
40 | |||
41 | # Find out how to test for executable files. Don't use a zero-byte file, | ||
42 | # as systems may use methods other than mode bits to determine executability. | ||
43 | cat >conf$$.file <<_ASEOF | ||
44 | #! /bin/sh | ||
45 | exit 0 | ||
46 | _ASEOF | ||
47 | chmod +x conf$$.file | ||
48 | if test -x conf$$.file >/dev/null 2>&1; then | ||
49 | ac_executable_p="test -x" | ||
50 | else | ||
51 | ac_executable_p="test -f" | ||
52 | fi | ||
53 | rm -f conf$$.file | ||
54 | |||
55 | # Extract the first word of "$2", so it can be a program name with args. | ||
27 | set dummy $2; ac_word=[$]2 | 56 | set dummy $2; ac_word=[$]2 |
28 | AC_MSG_CHECKING([for $ac_word]) | 57 | AC_MSG_CHECKING([for $ac_word]) |
29 | AC_CACHE_VAL(ac_cv_path_$1, | 58 | AC_CACHE_VAL(ac_cv_path_$1, |
30 | [case "[$]$1" in | 59 | [case "[$]$1" in |
31 | /*) | 60 | [[\\/]]* | ?:[[\\/]]*) |
32 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | 61 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
33 | ;; | 62 | ;; |
34 | *) | 63 | *) |
35 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | 64 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
36 | for ac_dir in ifelse([$5], , $PATH, [$5]); do | 65 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
37 | test -z "$ac_dir" && ac_dir=. | 66 | IFS="$ac_save_IFS" |
38 | if test -f $ac_dir/$ac_word; then | 67 | test -z "$ac_dir" && ac_dir=. |
39 | if [$3]; then | 68 | for ac_exec_ext in '' $ac_executable_extensions; do |
40 | ac_cv_path_$1="$ac_dir/$ac_word" | 69 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then |
41 | break | 70 | echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD |
42 | fi | 71 | if [$3]; then |
43 | fi | 72 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" |
44 | done | 73 | break 2 |
45 | IFS="$ac_save_ifs" | 74 | fi |
75 | fi | ||
76 | done | ||
77 | done | ||
78 | IFS="$ac_save_IFS" | ||
46 | dnl If no 4th arg is given, leave the cache variable unset, | 79 | dnl If no 4th arg is given, leave the cache variable unset, |
47 | dnl so AC_PATH_PROGS will keep looking. | 80 | dnl so AC_PATH_PROGS will keep looking. |
48 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | 81 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
49 | ])dnl | 82 | ])dnl |
50 | ;; | 83 | ;; |
51 | esac])dnl | 84 | esac])dnl |
52 | $1="$ac_cv_path_$1" | 85 | $1="$ac_cv_path_$1" |
53 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | 86 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |