Ticket #145: m4-update.001.diff

File m4-update.001.diff, 45.4 KB (added by anonymous, 15 years ago)

Added by email2trac

  • ChangeLog

    diff --git a/ChangeLog b/ChangeLog
    index 291791f..e1fd9ba 100644
    a b  
     1 
     22009-01-10  Enrico Weigelt, metux ITS <weigelt@metux.de> 
     3 
     4        * m4/*: updated several .m4 files to what gets changed by 
     5          autogen.sh 
     6 
    172008-12-18  Roland Illig  <roland.illig@gmx.de> 
    28 
    39        * doc/mcedit.1: Documented the newly added filename:lineno 
  • m4/codeset.m4

    diff --git a/m4/codeset.m4 b/m4/codeset.m4
    index 223955b..a6e67ec 100644
    a b  
    1 # codeset.m4 serial 2 (gettext-0.16) 
    2 dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. 
     1# codeset.m4 serial AM1 (gettext-0.10.40) 
     2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    AC_DEFUN([AM_LANGINFO_CODESET], 
    1010[ 
    1111  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 
    1212    [AC_TRY_LINK([#include <langinfo.h>], 
    13       [char* cs = nl_langinfo(CODESET); return !cs;], 
     13      [char* cs = nl_langinfo(CODESET);], 
    1414      am_cv_langinfo_codeset=yes, 
    1515      am_cv_langinfo_codeset=no) 
    1616    ]) 
  • m4/iconv.m4

    diff --git a/m4/iconv.m4 b/m4/iconv.m4
    index 8e36b52..654c415 100644
    a b  
    1 # iconv.m4 serial AM6 (gettext-0.16.2) 
    2 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. 
     1# iconv.m4 serial AM4 (gettext-0.11.3) 
     2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    AC_DEFUN([AM_ICONV_LINK], 
    2121[ 
    2222  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 
    2323  dnl those with the standalone portable GNU libiconv installed). 
    24   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 
    2524 
    2625  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
    2726  dnl accordingly. 
    AC_DEFUN([AM_ICONV_LINK], 
    3433  am_save_CPPFLAGS="$CPPFLAGS" 
    3534  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 
    3635 
    37   AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ 
     36  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 
    3837    am_cv_func_iconv="no, consider installing GNU libiconv" 
    3938    am_cv_lib_iconv=no 
    4039    AC_TRY_LINK([#include <stdlib.h> 
    AC_DEFUN([AM_ICONV_LINK], 
    5756    fi 
    5857  ]) 
    5958  if test "$am_cv_func_iconv" = yes; then 
    60     AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ 
    61       dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. 
    62       am_save_LIBS="$LIBS" 
    63       if test $am_cv_lib_iconv = yes; then 
    64         LIBS="$LIBS $LIBICONV" 
    65       fi 
    66       AC_TRY_RUN([ 
    67 #include <iconv.h> 
    68 #include <string.h> 
    69 int main () 
    70 { 
    71   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 
    72      returns.  */ 
    73   { 
    74     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 
    75     if (cd_utf8_to_88591 != (iconv_t)(-1)) 
    76       { 
    77         static const char input[] = "\342\202\254"; /* EURO SIGN */ 
    78         char buf[10]; 
    79         const char *inptr = input; 
    80         size_t inbytesleft = strlen (input); 
    81         char *outptr = buf; 
    82         size_t outbytesleft = sizeof (buf); 
    83         size_t res = iconv (cd_utf8_to_88591, 
    84                             (char **) &inptr, &inbytesleft, 
    85                             &outptr, &outbytesleft); 
    86         if (res == 0) 
    87           return 1; 
    88       } 
    89   } 
    90 #if 0 /* This bug could be worked around by the caller.  */ 
    91   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */ 
    92   { 
    93     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 
    94     if (cd_88591_to_utf8 != (iconv_t)(-1)) 
    95       { 
    96         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 
    97         char buf[50]; 
    98         const char *inptr = input; 
    99         size_t inbytesleft = strlen (input); 
    100         char *outptr = buf; 
    101         size_t outbytesleft = sizeof (buf); 
    102         size_t res = iconv (cd_88591_to_utf8, 
    103                             (char **) &inptr, &inbytesleft, 
    104                             &outptr, &outbytesleft); 
    105         if ((int)res > 0) 
    106           return 1; 
    107       } 
    108   } 
    109 #endif 
    110   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 
    111      provided.  */ 
    112   if (/* Try standardized names.  */ 
    113       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 
    114       /* Try IRIX, OSF/1 names.  */ 
    115       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 
    116       /* Try AIX names.  */ 
    117       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 
    118       /* Try HP-UX names.  */ 
    119       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 
    120     return 1; 
    121   return 0; 
    122 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], 
    123         [case "$host_os" in 
    124            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 
    125            *)            am_cv_func_iconv_works="guessing yes" ;; 
    126          esac]) 
    127       LIBS="$am_save_LIBS" 
    128     ]) 
    129     case "$am_cv_func_iconv_works" in 
    130       *no) am_func_iconv=no am_cv_lib_iconv=no ;; 
    131       *)   am_func_iconv=yes ;; 
    132     esac 
    133   else 
    134     am_func_iconv=no am_cv_lib_iconv=no 
    135   fi 
    136   if test "$am_func_iconv" = yes; then 
    137     AC_DEFINE(HAVE_ICONV, 1, 
    138       [Define if you have the iconv() function and it works.]) 
     59    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 
    13960  fi 
    14061  if test "$am_cv_lib_iconv" = yes; then 
    14162    AC_MSG_CHECKING([how to link with libiconv]) 
  • m4/intdiv0.m4

    diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
    index 534134a..b8d7817 100644
    a b  
    1 # intdiv0.m4 serial 2 (gettext-0.16.2) 
    2 dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. 
     1# intdiv0.m4 serial 1 (gettext-0.11.3) 
     2dnl Copyright (C) 2002 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    AC_DEFUN([gt_INTDIV0], 
    1414  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 
    1515    gt_cv_int_divbyzero_sigfpe, 
    1616    [ 
    17       gt_cv_int_divbyzero_sigfpe= 
    18 changequote(,)dnl 
    19       case "$host_os" in 
    20         macos* | darwin[6-9]* | darwin[1-9][0-9]*) 
    21           # On MacOS X 10.2 or newer, just assume the same as when cross- 
    22           # compiling. If we were to perform the real test, 1 Crash Report 
    23           # dialog window would pop up. 
    24           case "$host_cpu" in 
    25             i[34567]86 | x86_64) 
    26               gt_cv_int_divbyzero_sigfpe="guessing yes" ;; 
    27           esac 
    28           ;; 
    29       esac 
    30 changequote([,])dnl 
    31       if test -z "$gt_cv_int_divbyzero_sigfpe"; then 
    32         AC_TRY_RUN([ 
     17      AC_TRY_RUN([ 
    3318#include <stdlib.h> 
    3419#include <signal.h> 
    3520 
    3621static void 
     22#ifdef __cplusplus 
    3723sigfpe_handler (int sig) 
     24#else 
     25sigfpe_handler (sig) int sig; 
     26#endif 
    3827{ 
    3928  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */ 
    4029  exit (sig != SIGFPE); 
    int main () 
    6251  exit (1); 
    6352} 
    6453], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 
    65           [ 
    66             # Guess based on the CPU. 
    67 changequote(,)dnl 
    68             case "$host_cpu" in 
    69               alpha* | i[34567]86 | x86_64 | m68k | s390*) 
    70                 gt_cv_int_divbyzero_sigfpe="guessing yes";; 
    71               *) 
    72                 gt_cv_int_divbyzero_sigfpe="guessing no";; 
    73             esac 
    74 changequote([,])dnl 
    75           ]) 
    76       fi 
     54        [ 
     55          # Guess based on the CPU. 
     56          case "$host_cpu" in 
     57            alpha* | i[34567]86 | m68k | s390*) 
     58              gt_cv_int_divbyzero_sigfpe="guessing yes";; 
     59            *) 
     60              gt_cv_int_divbyzero_sigfpe="guessing no";; 
     61          esac 
     62        ]) 
    7763    ]) 
    7864  case "$gt_cv_int_divbyzero_sigfpe" in 
    7965    *yes) value=1;; 
  • m4/intmax.m4

    diff --git a/m4/intmax.m4 b/m4/intmax.m4
    index ce7a8a4..d99c999 100644
    a b  
    1 # intmax.m4 serial 3 (gettext-0.16) 
     1# intmax.m4 serial 2 (gettext-0.14.2) 
    22dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    AC_DEFUN([gt_TYPE_INTMAX_T], 
    2222#if HAVE_INTTYPES_H_WITH_UINTMAX 
    2323#include <inttypes.h> 
    2424#endif 
    25 ],     [intmax_t x = -1; 
    26         return !x;], 
    27        gt_cv_c_intmax_t=yes, 
    28        gt_cv_c_intmax_t=no)]) 
     25], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) 
    2926  if test $gt_cv_c_intmax_t = yes; then 
    3027    AC_DEFINE(HAVE_INTMAX_T, 1, 
    3128      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) 
  • m4/inttypes-pri.m4

    diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
    index 7c7f894..4d56a9a 100644
    a b  
    1 # inttypes-pri.m4 serial 4 (gettext-0.16) 
    2 dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. 
     1# inttypes-pri.m4 serial 1 (gettext-0.11.4) 
     2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    66 
    77dnl From Bruno Haible. 
    88 
    9 AC_PREREQ(2.52) 
    10  
    119# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* 
    1210# macros to non-string values.  This is the case on AIX 4.3.3. 
    1311 
    1412AC_DEFUN([gt_INTTYPES_PRI], 
    1513[ 
    16   AC_CHECK_HEADERS([inttypes.h]) 
    17   if test $ac_cv_header_inttypes_h = yes; then 
     14  AC_REQUIRE([gt_HEADER_INTTYPES_H]) 
     15  if test $gt_cv_header_inttypes_h = yes; then 
    1816    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], 
    1917      gt_cv_inttypes_pri_broken, 
    2018      [ 
    char *p = PRId32; 
    2826  if test "$gt_cv_inttypes_pri_broken" = yes; then 
    2927    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, 
    3028      [Define if <inttypes.h> exists and defines unusable PRI* macros.]) 
    31     PRI_MACROS_BROKEN=1 
    32   else 
    33     PRI_MACROS_BROKEN=0 
    3429  fi 
    35   AC_SUBST([PRI_MACROS_BROKEN]) 
    3630]) 
  • m4/inttypes_h.m4

    diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
    index edc8ecb..a5d075d 100644
    a b  
    1 # inttypes_h.m4 serial 7 
    2 dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. 
     1# inttypes_h.m4 serial 6 
     2dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    AC_DEFUN([gl_AC_HEADER_INTTYPES_H], 
    1515  [AC_TRY_COMPILE( 
    1616    [#include <sys/types.h> 
    1717#include <inttypes.h>], 
    18     [uintmax_t i = (uintmax_t) -1; return !i;], 
     18    [uintmax_t i = (uintmax_t) -1;], 
    1919    gl_cv_header_inttypes_h=yes, 
    2020    gl_cv_header_inttypes_h=no)]) 
    2121  if test $gl_cv_header_inttypes_h = yes; then 
  • m4/lib-link.m4

    diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
    index f157d98..ea0b0c4 100644
    a b  
    1 # lib-link.m4 serial 13 (gettext-0.16.2) 
    2 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. 
     1# lib-link.m4 serial 6 (gettext-0.14.3) 
     2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    66 
    77dnl From Bruno Haible. 
    88 
    9 AC_PREREQ(2.54) 
     9AC_PREREQ(2.50) 
    1010 
    1111dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 
    1212dnl the libraries corresponding to explicit and implicit dependencies. 
    1313dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 
    1414dnl augments the CPPFLAGS variable. 
    15 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 
    16 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 
    1715AC_DEFUN([AC_LIB_LINKFLAGS], 
    1816[ 
    1917  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    AC_DEFUN([AC_LIB_LINKFLAGS], 
    2624    ac_cv_lib[]Name[]_libs="$LIB[]NAME" 
    2725    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 
    2826    ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 
    29     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" 
    3027  ]) 
    3128  LIB[]NAME="$ac_cv_lib[]Name[]_libs" 
    3229  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 
    3330  INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 
    34   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" 
    3531  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 
    3632  AC_SUBST([LIB]NAME) 
    3733  AC_SUBST([LTLIB]NAME) 
    38   AC_SUBST([LIB]NAME[_PREFIX]) 
    3934  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 
    4035  dnl results of this search when this library appears as a dependency. 
    4136  HAVE_LIB[]NAME=yes 
    dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 
    5146dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 
    5247dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 
    5348dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 
    54 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 
    55 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 
    5649AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 
    5750[ 
    5851  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 
    8982    CPPFLAGS="$ac_save_CPPFLAGS" 
    9083    LIB[]NAME= 
    9184    LTLIB[]NAME= 
    92     LIB[]NAME[]_PREFIX= 
    9385  fi 
    9486  AC_SUBST([HAVE_LIB]NAME) 
    9587  AC_SUBST([LIB]NAME) 
    9688  AC_SUBST([LTLIB]NAME) 
    97   AC_SUBST([LIB]NAME[_PREFIX]) 
    9889  undefine([Name]) 
    9990  undefine([NAME]) 
    10091]) 
    10192 
    10293dnl Determine the platform dependent parameters needed to use rpath: 
    103 dnl   acl_libext, 
    104 dnl   acl_shlibext, 
    105 dnl   acl_hardcode_libdir_flag_spec, 
    106 dnl   acl_hardcode_libdir_separator, 
    107 dnl   acl_hardcode_direct, 
    108 dnl   acl_hardcode_minus_L. 
     94dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 
     95dnl hardcode_direct, hardcode_minus_L. 
    10996AC_DEFUN([AC_LIB_RPATH], 
    11097[ 
    11198  dnl Tell automake >= 1.10 to complain if config.rpath is missing. 
    AC_DEFUN([AC_LIB_RPATH], 
    122109    acl_cv_rpath=done 
    123110  ]) 
    124111  wl="$acl_cv_wl" 
    125   acl_libext="$acl_cv_libext" 
    126   acl_shlibext="$acl_cv_shlibext" 
    127   acl_libname_spec="$acl_cv_libname_spec" 
    128   acl_library_names_spec="$acl_cv_library_names_spec" 
    129   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 
    130   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 
    131   acl_hardcode_direct="$acl_cv_hardcode_direct" 
    132   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" 
     112  libext="$acl_cv_libext" 
     113  shlibext="$acl_cv_shlibext" 
     114  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 
     115  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 
     116  hardcode_direct="$acl_cv_hardcode_direct" 
     117  hardcode_minus_L="$acl_cv_hardcode_minus_L" 
    133118  dnl Determine whether the user wants rpath handling at all. 
    134119  AC_ARG_ENABLE(rpath, 
    135120    [  --disable-rpath         do not hardcode runtime library paths], 
    AC_DEFUN([AC_LIB_RPATH], 
    139124dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 
    140125dnl the libraries corresponding to explicit and implicit dependencies. 
    141126dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 
    142 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found 
    143 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 
    144127AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    145128[ 
    146   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 
    147129  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    148130                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    149   dnl Autoconf >= 2.61 supports dots in --with options. 
    150   define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) 
    151131  dnl By default, look in $includedir and $libdir. 
    152132  use_additional=yes 
    153133  AC_LIB_WITH_FINAL_PREFIX([ 
    154134    eval additional_includedir=\"$includedir\" 
    155135    eval additional_libdir=\"$libdir\" 
    156136  ]) 
    157   AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], 
    158 [  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib 
    159   --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir], 
     137  AC_LIB_ARG_WITH([lib$1-prefix], 
     138[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib 
     139  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir], 
    160140[ 
    161141    if test "X$withval" = "Xno"; then 
    162142      use_additional=no 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    168148        ]) 
    169149      else 
    170150        additional_includedir="$withval/include" 
    171         additional_libdir="$withval/$acl_libdirstem" 
     151        additional_libdir="$withval/lib" 
    172152      fi 
    173153    fi 
    174154]) 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    177157  LIB[]NAME= 
    178158  LTLIB[]NAME= 
    179159  INC[]NAME= 
    180   LIB[]NAME[]_PREFIX= 
    181160  rpathdirs= 
    182161  ltrpathdirs= 
    183162  names_already_handled= 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    217196          found_la= 
    218197          found_so= 
    219198          found_a= 
    220           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name 
    221           if test -n "$acl_shlibext"; then 
    222             shrext=".$acl_shlibext"             # typically: shrext=.so 
    223           else 
    224             shrext= 
    225           fi 
    226199          if test $use_additional = yes; then 
    227             dir="$additional_libdir" 
    228             dnl The same code as in the loop below: 
    229             dnl First look for a shared library. 
    230             if test -n "$acl_shlibext"; then 
    231               if test -f "$dir/$libname$shrext"; then 
    232                 found_dir="$dir" 
    233                 found_so="$dir/$libname$shrext" 
    234               else 
    235                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 
    236                   ver=`(cd "$dir" && \ 
    237                         for f in "$libname$shrext".*; do echo "$f"; done \ 
    238                         | sed -e "s,^$libname$shrext\\\\.,," \ 
    239                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 
    240                         | sed 1q ) 2>/dev/null` 
    241                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 
    242                     found_dir="$dir" 
    243                     found_so="$dir/$libname$shrext.$ver" 
    244                   fi 
    245                 else 
    246                   eval library_names=\"$acl_library_names_spec\" 
    247                   for f in $library_names; do 
    248                     if test -f "$dir/$f"; then 
    249                       found_dir="$dir" 
    250                       found_so="$dir/$f" 
    251                       break 
    252                     fi 
    253                   done 
    254                 fi 
     200            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then 
     201              found_dir="$additional_libdir" 
     202              found_so="$additional_libdir/lib$name.$shlibext" 
     203              if test -f "$additional_libdir/lib$name.la"; then 
     204                found_la="$additional_libdir/lib$name.la" 
    255205              fi 
    256             fi 
    257             dnl Then look for a static library. 
    258             if test "X$found_dir" = "X"; then 
    259               if test -f "$dir/$libname.$acl_libext"; then 
    260                 found_dir="$dir" 
    261                 found_a="$dir/$libname.$acl_libext" 
    262               fi 
    263             fi 
    264             if test "X$found_dir" != "X"; then 
    265               if test -f "$dir/$libname.la"; then 
    266                 found_la="$dir/$libname.la" 
     206            else 
     207              if test -f "$additional_libdir/lib$name.$libext"; then 
     208                found_dir="$additional_libdir" 
     209                found_a="$additional_libdir/lib$name.$libext" 
     210                if test -f "$additional_libdir/lib$name.la"; then 
     211                  found_la="$additional_libdir/lib$name.la" 
     212                fi 
    267213              fi 
    268214            fi 
    269215          fi 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    273219              case "$x" in 
    274220                -L*) 
    275221                  dir=`echo "X$x" | sed -e 's/^X-L//'` 
    276                   dnl First look for a shared library. 
    277                   if test -n "$acl_shlibext"; then 
    278                     if test -f "$dir/$libname$shrext"; then 
    279                       found_dir="$dir" 
    280                       found_so="$dir/$libname$shrext" 
    281                     else 
    282                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 
    283                         ver=`(cd "$dir" && \ 
    284                               for f in "$libname$shrext".*; do echo "$f"; done \ 
    285                               | sed -e "s,^$libname$shrext\\\\.,," \ 
    286                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 
    287                               | sed 1q ) 2>/dev/null` 
    288                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 
    289                           found_dir="$dir" 
    290                           found_so="$dir/$libname$shrext.$ver" 
    291                         fi 
    292                       else 
    293                         eval library_names=\"$acl_library_names_spec\" 
    294                         for f in $library_names; do 
    295                           if test -f "$dir/$f"; then 
    296                             found_dir="$dir" 
    297                             found_so="$dir/$f" 
    298                             break 
    299                           fi 
    300                         done 
    301                       fi 
     222                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then 
     223                    found_dir="$dir" 
     224                    found_so="$dir/lib$name.$shlibext" 
     225                    if test -f "$dir/lib$name.la"; then 
     226                      found_la="$dir/lib$name.la" 
    302227                    fi 
    303                   fi 
    304                   dnl Then look for a static library. 
    305                   if test "X$found_dir" = "X"; then 
    306                     if test -f "$dir/$libname.$acl_libext"; then 
     228                  else 
     229                    if test -f "$dir/lib$name.$libext"; then 
    307230                      found_dir="$dir" 
    308                       found_a="$dir/$libname.$acl_libext" 
    309                     fi 
    310                   fi 
    311                   if test "X$found_dir" != "X"; then 
    312                     if test -f "$dir/$libname.la"; then 
    313                       found_la="$dir/$libname.la" 
     231                      found_a="$dir/lib$name.$libext" 
     232                      if test -f "$dir/lib$name.la"; then 
     233                        found_la="$dir/lib$name.la" 
     234                      fi 
    314235                    fi 
    315236                  fi 
    316237                  ;; 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    327248              dnl Linking with a shared library. We attempt to hardcode its 
    328249              dnl directory into the executable's runpath, unless it's the 
    329250              dnl standard /usr/lib. 
    330               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then 
     251              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 
    331252                dnl No hardcoding is needed. 
    332253                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    333254              else 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    346267                  ltrpathdirs="$ltrpathdirs $found_dir" 
    347268                fi 
    348269                dnl The hardcoding into $LIBNAME is system dependent. 
    349                 if test "$acl_hardcode_direct" = yes; then 
     270                if test "$hardcode_direct" = yes; then 
    350271                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the 
    351272                  dnl resulting binary. 
    352273                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    353274                else 
    354                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 
     275                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 
    355276                    dnl Use an explicit option to hardcode DIR into the resulting 
    356277                    dnl binary. 
    357278                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    382303                    if test -z "$haveit"; then 
    383304                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 
    384305                    fi 
    385                     if test "$acl_hardcode_minus_L" != no; then 
     306                    if test "$hardcode_minus_L" != no; then 
    386307                      dnl FIXME: Not sure whether we should use 
    387308                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 
    388309                      dnl here. 
    389310                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    390311                    else 
    391                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH 
     312                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH 
    392313                      dnl here, because this doesn't fit in flags passed to the 
    393314                      dnl compiler. So give up. No hardcoding. This affects only 
    394315                      dnl very old systems. 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    413334            dnl Assume the include files are nearby. 
    414335            additional_includedir= 
    415336            case "$found_dir" in 
    416               */$acl_libdirstem | */$acl_libdirstem/) 
    417                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 
    418                 LIB[]NAME[]_PREFIX="$basedir" 
     337              */lib | */lib/) 
     338                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 
    419339                additional_includedir="$basedir/include" 
    420340                ;; 
    421341            esac 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    476396                    dnl   3. if it's already present in $LDFLAGS or the already 
    477397                    dnl      constructed $LIBNAME, 
    478398                    dnl   4. if it doesn't exist as a directory. 
    479                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 
     399                    if test "X$additional_libdir" != "X/usr/lib"; then 
    480400                      haveit= 
    481                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 
     401                      if test "X$additional_libdir" = "X/usr/local/lib"; then 
    482402                        if test -n "$GCC"; then 
    483403                          case $host_os in 
    484404                            linux* | gnu* | k*bsd*-gnu) haveit=yes;; 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    577497    done 
    578498  done 
    579499  if test "X$rpathdirs" != "X"; then 
    580     if test -n "$acl_hardcode_libdir_separator"; then 
     500    if test -n "$hardcode_libdir_separator"; then 
    581501      dnl Weird platform: only the last -rpath option counts, the user must 
    582502      dnl pass all path elements in one option. We can arrange that for a 
    583503      dnl single library, but not when more than one $LIBNAMEs are used. 
    584504      alldirs= 
    585505      for found_dir in $rpathdirs; do 
    586         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 
     506        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" 
    587507      done 
    588       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. 
     508      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. 
    589509      acl_save_libdir="$libdir" 
    590510      libdir="$alldirs" 
    591       eval flag=\"$acl_hardcode_libdir_flag_spec\" 
     511      eval flag=\"$hardcode_libdir_flag_spec\" 
    592512      libdir="$acl_save_libdir" 
    593513      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 
    594514    else 
    AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    596516      for found_dir in $rpathdirs; do 
    597517        acl_save_libdir="$libdir" 
    598518        libdir="$found_dir" 
    599         eval flag=\"$acl_hardcode_libdir_flag_spec\" 
     519        eval flag=\"$hardcode_libdir_flag_spec\" 
    600520        libdir="$acl_save_libdir" 
    601521        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 
    602522      done 
    AC_DEFUN([AC_LIB_APPENDTOVAR], 
    631551    fi 
    632552  done 
    633553]) 
    634  
    635 dnl For those cases where a variable contains several -L and -l options 
    636 dnl referring to unknown libraries and directories, this macro determines the 
    637 dnl necessary additional linker options for the runtime path. 
    638 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 
    639 dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 
    640 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 
    641 dnl otherwise linking without libtool is assumed. 
    642 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], 
    643 [ 
    644   AC_REQUIRE([AC_LIB_RPATH]) 
    645   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 
    646   $1= 
    647   if test "$enable_rpath" != no; then 
    648     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 
    649       dnl Use an explicit option to hardcode directories into the resulting 
    650       dnl binary. 
    651       rpathdirs= 
    652       next= 
    653       for opt in $2; do 
    654         if test -n "$next"; then 
    655           dir="$next" 
    656           dnl No need to hardcode the standard /usr/lib. 
    657           if test "X$dir" != "X/usr/$acl_libdirstem"; then 
    658             rpathdirs="$rpathdirs $dir" 
    659           fi 
    660           next= 
    661         else 
    662           case $opt in 
    663             -L) next=yes ;; 
    664             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` 
    665                  dnl No need to hardcode the standard /usr/lib. 
    666                  if test "X$dir" != "X/usr/$acl_libdirstem"; then 
    667                    rpathdirs="$rpathdirs $dir" 
    668                  fi 
    669                  next= ;; 
    670             *) next= ;; 
    671           esac 
    672         fi 
    673       done 
    674       if test "X$rpathdirs" != "X"; then 
    675         if test -n ""$3""; then 
    676           dnl libtool is used for linking. Use -R options. 
    677           for dir in $rpathdirs; do 
    678             $1="${$1}${$1:+ }-R$dir" 
    679           done 
    680         else 
    681           dnl The linker is used for linking directly. 
    682           if test -n "$acl_hardcode_libdir_separator"; then 
    683             dnl Weird platform: only the last -rpath option counts, the user 
    684             dnl must pass all path elements in one option. 
    685             alldirs= 
    686             for dir in $rpathdirs; do 
    687               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" 
    688             done 
    689             acl_save_libdir="$libdir" 
    690             libdir="$alldirs" 
    691             eval flag=\"$acl_hardcode_libdir_flag_spec\" 
    692             libdir="$acl_save_libdir" 
    693             $1="$flag" 
    694           else 
    695             dnl The -rpath options are cumulative. 
    696             for dir in $rpathdirs; do 
    697               acl_save_libdir="$libdir" 
    698               libdir="$dir" 
    699               eval flag=\"$acl_hardcode_libdir_flag_spec\" 
    700               libdir="$acl_save_libdir" 
    701               $1="${$1}${$1:+ }$flag" 
    702             done 
    703           fi 
    704         fi 
    705       fi 
    706     fi 
    707   fi 
    708   AC_SUBST([$1]) 
    709 ]) 
  • m4/lib-prefix.m4

    diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
    index a8684e1..0d895ca 100644
    a b  
    1 # lib-prefix.m4 serial 5 (gettext-0.15) 
     1# lib-prefix.m4 serial 4 (gettext-0.14.2) 
    22dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    AC_DEFUN([AC_LIB_PREFIX], 
    2424  AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 
    2525  AC_REQUIRE([AC_PROG_CC]) 
    2626  AC_REQUIRE([AC_CANONICAL_HOST]) 
    27   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 
    2827  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    2928  dnl By default, look in $includedir and $libdir. 
    3029  use_additional=yes 
    AC_DEFUN([AC_LIB_PREFIX], 
    4645        ]) 
    4746      else 
    4847        additional_includedir="$withval/include" 
    49         additional_libdir="$withval/$acl_libdirstem" 
     48        additional_libdir="$withval/lib" 
    5049      fi 
    5150    fi 
    5251]) 
    AC_DEFUN([AC_LIB_PREFIX], 
    8887    dnl   2. if it's already present in $LDFLAGS, 
    8988    dnl   3. if it's /usr/local/lib and we are using GCC on Linux, 
    9089    dnl   4. if it doesn't exist as a directory. 
    91     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 
     90    if test "X$additional_libdir" != "X/usr/lib"; then 
    9291      haveit= 
    9392      for x in $LDFLAGS; do 
    9493        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    AC_DEFUN([AC_LIB_PREFIX], 
    9897        fi 
    9998      done 
    10099      if test -z "$haveit"; then 
    101         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 
     100        if test "X$additional_libdir" = "X/usr/local/lib"; then 
    102101          if test -n "$GCC"; then 
    103102            case $host_os in 
    104103              linux*) haveit=yes;; 
    AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 
    152151  exec_prefix="$acl_save_exec_prefix" 
    153152  prefix="$acl_save_prefix" 
    154153]) 
    155  
    156 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing 
    157 dnl the basename of the libdir, either "lib" or "lib64". 
    158 AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 
    159 [ 
    160   dnl There is no formal standard regarding lib and lib64. The current 
    161   dnl practice is that on a system supporting 32-bit and 64-bit instruction 
    162   dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit 
    163   dnl libraries go under $prefix/lib. We determine the compiler's default 
    164   dnl mode by looking at the compiler's library search path. If at least 
    165   dnl of its elements ends in /lib64 or points to a directory whose absolute 
    166   dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the 
    167   dnl default, namely "lib". 
    168   acl_libdirstem=lib 
    169   searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 
    170   if test -n "$searchpath"; then 
    171     acl_save_IFS="${IFS=        }"; IFS=":" 
    172     for searchdir in $searchpath; do 
    173       if test -d "$searchdir"; then 
    174         case "$searchdir" in 
    175           */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 
    176           *) searchdir=`cd "$searchdir" && pwd` 
    177              case "$searchdir" in 
    178                */lib64 ) acl_libdirstem=lib64 ;; 
    179              esac ;; 
    180         esac 
    181       fi 
    182     done 
    183     IFS="$acl_save_IFS" 
    184   fi 
    185 ]) 
  • m4/longlong.m4

    diff --git a/m4/longlong.m4 b/m4/longlong.m4
    index 1f9e862..7b399e0 100644
    a b  
    1 # longlong.m4 serial 10 
    2 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. 
     1# longlong.m4 serial 5 
     2dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    66 
    77dnl From Paul Eggert. 
    88 
    9 # Define HAVE_LONG_LONG_INT if 'long long int' works. 
    10 # This fixes a bug in Autoconf 2.60, but can be removed once we 
    11 # assume 2.61 everywhere. 
     9# Define HAVE_LONG_LONG if 'long long' works. 
    1210 
    13 # Note: If the type 'long long int' exists but is only 32 bits large 
    14 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be 
    15 # defined. In this case you can treat 'long long int' like 'long int'. 
    16  
    17 AC_DEFUN([AC_TYPE_LONG_LONG_INT], 
    18 [ 
    19   AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], 
    20     [AC_LINK_IFELSE( 
    21        [AC_LANG_PROGRAM( 
    22           [[long long int ll = 9223372036854775807ll; 
    23             long long int nll = -9223372036854775807LL; 
    24             typedef int a[((-9223372036854775807LL < 0 
    25                             && 0 < 9223372036854775807ll) 
    26                            ? 1 : -1)]; 
    27             int i = 63;]], 
    28           [[long long int llmax = 9223372036854775807ll; 
    29             return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) 
    30                     | (llmax / ll) | (llmax % ll));]])], 
    31        [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. 
    32         dnl If cross compiling, assume the bug isn't important, since 
    33         dnl nobody cross compiles for this platform as far as we know. 
    34         AC_RUN_IFELSE( 
    35           [AC_LANG_PROGRAM( 
    36              [[@%:@include <limits.h> 
    37                @%:@ifndef LLONG_MAX 
    38                @%:@ define HALF \ 
    39                         (1LL << (sizeof (long long int) * CHAR_BIT - 2)) 
    40                @%:@ define LLONG_MAX (HALF - 1 + HALF) 
    41                @%:@endif]], 
    42              [[long long int n = 1; 
    43                int i; 
    44                for (i = 0; ; i++) 
    45                  { 
    46                    long long int m = n << i; 
    47                    if (m >> i != n) 
    48                      return 1; 
    49                    if (LLONG_MAX / 2 < m) 
    50                      break; 
    51                  } 
    52                return 0;]])], 
    53           [ac_cv_type_long_long_int=yes], 
    54           [ac_cv_type_long_long_int=no], 
    55           [ac_cv_type_long_long_int=yes])], 
    56        [ac_cv_type_long_long_int=no])]) 
    57   if test $ac_cv_type_long_long_int = yes; then 
    58     AC_DEFINE([HAVE_LONG_LONG_INT], 1, 
    59       [Define to 1 if the system has the type `long long int'.]) 
    60   fi 
    61 ]) 
    62  
    63 # This macro is obsolescent and should go away soon. 
    6411AC_DEFUN([gl_AC_TYPE_LONG_LONG], 
    6512[ 
    66   AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) 
    67   ac_cv_type_long_long=$ac_cv_type_long_long_int 
     13  AC_CACHE_CHECK([for long long], ac_cv_type_long_long, 
     14  [AC_TRY_LINK([long long ll = 1LL; int i = 63;], 
     15    [long long llmax = (long long) -1; 
     16     return ll << i | ll >> i | llmax / ll | llmax % ll;], 
     17    ac_cv_type_long_long=yes, 
     18    ac_cv_type_long_long=no)]) 
    6819  if test $ac_cv_type_long_long = yes; then 
    6920    AC_DEFINE(HAVE_LONG_LONG, 1, 
    7021      [Define if you have the 'long long' type.]) 
  • m4/printf-posix.m4

    diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
    index 33e387c..af10170 100644
    a b  
    1 # printf-posix.m4 serial 3 (gettext-0.16.2) 
    2 dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. 
     1# printf-posix.m4 serial 2 (gettext-0.13.1) 
     2dnl Copyright (C) 2003 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    int main () 
    2828}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, 
    2929      [ 
    3030        AC_EGREP_CPP(notposix, [ 
    31 #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ 
     31#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ 
    3232  notposix 
    3333#endif 
    3434        ], gt_cv_func_printf_posix="guessing no", 
  • m4/size_max.m4

    diff --git a/m4/size_max.m4 b/m4/size_max.m4
    index 6cb4868..4fe81c7 100644
    a b  
    1 # size_max.m4 serial 6 
    2 dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. 
     1# size_max.m4 serial 2 
     2dnl Copyright (C) 2003 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    AC_DEFUN([gl_SIZE_MAX], 
    1111  AC_CHECK_HEADERS(stdint.h) 
    1212  dnl First test whether the system already has SIZE_MAX. 
    1313  AC_MSG_CHECKING([for SIZE_MAX]) 
    14   AC_CACHE_VAL([gl_cv_size_max], [ 
    15     gl_cv_size_max= 
    16     AC_EGREP_CPP([Found it], [ 
     14  result= 
     15  AC_EGREP_CPP([Found it], [ 
    1716#include <limits.h> 
    1817#if HAVE_STDINT_H 
    1918#include <stdint.h> 
    AC_DEFUN([gl_SIZE_MAX], 
    2120#ifdef SIZE_MAX 
    2221Found it 
    2322#endif 
    24 ], gl_cv_size_max=yes) 
    25     if test -z "$gl_cv_size_max"; then 
    26       dnl Define it ourselves. Here we assume that the type 'size_t' is not wider 
    27       dnl than the type 'unsigned long'. Try hard to find a definition that can 
    28       dnl be used in a preprocessor #if, i.e. doesn't contain a cast. 
    29       AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], 
    30         [#include <stddef.h> 
    31 #include <limits.h>], size_t_bits_minus_1=) 
    32       AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], 
    33         [#include <stddef.h>], fits_in_uint=) 
    34       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then 
    35         if test $fits_in_uint = 1; then 
    36           dnl Even though SIZE_MAX fits in an unsigned int, it must be of type 
    37           dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. 
    38           AC_TRY_COMPILE([#include <stddef.h> 
    39             extern size_t foo; 
    40             extern unsigned long foo; 
    41             ], [], fits_in_uint=0) 
    42         fi 
    43         dnl We cannot use 'expr' to simplify this expression, because 'expr' 
    44         dnl works only with 'long' integers in the host environment, while we 
    45         dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. 
    46         if test $fits_in_uint = 1; then 
    47           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" 
    48         else 
    49           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" 
    50         fi 
     23], result=yes) 
     24  if test -z "$result"; then 
     25    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider 
     26    dnl than the type 'unsigned long'. 
     27    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', 
     28    dnl which is guaranteed to work from LONG_MIN to LONG_MAX. 
     29    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, 
     30      [#include <stddef.h>], result=?) 
     31    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, 
     32      [#include <stddef.h>], result=?) 
     33    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, 
     34      [#include <stddef.h>], result=?) 
     35    if test "$fits_in_uint" = 1; then 
     36      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type 
     37      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. 
     38      AC_TRY_COMPILE([#include <stddef.h> 
     39        extern size_t foo; 
     40        extern unsigned long foo; 
     41        ], [], fits_in_uint=0) 
     42    fi 
     43    if test -z "$result"; then 
     44      if test "$fits_in_uint" = 1; then 
     45        result="$res_hi$res_lo"U 
    5146      else 
    52         dnl Shouldn't happen, but who knows... 
    53         gl_cv_size_max='((size_t)~(size_t)0)' 
     47        result="$res_hi$res_lo"UL 
    5448      fi 
     49    else 
     50      dnl Shouldn't happen, but who knows... 
     51      result='~(size_t)0' 
    5552    fi 
    56   ]) 
    57   AC_MSG_RESULT([$gl_cv_size_max]) 
    58   if test "$gl_cv_size_max" != yes; then 
    59     AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], 
     53  fi 
     54  AC_MSG_RESULT([$result]) 
     55  if test "$result" != yes; then 
     56    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], 
    6057      [Define as the maximum value of type 'size_t', if the system doesn't define it.]) 
    6158  fi 
    6259]) 
    63  
    64 dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. 
    65 dnl Remove this when we can assume autoconf >= 2.61. 
    66 m4_ifdef([AC_COMPUTE_INT], [], [ 
    67   AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) 
    68 ]) 
  • m4/stdint_h.m4

    diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
    index db9a8ac..3355f35 100644
    a b  
    1 # stdint_h.m4 serial 6 
    2 dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. 
     1# stdint_h.m4 serial 5 
     2dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    AC_DEFUN([gl_AC_HEADER_STDINT_H], 
    1515  [AC_TRY_COMPILE( 
    1616    [#include <sys/types.h> 
    1717#include <stdint.h>], 
    18     [uintmax_t i = (uintmax_t) -1; return !i;], 
     18    [uintmax_t i = (uintmax_t) -1;], 
    1919    gl_cv_header_stdint_h=yes, 
    2020    gl_cv_header_stdint_h=no)]) 
    2121  if test $gl_cv_header_stdint_h = yes; then 
  • m4/ulonglong.m4

    diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4
    index 9fae98e..dee10cc 100644
    a b  
    1 # ulonglong.m4 serial 6 
    2 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. 
     1# ulonglong.m4 serial 4 
     2dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    66 
    77dnl From Paul Eggert. 
    88 
    9 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. 
    10 # This fixes a bug in Autoconf 2.60, but can be removed once we 
    11 # assume 2.61 everywhere. 
     9# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. 
    1210 
    13 # Note: If the type 'unsigned long long int' exists but is only 32 bits 
    14 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT 
    15 # will not be defined. In this case you can treat 'unsigned long long int' 
    16 # like 'unsigned long int'. 
    17  
    18 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], 
    19 [ 
    20   AC_CACHE_CHECK([for unsigned long long int], 
    21     [ac_cv_type_unsigned_long_long_int], 
    22     [AC_LINK_IFELSE( 
    23        [AC_LANG_PROGRAM( 
    24           [[unsigned long long int ull = 18446744073709551615ULL; 
    25             typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 
    26                            ? 1 : -1)]; 
    27            int i = 63;]], 
    28           [[unsigned long long int ullmax = 18446744073709551615ull; 
    29             return (ull << 63 | ull >> 63 | ull << i | ull >> i 
    30                     | ullmax / ull | ullmax % ull);]])], 
    31        [ac_cv_type_unsigned_long_long_int=yes], 
    32        [ac_cv_type_unsigned_long_long_int=no])]) 
    33   if test $ac_cv_type_unsigned_long_long_int = yes; then 
    34     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, 
    35       [Define to 1 if the system has the type `unsigned long long int'.]) 
    36   fi 
    37 ]) 
    38  
    39 # This macro is obsolescent and should go away soon. 
    4011AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], 
    4112[ 
    42   AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) 
    43   ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int 
     13  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, 
     14  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], 
     15    [unsigned long long ullmax = (unsigned long long) -1; 
     16     return ull << i | ull >> i | ullmax / ull | ullmax % ull;], 
     17    ac_cv_type_unsigned_long_long=yes, 
     18    ac_cv_type_unsigned_long_long=no)]) 
    4419  if test $ac_cv_type_unsigned_long_long = yes; then 
    4520    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, 
    4621      [Define if you have the 'unsigned long long' type.]) 
  • m4/wint_t.m4

    diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
    index 2cac1a7..b8fff9c 100644
    a b  
    1 # wint_t.m4 serial 2 (gettext-0.16.2) 
    2 dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. 
     1# wint_t.m4 serial 1 (gettext-0.12) 
     2dnl Copyright (C) 2003 Free Software Foundation, Inc. 
    33dnl This file is free software; the Free Software Foundation 
    44dnl gives unlimited permission to copy and/or distribute it, 
    55dnl with or without modifications, as long as this notice is preserved. 
    dnl Prerequisite: AC_PROG_CC 
    1111AC_DEFUN([gt_TYPE_WINT_T], 
    1212[ 
    1313  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, 
    14     [AC_TRY_COMPILE([ 
    15 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 
    16    <wchar.h>. 
    17    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 
    18    before <wchar.h>.  */ 
    19 #include <stddef.h> 
    20 #include <stdio.h> 
    21 #include <time.h> 
    22 #include <wchar.h> 
     14    [AC_TRY_COMPILE([#include <wchar.h> 
    2315       wint_t foo = (wchar_t)'\0';], , 
    2416       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) 
    2517  if test $gt_cv_c_wint_t = yes; then