1
- # gettext.m4 serial 68 (gettext-0.19.8 )
2
- dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
1
+ # gettext.m4 serial 71 (gettext-0.20.2 )
2
+ dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
6
6
dnl
7
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
9
dnl License but which still want to provide support for the GNU gettext
10
10
dnl functionality.
11
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
13
dnl gettext package is covered by the GNU General Public License.
14
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
20
dnl Macro to add for using GNU gettext.
21
21
22
22
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
23
- dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
24
- dnl default (if it is not specified or empty) is 'no-libtool'.
25
- dnl INTLSYMBOL should be 'external' for packages with no intl directory,
26
- dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
23
+ dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
24
+ dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
25
+ dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
27
26
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
28
27
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
29
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
31
- dnl $(top_builddir)/intl/libintl.a will be created.
29
+ dnl AM-DISABLE-SHARED).
32
30
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
33
31
dnl implementations (in libc or libintl) without the ngettext() function
34
32
dnl will be ignored. If NEEDSYMBOL is specified and is
57
55
AC_DEFUN ( [ AM_GNU_GETTEXT] ,
58
56
[
59
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
59
[ errprint ( [ ERROR: invalid first argument to AM_GNU_GETTEXT
62
- ] ) ] ) ] ) ] ) ] )
60
+ ] ) ] ) ] ) ] )
63
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
64
ifelse ( [ $2 ] , [ ] , , [ ifelse ( [ $2 ] , [ need-ngettext] , , [ ifelse ( [ $2 ] , [ need-formatstring-macros] , ,
66
65
[ errprint ( [ ERROR: invalid second argument to AM_GNU_GETTEXT
67
66
] ) ] ) ] ) ] )
68
67
define ( [ gt_included_intl] ,
69
- ifelse ( [ $1 ] , [ external] ,
70
- ifdef ( [ AM_GNU_GETTEXT_] [ INTL_SUBDIR] , [ yes] , [ no] ) ,
71
- [ yes] ) )
72
- define ( [ gt_libtool_suffix_prefix] , ifelse ( [ $1 ] , [ use-libtool] , [ l] , [ ] ) )
68
+ ifelse ( [ $1 ] , [ external] , [ no] , [ yes] ) )
73
69
gt_NEEDS_INIT
74
70
AM_GNU_GETTEXT_NEED([ $2 ] )
75
71
@@ -91,8 +87,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
91
87
dnl again, outside any 'if'. There are two solutions:
92
88
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
93
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
95
- dnl documented, we avoid it.
90
+ dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
96
91
ifelse ( gt_included_intl , yes , , [
97
92
AC_REQUIRE ( [ AM_ICONV_LINKFLAGS_BODY] )
98
93
] )
@@ -192,7 +187,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
192
187
[ gt_save_CPPFLAGS="$CPPFLAGS"
193
188
CPPFLAGS="$CPPFLAGS $INCINTL"
194
189
gt_save_LIBS="$LIBS"
195
- LIBS="$LIBS $LIBINTL $INTL_MACOSX_LIBS "
190
+ LIBS="$LIBS $LIBINTL"
196
191
dnl Now see whether libintl exists and does not depend on libiconv.
197
192
AC_LINK_IFELSE (
198
193
[ AC_LANG_PROGRAM (
@@ -278,8 +273,8 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
278
273
dnl Mark actions used to generate GNU NLS library.
279
274
BUILD_INCLUDED_LIBINTL=yes
280
275
USE_INCLUDED_LIBINTL=yes
281
- LIBINTL="ifelse ( [ $3 ] ,[ ] ,\${top_builddir}/intl ,[ $3 ] ) /libintl.[ ] gt_libtool_suffix_prefix [ ] a $LIBICONV $LIBTHREAD"
282
- LTLIBINTL="ifelse ( [ $3 ] ,[ ] ,\${top_builddir}/intl ,[ $3 ] ) /libintl.[ ] gt_libtool_suffix_prefix [ ] a $LTLIBICONV $LTLIBTHREAD"
276
+ LIBINTL="ifelse ( [ $3 ] ,[ ] ,\${top_builddir}/intl ,[ $3 ] ) /libintl.la $LIBICONV $LIBTHREAD"
277
+ LTLIBINTL="ifelse ( [ $3 ] ,[ ] ,\${top_builddir}/intl ,[ $3 ] ) /libintl.la $LTLIBICONV $LTLIBTHREAD"
283
278
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
284
279
fi
285
280
@@ -347,43 +342,14 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
347
342
fi
348
343
349
344
ifelse ( gt_included_intl , yes , [
350
- dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
351
- dnl to 'yes' because some of the testsuite requires it.
352
- if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
353
- BUILD_INCLUDED_LIBINTL=yes
354
- fi
345
+ dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
346
+ dnl because some of the testsuite requires it.
347
+ BUILD_INCLUDED_LIBINTL=yes
355
348
356
349
dnl Make all variables we use known to autoconf.
357
350
AC_SUBST ( [ BUILD_INCLUDED_LIBINTL] )
358
351
AC_SUBST ( [ USE_INCLUDED_LIBINTL] )
359
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
355
dnl For backward compatibility. Some Makefiles may be using this.
0 commit comments