diff options
Diffstat (limited to 'm4/gettext.m4')
-rw-r--r-- | m4/gettext.m4 | 72 |
1 files changed, 19 insertions, 53 deletions
diff --git a/m4/gettext.m4 b/m4/gettext.m4 index eef5073..4f25a27 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 | |||
@@ -1,15 +1,15 @@ | |||
1 | # gettext.m4 serial 68 (gettext-0.19.8) | 1 | # gettext.m4 serial 71 (gettext-0.20.2) |
2 | dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2014, 2016, 2018-2020 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 | dnl | 6 | dnl |
7 | dnl This file can be used in projects which are not available under | 7 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Lesser General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 9 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 10 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 11 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 12 | dnl by the GNU Lesser General Public License, and the rest of the GNU |
13 | dnl gettext package is covered by the GNU General Public License. | 13 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 14 | dnl They are *not* in the public domain. |
15 | 15 | ||
@@ -20,15 +20,13 @@ dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. | |||
20 | dnl Macro to add for using GNU gettext. | 20 | dnl Macro to add for using GNU gettext. |
21 | 21 | ||
22 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). | 22 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). |
23 | dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The | 23 | dnl INTLSYMBOL must be one of 'external', 'use-libtool'. |
24 | dnl default (if it is not specified or empty) is 'no-libtool'. | 24 | dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and |
25 | dnl INTLSYMBOL should be 'external' for packages with no intl directory, | 25 | dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'. |
26 | dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. | ||
27 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library | 26 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library |
28 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, | 27 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, |
29 | dnl depending on --{enable,disable}-{shared,static} and on the presence of | 28 | dnl depending on --{enable,disable}-{shared,static} and on the presence of |
30 | dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library | 29 | dnl AM-DISABLE-SHARED). |
31 | dnl $(top_builddir)/intl/libintl.a will be created. | ||
32 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext | 30 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext |
33 | dnl implementations (in libc or libintl) without the ngettext() function | 31 | dnl implementations (in libc or libintl) without the ngettext() function |
34 | dnl will be ignored. If NEEDSYMBOL is specified and is | 32 | dnl will be ignored. If NEEDSYMBOL is specified and is |
@@ -57,19 +55,17 @@ dnl | |||
57 | AC_DEFUN([AM_GNU_GETTEXT], | 55 | AC_DEFUN([AM_GNU_GETTEXT], |
58 | [ | 56 | [ |
59 | dnl Argument checking. | 57 | dnl Argument checking. |
60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | 58 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], , |
61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | 59 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT |
62 | ])])])])]) | 60 | ])])])]) |
63 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], | 61 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], |
64 | [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) | 62 | [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. |
63 | ])]) | ||
65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | 64 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | 65 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
67 | ])])])]) | 66 | ])])])]) |
68 | define([gt_included_intl], | 67 | define([gt_included_intl], |
69 | ifelse([$1], [external], | 68 | ifelse([$1], [external], [no], [yes])) |
70 | ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), | ||
71 | [yes])) | ||
72 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) | ||
73 | gt_NEEDS_INIT | 69 | gt_NEEDS_INIT |
74 | AM_GNU_GETTEXT_NEED([$2]) | 70 | AM_GNU_GETTEXT_NEED([$2]) |
75 | 71 | ||
@@ -91,8 +87,7 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
91 | dnl again, outside any 'if'. There are two solutions: | 87 | dnl again, outside any 'if'. There are two solutions: |
92 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. | 88 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. |
93 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. | 89 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. |
94 | dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not | 90 | dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. |
95 | dnl documented, we avoid it. | ||
96 | ifelse(gt_included_intl, yes, , [ | 91 | ifelse(gt_included_intl, yes, , [ |
97 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | 92 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
98 | ]) | 93 | ]) |
@@ -278,8 +273,8 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | |||
278 | dnl Mark actions used to generate GNU NLS library. | 273 | dnl Mark actions used to generate GNU NLS library. |
279 | BUILD_INCLUDED_LIBINTL=yes | 274 | BUILD_INCLUDED_LIBINTL=yes |
280 | USE_INCLUDED_LIBINTL=yes | 275 | USE_INCLUDED_LIBINTL=yes |
281 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" | 276 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" |
282 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" | 277 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" |
283 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | 278 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
284 | fi | 279 | fi |
285 | 280 | ||
@@ -347,43 +342,14 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | |||
347 | fi | 342 | fi |
348 | 343 | ||
349 | ifelse(gt_included_intl, yes, [ | 344 | ifelse(gt_included_intl, yes, [ |
350 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL | 345 | dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes' |
351 | dnl to 'yes' because some of the testsuite requires it. | 346 | dnl because some of the testsuite requires it. |
352 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then | 347 | BUILD_INCLUDED_LIBINTL=yes |
353 | BUILD_INCLUDED_LIBINTL=yes | ||
354 | fi | ||
355 | 348 | ||
356 | dnl Make all variables we use known to autoconf. | 349 | dnl Make all variables we use known to autoconf. |
357 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) | 350 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) |
358 | AC_SUBST([USE_INCLUDED_LIBINTL]) | 351 | AC_SUBST([USE_INCLUDED_LIBINTL]) |
359 | AC_SUBST([CATOBJEXT]) | 352 | AC_SUBST([CATOBJEXT]) |
360 | |||
361 | dnl For backward compatibility. Some configure.ins may be using this. | ||
362 | nls_cv_header_intl= | ||
363 | nls_cv_header_libgt= | ||
364 | |||
365 | dnl For backward compatibility. Some Makefiles may be using this. | ||
366 | DATADIRNAME=share | ||
367 | AC_SUBST([DATADIRNAME]) | ||
368 | |||
369 | dnl For backward compatibility. Some Makefiles may be using this. | ||
370 | INSTOBJEXT=.mo | ||
371 | AC_SUBST([INSTOBJEXT]) | ||
372 | |||
373 | dnl For backward compatibility. Some Makefiles may be using this. | ||
374 | GENCAT=gencat | ||
375 | AC_SUBST([GENCAT]) | ||
376 | |||
377 | dnl For backward compatibility. Some Makefiles may be using this. | ||
378 | INTLOBJS= | ||
379 | if test "$USE_INCLUDED_LIBINTL" = yes; then | ||
380 | INTLOBJS="\$(GETTOBJS)" | ||
381 | fi | ||
382 | AC_SUBST([INTLOBJS]) | ||
383 | |||
384 | dnl Enable libtool support if the surrounding package wishes it. | ||
385 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | ||
386 | AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) | ||
387 | ]) | 353 | ]) |
388 | 354 | ||
389 | dnl For backward compatibility. Some Makefiles may be using this. | 355 | dnl For backward compatibility. Some Makefiles may be using this. |