Changeset 7a508b374001d7525b1a6ccbccbcb1ddd637f943

Show
Ignore:
Timestamp:
03/18/03 22:34:13 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1048023253 +0000
git-parent:

[126568cf13799bd251eb42f9c1154f81f68a8c20]

git-author:
Gildas Bazin <gbazin@videolan.org> 1048023253 +0000
Message:

* configure.ac.in, m4/*, po/Makefile.in.in: build updated to use gettext 0.11.5 by default.

This is necessary for the win32 build because old gettext versions do not work on win32.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac.in

    r126568c r7a508b3  
    174174dnl 
    175175ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv" 
    176 AM_GNU_GETTEXT_VERSION(0.10.40
     176AM_GNU_GETTEXT_VERSION(0.11.5
    177177AM_GNU_GETTEXT 
    178178if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then 
  • m4/codeset.m4

    r3eb8eef r7a508b3  
    1 #serial AM1 
     1# codeset.m4 serial AM1 (gettext-0.10.40) 
     2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 
     3dnl This file is free software, distributed under the terms of the GNU 
     4dnl General Public License.  As a special exception to the GNU General 
     5dnl Public License, this file may be distributed as part of a program 
     6dnl that contains a configuration script generated by Autoconf, under 
     7dnl the same distribution terms as the rest of that program. 
    28 
    39dnl From Bruno Haible. 
  • m4/gettext.m4

    r3eb8eef r7a508b3  
    1 # Macro to add for using GNU gettext. 
    2 # Ulrich Drepper <drepper@cygnus.com>, 1995. 
    3 
    4 # This file can be copied and used freely without restrictions.  It can 
    5 # be used in projects which are not available under the GNU General Public 
    6 # License or the GNU Library General Public License but which still want 
    7 # to provide support for the GNU gettext functionality. 
    8 # Please note that the actual code of the GNU gettext library is covered 
    9 # by the GNU Library General Public License, and the rest of the GNU 
    10 # gettext package package is covered by the GNU General Public License. 
    11 # They are *not* in the public domain. 
    12  
    13 # serial 10 
    14  
    15 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]). 
    16 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library 
     1# gettext.m4 serial 17 (gettext-0.11.5) 
     2dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 
     3dnl This file is free software, distributed under the terms of the GNU 
     4dnl General Public License.  As a special exception to the GNU General 
     5dnl Public License, this file may be distributed as part of a program 
     6dnl that contains a configuration script generated by Autoconf, under 
     7dnl the same distribution terms as the rest of that program. 
     8dnl 
     9dnl This file can can be used in projects which are not available under 
     10dnl the GNU General Public License or the GNU Library General Public 
     11dnl License but which still want to provide support for the GNU gettext 
     12dnl functionality. 
     13dnl Please note that the actual code of the GNU gettext library is covered 
     14dnl by the GNU Library General Public License, and the rest of the GNU 
     15dnl gettext package package is covered by the GNU General Public License. 
     16dnl They are *not* in the public domain. 
     17 
     18dnl Authors: 
     19dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 
     20dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002. 
     21 
     22dnl Macro to add for using GNU gettext. 
     23 
     24dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 
     25dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 
     26dnl    default (if it is not specified or empty) is 'no-libtool'. 
     27dnl    INTLSYMBOL should be 'external' for packages with no intl directory, 
     28dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory. 
     29dnl    If INTLSYMBOL is 'use-libtool', then a libtool library 
    1730dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static, 
    1831dnl    depending on --{enable,disable}-{shared,static} and on the presence of 
    19 dnl    AM-DISABLE-SHARED). Otherwise, a static library 
     32dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 
    2033dnl    $(top_builddir)/intl/libintl.a will be created. 
    2134dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 
    2235dnl    implementations (in libc or libintl) without the ngettext() function 
    23 dnl    will be ignored. 
    24 dnl LIBDIR is used to find the intl libraries.  If empty, 
     36dnl    will be ignored.  If NEEDSYMBOL is specified and is 
     37dnl    'need-formatstring-macros', then GNU gettext implementations that don't 
     38dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 
     39dnl INTLDIR is used to find the intl libraries.  If empty, 
    2540dnl    the value `$(top_builddir)/intl/' is used. 
    2641dnl 
     
    3651dnl    Catalog format: none 
    3752dnl    Catalog extension: none 
     53dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. 
    3854dnl The use of .gmo is historical (it was needed to avoid overwriting the 
    3955dnl GNU format catalogs when building on a platform with an X/Open gettext), 
     
    4157dnl maintainers. 
    4258dnl 
    43 AC_DEFUN([AM_WITH_NLS], 
    44   [AC_MSG_CHECKING([whether NLS is requested]) 
    45     dnl Default is enabled NLS 
    46     AC_ARG_ENABLE(nls, 
    47       [  --disable-nls           do not use Native Language Support], 
    48       USE_NLS=$enableval, USE_NLS=yes) 
    49     AC_MSG_RESULT($USE_NLS) 
    50     AC_SUBST(USE_NLS) 
    51  
     59AC_DEFUN([AM_GNU_GETTEXT], 
     60
     61  dnl Argument checking. 
     62  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 
     63    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 
     64])])])])]) 
     65  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 
     66    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 
     67])])])]) 
     68  define(gt_included_intl, ifelse([$1], [external], [no], [yes])) 
     69  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) 
     70 
     71  AC_REQUIRE([AM_PO_SUBDIRS])dnl 
     72  ifelse(gt_included_intl, yes, [ 
     73    AC_REQUIRE([AM_INTL_SUBDIR])dnl 
     74  ]) 
     75 
     76  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 
     77  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
     78  AC_REQUIRE([AC_LIB_RPATH]) 
     79 
     80  dnl Sometimes libintl requires libiconv, so first search for libiconv. 
     81  dnl Ideally we would do this search only after the 
     82  dnl      if test "$USE_NLS" = "yes"; then 
     83  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then 
     84  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT 
     85  dnl the configure script would need to contain the same shell code 
     86  dnl again, outside any 'if'. There are two solutions: 
     87  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 
     88  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 
     89  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 
     90  dnl documented, we avoid it. 
     91  ifelse(gt_included_intl, yes, , [ 
     92    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 
     93  ]) 
     94 
     95  AC_MSG_CHECKING([whether NLS is requested]) 
     96  dnl Default is enabled NLS 
     97  AC_ARG_ENABLE(nls, 
     98    [  --disable-nls           do not use Native Language Support], 
     99    USE_NLS=$enableval, USE_NLS=yes) 
     100  AC_MSG_RESULT($USE_NLS) 
     101  AC_SUBST(USE_NLS) 
     102 
     103  ifelse(gt_included_intl, yes, [ 
    52104    BUILD_INCLUDED_LIBINTL=no 
    53105    USE_INCLUDED_LIBINTL=no 
    54     INTLLIBS= 
    55  
    56     dnl If we use NLS figure out what method 
    57     if test "$USE_NLS" = "yes"; then 
    58       AC_DEFINE(ENABLE_NLS, 1, 
    59         [Define to 1 if translation of program messages to the user's native language 
    60    is requested.]) 
     106  ]) 
     107  LIBINTL= 
     108  LTLIBINTL= 
     109  POSUB= 
     110 
     111  dnl If we use NLS figure out what method 
     112  if test "$USE_NLS" = "yes"; then 
     113    gt_use_preinstalled_gnugettext=no 
     114    ifelse(gt_included_intl, yes, [ 
    61115      AC_MSG_CHECKING([whether included gettext is requested]) 
    62116      AC_ARG_WITH(included-gettext, 
     
    68122      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 
    69123      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 
     124    ]) 
    70125        dnl User does not insist on using GNU NLS library.  Figure out what 
    71126        dnl to use.  If GNU gettext is available we use this.  Else we have 
    72127        dnl to fall back to GNU NLS library. 
    73     CATOBJEXT=NONE 
    74128 
    75129        dnl Add a version number to the cache macros. 
    76         define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc]) 
    77         define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl]) 
    78  
    79     AC_CHECK_HEADER(libintl.h, 
    80       [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, 
    81         [AC_TRY_LINK([#include <libintl.h> 
    82 extern int _nl_msg_cat_cntr;], 
    83            [bindtextdomain ("", ""); 
    84 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], 
    85            gt_cv_func_gnugettext_libc=yes, 
    86            gt_cv_func_gnugettext_libc=no)]) 
    87  
    88        if test "$gt_cv_func_gnugettext_libc" != "yes"; then 
    89          AC_CACHE_CHECK([for GNU gettext in libintl], 
    90            gt_cv_func_gnugettext_libintl, 
    91            [gt_save_LIBS="$LIBS" 
    92         LIBS="$LIBS -lintl $LIBICONV" 
    93         AC_TRY_LINK([#include <libintl.h> 
    94 extern int _nl_msg_cat_cntr;], 
    95           [bindtextdomain ("", ""); 
    96 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], 
    97           gt_cv_func_gnugettext_libintl=yes, 
    98           gt_cv_func_gnugettext_libintl=no) 
    99         LIBS="$gt_save_LIBS"]) 
    100        fi 
    101  
    102        dnl If an already present or preinstalled GNU gettext() is found, 
    103        dnl use it.  But if this macro is used in GNU gettext, and GNU 
    104        dnl gettext is already preinstalled in libintl, we update this 
    105        dnl libintl.  (Cf. the install rule in intl/Makefile.in.) 
    106        if test "$gt_cv_func_gnugettext_libc" = "yes" \ 
    107           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 
    108            && test "$PACKAGE" != gettext; }; then 
    109          AC_DEFINE(HAVE_GETTEXT, 1, 
    110                [Define if the GNU gettext() function is already present or preinstalled.]) 
    111  
    112          if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 
    113            dnl If iconv() is in a separate libiconv library, then anyone 
    114            dnl linking with libintl{.a,.so} also needs to link with 
    115            dnl libiconv. 
    116            INTLLIBS="-lintl $LIBICONV" 
    117          fi 
    118  
    119          gt_save_LIBS="$LIBS" 
    120          LIBS="$LIBS $INTLLIBS" 
    121          AC_CHECK_FUNCS(dcgettext) 
    122          LIBS="$gt_save_LIBS" 
    123  
    124          dnl Search for GNU msgfmt in the PATH. 
    125          AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 
    126            [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) 
    127          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 
    128  
    129          dnl Search for GNU xgettext in the PATH. 
    130          AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
    131            [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) 
    132  
    133          CATOBJEXT=.gmo 
    134        fi 
    135     ]) 
    136  
    137         if test "$CATOBJEXT" = "NONE"; then 
    138       dnl GNU gettext is not found in the C library. 
    139       dnl Fall back on GNU gettext library. 
    140       nls_cv_use_gnu_gettext=yes 
     130        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) 
     131        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) 
     132        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) 
     133 
     134        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, 
     135         [AC_TRY_LINK([#include <libintl.h> 
     136]ifelse([$2], [need-formatstring-macros], 
     137[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 
     138#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 
     139#endif 
     140changequote(,)dnl 
     141typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 
     142changequote([,])dnl 
     143], [])[extern int _nl_msg_cat_cntr; 
     144extern int *_nl_domain_bindings;], 
     145            [bindtextdomain ("", ""); 
     146return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], 
     147            gt_cv_func_gnugettext_libc=yes, 
     148            gt_cv_func_gnugettext_libc=no)]) 
     149 
     150        if test "$gt_cv_func_gnugettext_libc" != "yes"; then 
     151          dnl Sometimes libintl requires libiconv, so first search for libiconv. 
     152          ifelse(gt_included_intl, yes, , [ 
     153            AM_ICONV_LINK 
     154          ]) 
     155          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL 
     156          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) 
     157          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL 
     158          dnl even if libiconv doesn't exist. 
     159          AC_LIB_LINKFLAGS_BODY([intl]) 
     160          AC_CACHE_CHECK([for GNU gettext in libintl], 
     161            gt_cv_func_gnugettext_libintl, 
     162           [gt_save_CPPFLAGS="$CPPFLAGS" 
     163            CPPFLAGS="$CPPFLAGS $INCINTL" 
     164            gt_save_LIBS="$LIBS" 
     165            LIBS="$LIBS $LIBINTL" 
     166            dnl Now see whether libintl exists and does not depend on libiconv. 
     167            AC_TRY_LINK([#include <libintl.h> 
     168]ifelse([$2], [need-formatstring-macros], 
     169[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 
     170#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 
     171#endif 
     172changequote(,)dnl 
     173typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 
     174changequote([,])dnl 
     175], [])[extern int _nl_msg_cat_cntr; 
     176extern 
     177#ifdef __cplusplus 
     178"C" 
     179#endif 
     180const char *_nl_expand_alias ();], 
     181              [bindtextdomain ("", ""); 
     182return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], 
     183              gt_cv_func_gnugettext_libintl=yes, 
     184              gt_cv_func_gnugettext_libintl=no) 
     185            dnl Now see whether libintl exists and depends on libiconv. 
     186            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then 
     187              LIBS="$LIBS $LIBICONV" 
     188              AC_TRY_LINK([#include <libintl.h> 
     189]ifelse([$2], [need-formatstring-macros], 
     190[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 
     191#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 
     192#endif 
     193changequote(,)dnl 
     194typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 
     195changequote([,])dnl 
     196], [])[extern int _nl_msg_cat_cntr; 
     197extern 
     198#ifdef __cplusplus 
     199"C" 
     200#endif 
     201const char *_nl_expand_alias ();], 
     202                [bindtextdomain ("", ""); 
     203return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], 
     204               [LIBINTL="$LIBINTL $LIBICONV" 
     205                LTLIBINTL="$LTLIBINTL $LTLIBICONV" 
     206                gt_cv_func_gnugettext_libintl=yes 
     207               ]) 
     208            fi 
     209            CPPFLAGS="$gt_save_CPPFLAGS" 
     210            LIBS="$gt_save_LIBS"]) 
     211        fi 
     212 
     213        dnl If an already present or preinstalled GNU gettext() is found, 
     214        dnl use it.  But if this macro is used in GNU gettext, and GNU 
     215        dnl gettext is already preinstalled in libintl, we update this 
     216        dnl libintl.  (Cf. the install rule in intl/Makefile.in.) 
     217        if test "$gt_cv_func_gnugettext_libc" = "yes" \ 
     218           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 
     219                && test "$PACKAGE" != gettext; }; then 
     220          gt_use_preinstalled_gnugettext=yes 
     221        else 
     222          dnl Reset the values set by searching for libintl. 
     223          LIBINTL= 
     224          LTLIBINTL= 
     225          INCINTL= 
     226        fi 
     227 
     228    ifelse(gt_included_intl, yes, [ 
     229        if test "$gt_use_preinstalled_gnugettext" != "yes"; then 
     230          dnl GNU gettext is not found in the C library. 
     231          dnl Fall back on included GNU gettext library. 
     232          nls_cv_use_gnu_gettext=yes 
    141233        fi 
    142234      fi 
     
    145237        dnl Mark actions used to generate GNU NLS library. 
    146238        INTLOBJS="\$(GETTOBJS)" 
    147         AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 
    148       [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) 
    149         AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 
    150         AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
    151       [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) 
    152         AC_SUBST(MSGFMT) 
    153     BUILD_INCLUDED_LIBINTL=yes 
    154     USE_INCLUDED_LIBINTL=yes 
     239        BUILD_INCLUDED_LIBINTL=yes 
     240        USE_INCLUDED_LIBINTL=yes 
     241        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" 
     242        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" 
     243        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 
     244      fi 
     245 
     246      if test "$gt_use_preinstalled_gnugettext" = "yes" \ 
     247         || test "$nls_cv_use_gnu_gettext" = "yes"; then 
     248        dnl Mark actions to use GNU gettext tools. 
    155249        CATOBJEXT=.gmo 
    156     INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV" 
    157     LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 
    158250      fi 
    159  
    160       dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 
    161       dnl Test whether we really found GNU msgfmt. 
    162       if test "$GMSGFMT" != ":"; then 
    163     dnl If it is no GNU msgfmt we define it as : so that the 
    164     dnl Makefiles still can work. 
    165     if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then 
    166       : ; 
    167     else 
    168       AC_MSG_RESULT( 
    169         [found msgfmt program is not GNU msgfmt; ignore it]) 
    170       GMSGFMT=":" 
    171     fi 
     251    ]) 
     252 
     253    if test "$gt_use_preinstalled_gnugettext" = "yes" \ 
     254       || test "$nls_cv_use_gnu_gettext" = "yes"; then 
     255      AC_DEFINE(ENABLE_NLS, 1, 
     256        [Define to 1 if translation of program messages to the user's native language 
     257   is requested.]) 
     258    else 
     259      USE_NLS=no 
     260    fi 
     261  fi 
     262 
     263  if test "$USE_NLS" = "yes"; then 
     264 
     265    if test "$gt_use_preinstalled_gnugettext" = "yes"; then 
     266      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 
     267        AC_MSG_CHECKING([how to link with libintl]) 
     268        AC_MSG_RESULT([$LIBINTL]) 
     269        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) 
    172270      fi 
    173271 
    174       dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 
    175       dnl Test whether we really found GNU xgettext. 
    176       if test "$XGETTEXT" != ":"; then 
    177     dnl If it is no GNU xgettext we define it as : so that the 
    178     dnl Makefiles still can work. 
    179     if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then 
    180       : ; 
    181     else 
    182       AC_MSG_RESULT( 
    183         [found xgettext program is not GNU xgettext; ignore it]) 
    184       XGETTEXT=":" 
    185     fi 
    186       fi 
    187  
    188       dnl We need to process the po/ directory. 
    189       POSUB=po 
     272      dnl For backward compatibility. Some packages may be using this. 
     273      AC_DEFINE(HAVE_GETTEXT, 1, 
     274       [Define if the GNU gettext() function is already present or preinstalled.]) 
     275      AC_DEFINE(HAVE_DCGETTEXT, 1, 
     276       [Define if the GNU dcgettext() function is already present or preinstalled.]) 
    190277    fi 
    191     AC_OUTPUT_COMMANDS( 
    192      [for ac_file in $CONFIG_FILES; do 
    193         # Support "outfile[:infile[:infile...]]" 
    194         case "$ac_file" in 
    195           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 
    196         esac 
    197         # PO directories have a Makefile.in generated from Makefile.in.in. 
    198         case "$ac_file" in */Makefile.in) 
    199           # Adjust a relative srcdir. 
    200           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 
    201           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 
    202           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 
    203           # In autoconf-2.13 it is called $ac_given_srcdir. 
    204           # In autoconf-2.50 it is called $srcdir. 
    205           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 
    206           case "$ac_given_srcdir" in 
    207             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 
    208             /*) top_srcdir="$ac_given_srcdir" ;; 
    209             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;; 
    210           esac 
    211           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 
    212             rm -f "$ac_dir/POTFILES" 
    213             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 
    214             sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" 
    215             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 
    216             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 
    217           fi 
    218           ;; 
    219         esac 
    220       done]) 
    221  
    222  
     278 
     279    dnl We need to process the po/ directory. 
     280    POSUB=po 
     281  fi 
     282 
     283  ifelse(gt_included_intl, yes, [ 
    223284    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 
    224285    dnl to 'yes' because some of the testsuite requires it. 
     
    227288    fi 
    228289 
    229     dnl intl/plural.c is generated from intl/plural.y. It requires bison, 
    230     dnl because plural.y uses bison specific features. It requires at least 
    231     dnl bison-1.26 because earlier versions generate a plural.c that doesn't 
    232     dnl compile. 
    233     dnl bison is only needed for the maintainer (who touches plural.y). But in 
    234     dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put 
    235     dnl the rule in general Makefile. Now, some people carelessly touch the 
    236     dnl files or have a broken "make" program, hence the plural.c rule will 
    237     dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not 
    238     dnl present or too old. 
    239     AC_CHECK_PROGS([INTLBISON], [bison]) 
    240     if test -z "$INTLBISON"; then 
    241       ac_verc_fail=yes 
    242     else 
    243       dnl Found it, now check the version. 
    244       AC_MSG_CHECKING([version of bison]) 
    245 changequote(<<,>>)dnl 
    246       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` 
    247       case $ac_prog_version in 
    248         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 
    249         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) 
    250 changequote([,])dnl 
    251            ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 
    252         *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 
    253       esac 
    254       AC_MSG_RESULT([$ac_prog_version]) 
    255     fi 
    256     if test $ac_verc_fail = yes; then 
    257       INTLBISON=: 
    258     fi 
    259  
    260     dnl These rules are solely for the distribution goal.  While doing this 
    261     dnl we only have to keep exactly one list of the available catalogs 
    262     dnl in configure.in. 
    263     for lang in $ALL_LINGUAS; do 
    264       GMOFILES="$GMOFILES $lang.gmo" 
    265       POFILES="$POFILES $lang.po" 
    266     done 
    267  
    268290    dnl Make all variables we use known to autoconf. 
    269291    AC_SUBST(BUILD_INCLUDED_LIBINTL) 
    270292    AC_SUBST(USE_INCLUDED_LIBINTL) 
    271     AC_SUBST(CATALOGS) 
    272293    AC_SUBST(CATOBJEXT) 
    273     AC_SUBST(GMOFILES) 
    274     AC_SUBST(INTLLIBS) 
    275294    AC_SUBST(INTLOBJS) 
    276     AC_SUBST(POFILES) 
    277     AC_SUBST(POSUB) 
    278295 
    279296    dnl For backward compatibility. Some configure.ins may be using this. 
     
    292309    GENCAT=gencat 
    293310    AC_SUBST(GENCAT) 
     311 
     312    dnl Enable libtool support if the surrounding package wishes it. 
     313    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 
     314    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 
    294315  ]) 
    295316 
    296 dnl Usage: Just like AM_WITH_NLS, which see. 
    297 AC_DEFUN([AM_GNU_GETTEXT], 
    298   [AC_REQUIRE([AC_PROG_MAKE_SET])dnl 
    299    AC_REQUIRE([AC_PROG_CC])dnl 
    300    AC_REQUIRE([AC_CANONICAL_HOST])dnl 
    301    AC_REQUIRE([AC_PROG_RANLIB])dnl 
    302    AC_REQUIRE([AC_ISC_POSIX])dnl 
    303    AC_REQUIRE([AC_HEADER_STDC])dnl 
    304    AC_REQUIRE([AC_C_CONST])dnl 
    305    AC_REQUIRE([AC_C_INLINE])dnl 
    306    AC_REQUIRE([AC_TYPE_OFF_T])dnl 
    307    AC_REQUIRE([AC_TYPE_SIZE_T])dnl 
    308    AC_REQUIRE([AC_FUNC_ALLOCA])dnl 
    309    AC_REQUIRE([AC_FUNC_MMAP])dnl 
    310    AC_REQUIRE([jm_GLIBC21])dnl 
    311  
    312    AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 
     317  dnl For backward compatibility. Some Makefiles may be using this. 
     318  INTLLIBS="$LIBINTL" 
     319  AC_SUBST(INTLLIBS) 
     320 
     321  dnl Make all documented variables known to autoconf. 
     322  AC_SUBST(LIBINTL) 
     323  AC_SUBST(LTLIBINTL) 
     324  AC_SUBST(POSUB) 
     325]) 
     326 
     327 
     328dnl Checks for all prerequisites of the po subdirectory, 
     329dnl except for USE_NLS. 
     330AC_DEFUN([AM_PO_SUBDIRS], 
     331
     332  AC_REQUIRE([AC_PROG_MAKE_SET])dnl 
     333  AC_REQUIRE([AC_PROG_INSTALL])dnl 
     334  AC_REQUIRE([AM_MKINSTALLDIRS])dnl 
     335 
     336  dnl Perform the following tests also if --disable-nls has been given, 
     337  dnl because they are needed for "make dist" to work. 
     338 
     339  dnl Search for GNU msgfmt in the PATH. 
     340  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. 
     341  dnl The second test excludes FreeBSD msgfmt. 
     342  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 
     343    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && 
     344     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 
     345    :) 
     346  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 
     347 
     348  dnl Search for GNU xgettext 0.11 or newer in the PATH. 
     349  dnl The first test excludes Solaris xgettext and early GNU xgettext versions. 
     350  dnl The second test excludes FreeBSD xgettext. 
     351  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
     352    [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && 
     353     (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 
     354    :) 
     355  dnl Remove leftover from FreeBSD xgettext call. 
     356  rm -f messages.po 
     357 
     358  dnl Search for GNU msgmerge 0.11 or newer in the PATH. 
     359  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, 
     360    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) 
     361 
     362  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 
     363  dnl Test whether we really found GNU msgfmt. 
     364  if test "$GMSGFMT" != ":"; then 
     365    dnl If it is no GNU msgfmt we define it as : so that the 
     366    dnl Makefiles still can work. 
     367    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && 
     368       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 
     369      : ; 
     370    else 
     371      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` 
     372      AC_MSG_RESULT( 
     373        [found $GMSGFMT program is not GNU msgfmt; ignore it]) 
     374      GMSGFMT=":" 
     375    fi 
     376  fi 
     377 
     378  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 
     379  dnl Test whether we really found GNU xgettext. 
     380  if test "$XGETTEXT" != ":"; then 
     381    dnl If it is no GNU xgettext we define it as : so that the 
     382    dnl Makefiles still can work. 
     383    if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && 
     384       (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 
     385      : ; 
     386    else 
     387      AC_MSG_RESULT( 
     388        [found xgettext program is not GNU xgettext; ignore it]) 
     389      XGETTEXT=":" 
     390    fi 
     391    dnl Remove leftover from FreeBSD xgettext call. 
     392    rm -f messages.po 
     393  fi 
     394 
     395  AC_OUTPUT_COMMANDS([ 
     396    for ac_file in $CONFIG_FILES; do 
     397      # Support "outfile[:infile[:infile...]]" 
     398      case "$ac_file" in 
     399        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 
     400      esac 
     401      # PO directories have a Makefile.in generated from Makefile.in.in. 
     402      case "$ac_file" in */Makefile.in) 
     403        # Adjust a relative srcdir. 
     404        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 
     405        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 
     406        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 
     407        # In autoconf-2.13 it is called $ac_given_srcdir. 
     408        # In autoconf-2.50 it is called $srcdir. 
     409        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 
     410        case "$ac_given_srcdir" in 
     411          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 
     412          /*) top_srcdir="$ac_given_srcdir" ;; 
     413          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;; 
     414        esac 
     415        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 
     416          rm -f "$ac_dir/POTFILES" 
     417          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 
     418          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 
     419          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend 
     420          # on $ac_dir but don't depend on user-specified configuration 
     421          # parameters. 
     422          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 
     423            # The LINGUAS file contains the set of available languages. 
     424            if test -n "$ALL_LINGUAS"; then 
     425              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 
     426            fi 
     427            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` 
     428            # Hide the ALL_LINGUAS assigment from automake. 
     429            eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 
     430          fi 
     431          case "$ac_given_srcdir" in 
     432            .) srcdirpre= ;; 
     433            *) srcdirpre='$(srcdir)/' ;; 
     434          esac 
     435          POFILES= 
     436          GMOFILES= 
     437          UPDATEPOFILES= 
     438          DUMMYPOFILES= 
     439          for lang in $ALL_LINGUAS; do 
     440            POFILES="$POFILES $srcdirpre$lang.po" 
     441            GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 
     442            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 
     443            DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 
     444          done 
     445          # CATALOGS depends on both $ac_dir and the user's LINGUAS 
     446          # environment variable. 
     447          INST_LINGUAS= 
     448          if test -n "$ALL_LINGUAS"; then 
     449            for presentlang in $ALL_LINGUAS; do 
     450              useit=no 
     451              if test "%UNSET%" != "$LINGUAS"; then 
     452                desiredlanguages="$LINGUAS" 
     453              else 
     454                desiredlanguages="$ALL_LINGUAS" 
     455              fi 
     456              for desiredlang in $desiredlanguages; do 
     457                # Use the presentlang catalog if desiredlang is 
     458                #   a. equal to presentlang, or 
     459                #   b. a variant of presentlang (because in this case, 
     460                #      presentlang can be used as a fallback for messages 
     461                #      which are not translated in the desiredlang catalog). 
     462                case "$desiredlang" in 
     463                  "$presentlang"*) useit=yes;; 
     464                esac 
     465              done 
     466              if test $useit = yes; then 
     467                INST_LINGUAS="$INST_LINGUAS $presentlang" 
     468              fi 
     469            done 
     470          fi 
     471          CATALOGS= 
     472          if test -n "$INST_LINGUAS"; then 
     473            for lang in $INST_LINGUAS; do 
     474              CATALOGS="$CATALOGS $lang.gmo" 
     475            done 
     476          fi 
     477          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 
     478          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 
     479          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do 
     480            if test -f "$f"; then 
     481              case "$f" in 
     482                *.orig | *.bak | *~) ;; 
     483                *) cat "$f" >> "$ac_dir/Makefile" ;; 
     484              esac 
     485            fi 
     486          done 
     487        fi 
     488        ;; 
     489      esac 
     490    done], 
     491   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute 
     492    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it 
     493    # from automake. 
     494    eval 'ALL_LINGUAS''="$ALL_LINGUAS"' 
     495    # Capture the value of LINGUAS because we need it to compute CATALOGS. 
     496    LINGUAS="${LINGUAS-%UNSET%}" 
     497   ]) 
     498]) 
     499 
     500 
     501dnl Checks for all prerequisites of the intl subdirectory, 
     502dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, 
     503dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. 
     504AC_DEFUN([AM_INTL_SUBDIR], 
     505
     506  AC_REQUIRE([AC_PROG_INSTALL])dnl 
     507  AC_REQUIRE([AM_MKINSTALLDIRS])dnl 
     508  AC_REQUIRE([AC_PROG_CC])dnl 
     509  AC_REQUIRE([AC_CANONICAL_HOST])dnl 
     510  AC_REQUIRE([AC_PROG_RANLIB])dnl 
     511  AC_REQUIRE([AC_ISC_POSIX])dnl 
     512  AC_REQUIRE([AC_HEADER_STDC])dnl 
     513  AC_REQUIRE([AC_C_CONST])dnl 
     514  AC_REQUIRE([AC_C_INLINE])dnl 
     515  AC_REQUIRE([AC_TYPE_OFF_T])dnl 
     516  AC_REQUIRE([AC_TYPE_SIZE_T])dnl 
     517  AC_REQUIRE([AC_FUNC_ALLOCA])dnl 
     518  AC_REQUIRE([AC_FUNC_MMAP])dnl 
     519  AC_REQUIRE([jm_GLIBC21])dnl 
     520  AC_REQUIRE([gt_INTDIV0])dnl 
     521  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl 
     522  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl 
     523  AC_REQUIRE([gt_INTTYPES_PRI])dnl 
     524 
     525  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 
    313526stdlib.h string.h unistd.h sys/param.h]) 
    314    AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \ 
    315 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ 
    316 strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) 
    317  
    318    AM_ICONV 
    319    AM_LANGINFO_CODESET 
    320    AM_LC_MESSAGES 
    321    AM_WITH_NLS([$1],[$2],[$3]) 
    322  
    323    if test "x$CATOBJEXT" != "x"; then 
    324      if test "x$ALL_LINGUAS" = "x"; then 
    325        LINGUAS= 
    326      else 
    327        AC_MSG_CHECKING(for catalogs to be installed) 
    328        NEW_LINGUAS= 
    329        for presentlang in $ALL_LINGUAS; do 
    330          useit=no 
    331          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do 
    332            # Use the presentlang catalog if desiredlang is 
    333            #   a. equal to presentlang, or 
    334            #   b. a variant of presentlang (because in this case, 
    335            #      presentlang can be used as a fallback for messages 
    336            #      which are not translated in the desiredlang catalog). 
    337            case "$desiredlang" in 
    338              "$presentlang"*) useit=yes;; 
    339            esac 
    340          done 
    341          if test $useit = yes; then 
    342            NEW_LINGUAS="$NEW_LINGUAS $presentlang" 
    343          fi 
    344        done 
    345        LINGUAS=$NEW_LINGUAS 
    346        AC_MSG_RESULT($LINGUAS) 
    347      fi 
    348  
    349      dnl Construct list of names of catalog files to be constructed. 
    350      if test -n "$LINGUAS"; then 
    351        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done 
    352      fi 
    353    fi 
    354  
    355    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 
    356    dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 
    357    dnl Try to locate is. 
    358    MKINSTALLDIRS= 
    359    if test -n "$ac_aux_dir"; then 
    360      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" 
    361    fi 
    362    if test -z "$MKINSTALLDIRS"; then 
    363      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 
    364    fi 
    365    AC_SUBST(MKINSTALLDIRS) 
    366  
    367    dnl Enable libtool support if the surrounding package wishes it. 
    368    INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) 
    369    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 
    370   ]) 
     527  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ 
     528geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ 
     529strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) 
     530 
     531  AM_ICONV 
     532  AM_LANGINFO_CODESET 
     533  if test $ac_cv_header_locale_h = yes; then 
     534    AM_LC_MESSAGES 
     535  fi 
     536 
     537  dnl intl/plural.c is generated from intl/plural.y. It requires bison, 
     538  dnl because plural.y uses bison specific features. It requires at least 
     539  dnl bison-1.26 because earlier versions generate a plural.c that doesn't 
     540  dnl compile. 
     541  dnl bison is only needed for the maintainer (who touches plural.y). But in 
     542  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put 
     543  dnl the rule in general Makefile. Now, some people carelessly touch the 
     544  dnl files or have a broken "make" program, hence the plural.c rule will 
     545  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not 
     546  dnl present or too old. 
     547  AC_CHECK_PROGS([INTLBISON], [bison]) 
     548  if test -z "$INTLBISON"; then 
     549    ac_verc_fail=yes 
     550  else 
     551    dnl Found it, now check the version. 
     552    AC_MSG_CHECKING([version of bison]) 
     553changequote(<<,>>)dnl 
     554    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` 
     555    case $ac_prog_version in 
     556      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 
     557      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) 
     558changequote([,])dnl 
     559         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 
     560      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 
     561    esac 
     562    AC_MSG_RESULT([$ac_prog_version]) 
     563  fi 
     564  if test $ac_verc_fail = yes; then 
     565    INTLBISON=: 
     566  fi 
     567]) 
     568 
     569 
     570AC_DEFUN([AM_MKINSTALLDIRS], 
     571
     572  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 
     573  dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 
     574  dnl Try to locate is. 
     575  MKINSTALLDIRS= 
     576  if test -n "$ac_aux_dir"; then 
     577    MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" 
     578  fi 
     579  if test -z "$MKINSTALLDIRS"; then 
     580    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 
     581  fi 
     582  AC_SUBST(MKINSTALLDIRS) 
     583]) 
     584 
     585 
     586dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 
     587AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 
  • m4/glibc21.m4

    r3eb8eef r7a508b3  
    1 #serial 2 
     1# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) 
     2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 
     3dnl This file is free software, distributed under the terms of the GNU 
     4dnl General Public License.  As a special exception to the GNU General 
     5dnl Public License, this file may be distributed as part of a program 
     6dnl that contains a configuration script generated by Autoconf, under 
     7dnl the same distribution terms as the rest of that program. 
    28 
    39# Test for the GNU C Library, version 2.1 or newer. 
  • m4/iconv.m4

    r3eb8eef r7a508b3  
    1 #serial AM2 
     1# iconv.m4 serial AM4 (gettext-0.11.3) 
     2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 
     3dnl This file is free software, distributed under the terms of the GNU 
     4dnl General Public License.  As a special exception to the GNU General 
     5dnl Public License, this file may be distributed as part of a program 
     6dnl that contains a configuration script generated by Autoconf, under 
     7dnl the same distribution terms as the rest of that program. 
    28 
    39dnl From Bruno Haible. 
    410 
    5 AC_DEFUN([AM_ICONV], 
     11AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 
     12
     13  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 
     14  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
     15  AC_REQUIRE([AC_LIB_RPATH]) 
     16 
     17  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
     18  dnl accordingly. 
     19  AC_LIB_LINKFLAGS_BODY([iconv]) 
     20]) 
     21 
     22AC_DEFUN([AM_ICONV_LINK], 
    623[ 
    724  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 
    825  dnl those with the standalone portable GNU libiconv installed). 
    926 
    10   AC_ARG_WITH([libiconv-prefix], 
    11 [  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [ 
    12     for dir in `echo "$withval" | tr : ' '`; do 
    13       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi 
    14       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi 
    15     done 
    16    ]) 
     27  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
     28  dnl accordingly. 
     29  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 
     30 
     31  dnl Add $INCICONV to CPPFLAGS before performing the following checks, 
     32  dnl because if the user has installed libiconv and not disabled its use 
     33  dnl via --without-libiconv-prefix, he wants to use it. The first 
     34  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 
     35  am_save_CPPFLAGS="$CPPFLAGS" 
     36  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 
    1737 
    1838  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 
     
    2747    if test "$am_cv_func_iconv" != yes; then 
    2848      am_save_LIBS="$LIBS" 
    29       LIBS="$LIBS -liconv
     49      LIBS="$LIBS $LIBICONV
    3050      AC_TRY_LINK([#include <stdlib.h> 
    3151#include <iconv.h>], 
     
    4060  if test "$am_cv_func_iconv" = yes; then 
    4161    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 
     62  fi 
     63  if test "$am_cv_lib_iconv" = yes; then 
     64    AC_MSG_CHECKING([how to link with libiconv]) 
     65    AC_MSG_RESULT([$LIBICONV]) 
     66  else 
     67    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 
     68    dnl either. 
     69    CPPFLAGS="$am_save_CPPFLAGS" 
     70    LIBICONV= 
     71    LTLIBICONV= 
     72  fi 
     73  AC_SUBST(LIBICONV) 
     74  AC_SUBST(LTLIBICONV) 
     75]) 
     76 
     77AC_DEFUN([AM_ICONV], 
     78[ 
     79  AM_ICONV_LINK 
     80  if test "$am_cv_func_iconv" = yes; then 
    4281    AC_MSG_CHECKING([for iconv declaration]) 
    4382    AC_CACHE_VAL(am_cv_proto_iconv, [ 
     
    62101      [Define as const if the declaration of iconv() needs const.]) 
    63102  fi 
    64   LIBICONV= 
    65   if test "$am_cv_lib_iconv" = yes; then 
    66     LIBICONV="-liconv" 
    67   fi 
    68   AC_SUBST(LIBICONV) 
    69103]) 
  • m4/isc-posix.m4

    r3eb8eef r7a508b3  
    1 #serial 1 
     1# isc-posix.m4 serial 2 (gettext-0.11.2) 
     2dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 
     3dnl This file is free software, distributed under the terms of the GNU 
     4dnl General Public License.  As a special exception to the GNU General 
     5dnl Public License, this file may be distributed as part of a program 
     6dnl that contains a configuration script generated by Autoconf, under 
     7dnl the same distribution terms as the rest of that program. 
     8 
     9# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005. 
     10 
    211# This test replaces the one in autoconf. 
    312# Currently this macro should have the same name as the autoconf macro