Changeset 207 for fm_server/aclocal.m4

Show
Ignore:
Timestamp:
01/16/08 14:17:20 (4 years ago)
Author:
ath
Message:

Move "fm_trunk".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • fm_server/aclocal.m4

    r206 r207  
    1616You have another version of autoconf.  If you want to use that, 
    1717you should regenerate the build system entirely.], [63])]) 
    18  
    19 # codeset.m4 serial 2 (gettext-0.16) 
    20 dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. 
    21 dnl This file is free software; the Free Software Foundation 
    22 dnl gives unlimited permission to copy and/or distribute it, 
    23 dnl with or without modifications, as long as this notice is preserved. 
    24  
    25 dnl From Bruno Haible. 
    26  
    27 AC_DEFUN([AM_LANGINFO_CODESET], 
    28 [ 
    29   AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 
    30     [AC_TRY_LINK([#include <langinfo.h>], 
    31       [char* cs = nl_langinfo(CODESET); return !cs;], 
    32       am_cv_langinfo_codeset=yes, 
    33       am_cv_langinfo_codeset=no) 
    34     ]) 
    35   if test $am_cv_langinfo_codeset = yes; then 
    36     AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 
    37       [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) 
    38   fi 
    39 ]) 
    40  
    41 # gettext.m4 serial 59 (gettext-0.16.1) 
    42 dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. 
    43 dnl This file is free software; the Free Software Foundation 
    44 dnl gives unlimited permission to copy and/or distribute it, 
    45 dnl with or without modifications, as long as this notice is preserved. 
    46 dnl 
    47 dnl This file can can be used in projects which are not available under 
    48 dnl the GNU General Public License or the GNU Library General Public 
    49 dnl License but which still want to provide support for the GNU gettext 
    50 dnl functionality. 
    51 dnl Please note that the actual code of the GNU gettext library is covered 
    52 dnl by the GNU Library General Public License, and the rest of the GNU 
    53 dnl gettext package package is covered by the GNU General Public License. 
    54 dnl They are *not* in the public domain. 
    55  
    56 dnl Authors: 
    57 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 
    58 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006. 
    59  
    60 dnl Macro to add for using GNU gettext. 
    61  
    62 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 
    63 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 
    64 dnl    default (if it is not specified or empty) is 'no-libtool'. 
    65 dnl    INTLSYMBOL should be 'external' for packages with no intl directory, 
    66 dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory. 
    67 dnl    If INTLSYMBOL is 'use-libtool', then a libtool library 
    68 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static, 
    69 dnl    depending on --{enable,disable}-{shared,static} and on the presence of 
    70 dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 
    71 dnl    $(top_builddir)/intl/libintl.a will be created. 
    72 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 
    73 dnl    implementations (in libc or libintl) without the ngettext() function 
    74 dnl    will be ignored.  If NEEDSYMBOL is specified and is 
    75 dnl    'need-formatstring-macros', then GNU gettext implementations that don't 
    76 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 
    77 dnl INTLDIR is used to find the intl libraries.  If empty, 
    78 dnl    the value `$(top_builddir)/intl/' is used. 
    79 dnl 
    80 dnl The result of the configuration is one of three cases: 
    81 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 
    82 dnl    and used. 
    83 dnl    Catalog format: GNU --> install in $(datadir) 
    84 dnl    Catalog extension: .mo after installation, .gmo in source tree 
    85 dnl 2) GNU gettext has been found in the system's C library. 
    86 dnl    Catalog format: GNU --> install in $(datadir) 
    87 dnl    Catalog extension: .mo after installation, .gmo in source tree 
    88 dnl 3) No internationalization, always use English msgid. 
    89 dnl    Catalog format: none 
    90 dnl    Catalog extension: none 
    91 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. 
    92 dnl The use of .gmo is historical (it was needed to avoid overwriting the 
    93 dnl GNU format catalogs when building on a platform with an X/Open gettext), 
    94 dnl but we keep it in order not to force irrelevant filename changes on the 
    95 dnl maintainers. 
    96 dnl 
    97 AC_DEFUN([AM_GNU_GETTEXT], 
    98 [ 
    99   dnl Argument checking. 
    100   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 
    101     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 
    102 ])])])])]) 
    103   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 
    104     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 
    105 ])])])]) 
    106   define([gt_included_intl], 
    107     ifelse([$1], [external], 
    108       ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), 
    109       [yes])) 
    110   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) 
    111   gt_NEEDS_INIT 
    112   AM_GNU_GETTEXT_NEED([$2]) 
    113  
    114   AC_REQUIRE([AM_PO_SUBDIRS])dnl 
    115   ifelse(gt_included_intl, yes, [ 
    116     AC_REQUIRE([AM_INTL_SUBDIR])dnl 
    117   ]) 
    118  
    119   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 
    120   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    121   AC_REQUIRE([AC_LIB_RPATH]) 
    122  
    123   dnl Sometimes libintl requires libiconv, so first search for libiconv. 
    124   dnl Ideally we would do this search only after the 
    125   dnl      if test "$USE_NLS" = "yes"; then 
    126   dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 
    127   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT 
    128   dnl the configure script would need to contain the same shell code 
    129   dnl again, outside any 'if'. There are two solutions: 
    130   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 
    131   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 
    132   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 
    133   dnl documented, we avoid it. 
    134   ifelse(gt_included_intl, yes, , [ 
    135     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 
    136   ]) 
    137  
    138   dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. 
    139   gt_INTL_MACOSX 
    140  
    141   dnl Set USE_NLS. 
    142   AC_REQUIRE([AM_NLS]) 
    143  
    144   ifelse(gt_included_intl, yes, [ 
    145     BUILD_INCLUDED_LIBINTL=no 
    146     USE_INCLUDED_LIBINTL=no 
    147   ]) 
    148   LIBINTL= 
    149   LTLIBINTL= 
    150   POSUB= 
    151  
    152   dnl Add a version number to the cache macros. 
    153   case " $gt_needs " in 
    154     *" need-formatstring-macros "*) gt_api_version=3 ;; 
    155     *" need-ngettext "*) gt_api_version=2 ;; 
    156     *) gt_api_version=1 ;; 
    157   esac 
    158   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" 
    159   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" 
    160  
    161   dnl If we use NLS figure out what method 
    162   if test "$USE_NLS" = "yes"; then 
    163     gt_use_preinstalled_gnugettext=no 
    164     ifelse(gt_included_intl, yes, [ 
    165       AC_MSG_CHECKING([whether included gettext is requested]) 
    166       AC_ARG_WITH(included-gettext, 
    167         [  --with-included-gettext use the GNU gettext library included here], 
    168         nls_cv_force_use_gnu_gettext=$withval, 
    169         nls_cv_force_use_gnu_gettext=no) 
    170       AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) 
    171  
    172       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 
    173       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 
    174     ]) 
    175         dnl User does not insist on using GNU NLS library.  Figure out what 
    176         dnl to use.  If GNU gettext is available we use this.  Else we have 
    177         dnl to fall back to GNU NLS library. 
    178  
    179         if test $gt_api_version -ge 3; then 
    180           gt_revision_test_code=' 
    181 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION 
    182 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 
    183 #endif 
    184 changequote(,)dnl 
    185 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 
    186 changequote([,])dnl 
    187 ' 
    188         else 
    189           gt_revision_test_code= 
    190         fi 
    191         if test $gt_api_version -ge 2; then 
    192           gt_expression_test_code=' + * ngettext ("", "", 0)' 
    193         else 
    194           gt_expression_test_code= 
    195         fi 
    196  
    197         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], 
    198          [AC_TRY_LINK([#include <libintl.h> 
    199 $gt_revision_test_code 
    200 extern int _nl_msg_cat_cntr; 
    201 extern int *_nl_domain_bindings;], 
    202             [bindtextdomain ("", ""); 
    203 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], 
    204             [eval "$gt_func_gnugettext_libc=yes"], 
    205             [eval "$gt_func_gnugettext_libc=no"])]) 
    206  
    207         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 
    208           dnl Sometimes libintl requires libiconv, so first search for libiconv. 
    209           ifelse(gt_included_intl, yes, , [ 
    210             AM_ICONV_LINK 
    211           ]) 
    212           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL 
    213           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) 
    214           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL 
    215           dnl even if libiconv doesn't exist. 
    216           AC_LIB_LINKFLAGS_BODY([intl]) 
    217           AC_CACHE_CHECK([for GNU gettext in libintl], 
    218             [$gt_func_gnugettext_libintl], 
    219            [gt_save_CPPFLAGS="$CPPFLAGS" 
    220             CPPFLAGS="$CPPFLAGS $INCINTL" 
    221             gt_save_LIBS="$LIBS" 
    222             LIBS="$LIBS $LIBINTL" 
    223             dnl Now see whether libintl exists and does not depend on libiconv. 
    224             AC_TRY_LINK([#include <libintl.h> 
    225 $gt_revision_test_code 
    226 extern int _nl_msg_cat_cntr; 
    227 extern 
    228 #ifdef __cplusplus 
    229 "C" 
    230 #endif 
    231 const char *_nl_expand_alias (const char *);], 
    232               [bindtextdomain ("", ""); 
    233 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 
    234               [eval "$gt_func_gnugettext_libintl=yes"], 
    235               [eval "$gt_func_gnugettext_libintl=no"]) 
    236             dnl Now see whether libintl exists and depends on libiconv. 
    237             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then 
    238               LIBS="$LIBS $LIBICONV" 
    239               AC_TRY_LINK([#include <libintl.h> 
    240 $gt_revision_test_code 
    241 extern int _nl_msg_cat_cntr; 
    242 extern 
    243 #ifdef __cplusplus 
    244 "C" 
    245 #endif 
    246 const char *_nl_expand_alias (const char *);], 
    247                 [bindtextdomain ("", ""); 
    248 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 
    249                [LIBINTL="$LIBINTL $LIBICONV" 
    250                 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 
    251                 eval "$gt_func_gnugettext_libintl=yes" 
    252                ]) 
    253             fi 
    254             CPPFLAGS="$gt_save_CPPFLAGS" 
    255             LIBS="$gt_save_LIBS"]) 
    256         fi 
    257  
    258         dnl If an already present or preinstalled GNU gettext() is found, 
    259         dnl use it.  But if this macro is used in GNU gettext, and GNU 
    260         dnl gettext is already preinstalled in libintl, we update this 
    261         dnl libintl.  (Cf. the install rule in intl/Makefile.in.) 
    262         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ 
    263            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ 
    264                 && test "$PACKAGE" != gettext-runtime \ 
    265                 && test "$PACKAGE" != gettext-tools; }; then 
    266           gt_use_preinstalled_gnugettext=yes 
    267         else 
    268           dnl Reset the values set by searching for libintl. 
    269           LIBINTL= 
    270           LTLIBINTL= 
    271           INCINTL= 
    272         fi 
    273  
    274     ifelse(gt_included_intl, yes, [ 
    275         if test "$gt_use_preinstalled_gnugettext" != "yes"; then 
    276           dnl GNU gettext is not found in the C library. 
    277           dnl Fall back on included GNU gettext library. 
    278           nls_cv_use_gnu_gettext=yes 
    279         fi 
    280       fi 
    281  
    282       if test "$nls_cv_use_gnu_gettext" = "yes"; then 
    283         dnl Mark actions used to generate GNU NLS library. 
    284         BUILD_INCLUDED_LIBINTL=yes 
    285         USE_INCLUDED_LIBINTL=yes 
    286         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" 
    287         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" 
    288         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 
    289       fi 
    290  
    291       CATOBJEXT= 
    292       if test "$gt_use_preinstalled_gnugettext" = "yes" \ 
    293          || test "$nls_cv_use_gnu_gettext" = "yes"; then 
    294         dnl Mark actions to use GNU gettext tools. 
    295         CATOBJEXT=.gmo 
    296       fi 
    297     ]) 
    298  
    299     if test -n "$INTL_MACOSX_LIBS"; then 
    300       if test "$gt_use_preinstalled_gnugettext" = "yes" \ 
    301          || test "$nls_cv_use_gnu_gettext" = "yes"; then 
    302         dnl Some extra flags are needed during linking. 
    303         LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" 
    304         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" 
    305       fi 
    306     fi 
    307  
    308     if test "$gt_use_preinstalled_gnugettext" = "yes" \ 
    309        || test "$nls_cv_use_gnu_gettext" = "yes"; then 
    310       AC_DEFINE(ENABLE_NLS, 1, 
    311         [Define to 1 if translation of program messages to the user's native language 
    312    is requested.]) 
    313     else 
    314       USE_NLS=no 
    315     fi 
    316   fi 
    317  
    318   AC_MSG_CHECKING([whether to use NLS]) 
    319   AC_MSG_RESULT([$USE_NLS]) 
    320   if test "$USE_NLS" = "yes"; then 
    321     AC_MSG_CHECKING([where the gettext function comes from]) 
    322     if test "$gt_use_preinstalled_gnugettext" = "yes"; then 
    323       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 
    324         gt_source="external libintl" 
    325       else 
    326         gt_source="libc" 
    327       fi 
    328     else 
    329       gt_source="included intl directory" 
    330     fi 
    331     AC_MSG_RESULT([$gt_source]) 
    332   fi 
    333  
    334   if test "$USE_NLS" = "yes"; then 
    335  
    336     if test "$gt_use_preinstalled_gnugettext" = "yes"; then 
    337       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 
    338         AC_MSG_CHECKING([how to link with libintl]) 
    339         AC_MSG_RESULT([$LIBINTL]) 
    340         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) 
    341       fi 
    342  
    343       dnl For backward compatibility. Some packages may be using this. 
    344       AC_DEFINE(HAVE_GETTEXT, 1, 
    345        [Define if the GNU gettext() function is already present or preinstalled.]) 
    346       AC_DEFINE(HAVE_DCGETTEXT, 1, 
    347        [Define if the GNU dcgettext() function is already present or preinstalled.]) 
    348     fi 
    349  
    350     dnl We need to process the po/ directory. 
    351     POSUB=po 
    352   fi 
    353  
    354   ifelse(gt_included_intl, yes, [ 
    355     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 
    356     dnl to 'yes' because some of the testsuite requires it. 
    357     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then 
    358       BUILD_INCLUDED_LIBINTL=yes 
    359     fi 
    360  
    361     dnl Make all variables we use known to autoconf. 
    362     AC_SUBST(BUILD_INCLUDED_LIBINTL) 
    363     AC_SUBST(USE_INCLUDED_LIBINTL) 
    364     AC_SUBST(CATOBJEXT) 
    365  
    366     dnl For backward compatibility. Some configure.ins may be using this. 
    367     nls_cv_header_intl= 
    368     nls_cv_header_libgt= 
    369  
    370     dnl For backward compatibility. Some Makefiles may be using this. 
    371     DATADIRNAME=share 
    372     AC_SUBST(DATADIRNAME) 
    373  
    374     dnl For backward compatibility. Some Makefiles may be using this. 
    375     INSTOBJEXT=.mo 
    376     AC_SUBST(INSTOBJEXT) 
    377  
    378     dnl For backward compatibility. Some Makefiles may be using this. 
    379     GENCAT=gencat 
    380     AC_SUBST(GENCAT) 
    381  
    382     dnl For backward compatibility. Some Makefiles may be using this. 
    383     INTLOBJS= 
    384     if test "$USE_INCLUDED_LIBINTL" = yes; then 
    385       INTLOBJS="\$(GETTOBJS)" 
    386     fi 
    387     AC_SUBST(INTLOBJS) 
    388  
    389     dnl Enable libtool support if the surrounding package wishes it. 
    390     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 
    391     AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 
    392   ]) 
    393  
    394   dnl For backward compatibility. Some Makefiles may be using this. 
    395   INTLLIBS="$LIBINTL" 
    396   AC_SUBST(INTLLIBS) 
    397  
    398   dnl Make all documented variables known to autoconf. 
    399   AC_SUBST(LIBINTL) 
    400   AC_SUBST(LTLIBINTL) 
    401   AC_SUBST(POSUB) 
    402 ]) 
    403  
    404  
    405 dnl Checks for special options needed on MacOS X. 
    406 dnl Defines INTL_MACOSX_LIBS. 
    407 AC_DEFUN([gt_INTL_MACOSX], 
    408 [ 
    409   dnl Check for API introduced in MacOS X 10.2. 
    410   AC_CACHE_CHECK([for CFPreferencesCopyAppValue], 
    411     gt_cv_func_CFPreferencesCopyAppValue, 
    412     [gt_save_LIBS="$LIBS" 
    413      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 
    414      AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], 
    415        [CFPreferencesCopyAppValue(NULL, NULL)], 
    416        [gt_cv_func_CFPreferencesCopyAppValue=yes], 
    417        [gt_cv_func_CFPreferencesCopyAppValue=no]) 
    418      LIBS="$gt_save_LIBS"]) 
    419   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then 
    420     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, 
    421       [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) 
    422   fi 
    423   dnl Check for API introduced in MacOS X 10.3. 
    424   AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, 
    425     [gt_save_LIBS="$LIBS" 
    426      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 
    427      AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], 
    428        [gt_cv_func_CFLocaleCopyCurrent=yes], 
    429        [gt_cv_func_CFLocaleCopyCurrent=no]) 
    430      LIBS="$gt_save_LIBS"]) 
    431   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then 
    432     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, 
    433       [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) 
    434   fi 
    435   INTL_MACOSX_LIBS= 
    436   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then 
    437     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" 
    438   fi 
    439   AC_SUBST([INTL_MACOSX_LIBS]) 
    440 ]) 
    441  
    442  
    443 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. 
    444 m4_define([gt_NEEDS_INIT], 
    445 [ 
    446   m4_divert_text([DEFAULTS], [gt_needs=]) 
    447   m4_define([gt_NEEDS_INIT], []) 
    448 ]) 
    449  
    450  
    451 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) 
    452 AC_DEFUN([AM_GNU_GETTEXT_NEED], 
    453 [ 
    454   m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) 
    455 ]) 
    456  
    457  
    458 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 
    459 AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 
    460  
    461 # glibc2.m4 serial 1 
    462 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. 
    463 dnl This file is free software; the Free Software Foundation 
    464 dnl gives unlimited permission to copy and/or distribute it, 
    465 dnl with or without modifications, as long as this notice is preserved. 
    466  
    467 # Test for the GNU C Library, version 2.0 or newer. 
    468 # From Bruno Haible. 
    469  
    470 AC_DEFUN([gt_GLIBC2], 
    471   [ 
    472     AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, 
    473       ac_cv_gnu_library_2, 
    474       [AC_EGREP_CPP([Lucky GNU user], 
    475         [ 
    476 #include <features.h> 
    477 #ifdef __GNU_LIBRARY__ 
    478  #if (__GLIBC__ >= 2) 
    479   Lucky GNU user 
    480  #endif 
    481 #endif 
    482         ], 
    483         ac_cv_gnu_library_2=yes, 
    484         ac_cv_gnu_library_2=no) 
    485       ] 
    486     ) 
    487     AC_SUBST(GLIBC2) 
    488     GLIBC2="$ac_cv_gnu_library_2" 
    489   ] 
    490 ) 
    491  
    492 # glibc21.m4 serial 3 
    493 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. 
    494 dnl This file is free software; the Free Software Foundation 
    495 dnl gives unlimited permission to copy and/or distribute it, 
    496 dnl with or without modifications, as long as this notice is preserved. 
    497  
    498 # Test for the GNU C Library, version 2.1 or newer. 
    499 # From Bruno Haible. 
    500  
    501 AC_DEFUN([gl_GLIBC21], 
    502   [ 
    503     AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, 
    504       ac_cv_gnu_library_2_1, 
    505       [AC_EGREP_CPP([Lucky GNU user], 
    506         [ 
    507 #include <features.h> 
    508 #ifdef __GNU_LIBRARY__ 
    509  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 
    510   Lucky GNU user 
    511  #endif 
    512 #endif 
    513         ], 
    514         ac_cv_gnu_library_2_1=yes, 
    515         ac_cv_gnu_library_2_1=no) 
    516       ] 
    517     ) 
    518     AC_SUBST(GLIBC21) 
    519     GLIBC21="$ac_cv_gnu_library_2_1" 
    520   ] 
    521 ) 
    522  
    523 # iconv.m4 serial AM4 (gettext-0.11.3) 
    524 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 
    525 dnl This file is free software; the Free Software Foundation 
    526 dnl gives unlimited permission to copy and/or distribute it, 
    527 dnl with or without modifications, as long as this notice is preserved. 
    528  
    529 dnl From Bruno Haible. 
    530  
    531 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 
    532 [ 
    533   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 
    534   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    535   AC_REQUIRE([AC_LIB_RPATH]) 
    536  
    537   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
    538   dnl accordingly. 
    539   AC_LIB_LINKFLAGS_BODY([iconv]) 
    540 ]) 
    541  
    542 AC_DEFUN([AM_ICONV_LINK], 
    543 [ 
    544   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 
    545   dnl those with the standalone portable GNU libiconv installed). 
    546  
    547   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
    548   dnl accordingly. 
    549   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 
    550  
    551   dnl Add $INCICONV to CPPFLAGS before performing the following checks, 
    552   dnl because if the user has installed libiconv and not disabled its use 
    553   dnl via --without-libiconv-prefix, he wants to use it. The first 
    554   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 
    555   am_save_CPPFLAGS="$CPPFLAGS" 
    556   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 
    557  
    558   AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 
    559     am_cv_func_iconv="no, consider installing GNU libiconv" 
    560     am_cv_lib_iconv=no 
    561     AC_TRY_LINK([#include <stdlib.h> 
    562 #include <iconv.h>], 
    563       [iconv_t cd = iconv_open("",""); 
    564        iconv(cd,NULL,NULL,NULL,NULL); 
    565        iconv_close(cd);], 
    566       am_cv_func_iconv=yes) 
    567     if test "$am_cv_func_iconv" != yes; then 
    568       am_save_LIBS="$LIBS" 
    569       LIBS="$LIBS $LIBICONV" 
    570       AC_TRY_LINK([#include <stdlib.h> 
    571 #include <iconv.h>], 
    572         [iconv_t cd = iconv_open("",""); 
    573          iconv(cd,NULL,NULL,NULL,NULL); 
    574          iconv_close(cd);], 
    575         am_cv_lib_iconv=yes 
    576         am_cv_func_iconv=yes) 
    577       LIBS="$am_save_LIBS" 
    578     fi 
    579   ]) 
    580   if test "$am_cv_func_iconv" = yes; then 
    581     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 
    582   fi 
    583   if test "$am_cv_lib_iconv" = yes; then 
    584     AC_MSG_CHECKING([how to link with libiconv]) 
    585     AC_MSG_RESULT([$LIBICONV]) 
    586   else 
    587     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 
    588     dnl either. 
    589     CPPFLAGS="$am_save_CPPFLAGS" 
    590     LIBICONV= 
    591     LTLIBICONV= 
    592   fi 
    593   AC_SUBST(LIBICONV) 
    594   AC_SUBST(LTLIBICONV) 
    595 ]) 
    596  
    597 AC_DEFUN([AM_ICONV], 
    598 [ 
    599   AM_ICONV_LINK 
    600   if test "$am_cv_func_iconv" = yes; then 
    601     AC_MSG_CHECKING([for iconv declaration]) 
    602     AC_CACHE_VAL(am_cv_proto_iconv, [ 
    603       AC_TRY_COMPILE([ 
    604 #include <stdlib.h> 
    605 #include <iconv.h> 
    606 extern 
    607 #ifdef __cplusplus 
    608 "C" 
    609 #endif 
    610 #if defined(__STDC__) || defined(__cplusplus) 
    611 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 
    612 #else 
    613 size_t iconv(); 
    614 #endif 
    615 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 
    616       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 
    617     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 
    618     AC_MSG_RESULT([$]{ac_t:- 
    619          }[$]am_cv_proto_iconv) 
    620     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 
    621       [Define as const if the declaration of iconv() needs const.]) 
    622   fi 
    623 ]) 
    624  
    625 # intdiv0.m4 serial 1 (gettext-0.11.3) 
    626 dnl Copyright (C) 2002 Free Software Foundation, Inc. 
    627 dnl This file is free software; the Free Software Foundation 
    628 dnl gives unlimited permission to copy and/or distribute it, 
    629 dnl with or without modifications, as long as this notice is preserved. 
    630  
    631 dnl From Bruno Haible. 
    632  
    633 AC_DEFUN([gt_INTDIV0], 
    634 [ 
    635   AC_REQUIRE([AC_PROG_CC])dnl 
    636   AC_REQUIRE([AC_CANONICAL_HOST])dnl 
    637  
    638   AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 
    639     gt_cv_int_divbyzero_sigfpe, 
    640     [ 
    641       AC_TRY_RUN([ 
    642 #include <stdlib.h> 
    643 #include <signal.h> 
    644  
    645 static void 
    646 #ifdef __cplusplus 
    647 sigfpe_handler (int sig) 
    648 #else 
    649 sigfpe_handler (sig) int sig; 
    650 #endif 
    651 { 
    652   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */ 
    653   exit (sig != SIGFPE); 
    654 } 
    655  
    656 int x = 1; 
    657 int y = 0; 
    658 int z; 
    659 int nan; 
    660  
    661 int main () 
    662 { 
    663   signal (SIGFPE, sigfpe_handler); 
    664 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */ 
    665 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) 
    666   signal (SIGTRAP, sigfpe_handler); 
    667 #endif 
    668 /* Linux/SPARC yields signal SIGILL.  */ 
    669 #if defined (__sparc__) && defined (__linux__) 
    670   signal (SIGILL, sigfpe_handler); 
    671 #endif 
    672  
    673   z = x / y; 
    674   nan = y / y; 
    675   exit (1); 
    676 } 
    677 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 
    678         [ 
    679           # Guess based on the CPU. 
    680           case "$host_cpu" in 
    681             alpha* | i[34567]86 | m68k | s390*) 
    682               gt_cv_int_divbyzero_sigfpe="guessing yes";; 
    683             *) 
    684               gt_cv_int_divbyzero_sigfpe="guessing no";; 
    685           esac 
    686         ]) 
    687     ]) 
    688   case "$gt_cv_int_divbyzero_sigfpe" in 
    689     *yes) value=1;; 
    690     *) value=0;; 
    691   esac 
    692   AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, 
    693     [Define if integer division by zero raises signal SIGFPE.]) 
    694 ]) 
    695  
    696 # intl.m4 serial 3 (gettext-0.16) 
    697 dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. 
    698 dnl This file is free software; the Free Software Foundation 
    699 dnl gives unlimited permission to copy and/or distribute it, 
    700 dnl with or without modifications, as long as this notice is preserved. 
    701 dnl 
    702 dnl This file can can be used in projects which are not available under 
    703 dnl the GNU General Public License or the GNU Library General Public 
    704 dnl License but which still want to provide support for the GNU gettext 
    705 dnl functionality. 
    706 dnl Please note that the actual code of the GNU gettext library is covered 
    707 dnl by the GNU Library General Public License, and the rest of the GNU 
    708 dnl gettext package package is covered by the GNU General Public License. 
    709 dnl They are *not* in the public domain. 
    710  
    711 dnl Authors: 
    712 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 
    713 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006. 
    714  
    715 AC_PREREQ(2.52) 
    716  
    717 dnl Checks for all prerequisites of the intl subdirectory, 
    718 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, 
    719 dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. 
    720 AC_DEFUN([AM_INTL_SUBDIR], 
    721 [ 
    722   AC_REQUIRE([AC_PROG_INSTALL])dnl 
    723   AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake 
    724   AC_REQUIRE([AC_PROG_CC])dnl 
    725   AC_REQUIRE([AC_CANONICAL_HOST])dnl 
    726   AC_REQUIRE([gt_GLIBC2])dnl 
    727   AC_REQUIRE([AC_PROG_RANLIB])dnl 
    728   AC_REQUIRE([gl_VISIBILITY])dnl 
    729   AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl 
    730   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl 
    731   AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl 
    732   AC_REQUIRE([gt_TYPE_WCHAR_T])dnl 
    733   AC_REQUIRE([gt_TYPE_WINT_T])dnl 
    734   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 
    735   AC_REQUIRE([gt_TYPE_INTMAX_T]) 
    736   AC_REQUIRE([gt_PRINTF_POSIX]) 
    737   AC_REQUIRE([gl_GLIBC21])dnl 
    738   AC_REQUIRE([gl_XSIZE])dnl 
    739   AC_REQUIRE([gt_INTL_MACOSX])dnl 
    740  
    741   AC_CHECK_TYPE([ptrdiff_t], , 
    742     [AC_DEFINE([ptrdiff_t], [long], 
    743        [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) 
    744     ]) 
    745   AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) 
    746   AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) 
    747  
    748   dnl Use the _snprintf function only if it is declared (because on NetBSD it 
    749   dnl is defined as a weak alias of snprintf; we prefer to use the latter). 
    750   gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) 
    751   gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) 
    752  
    753   dnl Use the *_unlocked functions only if they are declared. 
    754   dnl (because some of them were defined without being declared in Solaris 
    755   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built 
    756   dnl on Solaris 2.5.1 to run on Solaris 2.6). 
    757   dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. 
    758   gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) 
    759  
    760   case $gt_cv_func_printf_posix in 
    761     *yes) HAVE_POSIX_PRINTF=1 ;; 
    762     *) HAVE_POSIX_PRINTF=0 ;; 
    763   esac 
    764   AC_SUBST([HAVE_POSIX_PRINTF]) 
    765   if test "$ac_cv_func_asprintf" = yes; then 
    766     HAVE_ASPRINTF=1 
    767   else 
    768     HAVE_ASPRINTF=0 
    769   fi 
    770   AC_SUBST([HAVE_ASPRINTF]) 
    771   if test "$ac_cv_func_snprintf" = yes; then 
    772     HAVE_SNPRINTF=1 
    773   else 
    774     HAVE_SNPRINTF=0 
    775   fi 
    776   AC_SUBST([HAVE_SNPRINTF]) 
    777   if test "$ac_cv_func_wprintf" = yes; then 
    778     HAVE_WPRINTF=1 
    779   else 
    780     HAVE_WPRINTF=0 
    781   fi 
    782   AC_SUBST([HAVE_WPRINTF]) 
    783  
    784   AM_LANGINFO_CODESET 
    785   gt_LC_MESSAGES 
    786  
    787   dnl Compilation on mingw and Cygwin needs special Makefile rules, because 
    788   dnl 1. when we install a shared library, we must arrange to export 
    789   dnl    auxiliary pointer variables for every exported variable, 
    790   dnl 2. when we install a shared library and a static library simultaneously, 
    791   dnl    the include file specifies __declspec(dllimport) and therefore we 
    792   dnl    must arrange to define the auxiliary pointer variables for the 
    793   dnl    exported variables _also_ in the static library. 
    794   if test "$enable_shared" = yes; then 
    795     case "$host_os" in 
    796       cygwin*) is_woe32dll=yes ;; 
    797       *) is_woe32dll=no ;; 
    798     esac 
    799   else 
    800     is_woe32dll=no 
    801   fi 
    802   WOE32DLL=$is_woe32dll 
    803   AC_SUBST([WOE32DLL]) 
    804  
    805   dnl Rename some macros and functions used for locking. 
    806   AH_BOTTOM([ 
    807 #define __libc_lock_t                   gl_lock_t 
    808 #define __libc_lock_define              gl_lock_define 
    809 #define __libc_lock_define_initialized  gl_lock_define_initialized 
    810 #define __libc_lock_init                gl_lock_init 
    811 #define __libc_lock_lock                gl_lock_lock 
    812 #define __libc_lock_unlock              gl_lock_unlock 
    813 #define __libc_lock_recursive_t                   gl_recursive_lock_t 
    814 #define __libc_lock_define_recursive              gl_recursive_lock_define 
    815 #define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized 
    816 #define __libc_lock_init_recursive                gl_recursive_lock_init 
    817 #define __libc_lock_lock_recursive                gl_recursive_lock_lock 
    818 #define __libc_lock_unlock_recursive              gl_recursive_lock_unlock 
    819 #define glthread_in_use  libintl_thread_in_use 
    820 #define glthread_lock_init     libintl_lock_init 
    821 #define glthread_lock_lock     libintl_lock_lock 
    822 #define glthread_lock_unlock   libintl_lock_unlock 
    823 #define glthread_lock_destroy  libintl_lock_destroy 
    824 #define glthread_rwlock_init     libintl_rwlock_init 
    825 #define glthread_rwlock_rdlock   libintl_rwlock_rdlock 
    826 #define glthread_rwlock_wrlock   libintl_rwlock_wrlock 
    827 #define glthread_rwlock_unlock   libintl_rwlock_unlock 
    828 #define glthread_rwlock_destroy  libintl_rwlock_destroy 
    829 #define glthread_recursive_lock_init     libintl_recursive_lock_init 
    830 #define glthread_recursive_lock_lock     libintl_recursive_lock_lock 
    831 #define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock 
    832 #define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy 
    833 #define glthread_once                 libintl_once 
    834 #define glthread_once_call            libintl_once_call 
    835 #define glthread_once_singlethreaded  libintl_once_singlethreaded 
    836 ]) 
    837 ]) 
    838  
    839  
    840 dnl Checks for the core files of the intl subdirectory: 
    841 dnl   dcigettext.c 
    842 dnl   eval-plural.h 
    843 dnl   explodename.c 
    844 dnl   finddomain.c 
    845 dnl   gettextP.h 
    846 dnl   gmo.h 
    847 dnl   hash-string.h hash-string.c 
    848 dnl   l10nflist.c 
    849 dnl   libgnuintl.h.in (except the *printf stuff) 
    850 dnl   loadinfo.h 
    851 dnl   loadmsgcat.c 
    852 dnl   localealias.c 
    853 dnl   log.c 
    854 dnl   plural-exp.h plural-exp.c 
    855 dnl   plural.y 
    856 dnl Used by libglocale. 
    857 AC_DEFUN([gt_INTL_SUBDIR_CORE], 
    858 [ 
    859   AC_REQUIRE([AC_C_INLINE])dnl 
    860   AC_REQUIRE([AC_TYPE_SIZE_T])dnl 
    861   AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 
    862   AC_REQUIRE([AC_FUNC_ALLOCA])dnl 
    863   AC_REQUIRE([AC_FUNC_MMAP])dnl 
    864   AC_REQUIRE([gt_INTDIV0])dnl 
    865   AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl 
    866   AC_REQUIRE([gt_INTTYPES_PRI])dnl 
    867   AC_REQUIRE([gl_LOCK])dnl 
    868  
    869   AC_TRY_LINK( 
    870     [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], 
    871     [], 
    872     [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, 
    873        [Define to 1 if the compiler understands __builtin_expect.])]) 
    874  
    875   AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) 
    876   AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ 
    877     stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ 
    878     argz_next __fsetlocking]) 
    879  
    880   dnl Use the *_unlocked functions only if they are declared. 
    881   dnl (because some of them were defined without being declared in Solaris 
    882   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built 
    883   dnl on Solaris 2.5.1 to run on Solaris 2.6). 
    884   dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. 
    885   gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) 
    886   gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) 
    887  
    888   AM_ICONV 
    889  
    890   dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, 
    891   dnl and a _NL_LOCALE_NAME macro always. 
    892   AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, 
    893     [AC_TRY_LINK([#include <langinfo.h> 
    894 #include <locale.h>], 
    895       [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));], 
    896       gt_cv_nl_locale_name=yes, 
    897       gt_cv_nl_locale_name=no) 
    898     ]) 
    899   if test $gt_cv_nl_locale_name = yes; then 
    900     AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, 
    901       [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) 
    902   fi 
    903  
    904   dnl intl/plural.c is generated from intl/plural.y. It requires bison, 
    905   dnl because plural.y uses bison specific features. It requires at least 
    906   dnl bison-1.26 because earlier versions generate a plural.c that doesn't 
    907   dnl compile. 
    908   dnl bison is only needed for the maintainer (who touches plural.y). But in 
    909   dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put 
    910   dnl the rule in general Makefile. Now, some people carelessly touch the 
    911   dnl files or have a broken "make" program, hence the plural.c rule will 
    912   dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not 
    913   dnl present or too old. 
    914   AC_CHECK_PROGS([INTLBISON], [bison]) 
    915   if test -z "$INTLBISON"; then 
    916     ac_verc_fail=yes 
    917   else 
    918     dnl Found it, now check the version. 
    919     AC_MSG_CHECKING([version of bison]) 
    920 changequote(<<,>>)dnl 
    921     ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` 
    922     case $ac_prog_version in 
    923       '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 
    924       1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) 
    925 changequote([,])dnl 
    926          ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 
    927       *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 
    928     esac 
    929     AC_MSG_RESULT([$ac_prog_version]) 
    930   fi 
    931   if test $ac_verc_fail = yes; then 
    932     INTLBISON=: 
    933   fi 
    934 ]) 
    935  
    936  
    937 dnl gt_CHECK_DECL(FUNC, INCLUDES) 
    938 dnl Check whether a function is declared. 
    939 AC_DEFUN([gt_CHECK_DECL], 
    940 [ 
    941   AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, 
    942     [AC_TRY_COMPILE([$2], [ 
    943 #ifndef $1 
    944   char *p = (char *) $1; 
    945 #endif 
    946 ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) 
    947   if test $ac_cv_have_decl_$1 = yes; then 
    948     gt_value=1 
    949   else 
    950     gt_value=0 
    951   fi 
    952   AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], 
    953     [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) 
    954 ]) 
    955  
    956 # intmax.m4 serial 3 (gettext-0.16) 
    957 dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. 
    958 dnl This file is free software; the Free Software Foundation 
    959 dnl gives unlimited permission to copy and/or distribute it, 
    960 dnl with or without modifications, as long as this notice is preserved. 
    961  
    962 dnl From Bruno Haible. 
    963 dnl Test whether the system has the 'intmax_t' type, but don't attempt to 
    964 dnl find a replacement if it is lacking. 
    965  
    966 AC_DEFUN([gt_TYPE_INTMAX_T], 
    967 [ 
    968   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 
    969   AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 
    970   AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, 
    971     [AC_TRY_COMPILE([ 
    972 #include <stddef.h> 
    973 #include <stdlib.h> 
    974 #if HAVE_STDINT_H_WITH_UINTMAX 
    975 #include <stdint.h> 
    976 #endif 
    977 #if HAVE_INTTYPES_H_WITH_UINTMAX 
    978 #include <inttypes.h> 
    979 #endif 
    980 ],     [intmax_t x = -1; 
    981         return !x;], 
    982        gt_cv_c_intmax_t=yes, 
    983        gt_cv_c_intmax_t=no)]) 
    984   if test $gt_cv_c_intmax_t = yes; then 
    985     AC_DEFINE(HAVE_INTMAX_T, 1, 
    986       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) 
    987   fi 
    988 ]) 
    989  
    990 # inttypes-pri.m4 serial 4 (gettext-0.16) 
    991 dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. 
    992 dnl This file is free software; the Free Software Foundation 
    993 dnl gives unlimited permission to copy and/or distribute it, 
    994 dnl with or without modifications, as long as this notice is preserved. 
    995  
    996 dnl From Bruno Haible. 
    997  
    998 AC_PREREQ(2.52) 
    999  
    1000 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* 
    1001 # macros to non-string values.  This is the case on AIX 4.3.3. 
    1002  
    1003 AC_DEFUN([gt_INTTYPES_PRI], 
    1004 [ 
    1005   AC_CHECK_HEADERS([inttypes.h]) 
    1006   if test $ac_cv_header_inttypes_h = yes; then 
    1007     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], 
    1008       gt_cv_inttypes_pri_broken, 
    1009       [ 
    1010         AC_TRY_COMPILE([#include <inttypes.h> 
    1011 #ifdef PRId32 
    1012 char *p = PRId32; 
    1013 #endif 
    1014 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) 
    1015       ]) 
    1016   fi 
    1017   if test "$gt_cv_inttypes_pri_broken" = yes; then 
    1018     AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, 
    1019       [Define if <inttypes.h> exists and defines unusable PRI* macros.]) 
    1020     PRI_MACROS_BROKEN=1 
    1021   else 
    1022     PRI_MACROS_BROKEN=0 
    1023   fi 
    1024   AC_SUBST([PRI_MACROS_BROKEN]) 
    1025 ]) 
    1026  
    1027 # inttypes_h.m4 serial 7 
    1028 dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. 
    1029 dnl This file is free software; the Free Software Foundation 
    1030 dnl gives unlimited permission to copy and/or distribute it, 
    1031 dnl with or without modifications, as long as this notice is preserved. 
    1032  
    1033 dnl From Paul Eggert. 
    1034  
    1035 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, 
    1036 # doesn't clash with <sys/types.h>, and declares uintmax_t. 
    1037  
    1038 AC_DEFUN([gl_AC_HEADER_INTTYPES_H], 
    1039 [ 
    1040   AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, 
    1041   [AC_TRY_COMPILE( 
    1042     [#include <sys/types.h> 
    1043 #include <inttypes.h>], 
    1044     [uintmax_t i = (uintmax_t) -1; return !i;], 
    1045     gl_cv_header_inttypes_h=yes, 
    1046     gl_cv_header_inttypes_h=no)]) 
    1047   if test $gl_cv_header_inttypes_h = yes; then 
    1048     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, 
    1049       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, 
    1050        and declares uintmax_t. ]) 
    1051   fi 
    1052 ]) 
    1053  
    1054 # lcmessage.m4 serial 4 (gettext-0.14.2) 
    1055 dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. 
    1056 dnl This file is free software; the Free Software Foundation 
    1057 dnl gives unlimited permission to copy and/or distribute it, 
    1058 dnl with or without modifications, as long as this notice is preserved. 
    1059 dnl 
    1060 dnl This file can can be used in projects which are not available under 
    1061 dnl the GNU General Public License or the GNU Library General Public 
    1062 dnl License but which still want to provide support for the GNU gettext 
    1063 dnl functionality. 
    1064 dnl Please note that the actual code of the GNU gettext library is covered 
    1065 dnl by the GNU Library General Public License, and the rest of the GNU 
    1066 dnl gettext package package is covered by the GNU General Public License. 
    1067 dnl They are *not* in the public domain. 
    1068  
    1069 dnl Authors: 
    1070 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995. 
    1071  
    1072 # Check whether LC_MESSAGES is available in <locale.h>. 
    1073  
    1074 AC_DEFUN([gt_LC_MESSAGES], 
    1075 [ 
    1076   AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, 
    1077     [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 
    1078        gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) 
    1079   if test $gt_cv_val_LC_MESSAGES = yes; then 
    1080     AC_DEFINE(HAVE_LC_MESSAGES, 1, 
    1081       [Define if your <locale.h> file defines LC_MESSAGES.]) 
    1082   fi 
    1083 ]) 
    1084  
    1085 # lib-ld.m4 serial 3 (gettext-0.13) 
    1086 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 
    1087 dnl This file is free software; the Free Software Foundation 
    1088 dnl gives unlimited permission to copy and/or distribute it, 
    1089 dnl with or without modifications, as long as this notice is preserved. 
    1090  
    1091 dnl Subroutines of libtool.m4, 
    1092 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 
    1093 dnl with libtool.m4. 
    1094  
    1095 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 
    1096 AC_DEFUN([AC_LIB_PROG_LD_GNU], 
    1097 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 
    1098 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 
    1099 case `$LD -v 2>&1 </dev/null` in 
    1100 *GNU* | *'with BFD'*) 
    1101   acl_cv_prog_gnu_ld=yes ;; 
    1102 *) 
    1103   acl_cv_prog_gnu_ld=no ;; 
    1104 esac]) 
    1105 with_gnu_ld=$acl_cv_prog_gnu_ld 
    1106 ]) 
    1107  
    1108 dnl From libtool-1.4. Sets the variable LD. 
    1109 AC_DEFUN([AC_LIB_PROG_LD], 
    1110 [AC_ARG_WITH(gnu-ld, 
    1111 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]], 
    1112 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 
    1113 AC_REQUIRE([AC_PROG_CC])dnl 
    1114 AC_REQUIRE([AC_CANONICAL_HOST])dnl 
    1115 # Prepare PATH_SEPARATOR. 
    1116 # The user is always right. 
    1117 if test "${PATH_SEPARATOR+set}" != set; then 
    1118   echo "#! /bin/sh" >conf$$.sh 
    1119   echo  "exit 0"   >>conf$$.sh 
    1120   chmod +x conf$$.sh 
    1121   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 
    1122     PATH_SEPARATOR=';' 
    1123   else 
    1124     PATH_SEPARATOR=: 
    1125   fi 
    1126   rm -f conf$$.sh 
    1127 fi 
    1128 ac_prog=ld 
    1129 if test "$GCC" = yes; then 
    1130   # Check if gcc -print-prog-name=ld gives a path. 
    1131   AC_MSG_CHECKING([for ld used by GCC]) 
    1132   case $host in 
    1133   *-*-mingw*) 
    1134     # gcc leaves a trailing carriage return which upsets mingw 
    1135     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 
    1136   *) 
    1137     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 
    1138   esac 
    1139   case $ac_prog in 
    1140     # Accept absolute paths. 
    1141     [[\\/]* | [A-Za-z]:[\\/]*)] 
    1142       [re_direlt='/[^/][^/]*/\.\./'] 
    1143       # Canonicalize the path of ld 
    1144       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 
    1145       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 
    1146         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 
    1147       done 
    1148       test -z "$LD" && LD="$ac_prog" 
    1149       ;; 
    1150   "") 
    1151     # If it fails, then pretend we aren't using GCC. 
    1152     ac_prog=ld 
    1153     ;; 
    1154   *) 
    1155     # If it is relative, then search for the first ld in PATH. 
    1156     with_gnu_ld=unknown 
    1157     ;; 
    1158   esac 
    1159 elif test "$with_gnu_ld" = yes; then 
    1160   AC_MSG_CHECKING([for GNU ld]) 
    1161 else 
    1162   AC_MSG_CHECKING([for non-GNU ld]) 
    1163 fi 
    1164 AC_CACHE_VAL(acl_cv_path_LD, 
    1165 [if test -z "$LD"; then 
    1166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 
    1167   for ac_dir in $PATH; do 
    1168     test -z "$ac_dir" && ac_dir=. 
    1169     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 
    1170       acl_cv_path_LD="$ac_dir/$ac_prog" 
    1171       # Check to see if the program is GNU ld.  I'd rather use --version, 
    1172       # but apparently some GNU ld's only accept -v. 
    1173       # Break only if it was the GNU/non-GNU ld that we prefer. 
    1174       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 
    1175       *GNU* | *'with BFD'*) 
    1176         test "$with_gnu_ld" != no && break ;; 
    1177       *) 
    1178         test "$with_gnu_ld" != yes && break ;; 
    1179       esac 
    1180     fi 
    1181   done 
    1182   IFS="$ac_save_ifs" 
    1183 else 
    1184   acl_cv_path_LD="$LD" # Let the user override the test with a path. 
    1185 fi]) 
    1186 LD="$acl_cv_path_LD" 
    1187 if test -n "$LD"; then 
    1188   AC_MSG_RESULT($LD) 
    1189 else 
    1190   AC_MSG_RESULT(no) 
    1191 fi 
    1192 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 
    1193 AC_LIB_PROG_LD_GNU 
    1194 ]) 
    1195  
    1196 # lib-link.m4 serial 9 (gettext-0.16) 
    1197 dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. 
    1198 dnl This file is free software; the Free Software Foundation 
    1199 dnl gives unlimited permission to copy and/or distribute it, 
    1200 dnl with or without modifications, as long as this notice is preserved. 
    1201  
    1202 dnl From Bruno Haible. 
    1203  
    1204 AC_PREREQ(2.50) 
    1205  
    1206 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 
    1207 dnl the libraries corresponding to explicit and implicit dependencies. 
    1208 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 
    1209 dnl augments the CPPFLAGS variable. 
    1210 AC_DEFUN([AC_LIB_LINKFLAGS], 
    1211 [ 
    1212   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    1213   AC_REQUIRE([AC_LIB_RPATH]) 
    1214   define([Name],[translit([$1],[./-], [___])]) 
    1215   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    1216                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    1217   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 
    1218     AC_LIB_LINKFLAGS_BODY([$1], [$2]) 
    1219     ac_cv_lib[]Name[]_libs="$LIB[]NAME" 
    1220     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 
    1221     ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 
    1222   ]) 
    1223   LIB[]NAME="$ac_cv_lib[]Name[]_libs" 
    1224   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 
    1225   INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 
    1226   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 
    1227   AC_SUBST([LIB]NAME) 
    1228   AC_SUBST([LTLIB]NAME) 
    1229   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 
    1230   dnl results of this search when this library appears as a dependency. 
    1231   HAVE_LIB[]NAME=yes 
    1232   undefine([Name]) 
    1233   undefine([NAME]) 
    1234 ]) 
    1235  
    1236 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 
    1237 dnl searches for libname and the libraries corresponding to explicit and 
    1238 dnl implicit dependencies, together with the specified include files and 
    1239 dnl the ability to compile and link the specified testcode. If found, it 
    1240 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 
    1241 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 
    1242 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 
    1243 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 
    1244 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 
    1245 [ 
    1246   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    1247   AC_REQUIRE([AC_LIB_RPATH]) 
    1248   define([Name],[translit([$1],[./-], [___])]) 
    1249   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    1250                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    1251  
    1252   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 
    1253   dnl accordingly. 
    1254   AC_LIB_LINKFLAGS_BODY([$1], [$2]) 
    1255  
    1256   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 
    1257   dnl because if the user has installed lib[]Name and not disabled its use 
    1258   dnl via --without-lib[]Name-prefix, he wants to use it. 
    1259   ac_save_CPPFLAGS="$CPPFLAGS" 
    1260   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 
    1261  
    1262   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 
    1263     ac_save_LIBS="$LIBS" 
    1264     LIBS="$LIBS $LIB[]NAME" 
    1265     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 
    1266     LIBS="$ac_save_LIBS" 
    1267   ]) 
    1268   if test "$ac_cv_lib[]Name" = yes; then 
    1269     HAVE_LIB[]NAME=yes 
    1270     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 
    1271     AC_MSG_CHECKING([how to link with lib[]$1]) 
    1272     AC_MSG_RESULT([$LIB[]NAME]) 
    1273   else 
    1274     HAVE_LIB[]NAME=no 
    1275     dnl If $LIB[]NAME didn't lead to a usable library, we don't need 
    1276     dnl $INC[]NAME either. 
    1277     CPPFLAGS="$ac_save_CPPFLAGS" 
    1278     LIB[]NAME= 
    1279     LTLIB[]NAME= 
    1280   fi 
    1281   AC_SUBST([HAVE_LIB]NAME) 
    1282   AC_SUBST([LIB]NAME) 
    1283   AC_SUBST([LTLIB]NAME) 
    1284   undefine([Name]) 
    1285   undefine([NAME]) 
    1286 ]) 
    1287  
    1288 dnl Determine the platform dependent parameters needed to use rpath: 
    1289 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 
    1290 dnl hardcode_direct, hardcode_minus_L. 
    1291 AC_DEFUN([AC_LIB_RPATH], 
    1292 [ 
    1293   dnl Tell automake >= 1.10 to complain if config.rpath is missing. 
    1294   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) 
    1295   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS 
    1296   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld 
    1297   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host 
    1298   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 
    1299   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 
    1300     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 
    1301     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 
    1302     . ./conftest.sh 
    1303     rm -f ./conftest.sh 
    1304     acl_cv_rpath=done 
    1305   ]) 
    1306   wl="$acl_cv_wl" 
    1307   libext="$acl_cv_libext" 
    1308   shlibext="$acl_cv_shlibext" 
    1309   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 
    1310   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 
    1311   hardcode_direct="$acl_cv_hardcode_direct" 
    1312   hardcode_minus_L="$acl_cv_hardcode_minus_L" 
    1313   dnl Determine whether the user wants rpath handling at all. 
    1314   AC_ARG_ENABLE(rpath, 
    1315     [  --disable-rpath         do not hardcode runtime library paths], 
    1316     :, enable_rpath=yes) 
    1317 ]) 
    1318  
    1319 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 
    1320 dnl the libraries corresponding to explicit and implicit dependencies. 
    1321 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 
    1322 AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    1323 [ 
    1324   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 
    1325   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    1326                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    1327   dnl By default, look in $includedir and $libdir. 
    1328   use_additional=yes 
    1329   AC_LIB_WITH_FINAL_PREFIX([ 
    1330     eval additional_includedir=\"$includedir\" 
    1331     eval additional_libdir=\"$libdir\" 
    1332   ]) 
    1333   AC_LIB_ARG_WITH([lib$1-prefix], 
    1334 [  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib 
    1335   --without-lib$1-prefix     don't search for lib$1 in includedir and libdir], 
    1336 [ 
    1337     if test "X$withval" = "Xno"; then 
    1338       use_additional=no 
    1339     else 
    1340       if test "X$withval" = "X"; then 
    1341         AC_LIB_WITH_FINAL_PREFIX([ 
    1342           eval additional_includedir=\"$includedir\" 
    1343           eval additional_libdir=\"$libdir\" 
    1344         ]) 
    1345       else 
    1346         additional_includedir="$withval/include" 
    1347         additional_libdir="$withval/$acl_libdirstem" 
    1348       fi 
    1349     fi 
    1350 ]) 
    1351   dnl Search the library and its dependencies in $additional_libdir and 
    1352   dnl $LDFLAGS. Using breadth-first-seach. 
    1353   LIB[]NAME= 
    1354   LTLIB[]NAME= 
    1355   INC[]NAME= 
    1356   rpathdirs= 
    1357   ltrpathdirs= 
    1358   names_already_handled= 
    1359   names_next_round='$1 $2' 
    1360   while test -n "$names_next_round"; do 
    1361     names_this_round="$names_next_round" 
    1362     names_next_round= 
    1363     for name in $names_this_round; do 
    1364       already_handled= 
    1365       for n in $names_already_handled; do 
    1366         if test "$n" = "$name"; then 
    1367           already_handled=yes 
    1368           break 
    1369         fi 
    1370       done 
    1371       if test -z "$already_handled"; then 
    1372         names_already_handled="$names_already_handled $name" 
    1373         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 
    1374         dnl or AC_LIB_HAVE_LINKFLAGS call. 
    1375         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 
    1376         eval value=\"\$HAVE_LIB$uppername\" 
    1377         if test -n "$value"; then 
    1378           if test "$value" = yes; then 
    1379             eval value=\"\$LIB$uppername\" 
    1380             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 
    1381             eval value=\"\$LTLIB$uppername\" 
    1382             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 
    1383           else 
    1384             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 
    1385             dnl that this library doesn't exist. So just drop it. 
    1386             : 
    1387           fi 
    1388         else 
    1389           dnl Search the library lib$name in $additional_libdir and $LDFLAGS 
    1390           dnl and the already constructed $LIBNAME/$LTLIBNAME. 
    1391           found_dir= 
    1392           found_la= 
    1393           found_so= 
    1394           found_a= 
    1395           if test $use_additional = yes; then 
    1396             if test -n "$shlibext" \ 
    1397                && { test -f "$additional_libdir/lib$name.$shlibext" \ 
    1398                     || { test "$shlibext" = dll \ 
    1399                          && test -f "$additional_libdir/lib$name.dll.a"; }; }; then 
    1400               found_dir="$additional_libdir" 
    1401               if test -f "$additional_libdir/lib$name.$shlibext"; then 
    1402                 found_so="$additional_libdir/lib$name.$shlibext" 
    1403               else 
    1404                 found_so="$additional_libdir/lib$name.dll.a" 
    1405               fi 
    1406               if test -f "$additional_libdir/lib$name.la"; then 
    1407                 found_la="$additional_libdir/lib$name.la" 
    1408               fi 
    1409             else 
    1410               if test -f "$additional_libdir/lib$name.$libext"; then 
    1411                 found_dir="$additional_libdir" 
    1412                 found_a="$additional_libdir/lib$name.$libext" 
    1413                 if test -f "$additional_libdir/lib$name.la"; then 
    1414                   found_la="$additional_libdir/lib$name.la" 
    1415                 fi 
    1416               fi 
    1417             fi 
    1418           fi 
    1419           if test "X$found_dir" = "X"; then 
    1420             for x in $LDFLAGS $LTLIB[]NAME; do 
    1421               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1422               case "$x" in 
    1423                 -L*) 
    1424                   dir=`echo "X$x" | sed -e 's/^X-L//'` 
    1425                   if test -n "$shlibext" \ 
    1426                      && { test -f "$dir/lib$name.$shlibext" \ 
    1427                           || { test "$shlibext" = dll \ 
    1428                                && test -f "$dir/lib$name.dll.a"; }; }; then 
    1429                     found_dir="$dir" 
    1430                     if test -f "$dir/lib$name.$shlibext"; then 
    1431                       found_so="$dir/lib$name.$shlibext" 
    1432                     else 
    1433                       found_so="$dir/lib$name.dll.a" 
    1434                     fi 
    1435                     if test -f "$dir/lib$name.la"; then 
    1436                       found_la="$dir/lib$name.la" 
    1437                     fi 
    1438                   else 
    1439                     if test -f "$dir/lib$name.$libext"; then 
    1440                       found_dir="$dir" 
    1441                       found_a="$dir/lib$name.$libext" 
    1442                       if test -f "$dir/lib$name.la"; then 
    1443                         found_la="$dir/lib$name.la" 
    1444                       fi 
    1445                     fi 
    1446                   fi 
    1447                   ;; 
    1448               esac 
    1449               if test "X$found_dir" != "X"; then 
    1450                 break 
    1451               fi 
    1452             done 
    1453           fi 
    1454           if test "X$found_dir" != "X"; then 
    1455             dnl Found the library. 
    1456             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 
    1457             if test "X$found_so" != "X"; then 
    1458               dnl Linking with a shared library. We attempt to hardcode its 
    1459               dnl directory into the executable's runpath, unless it's the 
    1460               dnl standard /usr/lib. 
    1461               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then 
    1462                 dnl No hardcoding is needed. 
    1463                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    1464               else 
    1465                 dnl Use an explicit option to hardcode DIR into the resulting 
    1466                 dnl binary. 
    1467                 dnl Potentially add DIR to ltrpathdirs. 
    1468                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 
    1469                 haveit= 
    1470                 for x in $ltrpathdirs; do 
    1471                   if test "X$x" = "X$found_dir"; then 
    1472                     haveit=yes 
    1473                     break 
    1474                   fi 
    1475                 done 
    1476                 if test -z "$haveit"; then 
    1477                   ltrpathdirs="$ltrpathdirs $found_dir" 
    1478                 fi 
    1479                 dnl The hardcoding into $LIBNAME is system dependent. 
    1480                 if test "$hardcode_direct" = yes; then 
    1481                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the 
    1482                   dnl resulting binary. 
    1483                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    1484                 else 
    1485                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 
    1486                     dnl Use an explicit option to hardcode DIR into the resulting 
    1487                     dnl binary. 
    1488                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    1489                     dnl Potentially add DIR to rpathdirs. 
    1490                     dnl The rpathdirs will be appended to $LIBNAME at the end. 
    1491                     haveit= 
    1492                     for x in $rpathdirs; do 
    1493                       if test "X$x" = "X$found_dir"; then 
    1494                         haveit=yes 
    1495                         break 
    1496                       fi 
    1497                     done 
    1498                     if test -z "$haveit"; then 
    1499                       rpathdirs="$rpathdirs $found_dir" 
    1500                     fi 
    1501                   else 
    1502                     dnl Rely on "-L$found_dir". 
    1503                     dnl But don't add it if it's already contained in the LDFLAGS 
    1504                     dnl or the already constructed $LIBNAME 
    1505                     haveit= 
    1506                     for x in $LDFLAGS $LIB[]NAME; do 
    1507                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1508                       if test "X$x" = "X-L$found_dir"; then 
    1509                         haveit=yes 
    1510                         break 
    1511                       fi 
    1512                     done 
    1513                     if test -z "$haveit"; then 
    1514                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 
    1515                     fi 
    1516                     if test "$hardcode_minus_L" != no; then 
    1517                       dnl FIXME: Not sure whether we should use 
    1518                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 
    1519                       dnl here. 
    1520                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    1521                     else 
    1522                       dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH 
    1523                       dnl here, because this doesn't fit in flags passed to the 
    1524                       dnl compiler. So give up. No hardcoding. This affects only 
    1525                       dnl very old systems. 
    1526                       dnl FIXME: Not sure whether we should use 
    1527                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 
    1528                       dnl here. 
    1529                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 
    1530                     fi 
    1531                   fi 
    1532                 fi 
    1533               fi 
    1534             else 
    1535               if test "X$found_a" != "X"; then 
    1536                 dnl Linking with a static library. 
    1537                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 
    1538               else 
    1539                 dnl We shouldn't come here, but anyway it's good to have a 
    1540                 dnl fallback. 
    1541                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 
    1542               fi 
    1543             fi 
    1544             dnl Assume the include files are nearby. 
    1545             additional_includedir= 
    1546             case "$found_dir" in 
    1547               */$acl_libdirstem | */$acl_libdirstem/) 
    1548                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 
    1549                 additional_includedir="$basedir/include" 
    1550                 ;; 
    1551             esac 
    1552             if test "X$additional_includedir" != "X"; then 
    1553               dnl Potentially add $additional_includedir to $INCNAME. 
    1554               dnl But don't add it 
    1555               dnl   1. if it's the standard /usr/include, 
    1556               dnl   2. if it's /usr/local/include and we are using GCC on Linux, 
    1557               dnl   3. if it's already present in $CPPFLAGS or the already 
    1558               dnl      constructed $INCNAME, 
    1559               dnl   4. if it doesn't exist as a directory. 
    1560               if test "X$additional_includedir" != "X/usr/include"; then 
    1561                 haveit= 
    1562                 if test "X$additional_includedir" = "X/usr/local/include"; then 
    1563                   if test -n "$GCC"; then 
    1564                     case $host_os in 
    1565                       linux* | gnu* | k*bsd*-gnu) haveit=yes;; 
    1566                     esac 
    1567                   fi 
    1568                 fi 
    1569                 if test -z "$haveit"; then 
    1570                   for x in $CPPFLAGS $INC[]NAME; do 
    1571                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1572                     if test "X$x" = "X-I$additional_includedir"; then 
    1573                       haveit=yes 
    1574                       break 
    1575                     fi 
    1576                   done 
    1577                   if test -z "$haveit"; then 
    1578                     if test -d "$additional_includedir"; then 
    1579                       dnl Really add $additional_includedir to $INCNAME. 
    1580                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 
    1581                     fi 
    1582                   fi 
    1583                 fi 
    1584               fi 
    1585             fi 
    1586             dnl Look for dependencies. 
    1587             if test -n "$found_la"; then 
    1588               dnl Read the .la file. It defines the variables 
    1589               dnl dlname, library_names, old_library, dependency_libs, current, 
    1590               dnl age, revision, installed, dlopen, dlpreopen, libdir. 
    1591               save_libdir="$libdir" 
    1592               case "$found_la" in 
    1593                 */* | *\\*) . "$found_la" ;; 
    1594                 *) . "./$found_la" ;; 
    1595               esac 
    1596               libdir="$save_libdir" 
    1597               dnl We use only dependency_libs. 
    1598               for dep in $dependency_libs; do 
    1599                 case "$dep" in 
    1600                   -L*) 
    1601                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 
    1602                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 
    1603                     dnl But don't add it 
    1604                     dnl   1. if it's the standard /usr/lib, 
    1605                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux, 
    1606                     dnl   3. if it's already present in $LDFLAGS or the already 
    1607                     dnl      constructed $LIBNAME, 
    1608                     dnl   4. if it doesn't exist as a directory. 
    1609                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 
    1610                       haveit= 
    1611                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 
    1612                         if test -n "$GCC"; then 
    1613                           case $host_os in 
    1614                             linux* | gnu* | k*bsd*-gnu) haveit=yes;; 
    1615                           esac 
    1616                         fi 
    1617                       fi 
    1618                       if test -z "$haveit"; then 
    1619                         haveit= 
    1620                         for x in $LDFLAGS $LIB[]NAME; do 
    1621                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1622                           if test "X$x" = "X-L$additional_libdir"; then 
    1623                             haveit=yes 
    1624                             break 
    1625                           fi 
    1626                         done 
    1627                         if test -z "$haveit"; then 
    1628                           if test -d "$additional_libdir"; then 
    1629                             dnl Really add $additional_libdir to $LIBNAME. 
    1630                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 
    1631                           fi 
    1632                         fi 
    1633                         haveit= 
    1634                         for x in $LDFLAGS $LTLIB[]NAME; do 
    1635                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1636                           if test "X$x" = "X-L$additional_libdir"; then 
    1637                             haveit=yes 
    1638                             break 
    1639                           fi 
    1640                         done 
    1641                         if test -z "$haveit"; then 
    1642                           if test -d "$additional_libdir"; then 
    1643                             dnl Really add $additional_libdir to $LTLIBNAME. 
    1644                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 
    1645                           fi 
    1646                         fi 
    1647                       fi 
    1648                     fi 
    1649                     ;; 
    1650                   -R*) 
    1651                     dir=`echo "X$dep" | sed -e 's/^X-R//'` 
    1652                     if test "$enable_rpath" != no; then 
    1653                       dnl Potentially add DIR to rpathdirs. 
    1654                       dnl The rpathdirs will be appended to $LIBNAME at the end. 
    1655                       haveit= 
    1656                       for x in $rpathdirs; do 
    1657                         if test "X$x" = "X$dir"; then 
    1658                           haveit=yes 
    1659                           break 
    1660                         fi 
    1661                       done 
    1662                       if test -z "$haveit"; then 
    1663                         rpathdirs="$rpathdirs $dir" 
    1664                       fi 
    1665                       dnl Potentially add DIR to ltrpathdirs. 
    1666                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 
    1667                       haveit= 
    1668                       for x in $ltrpathdirs; do 
    1669                         if test "X$x" = "X$dir"; then 
    1670                           haveit=yes 
    1671                           break 
    1672                         fi 
    1673                       done 
    1674                       if test -z "$haveit"; then 
    1675                         ltrpathdirs="$ltrpathdirs $dir" 
    1676                       fi 
    1677                     fi 
    1678                     ;; 
    1679                   -l*) 
    1680                     dnl Handle this in the next round. 
    1681                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 
    1682                     ;; 
    1683                   *.la) 
    1684                     dnl Handle this in the next round. Throw away the .la's 
    1685                     dnl directory; it is already contained in a preceding -L 
    1686                     dnl option. 
    1687                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 
    1688                     ;; 
    1689                   *) 
    1690                     dnl Most likely an immediate library name. 
    1691                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 
    1692                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 
    1693                     ;; 
    1694                 esac 
    1695               done 
    1696             fi 
    1697           else 
    1698             dnl Didn't find the library; assume it is in the system directories 
    1699             dnl known to the linker and runtime loader. (All the system 
    1700             dnl directories known to the linker should also be known to the 
    1701             dnl runtime loader, otherwise the system is severely misconfigured.) 
    1702             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 
    1703             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 
    1704           fi 
    1705         fi 
    1706       fi 
    1707     done 
    1708   done 
    1709   if test "X$rpathdirs" != "X"; then 
    1710     if test -n "$hardcode_libdir_separator"; then 
    1711       dnl Weird platform: only the last -rpath option counts, the user must 
    1712       dnl pass all path elements in one option. We can arrange that for a 
    1713       dnl single library, but not when more than one $LIBNAMEs are used. 
    1714       alldirs= 
    1715       for found_dir in $rpathdirs; do 
    1716         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" 
    1717       done 
    1718       dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. 
    1719       acl_save_libdir="$libdir" 
    1720       libdir="$alldirs" 
    1721       eval flag=\"$hardcode_libdir_flag_spec\" 
    1722       libdir="$acl_save_libdir" 
    1723       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 
    1724     else 
    1725       dnl The -rpath options are cumulative. 
    1726       for found_dir in $rpathdirs; do 
    1727         acl_save_libdir="$libdir" 
    1728         libdir="$found_dir" 
    1729         eval flag=\"$hardcode_libdir_flag_spec\" 
    1730         libdir="$acl_save_libdir" 
    1731         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 
    1732       done 
    1733     fi 
    1734   fi 
    1735   if test "X$ltrpathdirs" != "X"; then 
    1736     dnl When using libtool, the option that works for both libraries and 
    1737     dnl executables is -R. The -R options are cumulative. 
    1738     for found_dir in $ltrpathdirs; do 
    1739       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 
    1740     done 
    1741   fi 
    1742 ]) 
    1743  
    1744 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 
    1745 dnl unless already present in VAR. 
    1746 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 
    1747 dnl contains two or three consecutive elements that belong together. 
    1748 AC_DEFUN([AC_LIB_APPENDTOVAR], 
    1749 [ 
    1750   for element in [$2]; do 
    1751     haveit= 
    1752     for x in $[$1]; do 
    1753       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1754       if test "X$x" = "X$element"; then 
    1755         haveit=yes 
    1756         break 
    1757       fi 
    1758     done 
    1759     if test -z "$haveit"; then 
    1760       [$1]="${[$1]}${[$1]:+ }$element" 
    1761     fi 
    1762   done 
    1763 ]) 
    1764  
    1765 dnl For those cases where a variable contains several -L and -l options 
    1766 dnl referring to unknown libraries and directories, this macro determines the 
    1767 dnl necessary additional linker options for the runtime path. 
    1768 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 
    1769 dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 
    1770 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 
    1771 dnl otherwise linking without libtool is assumed. 
    1772 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], 
    1773 [ 
    1774   AC_REQUIRE([AC_LIB_RPATH]) 
    1775   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 
    1776   $1= 
    1777   if test "$enable_rpath" != no; then 
    1778     if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 
    1779       dnl Use an explicit option to hardcode directories into the resulting 
    1780       dnl binary. 
    1781       rpathdirs= 
    1782       next= 
    1783       for opt in $2; do 
    1784         if test -n "$next"; then 
    1785           dir="$next" 
    1786           dnl No need to hardcode the standard /usr/lib. 
    1787           if test "X$dir" != "X/usr/$acl_libdirstem"; then 
    1788             rpathdirs="$rpathdirs $dir" 
    1789           fi 
    1790           next= 
    1791         else 
    1792           case $opt in 
    1793             -L) next=yes ;; 
    1794             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` 
    1795                  dnl No need to hardcode the standard /usr/lib. 
    1796                  if test "X$dir" != "X/usr/$acl_libdirstem"; then 
    1797                    rpathdirs="$rpathdirs $dir" 
    1798                  fi 
    1799                  next= ;; 
    1800             *) next= ;; 
    1801           esac 
    1802         fi 
    1803       done 
    1804       if test "X$rpathdirs" != "X"; then 
    1805         if test -n ""$3""; then 
    1806           dnl libtool is used for linking. Use -R options. 
    1807           for dir in $rpathdirs; do 
    1808             $1="${$1}${$1:+ }-R$dir" 
    1809           done 
    1810         else 
    1811           dnl The linker is used for linking directly. 
    1812           if test -n "$hardcode_libdir_separator"; then 
    1813             dnl Weird platform: only the last -rpath option counts, the user 
    1814             dnl must pass all path elements in one option. 
    1815             alldirs= 
    1816             for dir in $rpathdirs; do 
    1817               alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" 
    1818             done 
    1819             acl_save_libdir="$libdir" 
    1820             libdir="$alldirs" 
    1821             eval flag=\"$hardcode_libdir_flag_spec\" 
    1822             libdir="$acl_save_libdir" 
    1823             $1="$flag" 
    1824           else 
    1825             dnl The -rpath options are cumulative. 
    1826             for dir in $rpathdirs; do 
    1827               acl_save_libdir="$libdir" 
    1828               libdir="$dir" 
    1829               eval flag=\"$hardcode_libdir_flag_spec\" 
    1830               libdir="$acl_save_libdir" 
    1831               $1="${$1}${$1:+ }$flag" 
    1832             done 
    1833           fi 
    1834         fi 
    1835       fi 
    1836     fi 
    1837   fi 
    1838   AC_SUBST([$1]) 
    1839 ]) 
    1840  
    1841 # lib-prefix.m4 serial 5 (gettext-0.15) 
    1842 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 
    1843 dnl This file is free software; the Free Software Foundation 
    1844 dnl gives unlimited permission to copy and/or distribute it, 
    1845 dnl with or without modifications, as long as this notice is preserved. 
    1846  
    1847 dnl From Bruno Haible. 
    1848  
    1849 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 
    1850 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 
    1851 dnl require excessive bracketing. 
    1852 ifdef([AC_HELP_STRING], 
    1853 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 
    1854 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 
    1855  
    1856 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 
    1857 dnl to access previously installed libraries. The basic assumption is that 
    1858 dnl a user will want packages to use other packages he previously installed 
    1859 dnl with the same --prefix option. 
    1860 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 
    1861 dnl libraries, but is otherwise very convenient. 
    1862 AC_DEFUN([AC_LIB_PREFIX], 
    1863 [ 
    1864   AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 
    1865   AC_REQUIRE([AC_PROG_CC]) 
    1866   AC_REQUIRE([AC_CANONICAL_HOST]) 
    1867   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 
    1868   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    1869   dnl By default, look in $includedir and $libdir. 
    1870   use_additional=yes 
    1871   AC_LIB_WITH_FINAL_PREFIX([ 
    1872     eval additional_includedir=\"$includedir\" 
    1873     eval additional_libdir=\"$libdir\" 
    1874   ]) 
    1875   AC_LIB_ARG_WITH([lib-prefix], 
    1876 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 
    1877   --without-lib-prefix    don't search for libraries in includedir and libdir], 
    1878 [ 
    1879     if test "X$withval" = "Xno"; then 
    1880       use_additional=no 
    1881     else 
    1882       if test "X$withval" = "X"; then 
    1883         AC_LIB_WITH_FINAL_PREFIX([ 
    1884           eval additional_includedir=\"$includedir\" 
    1885           eval additional_libdir=\"$libdir\" 
    1886         ]) 
    1887       else 
    1888         additional_includedir="$withval/include" 
    1889         additional_libdir="$withval/$acl_libdirstem" 
    1890       fi 
    1891     fi 
    1892 ]) 
    1893   if test $use_additional = yes; then 
    1894     dnl Potentially add $additional_includedir to $CPPFLAGS. 
    1895     dnl But don't add it 
    1896     dnl   1. if it's the standard /usr/include, 
    1897     dnl   2. if it's already present in $CPPFLAGS, 
    1898     dnl   3. if it's /usr/local/include and we are using GCC on Linux, 
    1899     dnl   4. if it doesn't exist as a directory. 
    1900     if test "X$additional_includedir" != "X/usr/include"; then 
    1901       haveit= 
    1902       for x in $CPPFLAGS; do 
    1903         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1904         if test "X$x" = "X-I$additional_includedir"; then 
    1905           haveit=yes 
    1906           break 
    1907         fi 
    1908       done 
    1909       if test -z "$haveit"; then 
    1910         if test "X$additional_includedir" = "X/usr/local/include"; then 
    1911           if test -n "$GCC"; then 
    1912             case $host_os in 
    1913               linux* | gnu* | k*bsd*-gnu) haveit=yes;; 
    1914             esac 
    1915           fi 
    1916         fi 
    1917         if test -z "$haveit"; then 
    1918           if test -d "$additional_includedir"; then 
    1919             dnl Really add $additional_includedir to $CPPFLAGS. 
    1920             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 
    1921           fi 
    1922         fi 
    1923       fi 
    1924     fi 
    1925     dnl Potentially add $additional_libdir to $LDFLAGS. 
    1926     dnl But don't add it 
    1927     dnl   1. if it's the standard /usr/lib, 
    1928     dnl   2. if it's already present in $LDFLAGS, 
    1929     dnl   3. if it's /usr/local/lib and we are using GCC on Linux, 
    1930     dnl   4. if it doesn't exist as a directory. 
    1931     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 
    1932       haveit= 
    1933       for x in $LDFLAGS; do 
    1934         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    1935         if test "X$x" = "X-L$additional_libdir"; then 
    1936           haveit=yes 
    1937           break 
    1938         fi 
    1939       done 
    1940       if test -z "$haveit"; then 
    1941         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 
    1942           if test -n "$GCC"; then 
    1943             case $host_os in 
    1944               linux*) haveit=yes;; 
    1945             esac 
    1946           fi 
    1947         fi 
    1948         if test -z "$haveit"; then 
    1949           if test -d "$additional_libdir"; then 
    1950             dnl Really add $additional_libdir to $LDFLAGS. 
    1951             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 
    1952           fi 
    1953         fi 
    1954       fi 
    1955     fi 
    1956   fi 
    1957 ]) 
    1958  
    1959 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 
    1960 dnl acl_final_exec_prefix, containing the values to which $prefix and 
    1961 dnl $exec_prefix will expand at the end of the configure script. 
    1962 AC_DEFUN([AC_LIB_PREPARE_PREFIX], 
    1963 [ 
    1964   dnl Unfortunately, prefix and exec_prefix get only finally determined 
    1965   dnl at the end of configure. 
    1966   if test "X$prefix" = "XNONE"; then 
    1967     acl_final_prefix="$ac_default_prefix" 
    1968   else 
    1969     acl_final_prefix="$prefix" 
    1970   fi 
    1971   if test "X$exec_prefix" = "XNONE"; then 
    1972     acl_final_exec_prefix='${prefix}' 
    1973   else 
    1974     acl_final_exec_prefix="$exec_prefix" 
    1975   fi 
    1976   acl_save_prefix="$prefix" 
    1977   prefix="$acl_final_prefix" 
    1978   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 
    1979   prefix="$acl_save_prefix" 
    1980 ]) 
    1981  
    1982 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 
    1983 dnl variables prefix and exec_prefix bound to the values they will have 
    1984 dnl at the end of the configure script. 
    1985 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 
    1986 [ 
    1987   acl_save_prefix="$prefix" 
    1988   prefix="$acl_final_prefix" 
    1989   acl_save_exec_prefix="$exec_prefix" 
    1990   exec_prefix="$acl_final_exec_prefix" 
    1991   $1 
    1992   exec_prefix="$acl_save_exec_prefix" 
    1993   prefix="$acl_save_prefix" 
    1994 ]) 
    1995  
    1996 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing 
    1997 dnl the basename of the libdir, either "lib" or "lib64". 
    1998 AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 
    1999 [ 
    2000   dnl There is no formal standard regarding lib and lib64. The current 
    2001   dnl practice is that on a system supporting 32-bit and 64-bit instruction 
    2002   dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit 
    2003   dnl libraries go under $prefix/lib. We determine the compiler's default 
    2004   dnl mode by looking at the compiler's library search path. If at least 
    2005   dnl of its elements ends in /lib64 or points to a directory whose absolute 
    2006   dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the 
    2007   dnl default, namely "lib". 
    2008   acl_libdirstem=lib 
    2009   searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 
    2010   if test -n "$searchpath"; then 
    2011     acl_save_IFS="${IFS=        }"; IFS=":" 
    2012     for searchdir in $searchpath; do 
    2013       if test -d "$searchdir"; then 
    2014         case "$searchdir" in 
    2015           */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 
    2016           *) searchdir=`cd "$searchdir" && pwd` 
    2017              case "$searchdir" in 
    2018                */lib64 ) acl_libdirstem=lib64 ;; 
    2019              esac ;; 
    2020         esac 
    2021       fi 
    2022     done 
    2023     IFS="$acl_save_IFS" 
    2024   fi 
    2025 ]) 
    202618 
    202719# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 
     
    86066598]) 
    86076599 
    8608 # lock.m4 serial 6 (gettext-0.16) 
    8609 dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. 
    8610 dnl This file is free software; the Free Software Foundation 
    8611 dnl gives unlimited permission to copy and/or distribute it, 
    8612 dnl with or without modifications, as long as this notice is preserved. 
    8613  
    8614 dnl From Bruno Haible. 
    8615  
    8616 dnl Tests for a multithreading library to be used. 
    8617 dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, 
    8618 dnl USE_PTH_THREADS, USE_WIN32_THREADS 
    8619 dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use 
    8620 dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with 
    8621 dnl libtool). 
    8622 dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for 
    8623 dnl programs that really need multithread functionality. The difference 
    8624 dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak 
    8625 dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". 
    8626 dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for 
    8627 dnl multithread-safe programs. 
    8628  
    8629 AC_DEFUN([gl_LOCK_EARLY], 
    8630 [ 
    8631   AC_REQUIRE([gl_LOCK_EARLY_BODY]) 
    8632 ]) 
    8633  
    8634 dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once. 
    8635  
    8636 AC_DEFUN([gl_LOCK_EARLY_BODY], 
    8637 [ 
    8638   dnl Ordering constraints: This macro modifies CPPFLAGS in a way that 
    8639   dnl influences the result of the autoconf tests that test for *_unlocked 
    8640   dnl declarations, on AIX 5 at least. Therefore it must come early. 
    8641   AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl 
    8642   AC_BEFORE([$0], [gl_ARGP])dnl 
    8643  
    8644   AC_REQUIRE([AC_CANONICAL_HOST]) 
    8645   AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems 
    8646   dnl Check for multithreading. 
    8647   AC_ARG_ENABLE(threads, 
    8648 AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) 
    8649 AC_HELP_STRING([--disable-threads], [build without multithread safety]), 
    8650     [gl_use_threads=$enableval], 
    8651     [case "$host_os" in 
    8652        dnl Disable multithreading by default on OSF/1, because it interferes 
    8653        dnl with fork()/exec(): When msgexec is linked with -lpthread, its child 
    8654        dnl process gets an endless segmentation fault inside execvp(). 
    8655        osf*) gl_use_threads=no ;; 
    8656        *)    gl_use_threads=yes ;; 
    8657      esac 
    8658     ]) 
    8659   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then 
    8660     # For using <pthread.h>: 
    8661     case "$host_os" in 
    8662       osf*) 
    8663         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it 
    8664         # groks <pthread.h>. cc also understands the flag -pthread, but 
    8665         # we don't use it because 1. gcc-2.95 doesn't understand -pthread, 
    8666         # 2. putting a flag into CPPFLAGS that has an effect on the linker 
    8667         # causes the AC_TRY_LINK test below to succeed unexpectedly, 
    8668         # leading to wrong values of LIBTHREAD and LTLIBTHREAD. 
    8669         CPPFLAGS="$CPPFLAGS -D_REENTRANT" 
    8670         ;; 
    8671     esac 
    8672     # Some systems optimize for single-threaded programs by default, and 
    8673     # need special flags to disable these optimizations. For example, the 
    8674     # definition of 'errno' in <errno.h>. 
    8675     case "$host_os" in 
    8676       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; 
    8677       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; 
    8678     esac 
    8679   fi 
    8680 ]) 
    8681  
    8682 dnl The guts of gl_LOCK. Needs to be expanded only once. 
    8683  
    8684 AC_DEFUN([gl_LOCK_BODY], 
    8685 [ 
    8686   AC_REQUIRE([gl_LOCK_EARLY_BODY]) 
    8687   gl_threads_api=none 
    8688   LIBTHREAD= 
    8689   LTLIBTHREAD= 
    8690   LIBMULTITHREAD= 
    8691   LTLIBMULTITHREAD= 
    8692   if test "$gl_use_threads" != no; then 
    8693     dnl Check whether the compiler and linker support weak declarations. 
    8694     AC_MSG_CHECKING([whether imported symbols can be declared weak]) 
    8695     gl_have_weak=no 
    8696     AC_TRY_LINK([extern void xyzzy (); 
    8697 #pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) 
    8698     AC_MSG_RESULT([$gl_have_weak]) 
    8699     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then 
    8700       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that 
    8701       # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY. 
    8702       AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) 
    8703       if test "$gl_have_pthread_h" = yes; then 
    8704         # Other possible tests: 
    8705         #   -lpthreads (FSU threads, PCthreads) 
    8706         #   -lgthreads 
    8707         gl_have_pthread= 
    8708         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist 
    8709         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but 
    8710         # the second one only in libpthread, and lock.c needs it. 
    8711         AC_TRY_LINK([#include <pthread.h>], 
    8712           [pthread_mutex_lock((pthread_mutex_t*)0); 
    8713            pthread_mutexattr_init((pthread_mutexattr_t*)0);], 
    8714           [gl_have_pthread=yes]) 
    8715         # Test for libpthread by looking for pthread_kill. (Not pthread_self, 
    8716         # since it is defined as a macro on OSF/1.) 
    8717         if test -n "$gl_have_pthread"; then 
    8718           # The program links fine without libpthread. But it may actually 
    8719           # need to link with libpthread in order to create multiple threads. 
    8720           AC_CHECK_LIB(pthread, pthread_kill, 
    8721             [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread 
    8722              # On Solaris and HP-UX, most pthread functions exist also in libc. 
    8723              # Therefore pthread_in_use() needs to actually try to create a 
    8724              # thread: pthread_create from libc will fail, whereas 
    8725              # pthread_create will actually create a thread. 
    8726              case "$host_os" in 
    8727                solaris* | hpux*) 
    8728                  AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1, 
    8729                    [Define if the pthread_in_use() detection is hard.]) 
    8730              esac 
    8731             ]) 
    8732         else 
    8733           # Some library is needed. Try libpthread and libc_r. 
    8734           AC_CHECK_LIB(pthread, pthread_kill, 
    8735             [gl_have_pthread=yes 
    8736              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread 
    8737              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) 
    8738           if test -z "$gl_have_pthread"; then 
    8739             # For FreeBSD 4. 
    8740             AC_CHECK_LIB(c_r, pthread_kill, 
    8741               [gl_have_pthread=yes 
    8742                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r 
    8743                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) 
    8744           fi 
    8745         fi 
    8746         if test -n "$gl_have_pthread"; then 
    8747           gl_threads_api=posix 
    8748           AC_DEFINE([USE_POSIX_THREADS], 1, 
    8749             [Define if the POSIX multithreading library can be used.]) 
    8750           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then 
    8751             if test $gl_have_weak = yes; then 
    8752               AC_DEFINE([USE_POSIX_THREADS_WEAK], 1, 
    8753                 [Define if references to the POSIX multithreading library should be made weak.]) 
    8754               LIBTHREAD= 
    8755               LTLIBTHREAD= 
    8756             fi 
    8757           fi 
    8758           # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the 
    8759           # pthread_rwlock_* functions. 
    8760           AC_CHECK_TYPE([pthread_rwlock_t], 
    8761             [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1, 
    8762                [Define if the POSIX multithreading library has read/write locks.])], 
    8763             [], 
    8764             [#include <pthread.h>]) 
    8765           # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. 
    8766           AC_TRY_COMPILE([#include <pthread.h>], 
    8767             [#if __FreeBSD__ == 4 
    8768 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." 
    8769 #else 
    8770 int x = (int)PTHREAD_MUTEX_RECURSIVE; 
    8771 return !x; 
    8772 #endif], 
    8773             [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1, 
    8774                [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) 
    8775         fi 
    8776       fi 
    8777     fi 
    8778     if test -z "$gl_have_pthread"; then 
    8779       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then 
    8780         gl_have_solaristhread= 
    8781         gl_save_LIBS="$LIBS" 
    8782         LIBS="$LIBS -lthread" 
    8783         AC_TRY_LINK([#include <thread.h> 
    8784 #include <synch.h>], 
    8785           [thr_self();], 
    8786           [gl_have_solaristhread=yes]) 
    8787         LIBS="$gl_save_LIBS" 
    8788         if test -n "$gl_have_solaristhread"; then 
    8789           gl_threads_api=solaris 
    8790           LIBTHREAD=-lthread 
    8791           LTLIBTHREAD=-lthread 
    8792           LIBMULTITHREAD="$LIBTHREAD" 
    8793           LTLIBMULTITHREAD="$LTLIBTHREAD" 
    8794           AC_DEFINE([USE_SOLARIS_THREADS], 1, 
    8795             [Define if the old Solaris multithreading library can be used.]) 
    8796           if test $gl_have_weak = yes; then 
    8797             AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1, 
    8798               [Define if references to the old Solaris multithreading library should be made weak.]) 
    8799             LIBTHREAD= 
    8800             LTLIBTHREAD= 
    8801           fi 
    8802         fi 
    8803       fi 
    8804     fi 
    8805     if test "$gl_use_threads" = pth; then 
    8806       gl_save_CPPFLAGS="$CPPFLAGS" 
    8807       AC_LIB_LINKFLAGS(pth) 
    8808       gl_have_pth= 
    8809       gl_save_LIBS="$LIBS" 
    8810       LIBS="$LIBS -lpth" 
    8811       AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes) 
    8812       LIBS="$gl_save_LIBS" 
    8813       if test -n "$gl_have_pth"; then 
    8814         gl_threads_api=pth 
    8815         LIBTHREAD="$LIBPTH" 
    8816         LTLIBTHREAD="$LTLIBPTH" 
    8817         LIBMULTITHREAD="$LIBTHREAD" 
    8818         LTLIBMULTITHREAD="$LTLIBTHREAD" 
    8819         AC_DEFINE([USE_PTH_THREADS], 1, 
    8820           [Define if the GNU Pth multithreading library can be used.]) 
    8821         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then 
    8822           if test $gl_have_weak = yes; then 
    8823             AC_DEFINE([USE_PTH_THREADS_WEAK], 1, 
    8824               [Define if references to the GNU Pth multithreading library should be made weak.]) 
    8825             LIBTHREAD= 
    8826             LTLIBTHREAD= 
    8827           fi 
    8828         fi 
    8829       else 
    8830         CPPFLAGS="$gl_save_CPPFLAGS" 
    8831       fi 
    8832     fi 
    8833     if test -z "$gl_have_pthread"; then 
    8834       if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then 
    8835         if { case "$host_os" in 
    8836                mingw*) true;; 
    8837                *) false;; 
    8838              esac 
    8839            }; then 
    8840           gl_threads_api=win32 
    8841           AC_DEFINE([USE_WIN32_THREADS], 1, 
    8842             [Define if the Win32 multithreading API can be used.]) 
    8843         fi 
    8844       fi 
    8845     fi 
    8846   fi 
    8847   AC_MSG_CHECKING([for multithread API to use]) 
    8848   AC_MSG_RESULT([$gl_threads_api]) 
    8849   AC_SUBST(LIBTHREAD) 
    8850   AC_SUBST(LTLIBTHREAD) 
    8851   AC_SUBST(LIBMULTITHREAD) 
    8852   AC_SUBST(LTLIBMULTITHREAD) 
    8853 ]) 
    8854  
    8855 AC_DEFUN([gl_LOCK], 
    8856 [ 
    8857   AC_REQUIRE([gl_LOCK_EARLY]) 
    8858   AC_REQUIRE([gl_LOCK_BODY]) 
    8859   gl_PREREQ_LOCK 
    8860 ]) 
    8861  
    8862 # Prerequisites of lib/lock.c. 
    8863 AC_DEFUN([gl_PREREQ_LOCK], [ 
    8864   AC_REQUIRE([AC_C_INLINE]) 
    8865 ]) 
    8866  
    8867 dnl Survey of platforms: 
    8868 dnl 
    8869 dnl Platform          Available   Compiler    Supports   test-lock 
    8870 dnl                   flavours    option      weak       result 
    8871 dnl ---------------   ---------   ---------   --------   --------- 
    8872 dnl Linux 2.4/glibc   posix       -lpthread       Y      OK 
    8873 dnl 
    8874 dnl GNU Hurd/glibc    posix 
    8875 dnl 
    8876 dnl FreeBSD 5.3       posix       -lc_r           Y 
    8877 dnl                   posix       -lkse ?         Y 
    8878 dnl                   posix       -lpthread ?     Y 
    8879 dnl                   posix       -lthr           Y 
    8880 dnl 
    8881 dnl FreeBSD 5.2       posix       -lc_r           Y 
    8882 dnl                   posix       -lkse           Y 
    8883 dnl                   posix       -lthr           Y 
    8884 dnl 
    8885 dnl FreeBSD 4.0,4.10  posix       -lc_r           Y      OK 
    8886 dnl 
    8887 dnl NetBSD 1.6        -- 
    8888 dnl 
    8889 dnl OpenBSD 3.4       posix       -lpthread       Y      OK 
    8890 dnl 
    8891 dnl MacOS X 10.[123]  posix       -lpthread       Y      OK 
    8892 dnl 
    8893 dnl Solaris 7,8,9     posix       -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK 
    8894 dnl                   solaris     -lthread        Y      Sol 7,8: 0.0; Sol 9: OK 
    8895 dnl 
    8896 dnl HP-UX 11          posix       -lpthread       N (cc) OK 
    8897 dnl                                               Y (gcc) 
    8898 dnl 
    8899 dnl IRIX 6.5          posix       -lpthread       Y      0.5 
    8900 dnl 
    8901 dnl AIX 4.3,5.1       posix       -lpthread       N      AIX 4: 0.5; AIX 5: OK 
    8902 dnl 
    8903 dnl OSF/1 4.0,5.1     posix       -pthread (cc)   N      OK 
    8904 dnl                               -lpthread (gcc) Y 
    8905 dnl 
    8906 dnl Cygwin            posix       -lpthread       Y      OK 
    8907 dnl 
    8908 dnl Any of the above  pth         -lpth                  0.0 
    8909 dnl 
    8910 dnl Mingw             win32                       N      OK 
    8911 dnl 
    8912 dnl BeOS 5            -- 
    8913 dnl 
    8914 dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is 
    8915 dnl turned off: 
    8916 dnl   OK if all three tests terminate OK, 
    8917 dnl   0.5 if the first test terminates OK but the second one loops endlessly, 
    8918 dnl   0.0 if the first test already loops endlessly. 
    8919  
    8920 # longdouble.m4 serial 2 (gettext-0.15) 
    8921 dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. 
    8922 dnl This file is free software; the Free Software Foundation 
    8923 dnl gives unlimited permission to copy and/or distribute it, 
    8924 dnl with or without modifications, as long as this notice is preserved. 
    8925  
    8926 dnl From Bruno Haible. 
    8927 dnl Test whether the compiler supports the 'long double' type. 
    8928 dnl Prerequisite: AC_PROG_CC 
    8929  
    8930 dnl This file is only needed in autoconf <= 2.59.  Newer versions of autoconf 
    8931 dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics. 
    8932  
    8933 AC_DEFUN([gt_TYPE_LONGDOUBLE], 
    8934 [ 
    8935   AC_CACHE_CHECK([for long double], gt_cv_c_long_double, 
    8936     [if test "$GCC" = yes; then 
    8937        gt_cv_c_long_double=yes 
    8938      else 
    8939        AC_TRY_COMPILE([ 
    8940          /* The Stardent Vistra knows sizeof(long double), but does not support it.  */ 
    8941          long double foo = 0.0; 
    8942          /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */ 
    8943          int array [2*(sizeof(long double) >= sizeof(double)) - 1]; 
    8944          ], , 
    8945          gt_cv_c_long_double=yes, gt_cv_c_long_double=no) 
    8946      fi]) 
    8947   if test $gt_cv_c_long_double = yes; then 
    8948     AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) 
    8949   fi 
    8950 ]) 
    8951  
    8952 # longlong.m4 serial 8 
    8953 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. 
    8954 dnl This file is free software; the Free Software Foundation 
    8955 dnl gives unlimited permission to copy and/or distribute it, 
    8956 dnl with or without modifications, as long as this notice is preserved. 
    8957  
    8958 dnl From Paul Eggert. 
    8959  
    8960 # Define HAVE_LONG_LONG_INT if 'long long int' works. 
    8961 # This fixes a bug in Autoconf 2.60, but can be removed once we 
    8962 # assume 2.61 everywhere. 
    8963  
    8964 # Note: If the type 'long long int' exists but is only 32 bits large 
    8965 # (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be 
    8966 # defined. In this case you can treat 'long long int' like 'long int'. 
    8967  
    8968 AC_DEFUN([AC_TYPE_LONG_LONG_INT], 
    8969 [ 
    8970   AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], 
    8971     [AC_LINK_IFELSE( 
    8972        [AC_LANG_PROGRAM( 
    8973           [[long long int ll = 9223372036854775807ll; 
    8974             long long int nll = -9223372036854775807LL; 
    8975             typedef int a[((-9223372036854775807LL < 0 
    8976                             && 0 < 9223372036854775807ll) 
    8977                            ? 1 : -1)]; 
    8978             int i = 63;]], 
    8979           [[long long int llmax = 9223372036854775807ll; 
    8980             return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) 
    8981                     | (llmax / ll) | (llmax % ll));]])], 
    8982        [ac_cv_type_long_long_int=yes], 
    8983        [ac_cv_type_long_long_int=no])]) 
    8984   if test $ac_cv_type_long_long_int = yes; then 
    8985     AC_DEFINE([HAVE_LONG_LONG_INT], 1, 
    8986       [Define to 1 if the system has the type `long long int'.]) 
    8987   fi 
    8988 ]) 
    8989  
    8990 # This macro is obsolescent and should go away soon. 
    8991 AC_DEFUN([gl_AC_TYPE_LONG_LONG], 
    8992 [ 
    8993   AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) 
    8994   ac_cv_type_long_long=$ac_cv_type_long_long_int 
    8995   if test $ac_cv_type_long_long = yes; then 
    8996     AC_DEFINE(HAVE_LONG_LONG, 1, 
    8997       [Define if you have the 'long long' type.]) 
    8998   fi 
    8999 ]) 
    9000  
    9001 # nls.m4 serial 3 (gettext-0.15) 
    9002 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. 
    9003 dnl This file is free software; the Free Software Foundation 
    9004 dnl gives unlimited permission to copy and/or distribute it, 
    9005 dnl with or without modifications, as long as this notice is preserved. 
    9006 dnl 
    9007 dnl This file can can be used in projects which are not available under 
    9008 dnl the GNU General Public License or the GNU Library General Public 
    9009 dnl License but which still want to provide support for the GNU gettext 
    9010 dnl functionality. 
    9011 dnl Please note that the actual code of the GNU gettext library is covered 
    9012 dnl by the GNU Library General Public License, and the rest of the GNU 
    9013 dnl gettext package package is covered by the GNU General Public License. 
    9014 dnl They are *not* in the public domain. 
    9015  
    9016 dnl Authors: 
    9017 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 
    9018 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003. 
    9019  
    9020 AC_PREREQ(2.50) 
    9021  
    9022 AC_DEFUN([AM_NLS], 
    9023 [ 
    9024   AC_MSG_CHECKING([whether NLS is requested]) 
    9025   dnl Default is enabled NLS 
    9026   AC_ARG_ENABLE(nls, 
    9027     [  --disable-nls           do not use Native Language Support], 
    9028     USE_NLS=$enableval, USE_NLS=yes) 
    9029   AC_MSG_RESULT($USE_NLS) 
    9030   AC_SUBST(USE_NLS) 
    9031 ]) 
    9032  
    90336600# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*- 
    90346601#  
     
    91886755fi[]dnl 
    91896756])# PKG_CHECK_MODULES 
    9190  
    9191 # po.m4 serial 13 (gettext-0.15) 
    9192 dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. 
    9193 dnl This file is free software; the Free Software Foundation 
    9194 dnl gives unlimited permission to copy and/or distribute it, 
    9195 dnl with or without modifications, as long as this notice is preserved. 
    9196 dnl 
    9197 dnl This file can can be used in projects which are not available under 
    9198 dnl the GNU General Public License or the GNU Library General Public 
    9199 dnl License but which still want to provide support for the GNU gettext 
    9200 dnl functionality. 
    9201 dnl Please note that the actual code of the GNU gettext library is covered 
    9202 dnl by the GNU Library General Public License, and the rest of the GNU 
    9203 dnl gettext package package is covered by the GNU General Public License. 
    9204 dnl They are *not* in the public domain. 
    9205  
    9206 dnl Authors: 
    9207 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 
    9208 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003. 
    9209  
    9210 AC_PREREQ(2.50) 
    9211  
    9212 dnl Checks for all prerequisites of the po subdirectory. 
    9213 AC_DEFUN([AM_PO_SUBDIRS], 
    9214 [ 
    9215   AC_REQUIRE([AC_PROG_MAKE_SET])dnl 
    9216   AC_REQUIRE([AC_PROG_INSTALL])dnl 
    9217   AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake 
    9218   AC_REQUIRE([AM_NLS])dnl 
    9219  
    9220   dnl Perform the following tests also if --disable-nls has been given, 
    9221   dnl because they are needed for "make dist" to work. 
    9222  
    9223   dnl Search for GNU msgfmt in the PATH. 
    9224   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. 
    9225   dnl The second test excludes FreeBSD msgfmt. 
    9226   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 
    9227     [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && 
    9228      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 
    9229     :) 
    9230   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 
    9231  
    9232   dnl Test whether it is GNU msgfmt >= 0.15. 
    9233 changequote(,)dnl 
    9234   case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 
    9235     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; 
    9236     *) MSGFMT_015=$MSGFMT ;; 
    9237   esac 
    9238 changequote([,])dnl 
    9239   AC_SUBST([MSGFMT_015]) 
    9240 changequote(,)dnl 
    9241   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 
    9242     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; 
    9243     *) GMSGFMT_015=$GMSGFMT ;; 
    9244   esac 
    9245 changequote([,])dnl 
    9246   AC_SUBST([GMSGFMT_015]) 
    9247  
    9248   dnl Search for GNU xgettext 0.12 or newer in the PATH. 
    9249   dnl The first test excludes Solaris xgettext and early GNU xgettext versions. 
    9250   dnl The second test excludes FreeBSD xgettext. 
    9251   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
    9252     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && 
    9253      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 
    9254     :) 
    9255   dnl Remove leftover from FreeBSD xgettext call. 
    9256   rm -f messages.po 
    9257  
    9258   dnl Test whether it is GNU xgettext >= 0.15. 
    9259 changequote(,)dnl 
    9260   case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 
    9261     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; 
    9262     *) XGETTEXT_015=$XGETTEXT ;; 
    9263   esac 
    9264 changequote([,])dnl 
    9265   AC_SUBST([XGETTEXT_015]) 
    9266  
    9267   dnl Search for GNU msgmerge 0.11 or newer in the PATH. 
    9268   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, 
    9269     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) 
    9270  
    9271   dnl Installation directories. 
    9272   dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we 
    9273   dnl have to define it here, so that it can be used in po/Makefile. 
    9274   test -n "$localedir" || localedir='${datadir}/locale' 
    9275   AC_SUBST([localedir]) 
    9276  
    9277   AC_CONFIG_COMMANDS([po-directories], [[ 
    9278     for ac_file in $CONFIG_FILES; do 
    9279       # Support "outfile[:infile[:infile...]]" 
    9280       case "$ac_file" in 
    9281         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 
    9282       esac 
    9283       # PO directories have a Makefile.in generated from Makefile.in.in. 
    9284       case "$ac_file" in */Makefile.in) 
    9285         # Adjust a relative srcdir. 
    9286         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 
    9287         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 
    9288         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 
    9289         # In autoconf-2.13 it is called $ac_given_srcdir. 
    9290         # In autoconf-2.50 it is called $srcdir. 
    9291         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 
    9292         case "$ac_given_srcdir" in 
    9293           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 
    9294           /*) top_srcdir="$ac_given_srcdir" ;; 
    9295           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;; 
    9296         esac 
    9297         # Treat a directory as a PO directory if and only if it has a 
    9298         # POTFILES.in file. This allows packages to have multiple PO 
    9299         # directories under different names or in different locations. 
    9300         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 
    9301           rm -f "$ac_dir/POTFILES" 
    9302           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 
    9303           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 
    9304           POMAKEFILEDEPS="POTFILES.in" 
    9305           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend 
    9306           # on $ac_dir but don't depend on user-specified configuration 
    9307           # parameters. 
    9308           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 
    9309             # The LINGUAS file contains the set of available languages. 
    9310             if test -n "$OBSOLETE_ALL_LINGUAS"; then 
    9311               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 
    9312             fi 
    9313             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 
    9314             # Hide the ALL_LINGUAS assigment from automake < 1.5. 
    9315             eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 
    9316             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 
    9317           else 
    9318             # The set of available languages was given in configure.in. 
    9319             # Hide the ALL_LINGUAS assigment from automake < 1.5. 
    9320             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' 
    9321           fi 
    9322           # Compute POFILES 
    9323           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 
    9324           # Compute UPDATEPOFILES 
    9325           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 
    9326           # Compute DUMMYPOFILES 
    9327           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 
    9328           # Compute GMOFILES 
    9329           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 
    9330           case "$ac_given_srcdir" in 
    9331             .) srcdirpre= ;; 
    9332             *) srcdirpre='$(srcdir)/' ;; 
    9333           esac 
    9334           POFILES= 
    9335           UPDATEPOFILES= 
    9336           DUMMYPOFILES= 
    9337           GMOFILES= 
    9338           for lang in $ALL_LINGUAS; do 
    9339             POFILES="$POFILES $srcdirpre$lang.po" 
    9340             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 
    9341             DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 
    9342             GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 
    9343           done 
    9344           # CATALOGS depends on both $ac_dir and the user's LINGUAS 
    9345           # environment variable. 
    9346           INST_LINGUAS= 
    9347           if test -n "$ALL_LINGUAS"; then 
    9348             for presentlang in $ALL_LINGUAS; do 
    9349               useit=no 
    9350               if test "%UNSET%" != "$LINGUAS"; then 
    9351                 desiredlanguages="$LINGUAS" 
    9352               else 
    9353                 desiredlanguages="$ALL_LINGUAS" 
    9354               fi 
    9355               for desiredlang in $desiredlanguages; do 
    9356                 # Use the presentlang catalog if desiredlang is 
    9357                 #   a. equal to presentlang, or 
    9358                 #   b. a variant of presentlang (because in this case, 
    9359                 #      presentlang can be used as a fallback for messages 
    9360                 #      which are not translated in the desiredlang catalog). 
    9361                 case "$desiredlang" in 
    9362                   "$presentlang"*) useit=yes;; 
    9363                 esac 
    9364               done 
    9365               if test $useit = yes; then 
    9366                 INST_LINGUAS="$INST_LINGUAS $presentlang" 
    9367               fi 
    9368             done 
    9369           fi 
    9370           CATALOGS= 
    9371           if test -n "$INST_LINGUAS"; then 
    9372             for lang in $INST_LINGUAS; do 
    9373               CATALOGS="$CATALOGS $lang.gmo" 
    9374             done 
    9375           fi 
    9376           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 
    9377           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 
    9378           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do 
    9379             if test -f "$f"; then 
    9380               case "$f" in 
    9381                 *.orig | *.bak | *~) ;; 
    9382                 *) cat "$f" >> "$ac_dir/Makefile" ;; 
    9383               esac 
    9384             fi 
    9385           done 
    9386         fi 
    9387         ;; 
    9388       esac 
    9389     done]], 
    9390    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute 
    9391     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it 
    9392     # from automake < 1.5. 
    9393     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' 
    9394     # Capture the value of LINGUAS because we need it to compute CATALOGS. 
    9395     LINGUAS="${LINGUAS-%UNSET%}" 
    9396    ]) 
    9397 ]) 
    9398  
    9399 dnl Postprocesses a Makefile in a directory containing PO files. 
    9400 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], 
    9401 [ 
    9402   # When this code is run, in config.status, two variables have already been 
    9403   # set: 
    9404   # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, 
    9405   # - LINGUAS is the value of the environment variable LINGUAS at configure 
    9406   #   time. 
    9407  
    9408 changequote(,)dnl 
    9409   # Adjust a relative srcdir. 
    9410   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 
    9411   ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 
    9412   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 
    9413   # In autoconf-2.13 it is called $ac_given_srcdir. 
    9414   # In autoconf-2.50 it is called $srcdir. 
    9415   test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 
    9416   case "$ac_given_srcdir" in 
    9417     .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 
    9418     /*) top_srcdir="$ac_given_srcdir" ;; 
    9419     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;; 
    9420   esac 
    9421  
    9422   # Find a way to echo strings without interpreting backslash. 
    9423   if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then 
    9424     gt_echo='echo' 
    9425   else 
    9426     if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then 
    9427       gt_echo='printf %s\n' 
    9428     else 
    9429       echo_func () { 
    9430         cat <<EOT 
    9431 $* 
    9432 EOT 
    9433       } 
    9434       gt_echo='echo_func' 
    9435     fi 
    9436   fi 
    9437  
    9438   # A sed script that extracts the value of VARIABLE from a Makefile. 
    9439   sed_x_variable=' 
    9440 # Test if the hold space is empty. 
    9441 x 
    9442 s/P/P/ 
    9443 x 
    9444 ta 
    9445 # Yes it was empty. Look if we have the expected variable definition. 
    9446 /^[      ]*VARIABLE[     ]*=/{ 
    9447   # Seen the first line of the variable definition. 
    9448   s/^[   ]*VARIABLE[     ]*=// 
    9449   ba 
    9450 } 
    9451 bd 
    9452 :a 
    9453 # Here we are processing a line from the variable definition. 
    9454 # Remove comment, more precisely replace it with a space. 
    9455 s/#.*$/ / 
    9456 # See if the line ends in a backslash. 
    9457 tb 
    9458 :b 
    9459 s/\\$// 
    9460 # Print the line, without the trailing backslash. 
    9461 p 
    9462 tc 
    9463 # There was no trailing backslash. The end of the variable definition is 
    9464 # reached. Clear the hold space. 
    9465 s/^.*$// 
    9466 x 
    9467 bd 
    9468 :c 
    9469 # A trailing backslash means that the variable definition continues in the 
    9470 # next line. Put a nonempty string into the hold space to indicate this. 
    9471 s/^.*$/P/ 
    9472 x 
    9473 :d 
    9474 ' 
    9475 changequote([,])dnl 
    9476  
    9477   # Set POTFILES to the value of the Makefile variable POTFILES. 
    9478   sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` 
    9479   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` 
    9480   # Compute POTFILES_DEPS as 
    9481   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) 
    9482   POTFILES_DEPS= 
    9483   for file in $POTFILES; do 
    9484     POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" 
    9485   done 
    9486   POMAKEFILEDEPS="" 
    9487  
    9488   if test -n "$OBSOLETE_ALL_LINGUAS"; then 
    9489     test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 
    9490   fi 
    9491   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 
    9492     # The LINGUAS file contains the set of available languages. 
    9493     ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 
    9494     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 
    9495   else 
    9496     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. 
    9497     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` 
    9498     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` 
    9499   fi 
    9500   # Hide the ALL_LINGUAS assigment from automake < 1.5. 
    9501   eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 
    9502   # Compute POFILES 
    9503   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 
    9504   # Compute UPDATEPOFILES 
    9505   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 
    9506   # Compute DUMMYPOFILES 
    9507   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 
    9508   # Compute GMOFILES 
    9509   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 
    9510   # Compute PROPERTIESFILES 
    9511   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) 
    9512   # Compute CLASSFILES 
    9513   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) 
    9514   # Compute QMFILES 
    9515   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) 
    9516   # Compute MSGFILES 
    9517   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) 
    9518   # Compute RESOURCESDLLFILES 
    9519   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) 
    9520   case "$ac_given_srcdir" in 
    9521     .) srcdirpre= ;; 
    9522     *) srcdirpre='$(srcdir)/' ;; 
    9523   esac 
    9524   POFILES= 
    9525   UPDATEPOFILES= 
    9526   DUMMYPOFILES= 
    9527   GMOFILES= 
    9528   PROPERTIESFILES= 
    9529   CLASSFILES= 
    9530   QMFILES= 
    9531   MSGFILES= 
    9532   RESOURCESDLLFILES= 
    9533   for lang in $ALL_LINGUAS; do 
    9534     POFILES="$POFILES $srcdirpre$lang.po" 
    9535     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 
    9536     DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 
    9537     GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 
    9538     PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" 
    9539     CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" 
    9540     QMFILES="$QMFILES $srcdirpre$lang.qm" 
    9541     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 
    9542     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" 
    9543     frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 
    9544     RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" 
    9545   done 
    9546   # CATALOGS depends on both $ac_dir and the user's LINGUAS 
    9547   # environment variable. 
    9548   INST_LINGUAS= 
    9549   if test -n "$ALL_LINGUAS"; then 
    9550     for presentlang in $ALL_LINGUAS; do 
    9551       useit=no 
    9552       if test "%UNSET%" != "$LINGUAS"; then 
    9553         desiredlanguages="$LINGUAS" 
    9554       else 
    9555         desiredlanguages="$ALL_LINGUAS" 
    9556       fi 
    9557       for desiredlang in $desiredlanguages; do 
    9558         # Use the presentlang catalog if desiredlang is 
    9559         #   a. equal to presentlang, or 
    9560         #   b. a variant of presentlang (because in this case, 
    9561         #      presentlang can be used as a fallback for messages 
    9562         #      which are not translated in the desiredlang catalog). 
    9563         case "$desiredlang" in 
    9564           "$presentlang"*) useit=yes;; 
    9565         esac 
    9566       done 
    9567       if test $useit = yes; then 
    9568         INST_LINGUAS="$INST_LINGUAS $presentlang" 
    9569       fi 
    9570     done 
    9571   fi 
    9572   CATALOGS= 
    9573   JAVACATALOGS= 
    9574   QTCATALOGS= 
    9575   TCLCATALOGS= 
    9576   CSHARPCATALOGS= 
    9577   if test -n "$INST_LINGUAS"; then 
    9578     for lang in $INST_LINGUAS; do 
    9579       CATALOGS="$CATALOGS $lang.gmo" 
    9580       JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" 
    9581       QTCATALOGS="$QTCATALOGS $lang.qm" 
    9582       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 
    9583       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" 
    9584       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 
    9585       CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" 
    9586     done 
    9587   fi 
    9588  
    9589   sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" 
    9590   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then 
    9591     # Add dependencies that cannot be formulated as a simple suffix rule. 
    9592     for lang in $ALL_LINGUAS; do 
    9593       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 
    9594       cat >> "$ac_file.tmp" <<EOF 
    9595 $frobbedlang.msg: $lang.po 
    9596         @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ 
    9597         \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 
    9598 EOF 
    9599     done 
    9600   fi 
    9601   if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then 
    9602     # Add dependencies that cannot be formulated as a simple suffix rule. 
    9603     for lang in $ALL_LINGUAS; do 
    9604       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 
    9605       cat >> "$ac_file.tmp" <<EOF 
    9606 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po 
    9607         @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ 
    9608         \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 
    9609 EOF 
    9610     done 
    9611   fi 
    9612   if test -n "$POMAKEFILEDEPS"; then 
    9613     cat >> "$ac_file.tmp" <<EOF 
    9614 Makefile: $POMAKEFILEDEPS 
    9615 EOF 
    9616   fi 
    9617   mv "$ac_file.tmp" "$ac_file" 
    9618 ]) 
    9619  
    9620 # printf-posix.m4 serial 2 (gettext-0.13.1) 
    9621 dnl Copyright (C) 2003 Free Software Foundation, Inc. 
    9622 dnl This file is free software; the Free Software Foundation 
    9623 dnl gives unlimited permission to copy and/or distribute it, 
    9624 dnl with or without modifications, as long as this notice is preserved. 
    9625  
    9626 dnl From Bruno Haible. 
    9627 dnl Test whether the printf() function supports POSIX/XSI format strings with 
    9628 dnl positions. 
    9629  
    9630 AC_DEFUN([gt_PRINTF_POSIX], 
    9631 [ 
    9632   AC_REQUIRE([AC_PROG_CC]) 
    9633   AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], 
    9634     gt_cv_func_printf_posix, 
    9635     [ 
    9636       AC_TRY_RUN([ 
    9637 #include <stdio.h> 
    9638 #include <string.h> 
    9639 /* The string "%2$d %1$d", with dollar characters protected from the shell's 
    9640    dollar expansion (possibly an autoconf bug).  */ 
    9641 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; 
    9642 static char buf[100]; 
    9643 int main () 
    9644 { 
    9645   sprintf (buf, format, 33, 55); 
    9646   return (strcmp (buf, "55 33") != 0); 
    9647 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, 
    9648       [ 
    9649         AC_EGREP_CPP(notposix, [ 
    9650 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ 
    9651   notposix 
    9652 #endif 
    9653         ], gt_cv_func_printf_posix="guessing no", 
    9654            gt_cv_func_printf_posix="guessing yes") 
    9655       ]) 
    9656     ]) 
    9657   case $gt_cv_func_printf_posix in 
    9658     *yes) 
    9659       AC_DEFINE(HAVE_POSIX_PRINTF, 1, 
    9660         [Define if your printf() function supports format strings with positions.]) 
    9661       ;; 
    9662   esac 
    9663 ]) 
    9664  
    9665 # progtest.m4 serial 4 (gettext-0.14.2) 
    9666 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. 
    9667 dnl This file is free software; the Free Software Foundation 
    9668 dnl gives unlimited permission to copy and/or distribute it, 
    9669 dnl with or without modifications, as long as this notice is preserved. 
    9670 dnl 
    9671 dnl This file can can be used in projects which are not available under 
    9672 dnl the GNU General Public License or the GNU Library General Public 
    9673 dnl License but which still want to provide support for the GNU gettext 
    9674 dnl functionality. 
    9675 dnl Please note that the actual code of the GNU gettext library is covered 
    9676 dnl by the GNU Library General Public License, and the rest of the GNU 
    9677 dnl gettext package package is covered by the GNU General Public License. 
    9678 dnl They are *not* in the public domain. 
    9679  
    9680 dnl Authors: 
    9681 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996. 
    9682  
    9683 AC_PREREQ(2.50) 
    9684  
    9685 # Search path for a program which passes the given test. 
    9686  
    9687 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 
    9688 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 
    9689 AC_DEFUN([AM_PATH_PROG_WITH_TEST], 
    9690 [ 
    9691 # Prepare PATH_SEPARATOR. 
    9692 # The user is always right. 
    9693 if test "${PATH_SEPARATOR+set}" != set; then 
    9694   echo "#! /bin/sh" >conf$$.sh 
    9695   echo  "exit 0"   >>conf$$.sh 
    9696   chmod +x conf$$.sh 
    9697   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 
    9698     PATH_SEPARATOR=';' 
    9699   else 
    9700     PATH_SEPARATOR=: 
    9701   fi 
    9702   rm -f conf$$.sh 
    9703 fi 
    9704  
    9705 # Find out how to test for executable files. Don't use a zero-byte file, 
    9706 # as systems may use methods other than mode bits to determine executability. 
    9707 cat >conf$$.file <<_ASEOF 
    9708 #! /bin/sh 
    9709 exit 0 
    9710 _ASEOF 
    9711 chmod +x conf$$.file 
    9712 if test -x conf$$.file >/dev/null 2>&1; then 
    9713   ac_executable_p="test -x" 
    9714 else 
    9715   ac_executable_p="test -f" 
    9716 fi 
    9717 rm -f conf$$.file 
    9718  
    9719 # Extract the first word of "$2", so it can be a program name with args. 
    9720 set dummy $2; ac_word=[$]2 
    9721 AC_MSG_CHECKING([for $ac_word]) 
    9722 AC_CACHE_VAL(ac_cv_path_$1, 
    9723 [case "[$]$1" in 
    9724   [[\\/]]* | ?:[[\\/]]*) 
    9725     ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 
    9726     ;; 
    9727   *) 
    9728     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 
    9729     for ac_dir in ifelse([$5], , $PATH, [$5]); do 
    9730       IFS="$ac_save_IFS" 
    9731       test -z "$ac_dir" && ac_dir=. 
    9732       for ac_exec_ext in '' $ac_executable_extensions; do 
    9733         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 
    9734           echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD 
    9735           if [$3]; then 
    9736             ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 
    9737             break 2 
    9738           fi 
    9739         fi 
    9740       done 
    9741     done 
    9742     IFS="$ac_save_IFS" 
    9743 dnl If no 4th arg is given, leave the cache variable unset, 
    9744 dnl so AC_PATH_PROGS will keep looking. 
    9745 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 
    9746 ])dnl 
    9747     ;; 
    9748 esac])dnl 
    9749 $1="$ac_cv_path_$1" 
    9750 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 
    9751   AC_MSG_RESULT([$]$1) 
    9752 else 
    9753   AC_MSG_RESULT(no) 
    9754 fi 
    9755 AC_SUBST($1)dnl 
    9756 ]) 
    9757  
    9758 # size_max.m4 serial 5 
    9759 dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. 
    9760 dnl This file is free software; the Free Software Foundation 
    9761 dnl gives unlimited permission to copy and/or distribute it, 
    9762 dnl with or without modifications, as long as this notice is preserved. 
    9763  
    9764 dnl From Bruno Haible. 
    9765  
    9766 AC_DEFUN([gl_SIZE_MAX], 
    9767 [ 
    9768   AC_CHECK_HEADERS(stdint.h) 
    9769   dnl First test whether the system already has SIZE_MAX. 
    9770   AC_MSG_CHECKING([for SIZE_MAX]) 
    9771   AC_CACHE_VAL([gl_cv_size_max], [ 
    9772     gl_cv_size_max= 
    9773     AC_EGREP_CPP([Found it], [ 
    9774 #include <limits.h> 
    9775 #if HAVE_STDINT_H 
    9776 #include <stdint.h> 
    9777 #endif 
    9778 #ifdef SIZE_MAX 
    9779 Found it 
    9780 #endif 
    9781 ], gl_cv_size_max=yes) 
    9782     if test -z "$gl_cv_size_max"; then 
    9783       dnl Define it ourselves. Here we assume that the type 'size_t' is not wider 
    9784       dnl than the type 'unsigned long'. Try hard to find a definition that can 
    9785       dnl be used in a preprocessor #if, i.e. doesn't contain a cast. 
    9786       _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1, 
    9787         [#include <stddef.h> 
    9788 #include <limits.h>], size_t_bits_minus_1=) 
    9789       _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, 
    9790         [#include <stddef.h>], fits_in_uint=) 
    9791       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then 
    9792         if test $fits_in_uint = 1; then 
    9793           dnl Even though SIZE_MAX fits in an unsigned int, it must be of type 
    9794           dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. 
    9795           AC_TRY_COMPILE([#include <stddef.h> 
    9796             extern size_t foo; 
    9797             extern unsigned long foo; 
    9798             ], [], fits_in_uint=0) 
    9799         fi 
    9800         dnl We cannot use 'expr' to simplify this expression, because 'expr' 
    9801         dnl works only with 'long' integers in the host environment, while we 
    9802         dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. 
    9803         if test $fits_in_uint = 1; then 
    9804           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" 
    9805         else 
    9806           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" 
    9807         fi 
    9808       else 
    9809         dnl Shouldn't happen, but who knows... 
    9810         gl_cv_size_max='((size_t)~(size_t)0)' 
    9811       fi 
    9812     fi 
    9813   ]) 
    9814   AC_MSG_RESULT([$gl_cv_size_max]) 
    9815   if test "$gl_cv_size_max" != yes; then 
    9816     AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], 
    9817       [Define as the maximum value of type 'size_t', if the system doesn't define it.]) 
    9818   fi 
    9819 ]) 
    9820  
    9821 # stdint_h.m4 serial 6 
    9822 dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. 
    9823 dnl This file is free software; the Free Software Foundation 
    9824 dnl gives unlimited permission to copy and/or distribute it, 
    9825 dnl with or without modifications, as long as this notice is preserved. 
    9826  
    9827 dnl From Paul Eggert. 
    9828  
    9829 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, 
    9830 # doesn't clash with <sys/types.h>, and declares uintmax_t. 
    9831  
    9832 AC_DEFUN([gl_AC_HEADER_STDINT_H], 
    9833 [ 
    9834   AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, 
    9835   [AC_TRY_COMPILE( 
    9836     [#include <sys/types.h> 
    9837 #include <stdint.h>], 
    9838     [uintmax_t i = (uintmax_t) -1; return !i;], 
    9839     gl_cv_header_stdint_h=yes, 
    9840     gl_cv_header_stdint_h=no)]) 
    9841   if test $gl_cv_header_stdint_h = yes; then 
    9842     AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, 
    9843       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, 
    9844        and declares uintmax_t. ]) 
    9845   fi 
    9846 ]) 
    9847  
    9848 # uintmax_t.m4 serial 9 
    9849 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. 
    9850 dnl This file is free software; the Free Software Foundation 
    9851 dnl gives unlimited permission to copy and/or distribute it, 
    9852 dnl with or without modifications, as long as this notice is preserved. 
    9853  
    9854 dnl From Paul Eggert. 
    9855  
    9856 AC_PREREQ(2.13) 
    9857  
    9858 # Define uintmax_t to 'unsigned long' or 'unsigned long long' 
    9859 # if it is not already defined in <stdint.h> or <inttypes.h>. 
    9860  
    9861 AC_DEFUN([gl_AC_TYPE_UINTMAX_T], 
    9862 [ 
    9863   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 
    9864   AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 
    9865   if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then 
    9866     AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) 
    9867     test $ac_cv_type_unsigned_long_long = yes \ 
    9868       && ac_type='unsigned long long' \ 
    9869       || ac_type='unsigned long' 
    9870     AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, 
    9871       [Define to unsigned long or unsigned long long 
    9872        if <stdint.h> and <inttypes.h> don't define.]) 
    9873   else 
    9874     AC_DEFINE(HAVE_UINTMAX_T, 1, 
    9875       [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) 
    9876   fi 
    9877 ]) 
    9878  
    9879 # ulonglong.m4 serial 6 
    9880 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. 
    9881 dnl This file is free software; the Free Software Foundation 
    9882 dnl gives unlimited permission to copy and/or distribute it, 
    9883 dnl with or without modifications, as long as this notice is preserved. 
    9884  
    9885 dnl From Paul Eggert. 
    9886  
    9887 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. 
    9888 # This fixes a bug in Autoconf 2.60, but can be removed once we 
    9889 # assume 2.61 everywhere. 
    9890  
    9891 # Note: If the type 'unsigned long long int' exists but is only 32 bits 
    9892 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT 
    9893 # will not be defined. In this case you can treat 'unsigned long long int' 
    9894 # like 'unsigned long int'. 
    9895  
    9896 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], 
    9897 [ 
    9898   AC_CACHE_CHECK([for unsigned long long int], 
    9899     [ac_cv_type_unsigned_long_long_int], 
    9900     [AC_LINK_IFELSE( 
    9901        [AC_LANG_PROGRAM( 
    9902           [[unsigned long long int ull = 18446744073709551615ULL; 
    9903             typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 
    9904                            ? 1 : -1)]; 
    9905            int i = 63;]], 
    9906           [[unsigned long long int ullmax = 18446744073709551615ull; 
    9907             return (ull << 63 | ull >> 63 | ull << i | ull >> i 
    9908                     | ullmax / ull | ullmax % ull);]])], 
    9909        [ac_cv_type_unsigned_long_long_int=yes], 
    9910        [ac_cv_type_unsigned_long_long_int=no])]) 
    9911   if test $ac_cv_type_unsigned_long_long_int = yes; then 
    9912     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, 
    9913       [Define to 1 if the system has the type `unsigned long long int'.]) 
    9914   fi 
    9915 ]) 
    9916  
    9917 # This macro is obsolescent and should go away soon. 
    9918 AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], 
    9919 [ 
    9920   AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) 
    9921   ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int 
    9922   if test $ac_cv_type_unsigned_long_long = yes; then 
    9923     AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, 
    9924       [Define if you have the 'unsigned long long' type.]) 
    9925   fi 
    9926 ]) 
    9927  
    9928 # visibility.m4 serial 1 (gettext-0.15) 
    9929 dnl Copyright (C) 2005 Free Software Foundation, Inc. 
    9930 dnl This file is free software; the Free Software Foundation 
    9931 dnl gives unlimited permission to copy and/or distribute it, 
    9932 dnl with or without modifications, as long as this notice is preserved. 
    9933  
    9934 dnl From Bruno Haible. 
    9935  
    9936 dnl Tests whether the compiler supports the command-line option 
    9937 dnl -fvisibility=hidden and the function and variable attributes 
    9938 dnl __attribute__((__visibility__("hidden"))) and 
    9939 dnl __attribute__((__visibility__("default"))). 
    9940 dnl Does *not* test for __visibility__("protected") - which has tricky 
    9941 dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on 
    9942 dnl MacOS X. 
    9943 dnl Does *not* test for __visibility__("internal") - which has processor 
    9944 dnl dependent semantics. 
    9945 dnl Does *not* test for #pragma GCC visibility push(hidden) - which is 
    9946 dnl "really only recommended for legacy code". 
    9947 dnl Set the variable CFLAG_VISIBILITY. 
    9948 dnl Defines and sets the variable HAVE_VISIBILITY. 
    9949  
    9950 AC_DEFUN([gl_VISIBILITY], 
    9951 [ 
    9952   AC_REQUIRE([AC_PROG_CC]) 
    9953   CFLAG_VISIBILITY= 
    9954   HAVE_VISIBILITY=0 
    9955   if test -n "$GCC"; then 
    9956     AC_MSG_CHECKING([for simple visibility declarations]) 
    9957     AC_CACHE_VAL(gl_cv_cc_visibility, [ 
    9958       gl_save_CFLAGS="$CFLAGS" 
    9959       CFLAGS="$CFLAGS -fvisibility=hidden" 
    9960       AC_TRY_COMPILE( 
    9961         [extern __attribute__((__visibility__("hidden"))) int hiddenvar; 
    9962          extern __attribute__((__visibility__("default"))) int exportedvar; 
    9963          extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); 
    9964          extern __attribute__((__visibility__("default"))) int exportedfunc (void);], 
    9965         [], 
    9966         gl_cv_cc_visibility=yes, 
    9967         gl_cv_cc_visibility=no) 
    9968       CFLAGS="$gl_save_CFLAGS"]) 
    9969     AC_MSG_RESULT([$gl_cv_cc_visibility]) 
    9970     if test $gl_cv_cc_visibility = yes; then 
    9971       CFLAG_VISIBILITY="-fvisibility=hidden" 
    9972       HAVE_VISIBILITY=1 
    9973     fi 
    9974   fi 
    9975   AC_SUBST([CFLAG_VISIBILITY]) 
    9976   AC_SUBST([HAVE_VISIBILITY]) 
    9977   AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], 
    9978     [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) 
    9979 ]) 
    9980  
    9981 # wchar_t.m4 serial 1 (gettext-0.12) 
    9982 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. 
    9983 dnl This file is free software; the Free Software Foundation 
    9984 dnl gives unlimited permission to copy and/or distribute it, 
    9985 dnl with or without modifications, as long as this notice is preserved. 
    9986  
    9987 dnl From Bruno Haible. 
    9988 dnl Test whether <stddef.h> has the 'wchar_t' type. 
    9989 dnl Prerequisite: AC_PROG_CC 
    9990  
    9991 AC_DEFUN([gt_TYPE_WCHAR_T], 
    9992 [ 
    9993   AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, 
    9994     [AC_TRY_COMPILE([#include <stddef.h> 
    9995        wchar_t foo = (wchar_t)'\0';], , 
    9996        gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) 
    9997   if test $gt_cv_c_wchar_t = yes; then 
    9998     AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) 
    9999   fi 
    10000 ]) 
    10001  
    10002 # wint_t.m4 serial 1 (gettext-0.12) 
    10003 dnl Copyright (C) 2003 Free Software Foundation, Inc. 
    10004 dnl This file is free software; the Free Software Foundation 
    10005 dnl gives unlimited permission to copy and/or distribute it, 
    10006 dnl with or without modifications, as long as this notice is preserved. 
    10007  
    10008 dnl From Bruno Haible. 
    10009 dnl Test whether <wchar.h> has the 'wint_t' type. 
    10010 dnl Prerequisite: AC_PROG_CC 
    10011  
    10012 AC_DEFUN([gt_TYPE_WINT_T], 
    10013 [ 
    10014   AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, 
    10015     [AC_TRY_COMPILE([#include <wchar.h> 
    10016        wint_t foo = (wchar_t)'\0';], , 
    10017        gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) 
    10018   if test $gt_cv_c_wint_t = yes; then 
    10019     AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) 
    10020   fi 
    10021 ]) 
    10022  
    10023 # xsize.m4 serial 3 
    10024 dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. 
    10025 dnl This file is free software; the Free Software Foundation 
    10026 dnl gives unlimited permission to copy and/or distribute it, 
    10027 dnl with or without modifications, as long as this notice is preserved. 
    10028  
    10029 AC_DEFUN([gl_XSIZE], 
    10030 [ 
    10031   dnl Prerequisites of lib/xsize.h. 
    10032   AC_REQUIRE([gl_SIZE_MAX]) 
    10033   AC_REQUIRE([AC_C_INLINE]) 
    10034   AC_CHECK_HEADERS(stdint.h) 
    10035 ]) 
    100366757 
    100376758# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc. 
     
    108797600]) # _AM_PROG_TAR 
    108807601 
     7602m4_include([m4/codeset.m4]) 
     7603m4_include([m4/gettext.m4]) 
     7604m4_include([m4/glibc2.m4]) 
     7605m4_include([m4/glibc21.m4]) 
     7606m4_include([m4/iconv.m4]) 
     7607m4_include([m4/intdiv0.m4]) 
     7608m4_include([m4/intmax.m4]) 
     7609m4_include([m4/inttypes-h.m4]) 
     7610m4_include([m4/inttypes-pri.m4]) 
     7611m4_include([m4/inttypes_h.m4]) 
     7612m4_include([m4/isc-posix.m4]) 
     7613m4_include([m4/lcmessage.m4]) 
     7614m4_include([m4/lib-ld.m4]) 
     7615m4_include([m4/lib-link.m4]) 
     7616m4_include([m4/lib-prefix.m4]) 
     7617m4_include([m4/lock.m4]) 
     7618m4_include([m4/longdouble.m4]) 
     7619m4_include([m4/longlong.m4]) 
     7620m4_include([m4/nls.m4]) 
     7621m4_include([m4/po.m4]) 
     7622m4_include([m4/printf-posix.m4]) 
     7623m4_include([m4/progtest.m4]) 
     7624m4_include([m4/signed.m4]) 
     7625m4_include([m4/size_max.m4]) 
     7626m4_include([m4/stdint_h.m4]) 
     7627m4_include([m4/uintmax_t.m4]) 
     7628m4_include([m4/ulonglong.m4]) 
     7629m4_include([m4/visibility.m4]) 
     7630m4_include([m4/wchar_t.m4]) 
     7631m4_include([m4/wint_t.m4]) 
     7632m4_include([m4/xsize.m4]) 
    108817633m4_include([acinclude.m4])