Blame m4/gettext.m4

rpm-build 0a0c83
# gettext.m4 serial 66 (gettext-0.18.2)
rpm-build 0a0c83
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
rpm-build 0a0c83
dnl This file is free software; the Free Software Foundation
rpm-build 0a0c83
dnl gives unlimited permission to copy and/or distribute it,
rpm-build 0a0c83
dnl with or without modifications, as long as this notice is preserved.
rpm-build 0a0c83
dnl
rpm-build 0a0c83
dnl This file can can be used in projects which are not available under
rpm-build 0a0c83
dnl the GNU General Public License or the GNU Library General Public
rpm-build 0a0c83
dnl License but which still want to provide support for the GNU gettext
rpm-build 0a0c83
dnl functionality.
rpm-build 0a0c83
dnl Please note that the actual code of the GNU gettext library is covered
rpm-build 0a0c83
dnl by the GNU Library General Public License, and the rest of the GNU
rpm-build 0a0c83
dnl gettext package package is covered by the GNU General Public License.
rpm-build 0a0c83
dnl They are *not* in the public domain.
rpm-build 0a0c83
rpm-build 0a0c83
dnl Authors:
rpm-build 0a0c83
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
rpm-build 0a0c83
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
rpm-build 0a0c83
rpm-build 0a0c83
dnl Macro to add for using GNU gettext.
rpm-build 0a0c83
rpm-build 0a0c83
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
rpm-build 0a0c83
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
rpm-build 0a0c83
dnl    default (if it is not specified or empty) is 'no-libtool'.
rpm-build 0a0c83
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
rpm-build 0a0c83
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
rpm-build 0a0c83
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
rpm-build 0a0c83
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
rpm-build 0a0c83
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
rpm-build 0a0c83
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
rpm-build 0a0c83
dnl    $(top_builddir)/intl/libintl.a will be created.
rpm-build 0a0c83
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
rpm-build 0a0c83
dnl    implementations (in libc or libintl) without the ngettext() function
rpm-build 0a0c83
dnl    will be ignored.  If NEEDSYMBOL is specified and is
rpm-build 0a0c83
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
rpm-build 0a0c83
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
rpm-build 0a0c83
dnl INTLDIR is used to find the intl libraries.  If empty,
rpm-build 0a0c83
dnl    the value '$(top_builddir)/intl/' is used.
rpm-build 0a0c83
dnl
rpm-build 0a0c83
dnl The result of the configuration is one of three cases:
rpm-build 0a0c83
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
rpm-build 0a0c83
dnl    and used.
rpm-build 0a0c83
dnl    Catalog format: GNU --> install in $(datadir)
rpm-build 0a0c83
dnl    Catalog extension: .mo after installation, .gmo in source tree
rpm-build 0a0c83
dnl 2) GNU gettext has been found in the system's C library.
rpm-build 0a0c83
dnl    Catalog format: GNU --> install in $(datadir)
rpm-build 0a0c83
dnl    Catalog extension: .mo after installation, .gmo in source tree
rpm-build 0a0c83
dnl 3) No internationalization, always use English msgid.
rpm-build 0a0c83
dnl    Catalog format: none
rpm-build 0a0c83
dnl    Catalog extension: none
rpm-build 0a0c83
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
rpm-build 0a0c83
dnl The use of .gmo is historical (it was needed to avoid overwriting the
rpm-build 0a0c83
dnl GNU format catalogs when building on a platform with an X/Open gettext),
rpm-build 0a0c83
dnl but we keep it in order not to force irrelevant filename changes on the
rpm-build 0a0c83
dnl maintainers.
rpm-build 0a0c83
dnl
rpm-build 0a0c83
AC_DEFUN([AM_GNU_GETTEXT],
rpm-build 0a0c83
[
rpm-build 0a0c83
  dnl Argument checking.
rpm-build 0a0c83
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
rpm-build 0a0c83
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
rpm-build 0a0c83
])])])])])
rpm-build 0a0c83
  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
rpm-build 0a0c83
    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
rpm-build 0a0c83
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
rpm-build 0a0c83
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
rpm-build 0a0c83
])])])])
rpm-build 0a0c83
  define([gt_included_intl],
rpm-build 0a0c83
    ifelse([$1], [external],
rpm-build 0a0c83
      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
rpm-build 0a0c83
      [yes]))
rpm-build 0a0c83
  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
rpm-build 0a0c83
  gt_NEEDS_INIT
rpm-build 0a0c83
  AM_GNU_GETTEXT_NEED([$2])
rpm-build 0a0c83
rpm-build 0a0c83
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
rpm-build 0a0c83
  ifelse(gt_included_intl, yes, [
rpm-build 0a0c83
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
rpm-build 0a0c83
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
rpm-build 0a0c83
  AC_REQUIRE([AC_LIB_RPATH])
rpm-build 0a0c83
rpm-build 0a0c83
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
rpm-build 0a0c83
  dnl Ideally we would do this search only after the
rpm-build 0a0c83
  dnl      if test "$USE_NLS" = "yes"; then
rpm-build 0a0c83
  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
rpm-build 0a0c83
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
rpm-build 0a0c83
  dnl the configure script would need to contain the same shell code
rpm-build 0a0c83
  dnl again, outside any 'if'. There are two solutions:
rpm-build 0a0c83
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
rpm-build 0a0c83
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
rpm-build 0a0c83
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
rpm-build 0a0c83
  dnl documented, we avoid it.
rpm-build 0a0c83
  ifelse(gt_included_intl, yes, , [
rpm-build 0a0c83
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
rpm-build 0a0c83
  gt_INTL_MACOSX
rpm-build 0a0c83
rpm-build 0a0c83
  dnl Set USE_NLS.
rpm-build 0a0c83
  AC_REQUIRE([AM_NLS])
rpm-build 0a0c83
rpm-build 0a0c83
  ifelse(gt_included_intl, yes, [
rpm-build 0a0c83
    BUILD_INCLUDED_LIBINTL=no
rpm-build 0a0c83
    USE_INCLUDED_LIBINTL=no
rpm-build 0a0c83
  ])
rpm-build 0a0c83
  LIBINTL=
rpm-build 0a0c83
  LTLIBINTL=
rpm-build 0a0c83
  POSUB=
rpm-build 0a0c83
rpm-build 0a0c83
  dnl Add a version number to the cache macros.
rpm-build 0a0c83
  case " $gt_needs " in
rpm-build 0a0c83
    *" need-formatstring-macros "*) gt_api_version=3 ;;
rpm-build 0a0c83
    *" need-ngettext "*) gt_api_version=2 ;;
rpm-build 0a0c83
    *) gt_api_version=1 ;;
rpm-build 0a0c83
  esac
rpm-build 0a0c83
  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
rpm-build 0a0c83
  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
rpm-build 0a0c83
rpm-build 0a0c83
  dnl If we use NLS figure out what method
rpm-build 0a0c83
  if test "$USE_NLS" = "yes"; then
rpm-build 0a0c83
    gt_use_preinstalled_gnugettext=no
rpm-build 0a0c83
    ifelse(gt_included_intl, yes, [
rpm-build 0a0c83
      AC_MSG_CHECKING([whether included gettext is requested])
rpm-build 0a0c83
      AC_ARG_WITH([included-gettext],
rpm-build 0a0c83
        [  --with-included-gettext use the GNU gettext library included here],
rpm-build 0a0c83
        nls_cv_force_use_gnu_gettext=$withval,
rpm-build 0a0c83
        nls_cv_force_use_gnu_gettext=no)
rpm-build 0a0c83
      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
rpm-build 0a0c83
rpm-build 0a0c83
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
rpm-build 0a0c83
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
rpm-build 0a0c83
    ])
rpm-build 0a0c83
        dnl User does not insist on using GNU NLS library.  Figure out what
rpm-build 0a0c83
        dnl to use.  If GNU gettext is available we use this.  Else we have
rpm-build 0a0c83
        dnl to fall back to GNU NLS library.
rpm-build 0a0c83
rpm-build 0a0c83
        if test $gt_api_version -ge 3; then
rpm-build 0a0c83
          gt_revision_test_code='
rpm-build 0a0c83
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
rpm-build 0a0c83
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
rpm-build 0a0c83
#endif
rpm-build 0a0c83
changequote(,)dnl
rpm-build 0a0c83
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
rpm-build 0a0c83
changequote([,])dnl
rpm-build 0a0c83
'
rpm-build 0a0c83
        else
rpm-build 0a0c83
          gt_revision_test_code=
rpm-build 0a0c83
        fi
rpm-build 0a0c83
        if test $gt_api_version -ge 2; then
rpm-build 0a0c83
          gt_expression_test_code=' + * ngettext ("", "", 0)'
rpm-build 0a0c83
        else
rpm-build 0a0c83
          gt_expression_test_code=
rpm-build 0a0c83
        fi
rpm-build 0a0c83
rpm-build 0a0c83
        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
rpm-build 0a0c83
         [AC_LINK_IFELSE(
rpm-build 0a0c83
            [AC_LANG_PROGRAM(
rpm-build 0a0c83
               [[
rpm-build 0a0c83
#include <libintl.h>
rpm-build 0a0c83
$gt_revision_test_code
rpm-build 0a0c83
extern int _nl_msg_cat_cntr;
rpm-build 0a0c83
extern int *_nl_domain_bindings;
rpm-build 0a0c83
               ]],
rpm-build 0a0c83
               [[
rpm-build 0a0c83
bindtextdomain ("", "");
rpm-build 0a0c83
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
rpm-build 0a0c83
               ]])],
rpm-build 0a0c83
            [eval "$gt_func_gnugettext_libc=yes"],
rpm-build 0a0c83
            [eval "$gt_func_gnugettext_libc=no"])])
rpm-build 0a0c83
rpm-build 0a0c83
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
rpm-build 0a0c83
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
rpm-build 0a0c83
          ifelse(gt_included_intl, yes, , [
rpm-build 0a0c83
            AM_ICONV_LINK
rpm-build 0a0c83
          ])
rpm-build 0a0c83
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
rpm-build 0a0c83
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
rpm-build 0a0c83
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
rpm-build 0a0c83
          dnl even if libiconv doesn't exist.
rpm-build 0a0c83
          AC_LIB_LINKFLAGS_BODY([intl])
rpm-build 0a0c83
          AC_CACHE_CHECK([for GNU gettext in libintl],
rpm-build 0a0c83
            [$gt_func_gnugettext_libintl],
rpm-build 0a0c83
           [gt_save_CPPFLAGS="$CPPFLAGS"
rpm-build 0a0c83
            CPPFLAGS="$CPPFLAGS $INCINTL"
rpm-build 0a0c83
            gt_save_LIBS="$LIBS"
rpm-build 0a0c83
            LIBS="$LIBS $LIBINTL"
rpm-build 0a0c83
            dnl Now see whether libintl exists and does not depend on libiconv.
rpm-build 0a0c83
            AC_LINK_IFELSE(
rpm-build 0a0c83
              [AC_LANG_PROGRAM(
rpm-build 0a0c83
                 [[
rpm-build 0a0c83
#include <libintl.h>
rpm-build 0a0c83
$gt_revision_test_code
rpm-build 0a0c83
extern int _nl_msg_cat_cntr;
rpm-build 0a0c83
extern
rpm-build 0a0c83
#ifdef __cplusplus
rpm-build 0a0c83
"C"
rpm-build 0a0c83
#endif
rpm-build 0a0c83
const char *_nl_expand_alias (const char *);
rpm-build 0a0c83
                 ]],
rpm-build 0a0c83
                 [[
rpm-build 0a0c83
bindtextdomain ("", "");
rpm-build 0a0c83
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
rpm-build 0a0c83
                 ]])],
rpm-build 0a0c83
              [eval "$gt_func_gnugettext_libintl=yes"],
rpm-build 0a0c83
              [eval "$gt_func_gnugettext_libintl=no"])
rpm-build 0a0c83
            dnl Now see whether libintl exists and depends on libiconv.
rpm-build 0a0c83
            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
rpm-build 0a0c83
              LIBS="$LIBS $LIBICONV"
rpm-build 0a0c83
              AC_LINK_IFELSE(
rpm-build 0a0c83
                [AC_LANG_PROGRAM(
rpm-build 0a0c83
                   [[
rpm-build 0a0c83
#include <libintl.h>
rpm-build 0a0c83
$gt_revision_test_code
rpm-build 0a0c83
extern int _nl_msg_cat_cntr;
rpm-build 0a0c83
extern
rpm-build 0a0c83
#ifdef __cplusplus
rpm-build 0a0c83
"C"
rpm-build 0a0c83
#endif
rpm-build 0a0c83
const char *_nl_expand_alias (const char *);
rpm-build 0a0c83
                   ]],
rpm-build 0a0c83
                   [[
rpm-build 0a0c83
bindtextdomain ("", "");
rpm-build 0a0c83
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
rpm-build 0a0c83
                   ]])],
rpm-build 0a0c83
                [LIBINTL="$LIBINTL $LIBICONV"
rpm-build 0a0c83
                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
rpm-build 0a0c83
                 eval "$gt_func_gnugettext_libintl=yes"
rpm-build 0a0c83
                ])
rpm-build 0a0c83
            fi
rpm-build 0a0c83
            CPPFLAGS="$gt_save_CPPFLAGS"
rpm-build 0a0c83
            LIBS="$gt_save_LIBS"])
rpm-build 0a0c83
        fi
rpm-build 0a0c83
rpm-build 0a0c83
        dnl If an already present or preinstalled GNU gettext() is found,
rpm-build 0a0c83
        dnl use it.  But if this macro is used in GNU gettext, and GNU
rpm-build 0a0c83
        dnl gettext is already preinstalled in libintl, we update this
rpm-build 0a0c83
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
rpm-build 0a0c83
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
rpm-build 0a0c83
           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
rpm-build 0a0c83
                && test "$PACKAGE" != gettext-runtime \
rpm-build 0a0c83
                && test "$PACKAGE" != gettext-tools; }; then
rpm-build 0a0c83
          gt_use_preinstalled_gnugettext=yes
rpm-build 0a0c83
        else
rpm-build 0a0c83
          dnl Reset the values set by searching for libintl.
rpm-build 0a0c83
          LIBINTL=
rpm-build 0a0c83
          LTLIBINTL=
rpm-build 0a0c83
          INCINTL=
rpm-build 0a0c83
        fi
rpm-build 0a0c83
rpm-build 0a0c83
    ifelse(gt_included_intl, yes, [
rpm-build 0a0c83
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
rpm-build 0a0c83
          dnl GNU gettext is not found in the C library.
rpm-build 0a0c83
          dnl Fall back on included GNU gettext library.
rpm-build 0a0c83
          nls_cv_use_gnu_gettext=yes
rpm-build 0a0c83
        fi
rpm-build 0a0c83
      fi
rpm-build 0a0c83
rpm-build 0a0c83
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
rpm-build 0a0c83
        dnl Mark actions used to generate GNU NLS library.
rpm-build 0a0c83
        BUILD_INCLUDED_LIBINTL=yes
rpm-build 0a0c83
        USE_INCLUDED_LIBINTL=yes
rpm-build 0a0c83
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
rpm-build 0a0c83
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
rpm-build 0a0c83
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
rpm-build 0a0c83
      fi
rpm-build 0a0c83
rpm-build 0a0c83
      CATOBJEXT=
rpm-build 0a0c83
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
rpm-build 0a0c83
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
rpm-build 0a0c83
        dnl Mark actions to use GNU gettext tools.
rpm-build 0a0c83
        CATOBJEXT=.gmo
rpm-build 0a0c83
      fi
rpm-build 0a0c83
    ])
rpm-build 0a0c83
rpm-build 0a0c83
    if test -n "$INTL_MACOSX_LIBS"; then
rpm-build 0a0c83
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
rpm-build 0a0c83
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
rpm-build 0a0c83
        dnl Some extra flags are needed during linking.
rpm-build 0a0c83
        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
rpm-build 0a0c83
        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
rpm-build 0a0c83
      fi
rpm-build 0a0c83
    fi
rpm-build 0a0c83
rpm-build 0a0c83
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
rpm-build 0a0c83
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
rpm-build 0a0c83
      AC_DEFINE([ENABLE_NLS], [1],
rpm-build 0a0c83
        [Define to 1 if translation of program messages to the user's native language
rpm-build 0a0c83
   is requested.])
rpm-build 0a0c83
    else
rpm-build 0a0c83
      USE_NLS=no
rpm-build 0a0c83
    fi
rpm-build 0a0c83
  fi
rpm-build 0a0c83
rpm-build 0a0c83
  AC_MSG_CHECKING([whether to use NLS])
rpm-build 0a0c83
  AC_MSG_RESULT([$USE_NLS])
rpm-build 0a0c83
  if test "$USE_NLS" = "yes"; then
rpm-build 0a0c83
    AC_MSG_CHECKING([where the gettext function comes from])
rpm-build 0a0c83
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
rpm-build 0a0c83
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
rpm-build 0a0c83
        gt_source="external libintl"
rpm-build 0a0c83
      else
rpm-build 0a0c83
        gt_source="libc"
rpm-build 0a0c83
      fi
rpm-build 0a0c83
    else
rpm-build 0a0c83
      gt_source="included intl directory"
rpm-build 0a0c83
    fi
rpm-build 0a0c83
    AC_MSG_RESULT([$gt_source])
rpm-build 0a0c83
  fi
rpm-build 0a0c83
rpm-build 0a0c83
  if test "$USE_NLS" = "yes"; then
rpm-build 0a0c83
rpm-build 0a0c83
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
rpm-build 0a0c83
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
rpm-build 0a0c83
        AC_MSG_CHECKING([how to link with libintl])
rpm-build 0a0c83
        AC_MSG_RESULT([$LIBINTL])
rpm-build 0a0c83
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
rpm-build 0a0c83
      fi
rpm-build 0a0c83
rpm-build 0a0c83
      dnl For backward compatibility. Some packages may be using this.
rpm-build 0a0c83
      AC_DEFINE([HAVE_GETTEXT], [1],
rpm-build 0a0c83
       [Define if the GNU gettext() function is already present or preinstalled.])
rpm-build 0a0c83
      AC_DEFINE([HAVE_DCGETTEXT], [1],
rpm-build 0a0c83
       [Define if the GNU dcgettext() function is already present or preinstalled.])
rpm-build 0a0c83
    fi
rpm-build 0a0c83
rpm-build 0a0c83
    dnl We need to process the po/ directory.
rpm-build 0a0c83
    POSUB=po
rpm-build 0a0c83
  fi
rpm-build 0a0c83
rpm-build 0a0c83
  ifelse(gt_included_intl, yes, [
rpm-build 0a0c83
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
rpm-build 0a0c83
    dnl to 'yes' because some of the testsuite requires it.
rpm-build 0a0c83
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
rpm-build 0a0c83
      BUILD_INCLUDED_LIBINTL=yes
rpm-build 0a0c83
    fi
rpm-build 0a0c83
rpm-build 0a0c83
    dnl Make all variables we use known to autoconf.
rpm-build 0a0c83
    AC_SUBST([BUILD_INCLUDED_LIBINTL])
rpm-build 0a0c83
    AC_SUBST([USE_INCLUDED_LIBINTL])
rpm-build 0a0c83
    AC_SUBST([CATOBJEXT])
rpm-build 0a0c83
rpm-build 0a0c83
    dnl For backward compatibility. Some configure.ins may be using this.
rpm-build 0a0c83
    nls_cv_header_intl=
rpm-build 0a0c83
    nls_cv_header_libgt=
rpm-build 0a0c83
rpm-build 0a0c83
    dnl For backward compatibility. Some Makefiles may be using this.
rpm-build 0a0c83
    DATADIRNAME=share
rpm-build 0a0c83
    AC_SUBST([DATADIRNAME])
rpm-build 0a0c83
rpm-build 0a0c83
    dnl For backward compatibility. Some Makefiles may be using this.
rpm-build 0a0c83
    INSTOBJEXT=.mo
rpm-build 0a0c83
    AC_SUBST([INSTOBJEXT])
rpm-build 0a0c83
rpm-build 0a0c83
    dnl For backward compatibility. Some Makefiles may be using this.
rpm-build 0a0c83
    GENCAT=gencat
rpm-build 0a0c83
    AC_SUBST([GENCAT])
rpm-build 0a0c83
rpm-build 0a0c83
    dnl For backward compatibility. Some Makefiles may be using this.
rpm-build 0a0c83
    INTLOBJS=
rpm-build 0a0c83
    if test "$USE_INCLUDED_LIBINTL" = yes; then
rpm-build 0a0c83
      INTLOBJS="\$(GETTOBJS)"
rpm-build 0a0c83
    fi
rpm-build 0a0c83
    AC_SUBST([INTLOBJS])
rpm-build 0a0c83
rpm-build 0a0c83
    dnl Enable libtool support if the surrounding package wishes it.
rpm-build 0a0c83
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
rpm-build 0a0c83
    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
  dnl For backward compatibility. Some Makefiles may be using this.
rpm-build 0a0c83
  INTLLIBS="$LIBINTL"
rpm-build 0a0c83
  AC_SUBST([INTLLIBS])
rpm-build 0a0c83
rpm-build 0a0c83
  dnl Make all documented variables known to autoconf.
rpm-build 0a0c83
  AC_SUBST([LIBINTL])
rpm-build 0a0c83
  AC_SUBST([LTLIBINTL])
rpm-build 0a0c83
  AC_SUBST([POSUB])
rpm-build 0a0c83
])
rpm-build 0a0c83
rpm-build 0a0c83
rpm-build 0a0c83
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
rpm-build 0a0c83
m4_define([gt_NEEDS_INIT],
rpm-build 0a0c83
[
rpm-build 0a0c83
  m4_divert_text([DEFAULTS], [gt_needs=])
rpm-build 0a0c83
  m4_define([gt_NEEDS_INIT], [])
rpm-build 0a0c83
])
rpm-build 0a0c83
rpm-build 0a0c83
rpm-build 0a0c83
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
rpm-build 0a0c83
AC_DEFUN([AM_GNU_GETTEXT_NEED],
rpm-build 0a0c83
[
rpm-build 0a0c83
  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
rpm-build 0a0c83
])
rpm-build 0a0c83
rpm-build 0a0c83
rpm-build 0a0c83
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
rpm-build 0a0c83
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])