1a32e9e42Smrg# gettext.m4 serial 68 (gettext-0.19.8) 2a32e9e42Smrgdnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. 3a32e9e42Smrgdnl This file is free software; the Free Software Foundation 4a32e9e42Smrgdnl gives unlimited permission to copy and/or distribute it, 5a32e9e42Smrgdnl with or without modifications, as long as this notice is preserved. 6a32e9e42Smrgdnl 7a32e9e42Smrgdnl This file can be used in projects which are not available under 8a32e9e42Smrgdnl the GNU General Public License or the GNU Library General Public 9a32e9e42Smrgdnl License but which still want to provide support for the GNU gettext 10a32e9e42Smrgdnl functionality. 11a32e9e42Smrgdnl Please note that the actual code of the GNU gettext library is covered 12a32e9e42Smrgdnl by the GNU Library General Public License, and the rest of the GNU 13a32e9e42Smrgdnl gettext package is covered by the GNU General Public License. 14a32e9e42Smrgdnl They are *not* in the public domain. 15a32e9e42Smrg 16a32e9e42Smrgdnl Authors: 17a32e9e42Smrgdnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 18a32e9e42Smrgdnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. 19a32e9e42Smrg 20a32e9e42Smrgdnl Macro to add for using GNU gettext. 21a32e9e42Smrg 22a32e9e42Smrgdnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 23a32e9e42Smrgdnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 24a32e9e42Smrgdnl default (if it is not specified or empty) is 'no-libtool'. 25a32e9e42Smrgdnl INTLSYMBOL should be 'external' for packages with no intl directory, 26a32e9e42Smrgdnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. 27a32e9e42Smrgdnl If INTLSYMBOL is 'use-libtool', then a libtool library 28a32e9e42Smrgdnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 29a32e9e42Smrgdnl depending on --{enable,disable}-{shared,static} and on the presence of 30a32e9e42Smrgdnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 31a32e9e42Smrgdnl $(top_builddir)/intl/libintl.a will be created. 32a32e9e42Smrgdnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 33a32e9e42Smrgdnl implementations (in libc or libintl) without the ngettext() function 34a32e9e42Smrgdnl will be ignored. If NEEDSYMBOL is specified and is 35a32e9e42Smrgdnl 'need-formatstring-macros', then GNU gettext implementations that don't 36a32e9e42Smrgdnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 37a32e9e42Smrgdnl INTLDIR is used to find the intl libraries. If empty, 38a32e9e42Smrgdnl the value '$(top_builddir)/intl/' is used. 39a32e9e42Smrgdnl 40a32e9e42Smrgdnl The result of the configuration is one of three cases: 41a32e9e42Smrgdnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 42a32e9e42Smrgdnl and used. 43a32e9e42Smrgdnl Catalog format: GNU --> install in $(datadir) 44a32e9e42Smrgdnl Catalog extension: .mo after installation, .gmo in source tree 45a32e9e42Smrgdnl 2) GNU gettext has been found in the system's C library. 46a32e9e42Smrgdnl Catalog format: GNU --> install in $(datadir) 47a32e9e42Smrgdnl Catalog extension: .mo after installation, .gmo in source tree 48a32e9e42Smrgdnl 3) No internationalization, always use English msgid. 49a32e9e42Smrgdnl Catalog format: none 50a32e9e42Smrgdnl Catalog extension: none 51a32e9e42Smrgdnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. 52a32e9e42Smrgdnl The use of .gmo is historical (it was needed to avoid overwriting the 53a32e9e42Smrgdnl GNU format catalogs when building on a platform with an X/Open gettext), 54a32e9e42Smrgdnl but we keep it in order not to force irrelevant filename changes on the 55a32e9e42Smrgdnl maintainers. 56a32e9e42Smrgdnl 57a32e9e42SmrgAC_DEFUN([AM_GNU_GETTEXT], 58a32e9e42Smrg[ 59a32e9e42Smrg dnl Argument checking. 60a32e9e42Smrg ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 61a32e9e42Smrg [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 62a32e9e42Smrg])])])])]) 63a32e9e42Smrg ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], 64a32e9e42Smrg [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) 65a32e9e42Smrg ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 66a32e9e42Smrg [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 67a32e9e42Smrg])])])]) 68a32e9e42Smrg define([gt_included_intl], 69a32e9e42Smrg ifelse([$1], [external], 70a32e9e42Smrg ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), 71a32e9e42Smrg [yes])) 72a32e9e42Smrg define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) 73a32e9e42Smrg gt_NEEDS_INIT 74a32e9e42Smrg AM_GNU_GETTEXT_NEED([$2]) 75a32e9e42Smrg 76a32e9e42Smrg AC_REQUIRE([AM_PO_SUBDIRS])dnl 77a32e9e42Smrg ifelse(gt_included_intl, yes, [ 78a32e9e42Smrg AC_REQUIRE([AM_INTL_SUBDIR])dnl 79a32e9e42Smrg ]) 80a32e9e42Smrg 81a32e9e42Smrg dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 82a32e9e42Smrg AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 83a32e9e42Smrg AC_REQUIRE([AC_LIB_RPATH]) 84a32e9e42Smrg 85a32e9e42Smrg dnl Sometimes libintl requires libiconv, so first search for libiconv. 86a32e9e42Smrg dnl Ideally we would do this search only after the 87a32e9e42Smrg dnl if test "$USE_NLS" = "yes"; then 88a32e9e42Smrg dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 89a32e9e42Smrg dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT 90a32e9e42Smrg dnl the configure script would need to contain the same shell code 91a32e9e42Smrg dnl again, outside any 'if'. There are two solutions: 92a32e9e42Smrg dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 93a32e9e42Smrg dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 94a32e9e42Smrg dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 95a32e9e42Smrg dnl documented, we avoid it. 96a32e9e42Smrg ifelse(gt_included_intl, yes, , [ 97a32e9e42Smrg AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 98a32e9e42Smrg ]) 99a32e9e42Smrg 100a32e9e42Smrg dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. 101a32e9e42Smrg gt_INTL_MACOSX 102a32e9e42Smrg 103a32e9e42Smrg dnl Set USE_NLS. 104a32e9e42Smrg AC_REQUIRE([AM_NLS]) 105a32e9e42Smrg 106a32e9e42Smrg ifelse(gt_included_intl, yes, [ 107a32e9e42Smrg BUILD_INCLUDED_LIBINTL=no 108a32e9e42Smrg USE_INCLUDED_LIBINTL=no 109a32e9e42Smrg ]) 110a32e9e42Smrg LIBINTL= 111a32e9e42Smrg LTLIBINTL= 112a32e9e42Smrg POSUB= 113a32e9e42Smrg 114a32e9e42Smrg dnl Add a version number to the cache macros. 115a32e9e42Smrg case " $gt_needs " in 116a32e9e42Smrg *" need-formatstring-macros "*) gt_api_version=3 ;; 117a32e9e42Smrg *" need-ngettext "*) gt_api_version=2 ;; 118a32e9e42Smrg *) gt_api_version=1 ;; 119a32e9e42Smrg esac 120a32e9e42Smrg gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" 121a32e9e42Smrg gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" 122a32e9e42Smrg 123a32e9e42Smrg dnl If we use NLS figure out what method 124a32e9e42Smrg if test "$USE_NLS" = "yes"; then 125a32e9e42Smrg gt_use_preinstalled_gnugettext=no 126a32e9e42Smrg ifelse(gt_included_intl, yes, [ 127a32e9e42Smrg AC_MSG_CHECKING([whether included gettext is requested]) 128a32e9e42Smrg AC_ARG_WITH([included-gettext], 129a32e9e42Smrg [ --with-included-gettext use the GNU gettext library included here], 130a32e9e42Smrg nls_cv_force_use_gnu_gettext=$withval, 131a32e9e42Smrg nls_cv_force_use_gnu_gettext=no) 132a32e9e42Smrg AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) 133a32e9e42Smrg 134a32e9e42Smrg nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 135a32e9e42Smrg if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 136a32e9e42Smrg ]) 137a32e9e42Smrg dnl User does not insist on using GNU NLS library. Figure out what 138a32e9e42Smrg dnl to use. If GNU gettext is available we use this. Else we have 139a32e9e42Smrg dnl to fall back to GNU NLS library. 140a32e9e42Smrg 141a32e9e42Smrg if test $gt_api_version -ge 3; then 142a32e9e42Smrg gt_revision_test_code=' 143a32e9e42Smrg#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 144a32e9e42Smrg#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 145a32e9e42Smrg#endif 146a32e9e42Smrgchangequote(,)dnl 147a32e9e42Smrgtypedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 148a32e9e42Smrgchangequote([,])dnl 149a32e9e42Smrg' 150a32e9e42Smrg else 151a32e9e42Smrg gt_revision_test_code= 152a32e9e42Smrg fi 153a32e9e42Smrg if test $gt_api_version -ge 2; then 154a32e9e42Smrg gt_expression_test_code=' + * ngettext ("", "", 0)' 155a32e9e42Smrg else 156a32e9e42Smrg gt_expression_test_code= 157a32e9e42Smrg fi 158a32e9e42Smrg 159a32e9e42Smrg AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], 160a32e9e42Smrg [AC_LINK_IFELSE( 161a32e9e42Smrg [AC_LANG_PROGRAM( 162a32e9e42Smrg [[ 163a32e9e42Smrg#include <libintl.h> 164a32e9e42Smrg#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 165a32e9e42Smrgextern int _nl_msg_cat_cntr; 166a32e9e42Smrgextern int *_nl_domain_bindings; 167a32e9e42Smrg#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) 168a32e9e42Smrg#else 169a32e9e42Smrg#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 170a32e9e42Smrg#endif 171a32e9e42Smrg$gt_revision_test_code 172a32e9e42Smrg ]], 173a32e9e42Smrg [[ 174a32e9e42Smrgbindtextdomain ("", ""); 175a32e9e42Smrgreturn * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION 176a32e9e42Smrg ]])], 177a32e9e42Smrg [eval "$gt_func_gnugettext_libc=yes"], 178a32e9e42Smrg [eval "$gt_func_gnugettext_libc=no"])]) 179a32e9e42Smrg 180a32e9e42Smrg if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 181a32e9e42Smrg dnl Sometimes libintl requires libiconv, so first search for libiconv. 182a32e9e42Smrg ifelse(gt_included_intl, yes, , [ 183a32e9e42Smrg AM_ICONV_LINK 184a32e9e42Smrg ]) 185a32e9e42Smrg dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL 186a32e9e42Smrg dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) 187a32e9e42Smrg dnl because that would add "-liconv" to LIBINTL and LTLIBINTL 188a32e9e42Smrg dnl even if libiconv doesn't exist. 189a32e9e42Smrg AC_LIB_LINKFLAGS_BODY([intl]) 190a32e9e42Smrg AC_CACHE_CHECK([for GNU gettext in libintl], 191a32e9e42Smrg [$gt_func_gnugettext_libintl], 192a32e9e42Smrg [gt_save_CPPFLAGS="$CPPFLAGS" 193a32e9e42Smrg CPPFLAGS="$CPPFLAGS $INCINTL" 194a32e9e42Smrg gt_save_LIBS="$LIBS" 195a32e9e42Smrg LIBS="$LIBS $LIBINTL" 196a32e9e42Smrg dnl Now see whether libintl exists and does not depend on libiconv. 197a32e9e42Smrg AC_LINK_IFELSE( 198a32e9e42Smrg [AC_LANG_PROGRAM( 199a32e9e42Smrg [[ 200a32e9e42Smrg#include <libintl.h> 201a32e9e42Smrg#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 202a32e9e42Smrgextern int _nl_msg_cat_cntr; 203a32e9e42Smrgextern 204a32e9e42Smrg#ifdef __cplusplus 205a32e9e42Smrg"C" 206a32e9e42Smrg#endif 207a32e9e42Smrgconst char *_nl_expand_alias (const char *); 208a32e9e42Smrg#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) 209a32e9e42Smrg#else 210a32e9e42Smrg#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 211a32e9e42Smrg#endif 212a32e9e42Smrg$gt_revision_test_code 213a32e9e42Smrg ]], 214a32e9e42Smrg [[ 215a32e9e42Smrgbindtextdomain ("", ""); 216a32e9e42Smrgreturn * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION 217a32e9e42Smrg ]])], 218a32e9e42Smrg [eval "$gt_func_gnugettext_libintl=yes"], 219a32e9e42Smrg [eval "$gt_func_gnugettext_libintl=no"]) 220a32e9e42Smrg dnl Now see whether libintl exists and depends on libiconv. 221a32e9e42Smrg if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then 222a32e9e42Smrg LIBS="$LIBS $LIBICONV" 223a32e9e42Smrg AC_LINK_IFELSE( 224a32e9e42Smrg [AC_LANG_PROGRAM( 225a32e9e42Smrg [[ 226a32e9e42Smrg#include <libintl.h> 227a32e9e42Smrg#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 228a32e9e42Smrgextern int _nl_msg_cat_cntr; 229a32e9e42Smrgextern 230a32e9e42Smrg#ifdef __cplusplus 231a32e9e42Smrg"C" 232a32e9e42Smrg#endif 233a32e9e42Smrgconst char *_nl_expand_alias (const char *); 234a32e9e42Smrg#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) 235a32e9e42Smrg#else 236a32e9e42Smrg#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 237a32e9e42Smrg#endif 238a32e9e42Smrg$gt_revision_test_code 239a32e9e42Smrg ]], 240a32e9e42Smrg [[ 241a32e9e42Smrgbindtextdomain ("", ""); 242a32e9e42Smrgreturn * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION 243a32e9e42Smrg ]])], 244a32e9e42Smrg [LIBINTL="$LIBINTL $LIBICONV" 245a32e9e42Smrg LTLIBINTL="$LTLIBINTL $LTLIBICONV" 246a32e9e42Smrg eval "$gt_func_gnugettext_libintl=yes" 247a32e9e42Smrg ]) 248a32e9e42Smrg fi 249a32e9e42Smrg CPPFLAGS="$gt_save_CPPFLAGS" 250a32e9e42Smrg LIBS="$gt_save_LIBS"]) 251a32e9e42Smrg fi 252a32e9e42Smrg 253a32e9e42Smrg dnl If an already present or preinstalled GNU gettext() is found, 254a32e9e42Smrg dnl use it. But if this macro is used in GNU gettext, and GNU 255a32e9e42Smrg dnl gettext is already preinstalled in libintl, we update this 256a32e9e42Smrg dnl libintl. (Cf. the install rule in intl/Makefile.in.) 257a32e9e42Smrg if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ 258a32e9e42Smrg || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ 259a32e9e42Smrg && test "$PACKAGE" != gettext-runtime \ 260a32e9e42Smrg && test "$PACKAGE" != gettext-tools; }; then 261a32e9e42Smrg gt_use_preinstalled_gnugettext=yes 262a32e9e42Smrg else 263a32e9e42Smrg dnl Reset the values set by searching for libintl. 264a32e9e42Smrg LIBINTL= 265a32e9e42Smrg LTLIBINTL= 266a32e9e42Smrg INCINTL= 267a32e9e42Smrg fi 268a32e9e42Smrg 269a32e9e42Smrg ifelse(gt_included_intl, yes, [ 270a32e9e42Smrg if test "$gt_use_preinstalled_gnugettext" != "yes"; then 271a32e9e42Smrg dnl GNU gettext is not found in the C library. 272a32e9e42Smrg dnl Fall back on included GNU gettext library. 273a32e9e42Smrg nls_cv_use_gnu_gettext=yes 274a32e9e42Smrg fi 275a32e9e42Smrg fi 276a32e9e42Smrg 277a32e9e42Smrg if test "$nls_cv_use_gnu_gettext" = "yes"; then 278a32e9e42Smrg dnl Mark actions used to generate GNU NLS library. 279a32e9e42Smrg BUILD_INCLUDED_LIBINTL=yes 280a32e9e42Smrg USE_INCLUDED_LIBINTL=yes 281a32e9e42Smrg LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" 282a32e9e42Smrg LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" 283a32e9e42Smrg LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 284a32e9e42Smrg fi 285a32e9e42Smrg 286a32e9e42Smrg CATOBJEXT= 287a32e9e42Smrg if test "$gt_use_preinstalled_gnugettext" = "yes" \ 288a32e9e42Smrg || test "$nls_cv_use_gnu_gettext" = "yes"; then 289a32e9e42Smrg dnl Mark actions to use GNU gettext tools. 290a32e9e42Smrg CATOBJEXT=.gmo 291a32e9e42Smrg fi 292a32e9e42Smrg ]) 293a32e9e42Smrg 294a32e9e42Smrg if test -n "$INTL_MACOSX_LIBS"; then 295a32e9e42Smrg if test "$gt_use_preinstalled_gnugettext" = "yes" \ 296a32e9e42Smrg || test "$nls_cv_use_gnu_gettext" = "yes"; then 297a32e9e42Smrg dnl Some extra flags are needed during linking. 298a32e9e42Smrg LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" 299a32e9e42Smrg LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" 300a32e9e42Smrg fi 301a32e9e42Smrg fi 302a32e9e42Smrg 303a32e9e42Smrg if test "$gt_use_preinstalled_gnugettext" = "yes" \ 304a32e9e42Smrg || test "$nls_cv_use_gnu_gettext" = "yes"; then 305a32e9e42Smrg AC_DEFINE([ENABLE_NLS], [1], 306a32e9e42Smrg [Define to 1 if translation of program messages to the user's native language 307a32e9e42Smrg is requested.]) 308a32e9e42Smrg else 309a32e9e42Smrg USE_NLS=no 310a32e9e42Smrg fi 311a32e9e42Smrg fi 312a32e9e42Smrg 313a32e9e42Smrg AC_MSG_CHECKING([whether to use NLS]) 314a32e9e42Smrg AC_MSG_RESULT([$USE_NLS]) 315a32e9e42Smrg if test "$USE_NLS" = "yes"; then 316a32e9e42Smrg AC_MSG_CHECKING([where the gettext function comes from]) 317a32e9e42Smrg if test "$gt_use_preinstalled_gnugettext" = "yes"; then 318a32e9e42Smrg if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 319a32e9e42Smrg gt_source="external libintl" 320a32e9e42Smrg else 321a32e9e42Smrg gt_source="libc" 322a32e9e42Smrg fi 323a32e9e42Smrg else 324a32e9e42Smrg gt_source="included intl directory" 325a32e9e42Smrg fi 326a32e9e42Smrg AC_MSG_RESULT([$gt_source]) 327a32e9e42Smrg fi 328a32e9e42Smrg 329a32e9e42Smrg if test "$USE_NLS" = "yes"; then 330a32e9e42Smrg 331a32e9e42Smrg if test "$gt_use_preinstalled_gnugettext" = "yes"; then 332a32e9e42Smrg if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 333a32e9e42Smrg AC_MSG_CHECKING([how to link with libintl]) 334a32e9e42Smrg AC_MSG_RESULT([$LIBINTL]) 335a32e9e42Smrg AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) 336a32e9e42Smrg fi 337a32e9e42Smrg 338a32e9e42Smrg dnl For backward compatibility. Some packages may be using this. 339a32e9e42Smrg AC_DEFINE([HAVE_GETTEXT], [1], 340a32e9e42Smrg [Define if the GNU gettext() function is already present or preinstalled.]) 341a32e9e42Smrg AC_DEFINE([HAVE_DCGETTEXT], [1], 342a32e9e42Smrg [Define if the GNU dcgettext() function is already present or preinstalled.]) 343a32e9e42Smrg fi 344a32e9e42Smrg 345a32e9e42Smrg dnl We need to process the po/ directory. 346a32e9e42Smrg POSUB=po 347a32e9e42Smrg fi 348a32e9e42Smrg 349a32e9e42Smrg ifelse(gt_included_intl, yes, [ 350a32e9e42Smrg dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 351a32e9e42Smrg dnl to 'yes' because some of the testsuite requires it. 352a32e9e42Smrg if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then 353a32e9e42Smrg BUILD_INCLUDED_LIBINTL=yes 354a32e9e42Smrg fi 355a32e9e42Smrg 356a32e9e42Smrg dnl Make all variables we use known to autoconf. 357a32e9e42Smrg AC_SUBST([BUILD_INCLUDED_LIBINTL]) 358a32e9e42Smrg AC_SUBST([USE_INCLUDED_LIBINTL]) 359a32e9e42Smrg AC_SUBST([CATOBJEXT]) 360a32e9e42Smrg 361a32e9e42Smrg dnl For backward compatibility. Some configure.ins may be using this. 362a32e9e42Smrg nls_cv_header_intl= 363a32e9e42Smrg nls_cv_header_libgt= 364a32e9e42Smrg 365a32e9e42Smrg dnl For backward compatibility. Some Makefiles may be using this. 366a32e9e42Smrg DATADIRNAME=share 367a32e9e42Smrg AC_SUBST([DATADIRNAME]) 368a32e9e42Smrg 369a32e9e42Smrg dnl For backward compatibility. Some Makefiles may be using this. 370a32e9e42Smrg INSTOBJEXT=.mo 371a32e9e42Smrg AC_SUBST([INSTOBJEXT]) 372a32e9e42Smrg 373a32e9e42Smrg dnl For backward compatibility. Some Makefiles may be using this. 374a32e9e42Smrg GENCAT=gencat 375a32e9e42Smrg AC_SUBST([GENCAT]) 376a32e9e42Smrg 377a32e9e42Smrg dnl For backward compatibility. Some Makefiles may be using this. 378a32e9e42Smrg INTLOBJS= 379a32e9e42Smrg if test "$USE_INCLUDED_LIBINTL" = yes; then 380a32e9e42Smrg INTLOBJS="\$(GETTOBJS)" 381a32e9e42Smrg fi 382a32e9e42Smrg AC_SUBST([INTLOBJS]) 383a32e9e42Smrg 384a32e9e42Smrg dnl Enable libtool support if the surrounding package wishes it. 385a32e9e42Smrg INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 386a32e9e42Smrg AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) 387a32e9e42Smrg ]) 388a32e9e42Smrg 389a32e9e42Smrg dnl For backward compatibility. Some Makefiles may be using this. 390a32e9e42Smrg INTLLIBS="$LIBINTL" 391a32e9e42Smrg AC_SUBST([INTLLIBS]) 392a32e9e42Smrg 393a32e9e42Smrg dnl Make all documented variables known to autoconf. 394a32e9e42Smrg AC_SUBST([LIBINTL]) 395a32e9e42Smrg AC_SUBST([LTLIBINTL]) 396a32e9e42Smrg AC_SUBST([POSUB]) 397a32e9e42Smrg]) 398a32e9e42Smrg 399a32e9e42Smrg 400a32e9e42Smrgdnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. 401a32e9e42Smrgm4_define([gt_NEEDS_INIT], 402a32e9e42Smrg[ 403a32e9e42Smrg m4_divert_text([DEFAULTS], [gt_needs=]) 404a32e9e42Smrg m4_define([gt_NEEDS_INIT], []) 405a32e9e42Smrg]) 406a32e9e42Smrg 407a32e9e42Smrg 408a32e9e42Smrgdnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) 409a32e9e42SmrgAC_DEFUN([AM_GNU_GETTEXT_NEED], 410a32e9e42Smrg[ 411a32e9e42Smrg m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) 412a32e9e42Smrg]) 413a32e9e42Smrg 414a32e9e42Smrg 415a32e9e42Smrgdnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 416a32e9e42SmrgAC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 417a32e9e42Smrg 418a32e9e42Smrg 419a32e9e42Smrgdnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) 420a32e9e42SmrgAC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) 421