diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-18 19:54:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-18 19:54:00 +0000 |
commit | 5a8673341a80e189a8f166c079f531a580dd006d (patch) | |
tree | 65c153092910cbbf0b6155fb7b90b214c68f8397 /m4 | |
parent | d432bca57dff61c4c07c133d9b660d2fae2f26b7 (diff) | |
download | gnunet-gtk-5a8673341a80e189a8f166c079f531a580dd006d.tar.gz gnunet-gtk-5a8673341a80e189a8f166c079f531a580dd006d.zip |
-libtool and gettext update
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gettext.m4 | 96 | ||||
-rw-r--r-- | m4/iconv.m4 | 164 | ||||
-rw-r--r-- | m4/intl.m4 | 187 | ||||
-rw-r--r-- | m4/lib-ld.m4 | 87 | ||||
-rw-r--r-- | m4/lib-link.m4 | 138 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 91 | ||||
-rw-r--r-- | m4/nls.m4 | 13 | ||||
-rw-r--r-- | m4/po.m4 | 40 | ||||
-rw-r--r-- | m4/progtest.m4 | 31 |
9 files changed, 560 insertions, 287 deletions
diff --git a/m4/gettext.m4 b/m4/gettext.m4 index c9ae1f7d..be247bf7 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # gettext.m4 serial 60 (gettext-0.17) | 1 | # gettext.m4 serial 66 (gettext-0.18.2) |
2 | dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2014 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. |
@@ -15,7 +15,7 @@ dnl They are *not* in the public domain. | |||
15 | 15 | ||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. |
19 | 19 | ||
20 | dnl Macro to add for using GNU gettext. | 20 | dnl Macro to add for using GNU gettext. |
21 | 21 | ||
@@ -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 |
@@ -60,6 +60,8 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | 60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , |
61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | 61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT |
62 | ])])])])]) | 62 | ])])])])]) |
63 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], | ||
64 | [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) | ||
63 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | 65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
64 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | 66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
65 | ])])])]) | 67 | ])])])]) |
@@ -95,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
95 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | 97 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
96 | ]) | 98 | ]) |
97 | 99 | ||
98 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. | 100 | dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. |
99 | gt_INTL_MACOSX | 101 | gt_INTL_MACOSX |
100 | 102 | ||
101 | dnl Set USE_NLS. | 103 | dnl Set USE_NLS. |
@@ -123,11 +125,11 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
123 | gt_use_preinstalled_gnugettext=no | 125 | gt_use_preinstalled_gnugettext=no |
124 | ifelse(gt_included_intl, yes, [ | 126 | ifelse(gt_included_intl, yes, [ |
125 | AC_MSG_CHECKING([whether included gettext is requested]) | 127 | AC_MSG_CHECKING([whether included gettext is requested]) |
126 | AC_ARG_WITH(included-gettext, | 128 | AC_ARG_WITH([included-gettext], |
127 | [ --with-included-gettext use the GNU gettext library included here], | 129 | [ --with-included-gettext use the GNU gettext library included here], |
128 | nls_cv_force_use_gnu_gettext=$withval, | 130 | nls_cv_force_use_gnu_gettext=$withval, |
129 | nls_cv_force_use_gnu_gettext=no) | 131 | nls_cv_force_use_gnu_gettext=no) |
130 | AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) | 132 | AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) |
131 | 133 | ||
132 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | 134 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
133 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | 135 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
@@ -155,12 +157,18 @@ changequote([,])dnl | |||
155 | fi | 157 | fi |
156 | 158 | ||
157 | 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], |
158 | [AC_TRY_LINK([#include <libintl.h> | 160 | [AC_LINK_IFELSE( |
161 | [AC_LANG_PROGRAM( | ||
162 | [[ | ||
163 | #include <libintl.h> | ||
159 | $gt_revision_test_code | 164 | $gt_revision_test_code |
160 | extern int _nl_msg_cat_cntr; | 165 | extern int _nl_msg_cat_cntr; |
161 | extern int *_nl_domain_bindings;], | 166 | extern int *_nl_domain_bindings; |
162 | [bindtextdomain ("", ""); | 167 | ]], |
163 | 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 | ]])], | ||
164 | [eval "$gt_func_gnugettext_libc=yes"], | 172 | [eval "$gt_func_gnugettext_libc=yes"], |
165 | [eval "$gt_func_gnugettext_libc=no"])]) | 173 | [eval "$gt_func_gnugettext_libc=no"])]) |
166 | 174 | ||
@@ -181,35 +189,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b | |||
181 | gt_save_LIBS="$LIBS" | 189 | gt_save_LIBS="$LIBS" |
182 | LIBS="$LIBS $LIBINTL" | 190 | LIBS="$LIBS $LIBINTL" |
183 | 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. |
184 | AC_TRY_LINK([#include <libintl.h> | 192 | AC_LINK_IFELSE( |
193 | [AC_LANG_PROGRAM( | ||
194 | [[ | ||
195 | #include <libintl.h> | ||
185 | $gt_revision_test_code | 196 | $gt_revision_test_code |
186 | extern int _nl_msg_cat_cntr; | 197 | extern int _nl_msg_cat_cntr; |
187 | extern | 198 | extern |
188 | #ifdef __cplusplus | 199 | #ifdef __cplusplus |
189 | "C" | 200 | "C" |
190 | #endif | 201 | #endif |
191 | const char *_nl_expand_alias (const char *);], | 202 | const char *_nl_expand_alias (const char *); |
192 | [bindtextdomain ("", ""); | 203 | ]], |
193 | 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 | ]])], | ||
194 | [eval "$gt_func_gnugettext_libintl=yes"], | 208 | [eval "$gt_func_gnugettext_libintl=yes"], |
195 | [eval "$gt_func_gnugettext_libintl=no"]) | 209 | [eval "$gt_func_gnugettext_libintl=no"]) |
196 | dnl Now see whether libintl exists and depends on libiconv. | 210 | dnl Now see whether libintl exists and depends on libiconv. |
197 | 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 |
198 | LIBS="$LIBS $LIBICONV" | 212 | LIBS="$LIBS $LIBICONV" |
199 | AC_TRY_LINK([#include <libintl.h> | 213 | AC_LINK_IFELSE( |
214 | [AC_LANG_PROGRAM( | ||
215 | [[ | ||
216 | #include <libintl.h> | ||
200 | $gt_revision_test_code | 217 | $gt_revision_test_code |
201 | extern int _nl_msg_cat_cntr; | 218 | extern int _nl_msg_cat_cntr; |
202 | extern | 219 | extern |
203 | #ifdef __cplusplus | 220 | #ifdef __cplusplus |
204 | "C" | 221 | "C" |
205 | #endif | 222 | #endif |
206 | const char *_nl_expand_alias (const char *);], | 223 | const char *_nl_expand_alias (const char *); |
207 | [bindtextdomain ("", ""); | 224 | ]], |
208 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 225 | [[ |
209 | [LIBINTL="$LIBINTL $LIBICONV" | 226 | bindtextdomain ("", ""); |
210 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | 227 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") |
211 | eval "$gt_func_gnugettext_libintl=yes" | 228 | ]])], |
212 | ]) | 229 | [LIBINTL="$LIBINTL $LIBICONV" |
230 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | ||
231 | eval "$gt_func_gnugettext_libintl=yes" | ||
232 | ]) | ||
213 | fi | 233 | fi |
214 | CPPFLAGS="$gt_save_CPPFLAGS" | 234 | CPPFLAGS="$gt_save_CPPFLAGS" |
215 | LIBS="$gt_save_LIBS"]) | 235 | LIBS="$gt_save_LIBS"]) |
@@ -267,7 +287,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
267 | 287 | ||
268 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | 288 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
269 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | 289 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
270 | AC_DEFINE(ENABLE_NLS, 1, | 290 | AC_DEFINE([ENABLE_NLS], [1], |
271 | [Define to 1 if translation of program messages to the user's native language | 291 | [Define to 1 if translation of program messages to the user's native language |
272 | is requested.]) | 292 | is requested.]) |
273 | else | 293 | else |
@@ -301,9 +321,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
301 | fi | 321 | fi |
302 | 322 | ||
303 | dnl For backward compatibility. Some packages may be using this. | 323 | dnl For backward compatibility. Some packages may be using this. |
304 | AC_DEFINE(HAVE_GETTEXT, 1, | 324 | AC_DEFINE([HAVE_GETTEXT], [1], |
305 | [Define if the GNU gettext() function is already present or preinstalled.]) | 325 | [Define if the GNU gettext() function is already present or preinstalled.]) |
306 | AC_DEFINE(HAVE_DCGETTEXT, 1, | 326 | AC_DEFINE([HAVE_DCGETTEXT], [1], |
307 | [Define if the GNU dcgettext() function is already present or preinstalled.]) | 327 | [Define if the GNU dcgettext() function is already present or preinstalled.]) |
308 | fi | 328 | fi |
309 | 329 | ||
@@ -319,9 +339,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
319 | fi | 339 | fi |
320 | 340 | ||
321 | dnl Make all variables we use known to autoconf. | 341 | dnl Make all variables we use known to autoconf. |
322 | AC_SUBST(BUILD_INCLUDED_LIBINTL) | 342 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) |
323 | AC_SUBST(USE_INCLUDED_LIBINTL) | 343 | AC_SUBST([USE_INCLUDED_LIBINTL]) |
324 | AC_SUBST(CATOBJEXT) | 344 | AC_SUBST([CATOBJEXT]) |
325 | 345 | ||
326 | dnl For backward compatibility. Some configure.ins may be using this. | 346 | dnl For backward compatibility. Some configure.ins may be using this. |
327 | nls_cv_header_intl= | 347 | nls_cv_header_intl= |
@@ -329,36 +349,36 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
329 | 349 | ||
330 | dnl For backward compatibility. Some Makefiles may be using this. | 350 | dnl For backward compatibility. Some Makefiles may be using this. |
331 | DATADIRNAME=share | 351 | DATADIRNAME=share |
332 | AC_SUBST(DATADIRNAME) | 352 | AC_SUBST([DATADIRNAME]) |
333 | 353 | ||
334 | dnl For backward compatibility. Some Makefiles may be using this. | 354 | dnl For backward compatibility. Some Makefiles may be using this. |
335 | INSTOBJEXT=.mo | 355 | INSTOBJEXT=.mo |
336 | AC_SUBST(INSTOBJEXT) | 356 | AC_SUBST([INSTOBJEXT]) |
337 | 357 | ||
338 | dnl For backward compatibility. Some Makefiles may be using this. | 358 | dnl For backward compatibility. Some Makefiles may be using this. |
339 | GENCAT=gencat | 359 | GENCAT=gencat |
340 | AC_SUBST(GENCAT) | 360 | AC_SUBST([GENCAT]) |
341 | 361 | ||
342 | dnl For backward compatibility. Some Makefiles may be using this. | 362 | dnl For backward compatibility. Some Makefiles may be using this. |
343 | INTLOBJS= | 363 | INTLOBJS= |
344 | if test "$USE_INCLUDED_LIBINTL" = yes; then | 364 | if test "$USE_INCLUDED_LIBINTL" = yes; then |
345 | INTLOBJS="\$(GETTOBJS)" | 365 | INTLOBJS="\$(GETTOBJS)" |
346 | fi | 366 | fi |
347 | AC_SUBST(INTLOBJS) | 367 | AC_SUBST([INTLOBJS]) |
348 | 368 | ||
349 | dnl Enable libtool support if the surrounding package wishes it. | 369 | dnl Enable libtool support if the surrounding package wishes it. |
350 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | 370 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix |
351 | AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) | 371 | AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) |
352 | ]) | 372 | ]) |
353 | 373 | ||
354 | dnl For backward compatibility. Some Makefiles may be using this. | 374 | dnl For backward compatibility. Some Makefiles may be using this. |
355 | INTLLIBS="$LIBINTL" | 375 | INTLLIBS="$LIBINTL" |
356 | AC_SUBST(INTLLIBS) | 376 | AC_SUBST([INTLLIBS]) |
357 | 377 | ||
358 | dnl Make all documented variables known to autoconf. | 378 | dnl Make all documented variables known to autoconf. |
359 | AC_SUBST(LIBINTL) | 379 | AC_SUBST([LIBINTL]) |
360 | AC_SUBST(LTLIBINTL) | 380 | AC_SUBST([LTLIBINTL]) |
361 | AC_SUBST(POSUB) | 381 | AC_SUBST([POSUB]) |
362 | ]) | 382 | ]) |
363 | 383 | ||
364 | 384 | ||
diff --git a/m4/iconv.m4 b/m4/iconv.m4 index 66bc76f4..4b29c5f2 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # iconv.m4 serial AM6 (gettext-0.17) | 1 | # iconv.m4 serial 18 (gettext-0.18.2) |
2 | dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002, 2007-2014 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. |
@@ -30,44 +30,55 @@ AC_DEFUN([AM_ICONV_LINK], | |||
30 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, | 30 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, |
31 | dnl because if the user has installed libiconv and not disabled its use | 31 | dnl because if the user has installed libiconv and not disabled its use |
32 | dnl via --without-libiconv-prefix, he wants to use it. The first | 32 | dnl via --without-libiconv-prefix, he wants to use it. The first |
33 | dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. | 33 | dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. |
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_LINK_IFELSE( |
41 | #include <iconv.h>], | 41 | [AC_LANG_PROGRAM( |
42 | [iconv_t cd = iconv_open("",""); | 42 | [[ |
43 | iconv(cd,NULL,NULL,NULL,NULL); | 43 | #include <stdlib.h> |
44 | iconv_close(cd);], | 44 | #include <iconv.h> |
45 | am_cv_func_iconv=yes) | 45 | ]], |
46 | [[iconv_t cd = iconv_open("",""); | ||
47 | iconv(cd,NULL,NULL,NULL,NULL); | ||
48 | iconv_close(cd);]])], | ||
49 | [am_cv_func_iconv=yes]) | ||
46 | if test "$am_cv_func_iconv" != yes; then | 50 | if test "$am_cv_func_iconv" != yes; then |
47 | am_save_LIBS="$LIBS" | 51 | am_save_LIBS="$LIBS" |
48 | LIBS="$LIBS $LIBICONV" | 52 | LIBS="$LIBS $LIBICONV" |
49 | AC_TRY_LINK([#include <stdlib.h> | 53 | AC_LINK_IFELSE( |
50 | #include <iconv.h>], | 54 | [AC_LANG_PROGRAM( |
51 | [iconv_t cd = iconv_open("",""); | 55 | [[ |
52 | iconv(cd,NULL,NULL,NULL,NULL); | 56 | #include <stdlib.h> |
53 | iconv_close(cd);], | 57 | #include <iconv.h> |
54 | am_cv_lib_iconv=yes | 58 | ]], |
55 | am_cv_func_iconv=yes) | 59 | [[iconv_t cd = iconv_open("",""); |
60 | iconv(cd,NULL,NULL,NULL,NULL); | ||
61 | iconv_close(cd);]])], | ||
62 | [am_cv_lib_iconv=yes] | ||
63 | [am_cv_func_iconv=yes]) | ||
56 | LIBS="$am_save_LIBS" | 64 | LIBS="$am_save_LIBS" |
57 | fi | 65 | fi |
58 | ]) | 66 | ]) |
59 | if test "$am_cv_func_iconv" = yes; then | 67 | if test "$am_cv_func_iconv" = yes; then |
60 | AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ | 68 | 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. | 69 | dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, |
70 | dnl Solaris 10. | ||
62 | am_save_LIBS="$LIBS" | 71 | am_save_LIBS="$LIBS" |
63 | if test $am_cv_lib_iconv = yes; then | 72 | if test $am_cv_lib_iconv = yes; then |
64 | LIBS="$LIBS $LIBICONV" | 73 | LIBS="$LIBS $LIBICONV" |
65 | fi | 74 | fi |
66 | AC_TRY_RUN([ | 75 | AC_RUN_IFELSE( |
76 | [AC_LANG_SOURCE([[ | ||
67 | #include <iconv.h> | 77 | #include <iconv.h> |
68 | #include <string.h> | 78 | #include <string.h> |
69 | int main () | 79 | int main () |
70 | { | 80 | { |
81 | int result = 0; | ||
71 | /* Test against AIX 5.1 bug: Failures are not distinguishable from successful | 82 | /* Test against AIX 5.1 bug: Failures are not distinguishable from successful |
72 | returns. */ | 83 | returns. */ |
73 | { | 84 | { |
@@ -84,7 +95,47 @@ int main () | |||
84 | (char **) &inptr, &inbytesleft, | 95 | (char **) &inptr, &inbytesleft, |
85 | &outptr, &outbytesleft); | 96 | &outptr, &outbytesleft); |
86 | if (res == 0) | 97 | if (res == 0) |
87 | return 1; | 98 | result |= 1; |
99 | iconv_close (cd_utf8_to_88591); | ||
100 | } | ||
101 | } | ||
102 | /* Test against Solaris 10 bug: Failures are not distinguishable from | ||
103 | successful returns. */ | ||
104 | { | ||
105 | iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); | ||
106 | if (cd_ascii_to_88591 != (iconv_t)(-1)) | ||
107 | { | ||
108 | static const char input[] = "\263"; | ||
109 | char buf[10]; | ||
110 | const char *inptr = input; | ||
111 | size_t inbytesleft = strlen (input); | ||
112 | char *outptr = buf; | ||
113 | size_t outbytesleft = sizeof (buf); | ||
114 | size_t res = iconv (cd_ascii_to_88591, | ||
115 | (char **) &inptr, &inbytesleft, | ||
116 | &outptr, &outbytesleft); | ||
117 | if (res == 0) | ||
118 | result |= 2; | ||
119 | iconv_close (cd_ascii_to_88591); | ||
120 | } | ||
121 | } | ||
122 | /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ | ||
123 | { | ||
124 | iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); | ||
125 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | ||
126 | { | ||
127 | static const char input[] = "\304"; | ||
128 | static char buf[2] = { (char)0xDE, (char)0xAD }; | ||
129 | const char *inptr = input; | ||
130 | size_t inbytesleft = 1; | ||
131 | char *outptr = buf; | ||
132 | size_t outbytesleft = 1; | ||
133 | size_t res = iconv (cd_88591_to_utf8, | ||
134 | (char **) &inptr, &inbytesleft, | ||
135 | &outptr, &outbytesleft); | ||
136 | if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) | ||
137 | result |= 4; | ||
138 | iconv_close (cd_88591_to_utf8); | ||
88 | } | 139 | } |
89 | } | 140 | } |
90 | #if 0 /* This bug could be worked around by the caller. */ | 141 | #if 0 /* This bug could be worked around by the caller. */ |
@@ -103,7 +154,8 @@ int main () | |||
103 | (char **) &inptr, &inbytesleft, | 154 | (char **) &inptr, &inbytesleft, |
104 | &outptr, &outbytesleft); | 155 | &outptr, &outbytesleft); |
105 | if ((int)res > 0) | 156 | if ((int)res > 0) |
106 | return 1; | 157 | result |= 8; |
158 | iconv_close (cd_88591_to_utf8); | ||
107 | } | 159 | } |
108 | } | 160 | } |
109 | #endif | 161 | #endif |
@@ -117,13 +169,19 @@ int main () | |||
117 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | 169 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) |
118 | /* Try HP-UX names. */ | 170 | /* Try HP-UX names. */ |
119 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | 171 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) |
120 | return 1; | 172 | result |= 16; |
121 | return 0; | 173 | return result; |
122 | }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], | 174 | }]])], |
123 | [case "$host_os" in | 175 | [am_cv_func_iconv_works=yes], |
176 | [am_cv_func_iconv_works=no], | ||
177 | [ | ||
178 | changequote(,)dnl | ||
179 | case "$host_os" in | ||
124 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; | 180 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; |
125 | *) am_cv_func_iconv_works="guessing yes" ;; | 181 | *) am_cv_func_iconv_works="guessing yes" ;; |
126 | esac]) | 182 | esac |
183 | changequote([,])dnl | ||
184 | ]) | ||
127 | LIBS="$am_save_LIBS" | 185 | LIBS="$am_save_LIBS" |
128 | ]) | 186 | ]) |
129 | case "$am_cv_func_iconv_works" in | 187 | case "$am_cv_func_iconv_works" in |
@@ -134,7 +192,7 @@ int main () | |||
134 | am_func_iconv=no am_cv_lib_iconv=no | 192 | am_func_iconv=no am_cv_lib_iconv=no |
135 | fi | 193 | fi |
136 | if test "$am_func_iconv" = yes; then | 194 | if test "$am_func_iconv" = yes; then |
137 | AC_DEFINE(HAVE_ICONV, 1, | 195 | AC_DEFINE([HAVE_ICONV], [1], |
138 | [Define if you have the iconv() function and it works.]) | 196 | [Define if you have the iconv() function and it works.]) |
139 | fi | 197 | fi |
140 | if test "$am_cv_lib_iconv" = yes; then | 198 | if test "$am_cv_lib_iconv" = yes; then |
@@ -147,34 +205,64 @@ int main () | |||
147 | LIBICONV= | 205 | LIBICONV= |
148 | LTLIBICONV= | 206 | LTLIBICONV= |
149 | fi | 207 | fi |
150 | AC_SUBST(LIBICONV) | 208 | AC_SUBST([LIBICONV]) |
151 | AC_SUBST(LTLIBICONV) | 209 | AC_SUBST([LTLIBICONV]) |
152 | ]) | 210 | ]) |
153 | 211 | ||
154 | AC_DEFUN([AM_ICONV], | 212 | dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to |
213 | dnl avoid warnings like | ||
214 | dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". | ||
215 | dnl This is tricky because of the way 'aclocal' is implemented: | ||
216 | dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. | ||
217 | dnl Otherwise aclocal's initial scan pass would miss the macro definition. | ||
218 | dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. | ||
219 | dnl Otherwise aclocal would emit many "Use of uninitialized value $1" | ||
220 | dnl warnings. | ||
221 | m4_define([gl_iconv_AC_DEFUN], | ||
222 | m4_version_prereq([2.64], | ||
223 | [[AC_DEFUN_ONCE( | ||
224 | [$1], [$2])]], | ||
225 | [m4_ifdef([gl_00GNULIB], | ||
226 | [[AC_DEFUN_ONCE( | ||
227 | [$1], [$2])]], | ||
228 | [[AC_DEFUN( | ||
229 | [$1], [$2])]])])) | ||
230 | gl_iconv_AC_DEFUN([AM_ICONV], | ||
155 | [ | 231 | [ |
156 | AM_ICONV_LINK | 232 | AM_ICONV_LINK |
157 | if test "$am_cv_func_iconv" = yes; then | 233 | if test "$am_cv_func_iconv" = yes; then |
158 | AC_MSG_CHECKING([for iconv declaration]) | 234 | AC_MSG_CHECKING([for iconv declaration]) |
159 | AC_CACHE_VAL(am_cv_proto_iconv, [ | 235 | AC_CACHE_VAL([am_cv_proto_iconv], [ |
160 | AC_TRY_COMPILE([ | 236 | AC_COMPILE_IFELSE( |
237 | [AC_LANG_PROGRAM( | ||
238 | [[ | ||
161 | #include <stdlib.h> | 239 | #include <stdlib.h> |
162 | #include <iconv.h> | 240 | #include <iconv.h> |
163 | extern | 241 | extern |
164 | #ifdef __cplusplus | 242 | #ifdef __cplusplus |
165 | "C" | 243 | "C" |
166 | #endif | 244 | #endif |
167 | #if defined(__STDC__) || defined(__cplusplus) | 245 | #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) |
168 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | 246 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
169 | #else | 247 | #else |
170 | size_t iconv(); | 248 | size_t iconv(); |
171 | #endif | 249 | #endif |
172 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") | 250 | ]], |
251 | [[]])], | ||
252 | [am_cv_proto_iconv_arg1=""], | ||
253 | [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);"]) | 254 | 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/( /(/'` | 255 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
175 | AC_MSG_RESULT([$]{ac_t:- | 256 | AC_MSG_RESULT([ |
176 | }[$]am_cv_proto_iconv) | 257 | $am_cv_proto_iconv]) |
177 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, | 258 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], |
178 | [Define as const if the declaration of iconv() needs const.]) | 259 | [Define as const if the declaration of iconv() needs const.]) |
260 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | ||
261 | m4_ifdef([gl_ICONV_H_DEFAULTS], | ||
262 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
263 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
264 | ICONV_CONST="const" | ||
265 | fi | ||
266 | ]) | ||
179 | fi | 267 | fi |
180 | ]) | 268 | ]) |
@@ -1,5 +1,5 @@ | |||
1 | # intl.m4 serial 3 (gettext-0.16) | 1 | # intl.m4 serial 27 (gettext-0.19) |
2 | dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2014 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. |
@@ -15,9 +15,9 @@ dnl They are *not* in the public domain. | |||
15 | 15 | ||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. |
19 | 19 | ||
20 | AC_PREREQ(2.52) | 20 | AC_PREREQ([2.60]) |
21 | 21 | ||
22 | dnl Checks for all prerequisites of the intl subdirectory, | 22 | dnl Checks for all prerequisites of the intl subdirectory, |
23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | 23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, |
@@ -25,38 +25,51 @@ dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | |||
25 | AC_DEFUN([AM_INTL_SUBDIR], | 25 | AC_DEFUN([AM_INTL_SUBDIR], |
26 | [ | 26 | [ |
27 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 27 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
28 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | 28 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
29 | AC_REQUIRE([AC_PROG_CC])dnl | 29 | AC_REQUIRE([AC_PROG_CC])dnl |
30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
31 | AC_REQUIRE([gt_GLIBC2])dnl | ||
31 | AC_REQUIRE([AC_PROG_RANLIB])dnl | 32 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
32 | AC_REQUIRE([gl_VISIBILITY])dnl | 33 | AC_REQUIRE([gl_VISIBILITY])dnl |
33 | AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl | 34 | AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl |
34 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl | 35 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl |
35 | AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl | ||
36 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl | 36 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl |
37 | AC_REQUIRE([gt_TYPE_WINT_T])dnl | 37 | AC_REQUIRE([gt_TYPE_WINT_T])dnl |
38 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
38 | AC_REQUIRE([gt_TYPE_INTMAX_T]) | 39 | AC_REQUIRE([gt_TYPE_INTMAX_T]) |
39 | AC_REQUIRE([gt_PRINTF_POSIX]) | 40 | AC_REQUIRE([gt_PRINTF_POSIX]) |
41 | AC_REQUIRE([gl_GLIBC21])dnl | ||
40 | AC_REQUIRE([gl_XSIZE])dnl | 42 | AC_REQUIRE([gl_XSIZE])dnl |
43 | AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl | ||
44 | AC_REQUIRE([gt_INTL_MACOSX])dnl | ||
45 | AC_REQUIRE([gl_EXTERN_INLINE])dnl | ||
46 | AC_REQUIRE([gt_GL_ATTRIBUTE])dnl | ||
47 | |||
48 | dnl Support for automake's --enable-silent-rules. | ||
49 | case "$enable_silent_rules" in | ||
50 | yes) INTL_DEFAULT_VERBOSITY=0;; | ||
51 | no) INTL_DEFAULT_VERBOSITY=1;; | ||
52 | *) INTL_DEFAULT_VERBOSITY=1;; | ||
53 | esac | ||
54 | AC_SUBST([INTL_DEFAULT_VERBOSITY]) | ||
41 | 55 | ||
42 | AC_CHECK_TYPE([ptrdiff_t], , | 56 | AC_CHECK_TYPE([ptrdiff_t], , |
43 | [AC_DEFINE([ptrdiff_t], [long], | 57 | [AC_DEFINE([ptrdiff_t], [long], |
44 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) | 58 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) |
45 | ]) | 59 | ]) |
46 | AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) | 60 | AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h]) |
47 | AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) | 61 | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ |
62 | snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | ||
48 | 63 | ||
49 | dnl Use the _snprintf function only if it is declared (because on NetBSD it | 64 | dnl Use the _snprintf function only if it is declared (because on NetBSD it |
50 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | 65 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). |
51 | gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) | 66 | AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>]) |
52 | gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) | ||
53 | 67 | ||
54 | dnl Use the *_unlocked functions only if they are declared. | 68 | dnl Use the *_unlocked functions only if they are declared. |
55 | dnl (because some of them were defined without being declared in Solaris | 69 | dnl (because some of them were defined without being declared in Solaris |
56 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | 70 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
57 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | 71 | dnl on Solaris 2.5.1 to run on Solaris 2.6). |
58 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | 72 | AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>]) |
59 | gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) | ||
60 | 73 | ||
61 | case $gt_cv_func_printf_posix in | 74 | case $gt_cv_func_printf_posix in |
62 | *yes) HAVE_POSIX_PRINTF=1 ;; | 75 | *yes) HAVE_POSIX_PRINTF=1 ;; |
@@ -75,6 +88,12 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
75 | HAVE_SNPRINTF=0 | 88 | HAVE_SNPRINTF=0 |
76 | fi | 89 | fi |
77 | AC_SUBST([HAVE_SNPRINTF]) | 90 | AC_SUBST([HAVE_SNPRINTF]) |
91 | if test "$ac_cv_func_newlocale" = yes; then | ||
92 | HAVE_NEWLOCALE=1 | ||
93 | else | ||
94 | HAVE_NEWLOCALE=0 | ||
95 | fi | ||
96 | AC_SUBST([HAVE_NEWLOCALE]) | ||
78 | if test "$ac_cv_func_wprintf" = yes; then | 97 | if test "$ac_cv_func_wprintf" = yes; then |
79 | HAVE_WPRINTF=1 | 98 | HAVE_WPRINTF=1 |
80 | else | 99 | else |
@@ -94,7 +113,7 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
94 | dnl exported variables _also_ in the static library. | 113 | dnl exported variables _also_ in the static library. |
95 | if test "$enable_shared" = yes; then | 114 | if test "$enable_shared" = yes; then |
96 | case "$host_os" in | 115 | case "$host_os" in |
97 | cygwin*) is_woe32dll=yes ;; | 116 | mingw* | cygwin*) is_woe32dll=yes ;; |
98 | *) is_woe32dll=no ;; | 117 | *) is_woe32dll=no ;; |
99 | esac | 118 | esac |
100 | else | 119 | else |
@@ -103,6 +122,31 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
103 | WOE32DLL=$is_woe32dll | 122 | WOE32DLL=$is_woe32dll |
104 | AC_SUBST([WOE32DLL]) | 123 | AC_SUBST([WOE32DLL]) |
105 | 124 | ||
125 | dnl On mingw and Cygwin, we can activate special Makefile rules which add | ||
126 | dnl version information to the shared libraries and executables. | ||
127 | case "$host_os" in | ||
128 | mingw* | cygwin*) is_woe32=yes ;; | ||
129 | *) is_woe32=no ;; | ||
130 | esac | ||
131 | WOE32=$is_woe32 | ||
132 | AC_SUBST([WOE32]) | ||
133 | if test $WOE32 = yes; then | ||
134 | dnl Check for a program that compiles Windows resource files. | ||
135 | AC_CHECK_TOOL([WINDRES], [windres]) | ||
136 | fi | ||
137 | |||
138 | dnl Determine whether when creating a library, "-lc" should be passed to | ||
139 | dnl libtool or not. On many platforms, it is required for the libtool option | ||
140 | dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool | ||
141 | dnl in the *.la files - makes it impossible to create multithreaded programs, | ||
142 | dnl because libtool also reorders the -lc to come before the -pthread, and | ||
143 | dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>. | ||
144 | case "$host_os" in | ||
145 | hpux*) LTLIBC="" ;; | ||
146 | *) LTLIBC="-lc" ;; | ||
147 | esac | ||
148 | AC_SUBST([LTLIBC]) | ||
149 | |||
106 | dnl Rename some macros and functions used for locking. | 150 | dnl Rename some macros and functions used for locking. |
107 | AH_BOTTOM([ | 151 | AH_BOTTOM([ |
108 | #define __libc_lock_t gl_lock_t | 152 | #define __libc_lock_t gl_lock_t |
@@ -118,22 +162,31 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
118 | #define __libc_lock_lock_recursive gl_recursive_lock_lock | 162 | #define __libc_lock_lock_recursive gl_recursive_lock_lock |
119 | #define __libc_lock_unlock_recursive gl_recursive_lock_unlock | 163 | #define __libc_lock_unlock_recursive gl_recursive_lock_unlock |
120 | #define glthread_in_use libintl_thread_in_use | 164 | #define glthread_in_use libintl_thread_in_use |
121 | #define glthread_lock_init libintl_lock_init | 165 | #define glthread_lock_init_func libintl_lock_init_func |
122 | #define glthread_lock_lock libintl_lock_lock | 166 | #define glthread_lock_lock_func libintl_lock_lock_func |
123 | #define glthread_lock_unlock libintl_lock_unlock | 167 | #define glthread_lock_unlock_func libintl_lock_unlock_func |
124 | #define glthread_lock_destroy libintl_lock_destroy | 168 | #define glthread_lock_destroy_func libintl_lock_destroy_func |
125 | #define glthread_rwlock_init libintl_rwlock_init | 169 | #define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded |
126 | #define glthread_rwlock_rdlock libintl_rwlock_rdlock | 170 | #define glthread_rwlock_init_func libintl_rwlock_init_func |
127 | #define glthread_rwlock_wrlock libintl_rwlock_wrlock | 171 | #define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded |
128 | #define glthread_rwlock_unlock libintl_rwlock_unlock | 172 | #define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func |
129 | #define glthread_rwlock_destroy libintl_rwlock_destroy | 173 | #define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded |
130 | #define glthread_recursive_lock_init libintl_recursive_lock_init | 174 | #define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func |
131 | #define glthread_recursive_lock_lock libintl_recursive_lock_lock | 175 | #define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded |
132 | #define glthread_recursive_lock_unlock libintl_recursive_lock_unlock | 176 | #define glthread_rwlock_unlock_func libintl_rwlock_unlock_func |
133 | #define glthread_recursive_lock_destroy libintl_recursive_lock_destroy | 177 | #define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded |
134 | #define glthread_once libintl_once | 178 | #define glthread_rwlock_destroy_func libintl_rwlock_destroy_func |
135 | #define glthread_once_call libintl_once_call | 179 | #define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded |
180 | #define glthread_recursive_lock_init_func libintl_recursive_lock_init_func | ||
181 | #define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded | ||
182 | #define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func | ||
183 | #define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded | ||
184 | #define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func | ||
185 | #define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded | ||
186 | #define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func | ||
187 | #define glthread_once_func libintl_once_func | ||
136 | #define glthread_once_singlethreaded libintl_once_singlethreaded | 188 | #define glthread_once_singlethreaded libintl_once_singlethreaded |
189 | #define glthread_once_multithreaded libintl_once_multithreaded | ||
137 | ]) | 190 | ]) |
138 | ]) | 191 | ]) |
139 | 192 | ||
@@ -159,51 +212,37 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], | |||
159 | [ | 212 | [ |
160 | AC_REQUIRE([AC_C_INLINE])dnl | 213 | AC_REQUIRE([AC_C_INLINE])dnl |
161 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | 214 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
215 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
162 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | 216 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
163 | AC_REQUIRE([AC_FUNC_MMAP])dnl | 217 | AC_REQUIRE([AC_FUNC_MMAP])dnl |
164 | AC_REQUIRE([gt_INTDIV0])dnl | 218 | AC_REQUIRE([gt_INTDIV0])dnl |
219 | AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl | ||
165 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | 220 | AC_REQUIRE([gt_INTTYPES_PRI])dnl |
166 | AC_REQUIRE([gl_LOCK])dnl | 221 | AC_REQUIRE([gl_LOCK])dnl |
167 | 222 | ||
168 | AC_TRY_LINK( | 223 | AC_LINK_IFELSE( |
169 | [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], | 224 | [AC_LANG_PROGRAM( |
170 | [], | 225 | [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], |
171 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, | 226 | [[]])], |
227 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], | ||
172 | [Define to 1 if the compiler understands __builtin_expect.])]) | 228 | [Define to 1 if the compiler understands __builtin_expect.])]) |
173 | 229 | ||
174 | AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) | 230 | AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) |
175 | AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ | 231 | AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ |
176 | stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ | 232 | stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ |
177 | argz_next __fsetlocking]) | 233 | argz_stringify argz_next __fsetlocking]) |
178 | 234 | ||
179 | dnl Use the *_unlocked functions only if they are declared. | 235 | dnl Use the *_unlocked functions only if they are declared. |
180 | dnl (because some of them were defined without being declared in Solaris | 236 | dnl (because some of them were defined without being declared in Solaris |
181 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | 237 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
182 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | 238 | dnl on Solaris 2.5.1 to run on Solaris 2.6). |
183 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | 239 | AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>]) |
184 | gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) | ||
185 | gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) | ||
186 | 240 | ||
187 | AM_ICONV | 241 | AM_ICONV |
188 | 242 | ||
189 | dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, | ||
190 | dnl and a _NL_LOCALE_NAME macro always. | ||
191 | AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, | ||
192 | [AC_TRY_LINK([#include <langinfo.h> | ||
193 | #include <locale.h>], | ||
194 | [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));], | ||
195 | gt_cv_nl_locale_name=yes, | ||
196 | gt_cv_nl_locale_name=no) | ||
197 | ]) | ||
198 | if test $gt_cv_nl_locale_name = yes; then | ||
199 | AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, | ||
200 | [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) | ||
201 | fi | ||
202 | |||
203 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | 243 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, |
204 | dnl because plural.y uses bison specific features. It requires at least | 244 | dnl because plural.y uses bison specific features. It requires at least |
205 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't | 245 | dnl bison-2.7 for %define api.pure. |
206 | dnl compile. | ||
207 | dnl bison is only needed for the maintainer (who touches plural.y). But in | 246 | dnl bison is only needed for the maintainer (who touches plural.y). But in |
208 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | 247 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put |
209 | dnl the rule in general Makefile. Now, some people carelessly touch the | 248 | dnl the rule in general Makefile. Now, some people carelessly touch the |
@@ -220,7 +259,7 @@ changequote(<<,>>)dnl | |||
220 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | 259 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
221 | case $ac_prog_version in | 260 | case $ac_prog_version in |
222 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | 261 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; |
223 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | 262 | 2.[7-9]* | [3-9].*) |
224 | changequote([,])dnl | 263 | changequote([,])dnl |
225 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | 264 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; |
226 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | 265 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; |
@@ -232,22 +271,28 @@ changequote([,])dnl | |||
232 | fi | 271 | fi |
233 | ]) | 272 | ]) |
234 | 273 | ||
274 | dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from | ||
275 | dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib. | ||
276 | AC_DEFUN([gt_GL_ATTRIBUTE], [ | ||
277 | m4_ifndef([gl_[]COMMON], | ||
278 | AH_VERBATIM([gt_gl_attribute], | ||
279 | [/* Define as a marker that can be attached to declarations that might not | ||
280 | be used. This helps to reduce warnings, such as from | ||
281 | GCC -Wunused-parameter. */ | ||
282 | #ifndef _GL_UNUSED | ||
283 | # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) | ||
284 | # define _GL_UNUSED __attribute__ ((__unused__)) | ||
285 | # else | ||
286 | # define _GL_UNUSED | ||
287 | # endif | ||
288 | #endif | ||
235 | 289 | ||
236 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | 290 | /* The __pure__ attribute was added in gcc 2.96. */ |
237 | dnl Check whether a function is declared. | 291 | #ifndef _GL_ATTRIBUTE_PURE |
238 | AC_DEFUN([gt_CHECK_DECL], | 292 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) |
239 | [ | 293 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
240 | AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, | 294 | # else |
241 | [AC_TRY_COMPILE([$2], [ | 295 | # define _GL_ATTRIBUTE_PURE /* empty */ |
242 | #ifndef $1 | 296 | # endif |
243 | char *p = (char *) $1; | ||
244 | #endif | 297 | #endif |
245 | ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | 298 | ]))]) |
246 | if test $ac_cv_have_decl_$1 = yes; then | ||
247 | gt_value=1 | ||
248 | else | ||
249 | gt_value=0 | ||
250 | fi | ||
251 | AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], | ||
252 | [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) | ||
253 | ]) | ||
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 96c4e2c3..ddc569f7 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 | |||
@@ -1,50 +1,56 @@ | |||
1 | # lib-ld.m4 serial 3 (gettext-0.13) | 1 | # lib-ld.m4 serial 6 |
2 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1996-2003, 2009-2014 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. |
6 | 6 | ||
7 | dnl Subroutines of libtool.m4, | 7 | dnl Subroutines of libtool.m4, |
8 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision | 8 | dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid |
9 | dnl with libtool.m4. | 9 | dnl collision with libtool.m4. |
10 | 10 | ||
11 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. | 11 | dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. |
12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], | 12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], |
13 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, | 13 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], |
14 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | 14 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. |
15 | case `$LD -v 2>&1 </dev/null` in | 15 | case `$LD -v 2>&1 </dev/null` in |
16 | *GNU* | *'with BFD'*) | 16 | *GNU* | *'with BFD'*) |
17 | acl_cv_prog_gnu_ld=yes ;; | 17 | acl_cv_prog_gnu_ld=yes |
18 | ;; | ||
18 | *) | 19 | *) |
19 | acl_cv_prog_gnu_ld=no ;; | 20 | acl_cv_prog_gnu_ld=no |
21 | ;; | ||
20 | esac]) | 22 | esac]) |
21 | with_gnu_ld=$acl_cv_prog_gnu_ld | 23 | with_gnu_ld=$acl_cv_prog_gnu_ld |
22 | ]) | 24 | ]) |
23 | 25 | ||
24 | dnl From libtool-1.4. Sets the variable LD. | 26 | dnl From libtool-2.4. Sets the variable LD. |
25 | AC_DEFUN([AC_LIB_PROG_LD], | 27 | AC_DEFUN([AC_LIB_PROG_LD], |
26 | [AC_ARG_WITH(gnu-ld, | 28 | [AC_REQUIRE([AC_PROG_CC])dnl |
27 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | ||
28 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | ||
29 | AC_REQUIRE([AC_PROG_CC])dnl | ||
30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 29 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
30 | |||
31 | AC_ARG_WITH([gnu-ld], | ||
32 | [AS_HELP_STRING([--with-gnu-ld], | ||
33 | [assume the C compiler uses GNU ld [default=no]])], | ||
34 | [test "$withval" = no || with_gnu_ld=yes], | ||
35 | [with_gnu_ld=no])dnl | ||
36 | |||
31 | # Prepare PATH_SEPARATOR. | 37 | # Prepare PATH_SEPARATOR. |
32 | # The user is always right. | 38 | # The user is always right. |
33 | if test "${PATH_SEPARATOR+set}" != set; then | 39 | if test "${PATH_SEPARATOR+set}" != set; then |
34 | echo "#! /bin/sh" >conf$$.sh | 40 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which |
35 | echo "exit 0" >>conf$$.sh | 41 | # contains only /bin. Note that ksh looks also at the FPATH variable, |
36 | chmod +x conf$$.sh | 42 | # so we have to set that as well for the test. |
37 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | 43 | PATH_SEPARATOR=: |
38 | PATH_SEPARATOR=';' | 44 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ |
39 | else | 45 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ |
40 | PATH_SEPARATOR=: | 46 | || PATH_SEPARATOR=';' |
41 | fi | 47 | } |
42 | rm -f conf$$.sh | ||
43 | fi | 48 | fi |
49 | |||
44 | ac_prog=ld | 50 | ac_prog=ld |
45 | if test "$GCC" = yes; then | 51 | if test "$GCC" = yes; then |
46 | # Check if gcc -print-prog-name=ld gives a path. | 52 | # Check if gcc -print-prog-name=ld gives a path. |
47 | AC_MSG_CHECKING([for ld used by GCC]) | 53 | AC_MSG_CHECKING([for ld used by $CC]) |
48 | case $host in | 54 | case $host in |
49 | *-*-mingw*) | 55 | *-*-mingw*) |
50 | # gcc leaves a trailing carriage return which upsets mingw | 56 | # gcc leaves a trailing carriage return which upsets mingw |
@@ -54,12 +60,12 @@ if test "$GCC" = yes; then | |||
54 | esac | 60 | esac |
55 | case $ac_prog in | 61 | case $ac_prog in |
56 | # Accept absolute paths. | 62 | # Accept absolute paths. |
57 | [[\\/]* | [A-Za-z]:[\\/]*)] | 63 | [[\\/]]* | ?:[[\\/]]*) |
58 | [re_direlt='/[^/][^/]*/\.\./'] | 64 | re_direlt='/[[^/]][[^/]]*/\.\./' |
59 | # Canonicalize the path of ld | 65 | # Canonicalize the pathname of ld |
60 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | 66 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` |
61 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | 67 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do |
62 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | 68 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
63 | done | 69 | done |
64 | test -z "$LD" && LD="$ac_prog" | 70 | test -z "$LD" && LD="$ac_prog" |
65 | ;; | 71 | ;; |
@@ -77,33 +83,36 @@ elif test "$with_gnu_ld" = yes; then | |||
77 | else | 83 | else |
78 | AC_MSG_CHECKING([for non-GNU ld]) | 84 | AC_MSG_CHECKING([for non-GNU ld]) |
79 | fi | 85 | fi |
80 | AC_CACHE_VAL(acl_cv_path_LD, | 86 | AC_CACHE_VAL([acl_cv_path_LD], |
81 | [if test -z "$LD"; then | 87 | [if test -z "$LD"; then |
82 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | 88 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
83 | for ac_dir in $PATH; do | 89 | for ac_dir in $PATH; do |
90 | IFS="$acl_save_ifs" | ||
84 | test -z "$ac_dir" && ac_dir=. | 91 | test -z "$ac_dir" && ac_dir=. |
85 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | 92 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
86 | acl_cv_path_LD="$ac_dir/$ac_prog" | 93 | acl_cv_path_LD="$ac_dir/$ac_prog" |
87 | # Check to see if the program is GNU ld. I'd rather use --version, | 94 | # Check to see if the program is GNU ld. I'd rather use --version, |
88 | # but apparently some GNU ld's only accept -v. | 95 | # but apparently some variants of GNU ld only accept -v. |
89 | # Break only if it was the GNU/non-GNU ld that we prefer. | 96 | # Break only if it was the GNU/non-GNU ld that we prefer. |
90 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in | 97 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in |
91 | *GNU* | *'with BFD'*) | 98 | *GNU* | *'with BFD'*) |
92 | test "$with_gnu_ld" != no && break ;; | 99 | test "$with_gnu_ld" != no && break |
100 | ;; | ||
93 | *) | 101 | *) |
94 | test "$with_gnu_ld" != yes && break ;; | 102 | test "$with_gnu_ld" != yes && break |
103 | ;; | ||
95 | esac | 104 | esac |
96 | fi | 105 | fi |
97 | done | 106 | done |
98 | IFS="$ac_save_ifs" | 107 | IFS="$acl_save_ifs" |
99 | else | 108 | else |
100 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | 109 | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
101 | fi]) | 110 | fi]) |
102 | LD="$acl_cv_path_LD" | 111 | LD="$acl_cv_path_LD" |
103 | if test -n "$LD"; then | 112 | if test -n "$LD"; then |
104 | AC_MSG_RESULT($LD) | 113 | AC_MSG_RESULT([$LD]) |
105 | else | 114 | else |
106 | AC_MSG_RESULT(no) | 115 | AC_MSG_RESULT([no]) |
107 | fi | 116 | fi |
108 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | 117 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
109 | AC_LIB_PROG_LD_GNU | 118 | AC_LIB_PROG_LD_GNU |
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index e3d26fc4..3522d994 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 | |||
@@ -1,12 +1,12 @@ | |||
1 | # lib-link.m4 serial 13 (gettext-0.17) | 1 | # lib-link.m4 serial 26 (gettext-0.18.2) |
2 | dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-2014 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. |
6 | 6 | ||
7 | dnl From Bruno Haible. | 7 | dnl From Bruno Haible. |
8 | 8 | ||
9 | AC_PREREQ(2.54) | 9 | AC_PREREQ([2.54]) |
10 | 10 | ||
11 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | 11 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
12 | dnl the libraries corresponding to explicit and implicit dependencies. | 12 | dnl the libraries corresponding to explicit and implicit dependencies. |
@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS], | |||
18 | [ | 18 | [ |
19 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | 19 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
20 | AC_REQUIRE([AC_LIB_RPATH]) | 20 | AC_REQUIRE([AC_LIB_RPATH]) |
21 | define([Name],[translit([$1],[./-], [___])]) | 21 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) |
22 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | 22 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
23 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | 23 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
24 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ | 24 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
25 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | 25 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
26 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" | 26 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
@@ -39,16 +39,17 @@ AC_DEFUN([AC_LIB_LINKFLAGS], | |||
39 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | 39 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
40 | dnl results of this search when this library appears as a dependency. | 40 | dnl results of this search when this library appears as a dependency. |
41 | HAVE_LIB[]NAME=yes | 41 | HAVE_LIB[]NAME=yes |
42 | undefine([Name]) | 42 | popdef([NAME]) |
43 | undefine([NAME]) | 43 | popdef([Name]) |
44 | ]) | 44 | ]) |
45 | 45 | ||
46 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) | 46 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) |
47 | dnl searches for libname and the libraries corresponding to explicit and | 47 | dnl searches for libname and the libraries corresponding to explicit and |
48 | dnl implicit dependencies, together with the specified include files and | 48 | dnl implicit dependencies, together with the specified include files and |
49 | dnl the ability to compile and link the specified testcode. If found, it | 49 | dnl the ability to compile and link the specified testcode. The missing-message |
50 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and | 50 | dnl defaults to 'no' and may contain additional hints for the user. |
51 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and | 51 | dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} |
52 | dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and | ||
52 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | 53 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
53 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | 54 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
54 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | 55 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname |
@@ -57,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |||
57 | [ | 58 | [ |
58 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | 59 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
59 | AC_REQUIRE([AC_LIB_RPATH]) | 60 | AC_REQUIRE([AC_LIB_RPATH]) |
60 | define([Name],[translit([$1],[./-], [___])]) | 61 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) |
61 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | 62 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
62 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | 63 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
63 | 64 | ||
64 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME | 65 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
65 | dnl accordingly. | 66 | dnl accordingly. |
@@ -73,13 +74,26 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |||
73 | 74 | ||
74 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | 75 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
75 | ac_save_LIBS="$LIBS" | 76 | ac_save_LIBS="$LIBS" |
76 | LIBS="$LIBS $LIB[]NAME" | 77 | dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, |
77 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) | 78 | dnl because these -l options might require -L options that are present in |
79 | dnl LIBS. -l options benefit only from the -L options listed before it. | ||
80 | dnl Otherwise, add it to the front of LIBS, because it may be a static | ||
81 | dnl library that depends on another static library that is present in LIBS. | ||
82 | dnl Static libraries benefit only from the static libraries listed after | ||
83 | dnl it. | ||
84 | case " $LIB[]NAME" in | ||
85 | *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; | ||
86 | *) LIBS="$LIB[]NAME $LIBS" ;; | ||
87 | esac | ||
88 | AC_LINK_IFELSE( | ||
89 | [AC_LANG_PROGRAM([[$3]], [[$4]])], | ||
90 | [ac_cv_lib[]Name=yes], | ||
91 | [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) | ||
78 | LIBS="$ac_save_LIBS" | 92 | LIBS="$ac_save_LIBS" |
79 | ]) | 93 | ]) |
80 | if test "$ac_cv_lib[]Name" = yes; then | 94 | if test "$ac_cv_lib[]Name" = yes; then |
81 | HAVE_LIB[]NAME=yes | 95 | HAVE_LIB[]NAME=yes |
82 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) | 96 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) |
83 | AC_MSG_CHECKING([how to link with lib[]$1]) | 97 | AC_MSG_CHECKING([how to link with lib[]$1]) |
84 | AC_MSG_RESULT([$LIB[]NAME]) | 98 | AC_MSG_RESULT([$LIB[]NAME]) |
85 | else | 99 | else |
@@ -95,13 +109,15 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |||
95 | AC_SUBST([LIB]NAME) | 109 | AC_SUBST([LIB]NAME) |
96 | AC_SUBST([LTLIB]NAME) | 110 | AC_SUBST([LTLIB]NAME) |
97 | AC_SUBST([LIB]NAME[_PREFIX]) | 111 | AC_SUBST([LIB]NAME[_PREFIX]) |
98 | undefine([Name]) | 112 | popdef([NAME]) |
99 | undefine([NAME]) | 113 | popdef([Name]) |
100 | ]) | 114 | ]) |
101 | 115 | ||
102 | dnl Determine the platform dependent parameters needed to use rpath: | 116 | dnl Determine the platform dependent parameters needed to use rpath: |
103 | dnl acl_libext, | 117 | dnl acl_libext, |
104 | dnl acl_shlibext, | 118 | dnl acl_shlibext, |
119 | dnl acl_libname_spec, | ||
120 | dnl acl_library_names_spec, | ||
105 | dnl acl_hardcode_libdir_flag_spec, | 121 | dnl acl_hardcode_libdir_flag_spec, |
106 | dnl acl_hardcode_libdir_separator, | 122 | dnl acl_hardcode_libdir_separator, |
107 | dnl acl_hardcode_direct, | 123 | dnl acl_hardcode_direct, |
@@ -114,7 +130,7 @@ AC_DEFUN([AC_LIB_RPATH], | |||
114 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | 130 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
115 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | 131 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
116 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | 132 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
117 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ | 133 | AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ |
118 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | 134 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
119 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | 135 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
120 | . ./conftest.sh | 136 | . ./conftest.sh |
@@ -131,11 +147,32 @@ AC_DEFUN([AC_LIB_RPATH], | |||
131 | acl_hardcode_direct="$acl_cv_hardcode_direct" | 147 | acl_hardcode_direct="$acl_cv_hardcode_direct" |
132 | acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | 148 | acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" |
133 | dnl Determine whether the user wants rpath handling at all. | 149 | dnl Determine whether the user wants rpath handling at all. |
134 | AC_ARG_ENABLE(rpath, | 150 | AC_ARG_ENABLE([rpath], |
135 | [ --disable-rpath do not hardcode runtime library paths], | 151 | [ --disable-rpath do not hardcode runtime library paths], |
136 | :, enable_rpath=yes) | 152 | :, enable_rpath=yes) |
137 | ]) | 153 | ]) |
138 | 154 | ||
155 | dnl AC_LIB_FROMPACKAGE(name, package) | ||
156 | dnl declares that libname comes from the given package. The configure file | ||
157 | dnl will then not have a --with-libname-prefix option but a | ||
158 | dnl --with-package-prefix option. Several libraries can come from the same | ||
159 | dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar | ||
160 | dnl macro call that searches for libname. | ||
161 | AC_DEFUN([AC_LIB_FROMPACKAGE], | ||
162 | [ | ||
163 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
164 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
165 | define([acl_frompackage_]NAME, [$2]) | ||
166 | popdef([NAME]) | ||
167 | pushdef([PACK],[$2]) | ||
168 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
169 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
170 | define([acl_libsinpackage_]PACKUP, | ||
171 | m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) | ||
172 | popdef([PACKUP]) | ||
173 | popdef([PACK]) | ||
174 | ]) | ||
175 | |||
139 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | 176 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
140 | dnl the libraries corresponding to explicit and implicit dependencies. | 177 | dnl the libraries corresponding to explicit and implicit dependencies. |
141 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | 178 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
@@ -144,19 +181,23 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | |||
144 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | 181 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
145 | [ | 182 | [ |
146 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | 183 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
147 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | 184 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
148 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | 185 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
186 | pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) | ||
187 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
188 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
189 | pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) | ||
149 | dnl Autoconf >= 2.61 supports dots in --with options. | 190 | dnl Autoconf >= 2.61 supports dots in --with options. |
150 | define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) | 191 | pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) |
151 | dnl By default, look in $includedir and $libdir. | 192 | dnl By default, look in $includedir and $libdir. |
152 | use_additional=yes | 193 | use_additional=yes |
153 | AC_LIB_WITH_FINAL_PREFIX([ | 194 | AC_LIB_WITH_FINAL_PREFIX([ |
154 | eval additional_includedir=\"$includedir\" | 195 | eval additional_includedir=\"$includedir\" |
155 | eval additional_libdir=\"$libdir\" | 196 | eval additional_libdir=\"$libdir\" |
156 | ]) | 197 | ]) |
157 | AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], | 198 | AC_ARG_WITH(P_A_C_K[-prefix], |
158 | [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | 199 | [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib |
159 | --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], | 200 | --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], |
160 | [ | 201 | [ |
161 | if test "X$withval" = "Xno"; then | 202 | if test "X$withval" = "Xno"; then |
162 | use_additional=no | 203 | use_additional=no |
@@ -169,6 +210,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
169 | else | 210 | else |
170 | additional_includedir="$withval/include" | 211 | additional_includedir="$withval/include" |
171 | additional_libdir="$withval/$acl_libdirstem" | 212 | additional_libdir="$withval/$acl_libdirstem" |
213 | if test "$acl_libdirstem2" != "$acl_libdirstem" \ | ||
214 | && ! test -d "$withval/$acl_libdirstem"; then | ||
215 | additional_libdir="$withval/$acl_libdirstem2" | ||
216 | fi | ||
172 | fi | 217 | fi |
173 | fi | 218 | fi |
174 | ]) | 219 | ]) |
@@ -178,6 +223,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
178 | LTLIB[]NAME= | 223 | LTLIB[]NAME= |
179 | INC[]NAME= | 224 | INC[]NAME= |
180 | LIB[]NAME[]_PREFIX= | 225 | LIB[]NAME[]_PREFIX= |
226 | dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been | ||
227 | dnl computed. So it has to be reset here. | ||
228 | HAVE_LIB[]NAME= | ||
181 | rpathdirs= | 229 | rpathdirs= |
182 | ltrpathdirs= | 230 | ltrpathdirs= |
183 | names_already_handled= | 231 | names_already_handled= |
@@ -197,7 +245,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
197 | names_already_handled="$names_already_handled $name" | 245 | names_already_handled="$names_already_handled $name" |
198 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS | 246 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
199 | dnl or AC_LIB_HAVE_LINKFLAGS call. | 247 | dnl or AC_LIB_HAVE_LINKFLAGS call. |
200 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | 248 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` |
201 | eval value=\"\$HAVE_LIB$uppername\" | 249 | eval value=\"\$HAVE_LIB$uppername\" |
202 | if test -n "$value"; then | 250 | if test -n "$value"; then |
203 | if test "$value" = yes; then | 251 | if test "$value" = yes; then |
@@ -327,7 +375,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
327 | dnl Linking with a shared library. We attempt to hardcode its | 375 | dnl Linking with a shared library. We attempt to hardcode its |
328 | dnl directory into the executable's runpath, unless it's the | 376 | dnl directory into the executable's runpath, unless it's the |
329 | dnl standard /usr/lib. | 377 | dnl standard /usr/lib. |
330 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then | 378 | if test "$enable_rpath" = no \ |
379 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ | ||
380 | || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then | ||
331 | dnl No hardcoding is needed. | 381 | dnl No hardcoding is needed. |
332 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | 382 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
333 | else | 383 | else |
@@ -415,7 +465,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
415 | case "$found_dir" in | 465 | case "$found_dir" in |
416 | */$acl_libdirstem | */$acl_libdirstem/) | 466 | */$acl_libdirstem | */$acl_libdirstem/) |
417 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | 467 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` |
418 | LIB[]NAME[]_PREFIX="$basedir" | 468 | if test "$name" = '$1'; then |
469 | LIB[]NAME[]_PREFIX="$basedir" | ||
470 | fi | ||
471 | additional_includedir="$basedir/include" | ||
472 | ;; | ||
473 | */$acl_libdirstem2 | */$acl_libdirstem2/) | ||
474 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` | ||
475 | if test "$name" = '$1'; then | ||
476 | LIB[]NAME[]_PREFIX="$basedir" | ||
477 | fi | ||
419 | additional_includedir="$basedir/include" | 478 | additional_includedir="$basedir/include" |
420 | ;; | 479 | ;; |
421 | esac | 480 | esac |
@@ -476,9 +535,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
476 | dnl 3. if it's already present in $LDFLAGS or the already | 535 | dnl 3. if it's already present in $LDFLAGS or the already |
477 | dnl constructed $LIBNAME, | 536 | dnl constructed $LIBNAME, |
478 | dnl 4. if it doesn't exist as a directory. | 537 | dnl 4. if it doesn't exist as a directory. |
479 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | 538 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ |
539 | && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then | ||
480 | haveit= | 540 | haveit= |
481 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | 541 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ |
542 | || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then | ||
482 | if test -n "$GCC"; then | 543 | if test -n "$GCC"; then |
483 | case $host_os in | 544 | case $host_os in |
484 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | 545 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
@@ -609,6 +670,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
609 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | 670 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
610 | done | 671 | done |
611 | fi | 672 | fi |
673 | popdef([P_A_C_K]) | ||
674 | popdef([PACKLIBS]) | ||
675 | popdef([PACKUP]) | ||
676 | popdef([PACK]) | ||
677 | popdef([NAME]) | ||
612 | ]) | 678 | ]) |
613 | 679 | ||
614 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | 680 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
@@ -654,7 +720,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
654 | if test -n "$next"; then | 720 | if test -n "$next"; then |
655 | dir="$next" | 721 | dir="$next" |
656 | dnl No need to hardcode the standard /usr/lib. | 722 | dnl No need to hardcode the standard /usr/lib. |
657 | if test "X$dir" != "X/usr/$acl_libdirstem"; then | 723 | if test "X$dir" != "X/usr/$acl_libdirstem" \ |
724 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
658 | rpathdirs="$rpathdirs $dir" | 725 | rpathdirs="$rpathdirs $dir" |
659 | fi | 726 | fi |
660 | next= | 727 | next= |
@@ -663,7 +730,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
663 | -L) next=yes ;; | 730 | -L) next=yes ;; |
664 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` | 731 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
665 | dnl No need to hardcode the standard /usr/lib. | 732 | dnl No need to hardcode the standard /usr/lib. |
666 | if test "X$dir" != "X/usr/$acl_libdirstem"; then | 733 | if test "X$dir" != "X/usr/$acl_libdirstem" \ |
734 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
667 | rpathdirs="$rpathdirs $dir" | 735 | rpathdirs="$rpathdirs $dir" |
668 | fi | 736 | fi |
669 | next= ;; | 737 | next= ;; |
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index a8684e17..31f49e40 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lib-prefix.m4 serial 5 (gettext-0.15) | 1 | # lib-prefix.m4 serial 7 (gettext-0.18) |
2 | dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-2005, 2008-2014 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. |
@@ -153,33 +153,72 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | |||
153 | prefix="$acl_save_prefix" | 153 | prefix="$acl_save_prefix" |
154 | ]) | 154 | ]) |
155 | 155 | ||
156 | dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing | 156 | dnl AC_LIB_PREPARE_MULTILIB creates |
157 | dnl the basename of the libdir, either "lib" or "lib64". | 157 | dnl - a variable acl_libdirstem, containing the basename of the libdir, either |
158 | dnl "lib" or "lib64" or "lib/64", | ||
159 | dnl - a variable acl_libdirstem2, as a secondary possible value for | ||
160 | dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or | ||
161 | dnl "lib/amd64". | ||
158 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | 162 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
159 | [ | 163 | [ |
160 | dnl There is no formal standard regarding lib and lib64. The current | 164 | dnl There is no formal standard regarding lib and lib64. |
161 | dnl practice is that on a system supporting 32-bit and 64-bit instruction | 165 | dnl On glibc systems, the current practice is that on a system supporting |
162 | dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit | 166 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
163 | dnl libraries go under $prefix/lib. We determine the compiler's default | 167 | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine |
164 | dnl mode by looking at the compiler's library search path. If at least | 168 | dnl the compiler's default mode by looking at the compiler's library search |
165 | dnl of its elements ends in /lib64 or points to a directory whose absolute | 169 | dnl path. If at least one of its elements ends in /lib64 or points to a |
166 | dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the | 170 | dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. |
167 | dnl default, namely "lib". | 171 | dnl Otherwise we use the default, namely "lib". |
172 | dnl On Solaris systems, the current practice is that on a system supporting | ||
173 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under | ||
174 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or | ||
175 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. | ||
176 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
168 | acl_libdirstem=lib | 177 | acl_libdirstem=lib |
169 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | 178 | acl_libdirstem2= |
170 | if test -n "$searchpath"; then | 179 | case "$host_os" in |
171 | acl_save_IFS="${IFS= }"; IFS=":" | 180 | solaris*) |
172 | for searchdir in $searchpath; do | 181 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
173 | if test -d "$searchdir"; then | 182 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
174 | case "$searchdir" in | 183 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
175 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | 184 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
176 | *) searchdir=`cd "$searchdir" && pwd` | 185 | dnl symlink is missing, so we set acl_libdirstem2 too. |
177 | case "$searchdir" in | 186 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], |
178 | */lib64 ) acl_libdirstem=lib64 ;; | 187 | [AC_EGREP_CPP([sixtyfour bits], [ |
179 | esac ;; | 188 | #ifdef _LP64 |
189 | sixtyfour bits | ||
190 | #endif | ||
191 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | ||
192 | ]) | ||
193 | if test $gl_cv_solaris_64bit = yes; then | ||
194 | acl_libdirstem=lib/64 | ||
195 | case "$host_cpu" in | ||
196 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | ||
197 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | ||
180 | esac | 198 | esac |
181 | fi | 199 | fi |
182 | done | 200 | ;; |
183 | IFS="$acl_save_IFS" | 201 | *) |
184 | fi | 202 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
203 | if test -n "$searchpath"; then | ||
204 | acl_save_IFS="${IFS= }"; IFS=":" | ||
205 | for searchdir in $searchpath; do | ||
206 | if test -d "$searchdir"; then | ||
207 | case "$searchdir" in | ||
208 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | ||
209 | */../ | */.. ) | ||
210 | # Better ignore directories of this form. They are misleading. | ||
211 | ;; | ||
212 | *) searchdir=`cd "$searchdir" && pwd` | ||
213 | case "$searchdir" in | ||
214 | */lib64 ) acl_libdirstem=lib64 ;; | ||
215 | esac ;; | ||
216 | esac | ||
217 | fi | ||
218 | done | ||
219 | IFS="$acl_save_IFS" | ||
220 | fi | ||
221 | ;; | ||
222 | esac | ||
223 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | ||
185 | ]) | 224 | ]) |
@@ -1,5 +1,6 @@ | |||
1 | # nls.m4 serial 3 (gettext-0.15) | 1 | # nls.m4 serial 5 (gettext-0.18) |
2 | dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, |
3 | dnl Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
@@ -17,15 +18,15 @@ dnl Authors: | |||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 18 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | 19 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
19 | 20 | ||
20 | AC_PREREQ(2.50) | 21 | AC_PREREQ([2.50]) |
21 | 22 | ||
22 | AC_DEFUN([AM_NLS], | 23 | AC_DEFUN([AM_NLS], |
23 | [ | 24 | [ |
24 | AC_MSG_CHECKING([whether NLS is requested]) | 25 | AC_MSG_CHECKING([whether NLS is requested]) |
25 | dnl Default is enabled NLS | 26 | dnl Default is enabled NLS |
26 | AC_ARG_ENABLE(nls, | 27 | AC_ARG_ENABLE([nls], |
27 | [ --disable-nls do not use Native Language Support], | 28 | [ --disable-nls do not use Native Language Support], |
28 | USE_NLS=$enableval, USE_NLS=yes) | 29 | USE_NLS=$enableval, USE_NLS=yes) |
29 | AC_MSG_RESULT($USE_NLS) | 30 | AC_MSG_RESULT([$USE_NLS]) |
30 | AC_SUBST(USE_NLS) | 31 | AC_SUBST([USE_NLS]) |
31 | ]) | 32 | ]) |
@@ -1,5 +1,5 @@ | |||
1 | # po.m4 serial 15 (gettext-0.17) | 1 | # po.m4 serial 22 (gettext-0.19) |
2 | dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2014 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. |
@@ -17,19 +17,20 @@ dnl Authors: | |||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
19 | 19 | ||
20 | AC_PREREQ(2.50) | 20 | AC_PREREQ([2.60]) |
21 | 21 | ||
22 | dnl Checks for all prerequisites of the po subdirectory. | 22 | dnl Checks for all prerequisites of the po subdirectory. |
23 | AC_DEFUN([AM_PO_SUBDIRS], | 23 | AC_DEFUN([AM_PO_SUBDIRS], |
24 | [ | 24 | [ |
25 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | 25 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
26 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 26 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
27 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | 27 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
28 | AC_REQUIRE([AC_PROG_SED])dnl | ||
28 | AC_REQUIRE([AM_NLS])dnl | 29 | AC_REQUIRE([AM_NLS])dnl |
29 | 30 | ||
30 | dnl Release version of the gettext macros. This is used to ensure that | 31 | dnl Release version of the gettext macros. This is used to ensure that |
31 | dnl the gettext macros and po/Makefile.in.in are in sync. | 32 | dnl the gettext macros and po/Makefile.in.in are in sync. |
32 | AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) | 33 | AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) |
33 | 34 | ||
34 | dnl Perform the following tests also if --disable-nls has been given, | 35 | dnl Perform the following tests also if --disable-nls has been given, |
35 | dnl because they are needed for "make dist" to work. | 36 | dnl because they are needed for "make dist" to work. |
@@ -41,7 +42,7 @@ AC_DEFUN([AM_PO_SUBDIRS], | |||
41 | [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | 42 | [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && |
42 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | 43 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], |
43 | :) | 44 | :) |
44 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | 45 | AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) |
45 | 46 | ||
46 | dnl Test whether it is GNU msgfmt >= 0.15. | 47 | dnl Test whether it is GNU msgfmt >= 0.15. |
47 | changequote(,)dnl | 48 | changequote(,)dnl |
@@ -102,7 +103,7 @@ changequote([,])dnl | |||
102 | case "$ac_file" in */Makefile.in) | 103 | case "$ac_file" in */Makefile.in) |
103 | # Adjust a relative srcdir. | 104 | # Adjust a relative srcdir. |
104 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | 105 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
105 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | 106 | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` |
106 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | 107 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
107 | # In autoconf-2.13 it is called $ac_given_srcdir. | 108 | # In autoconf-2.13 it is called $ac_given_srcdir. |
108 | # In autoconf-2.50 it is called $srcdir. | 109 | # In autoconf-2.50 it is called $srcdir. |
@@ -118,7 +119,8 @@ changequote([,])dnl | |||
118 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | 119 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then |
119 | rm -f "$ac_dir/POTFILES" | 120 | rm -f "$ac_dir/POTFILES" |
120 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | 121 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" |
121 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | 122 | gt_tab=`printf '\t'` |
123 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | ||
122 | POMAKEFILEDEPS="POTFILES.in" | 124 | POMAKEFILEDEPS="POTFILES.in" |
123 | # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend | 125 | # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend |
124 | # on $ac_dir but don't depend on user-specified configuration | 126 | # on $ac_dir but don't depend on user-specified configuration |
@@ -129,12 +131,12 @@ changequote([,])dnl | |||
129 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | 131 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" |
130 | fi | 132 | fi |
131 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | 133 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` |
132 | # Hide the ALL_LINGUAS assigment from automake < 1.5. | 134 | # Hide the ALL_LINGUAS assignment from automake < 1.5. |
133 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | 135 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' |
134 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | 136 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
135 | else | 137 | else |
136 | # The set of available languages was given in configure.in. | 138 | # The set of available languages was given in configure.in. |
137 | # Hide the ALL_LINGUAS assigment from automake < 1.5. | 139 | # Hide the ALL_LINGUAS assignment from automake < 1.5. |
138 | eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' | 140 | eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' |
139 | fi | 141 | fi |
140 | # Compute POFILES | 142 | # Compute POFILES |
@@ -226,7 +228,7 @@ AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], | |||
226 | changequote(,)dnl | 228 | changequote(,)dnl |
227 | # Adjust a relative srcdir. | 229 | # Adjust a relative srcdir. |
228 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | 230 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
229 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | 231 | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` |
230 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | 232 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
231 | # In autoconf-2.13 it is called $ac_given_srcdir. | 233 | # In autoconf-2.13 it is called $ac_given_srcdir. |
232 | # In autoconf-2.50 it is called $srcdir. | 234 | # In autoconf-2.50 it is called $srcdir. |
@@ -254,6 +256,7 @@ EOT | |||
254 | fi | 256 | fi |
255 | 257 | ||
256 | # A sed script that extracts the value of VARIABLE from a Makefile. | 258 | # A sed script that extracts the value of VARIABLE from a Makefile. |
259 | tab=`printf '\t'` | ||
257 | sed_x_variable=' | 260 | sed_x_variable=' |
258 | # Test if the hold space is empty. | 261 | # Test if the hold space is empty. |
259 | x | 262 | x |
@@ -261,9 +264,9 @@ s/P/P/ | |||
261 | x | 264 | x |
262 | ta | 265 | ta |
263 | # Yes it was empty. Look if we have the expected variable definition. | 266 | # Yes it was empty. Look if we have the expected variable definition. |
264 | /^[ ]*VARIABLE[ ]*=/{ | 267 | /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ |
265 | # Seen the first line of the variable definition. | 268 | # Seen the first line of the variable definition. |
266 | s/^[ ]*VARIABLE[ ]*=// | 269 | s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// |
267 | ba | 270 | ba |
268 | } | 271 | } |
269 | bd | 272 | bd |
@@ -315,7 +318,7 @@ changequote([,])dnl | |||
315 | sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` | 318 | sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` |
316 | ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` | 319 | ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` |
317 | fi | 320 | fi |
318 | # Hide the ALL_LINGUAS assigment from automake < 1.5. | 321 | # Hide the ALL_LINGUAS assignment from automake < 1.5. |
319 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | 322 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' |
320 | # Compute POFILES | 323 | # Compute POFILES |
321 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) | 324 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) |
@@ -405,14 +408,15 @@ changequote([,])dnl | |||
405 | fi | 408 | fi |
406 | 409 | ||
407 | sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" | 410 | sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" |
411 | tab=`printf '\t'` | ||
408 | if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then | 412 | if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then |
409 | # Add dependencies that cannot be formulated as a simple suffix rule. | 413 | # Add dependencies that cannot be formulated as a simple suffix rule. |
410 | for lang in $ALL_LINGUAS; do | 414 | for lang in $ALL_LINGUAS; do |
411 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | 415 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
412 | cat >> "$ac_file.tmp" <<EOF | 416 | cat >> "$ac_file.tmp" <<EOF |
413 | $frobbedlang.msg: $lang.po | 417 | $frobbedlang.msg: $lang.po |
414 | @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ | 418 | ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ |
415 | \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | 419 | ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } |
416 | EOF | 420 | EOF |
417 | done | 421 | done |
418 | fi | 422 | fi |
@@ -422,8 +426,8 @@ EOF | |||
422 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | 426 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` |
423 | cat >> "$ac_file.tmp" <<EOF | 427 | cat >> "$ac_file.tmp" <<EOF |
424 | $frobbedlang/\$(DOMAIN).resources.dll: $lang.po | 428 | $frobbedlang/\$(DOMAIN).resources.dll: $lang.po |
425 | @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ | 429 | ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ |
426 | \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | 430 | ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } |
427 | EOF | 431 | EOF |
428 | done | 432 | done |
429 | fi | 433 | fi |
diff --git a/m4/progtest.m4 b/m4/progtest.m4 index a56365cd..b499f79c 100644 --- a/m4/progtest.m4 +++ b/m4/progtest.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # progtest.m4 serial 4 (gettext-0.14.2) | 1 | # progtest.m4 serial 7 (gettext-0.18.2) |
2 | dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1996-2003, 2005, 2008-2014 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. |
@@ -16,7 +16,7 @@ dnl They are *not* in the public domain. | |||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. |
18 | 18 | ||
19 | AC_PREREQ(2.50) | 19 | AC_PREREQ([2.50]) |
20 | 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 | ||
@@ -27,15 +27,14 @@ AC_DEFUN([AM_PATH_PROG_WITH_TEST], | |||
27 | # Prepare PATH_SEPARATOR. | 27 | # Prepare PATH_SEPARATOR. |
28 | # The user is always right. | 28 | # The user is always right. |
29 | if test "${PATH_SEPARATOR+set}" != set; then | 29 | if test "${PATH_SEPARATOR+set}" != set; then |
30 | echo "#! /bin/sh" >conf$$.sh | 30 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which |
31 | echo "exit 0" >>conf$$.sh | 31 | # contains only /bin. Note that ksh looks also at the FPATH variable, |
32 | chmod +x conf$$.sh | 32 | # so we have to set that as well for the test. |
33 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | 33 | PATH_SEPARATOR=: |
34 | PATH_SEPARATOR=';' | 34 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ |
35 | else | 35 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ |
36 | PATH_SEPARATOR=: | 36 | || PATH_SEPARATOR=';' |
37 | fi | 37 | } |
38 | rm -f conf$$.sh | ||
39 | fi | 38 | fi |
40 | 39 | ||
41 | # Find out how to test for executable files. Don't use a zero-byte file, | 40 | # Find out how to test for executable files. Don't use a zero-byte file, |
@@ -55,7 +54,7 @@ rm -f conf$$.file | |||
55 | # Extract the first word of "$2", so it can be a program name with args. | 54 | # Extract the first word of "$2", so it can be a program name with args. |
56 | set dummy $2; ac_word=[$]2 | 55 | set dummy $2; ac_word=[$]2 |
57 | AC_MSG_CHECKING([for $ac_word]) | 56 | AC_MSG_CHECKING([for $ac_word]) |
58 | AC_CACHE_VAL(ac_cv_path_$1, | 57 | AC_CACHE_VAL([ac_cv_path_$1], |
59 | [case "[$]$1" in | 58 | [case "[$]$1" in |
60 | [[\\/]]* | ?:[[\\/]]*) | 59 | [[\\/]]* | ?:[[\\/]]*) |
61 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | 60 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
@@ -84,9 +83,9 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | |||
84 | esac])dnl | 83 | esac])dnl |
85 | $1="$ac_cv_path_$1" | 84 | $1="$ac_cv_path_$1" |
86 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | 85 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
87 | AC_MSG_RESULT([$]$1) | 86 | AC_MSG_RESULT([$][$1]) |
88 | else | 87 | else |
89 | AC_MSG_RESULT(no) | 88 | AC_MSG_RESULT([no]) |
90 | fi | 89 | fi |
91 | AC_SUBST($1)dnl | 90 | AC_SUBST([$1])dnl |
92 | ]) | 91 | ]) |