aboutsummaryrefslogtreecommitdiff
path: root/m4/gettext.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/gettext.m4')
-rw-r--r--m4/gettext.m472
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)
2dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6dnl 6dnl
7dnl This file can be used in projects which are not available under 7dnl This file can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public 8dnl the GNU General Public License or the GNU Lesser General Public
9dnl License but which still want to provide support for the GNU gettext 9dnl License but which still want to provide support for the GNU gettext
10dnl functionality. 10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered 11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU 12dnl by the GNU Lesser General Public License, and the rest of the GNU
13dnl gettext package is covered by the GNU General Public License. 13dnl gettext package is covered by the GNU General Public License.
14dnl They are *not* in the public domain. 14dnl They are *not* in the public domain.
15 15
@@ -20,15 +20,13 @@ dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
20dnl Macro to add for using GNU gettext. 20dnl Macro to add for using GNU gettext.
21 21
22dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 22dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
23dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 23dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
24dnl default (if it is not specified or empty) is 'no-libtool'. 24dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
25dnl INTLSYMBOL should be 'external' for packages with no intl directory, 25dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
26dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
27dnl If INTLSYMBOL is 'use-libtool', then a libtool library 26dnl If INTLSYMBOL is 'use-libtool', then a libtool library
28dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 27dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
29dnl depending on --{enable,disable}-{shared,static} and on the presence of 28dnl depending on --{enable,disable}-{shared,static} and on the presence of
30dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 29dnl AM-DISABLE-SHARED).
31dnl $(top_builddir)/intl/libintl.a will be created.
32dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 30dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
33dnl implementations (in libc or libintl) without the ngettext() function 31dnl implementations (in libc or libintl) without the ngettext() function
34dnl will be ignored. If NEEDSYMBOL is specified and is 32dnl will be ignored. If NEEDSYMBOL is specified and is
@@ -57,19 +55,17 @@ dnl
57AC_DEFUN([AM_GNU_GETTEXT], 55AC_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.