Changeset 2452:d69e113978a3 for m4

Show
Ignore:
Timestamp:
2001-06-07 13:02:36 (7 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Gettext update. (From E.G.E., of course.)

Location:
m4
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • m4/gettext.m4

    r2037 r2452  
    66# 
    77 
    8 # 
    98# This file can be copied and used freely without restrictions.  It can 
    109# be used in projects which are not available under the GNU Public License 
     
    1211# Please note that the actual code is *not* freely available. 
    1312 
    14 # serial 105 
    15  
    16 AC_DEFUN(MUTT_AM_WITH_NLS, 
     13# serial 109 
     14 
     15dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]). 
     16dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library 
     17dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static, 
     18dnl    depending on --{enable,disable}-{shared,static} and on the presence of 
     19dnl    AM-DISABLE-SHARED). Otherwise, a static library 
     20dnl    $(top_builddir)/intl/libintl.a will be created. 
     21dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 
     22dnl    implementations (in libc or libintl) without the ngettext() function 
     23dnl    will be ignored. 
     24dnl LIBDIR is used to find the intl libraries.  If empty, 
     25dnl    the value `$(top_builddir)/intl/' is used. 
     26dnl 
     27dnl The result of the configuration is one of three cases: 
     28dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 
     29dnl    and used. 
     30dnl    Catalog format: GNU --> install in $(datadir) 
     31dnl    Catalog extension: .mo after installation, .gmo in source tree 
     32dnl 2) GNU gettext has been found in the system's C library. 
     33dnl    Catalog format: GNU --> install in $(datadir) 
     34dnl    Catalog extension: .mo after installation, .gmo in source tree 
     35dnl 3) No internationalization, always use English msgid. 
     36dnl    Catalog format: none 
     37dnl    Catalog extension: none 
     38dnl The use of .gmo is historical (it was needed to avoid overwriting the 
     39dnl GNU format catalogs when building on a platform with an X/Open gettext), 
     40dnl but we keep it in order not to force irrelevant filename changes on the 
     41dnl maintainers. 
     42dnl 
     43AC_DEFUN([MUTT_AM_WITH_NLS], 
    1744  [AC_MSG_CHECKING([whether NLS is requested]) 
    1845    dnl Default is enabled NLS 
     
    2350    AC_SUBST(USE_NLS) 
    2451 
     52    BUILD_INCLUDED_LIBINTL=no 
    2553    USE_INCLUDED_LIBINTL=no 
     54    INTLLIBS= 
    2655 
    2756    dnl If we use NLS figure out what method 
    2857    if test "$USE_NLS" = "yes"; then 
    29       AC_DEFINE(ENABLE_NLS) 
     58      AC_DEFINE(ENABLE_NLS, 1, 
     59        [Define to 1 if translation of program messages to the user's native language 
     60   is requested.]) 
    3061      AC_MSG_CHECKING([whether included gettext is requested]) 
    3162      AC_ARG_WITH(included-gettext, 
     
    3869      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 
    3970        dnl User does not insist on using GNU NLS library.  Figure out what 
    40         dnl to use.  If gettext or catgets are available (in this order) we 
    41         dnl use this.  Else we have to fall back to GNU NLS library. 
    42         dnl catgets is only used if permitted by option --with-catgets. 
    43         nls_cv_header_intl= 
    44         nls_cv_header_libgt= 
     71        dnl to use.  If GNU gettext is available we use this.  Else we have 
     72        dnl to fall back to GNU NLS library. 
    4573        CATOBJEXT=NONE 
    4674 
     75        dnl Add a version number to the cache macros. 
     76        define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc]) 
     77        define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl]) 
     78 
    4779        AC_CHECK_HEADER(libintl.h, 
    48           [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, 
    49             [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], 
    50                gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) 
    51  
    52            if test "$gt_cv_func_gettext_libc" != "yes"; then 
    53              AC_CHECK_LIB(intl, bindtextdomain, 
    54                [AC_CHECK_LIB(intl, gettext, 
    55                  gt_cv_func_gettext_libintl=yes, 
    56                  gt_cv_func_gettext_libintl=no)]) 
     80          [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, 
     81            [AC_TRY_LINK([#include <libintl.h> 
     82extern int _nl_msg_cat_cntr;], 
     83               [bindtextdomain ("", ""); 
     84return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], 
     85               gt_cv_func_gnugettext_libc=yes, 
     86               gt_cv_func_gnugettext_libc=no)]) 
     87 
     88           if test "$gt_cv_func_gnugettext_libc" != "yes"; then 
     89             AC_CACHE_CHECK([for GNU gettext in libintl], 
     90               gt_cv_func_gnugettext_libintl, 
     91               [gt_save_LIBS="$LIBS" 
     92                LIBS="$LIBS -lintl $LIBICONV" 
     93                AC_TRY_LINK([#include <libintl.h> 
     94extern int _nl_msg_cat_cntr;], 
     95                  [bindtextdomain ("", ""); 
     96return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], 
     97                  gt_cv_func_gnugettext_libintl=yes, 
     98                  gt_cv_func_gnugettext_libintl=no) 
     99                LIBS="$gt_save_LIBS"]) 
    57100           fi 
    58             
    59            if test "$gt_cv_func_gettext_libintl" = yes; then 
    60              LIBS="$LIBS -lintl" 
     101 
     102           dnl If an already present or preinstalled GNU gettext() is found, 
     103           dnl use it.  But if this macro is used in GNU gettext, and GNU 
     104           dnl gettext is already preinstalled in libintl, we update this 
     105           dnl libintl.  (Cf. the install rule in intl/Makefile.in.) 
     106           if test "$gt_cv_func_gnugettext_libc" = "yes" \ 
     107              || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 
     108                   && test "$PACKAGE" != gettext; }; then 
     109             AC_DEFINE(HAVE_GETTEXT, 1, 
     110               [Define if the GNU gettext() function is already present or preinstalled.]) 
     111 
     112             if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 
     113               dnl If iconv() is in a separate libiconv library, then anyone 
     114               dnl linking with libintl{.a,.so} also needs to link with 
     115               dnl libiconv. 
     116               INTLLIBS="-lintl $LIBICONV" 
     117             fi 
     118 
     119             gt_save_LIBS="$LIBS" 
     120             LIBS="$LIBS $INTLLIBS" 
     121             AC_CHECK_FUNCS(dcgettext) 
     122             LIBS="$gt_save_LIBS" 
     123 
     124             MUTT_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 
     125               [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl 
     126             if test "$MSGFMT" != "no"; then 
     127               AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 
     128             fi 
     129 
     130             MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
     131               [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 
     132 
     133             CATOBJEXT=.gmo 
    61134           fi 
    62  
    63            if test "$gt_cv_func_gettext_libc" = "yes" \ 
    64               || test "$gt_cv_func_gettext_libintl" = "yes"; then 
    65               AC_DEFINE(HAVE_GETTEXT) 
    66               MUTT_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 
    67                 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl 
    68               if test "$MSGFMT" != "no"; then 
    69                 AC_CHECK_FUNCS(dcgettext) 
    70                 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 
    71                 MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
    72                   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 
    73                 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; 
    74                                return _nl_msg_cat_cntr], 
    75                   [CATOBJEXT=.gmo 
    76                    DATADIRNAME=share], 
    77                   [CATOBJEXT=.mo 
    78                    DATADIRNAME=lib]) 
    79                 INSTOBJEXT=.mo 
    80               fi 
    81             fi 
    82135        ]) 
    83136 
    84137        if test "$CATOBJEXT" = "NONE"; then 
    85           AC_MSG_CHECKING([whether catgets can be used]) 
    86           AC_ARG_WITH(catgets, 
    87             [  --with-catgets             Use catgets functions if available], 
    88             nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) 
    89           AC_MSG_RESULT($nls_cv_use_catgets) 
    90  
    91           if test "$nls_cv_use_catgets" = "yes"; then 
    92             dnl No gettext in C library.  Try catgets next. 
    93             AC_CHECK_LIB(i, main) 
    94             AC_CHECK_FUNC(catgets, 
    95               [AC_DEFINE(HAVE_CATGETS) 
    96                INTLOBJS="\$(CATOBJS)" 
    97                AC_PATH_PROG(GENCAT, gencat, no)dnl 
    98                if test "$GENCAT" != "no"; then 
    99                  AC_PATH_PROG(GMSGFMT, gmsgfmt, no) 
    100                  if test "$GMSGFMT" = "no"; then 
    101                    MUTT_AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, 
    102                     [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) 
    103                  fi 
    104                  MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 
    105                    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 
    106                  USE_INCLUDED_LIBINTL=yes 
    107                  CATOBJEXT=.cat 
    108                  INSTOBJEXT=.cat 
    109                  DATADIRNAME=lib 
    110                  INTLDEPS='$(top_builddir)/intl/libintl.a' 
    111                  INTLLIBS=$INTLDEPS 
    112                  LIBS=`echo $LIBS | sed -e 's/-lintl//'` 
    113                  nls_cv_header_intl=intl/libintl.h 
    114                  nls_cv_header_libgt=intl/libgettext.h 
    115                fi]) 
    116           fi 
    117         fi 
    118  
    119         if test "$CATOBJEXT" = "NONE"; then 
    120           dnl Neither gettext nor catgets in included in the C library. 
     138          dnl GNU gettext is not found in the C library. 
    121139          dnl Fall back on GNU gettext library. 
    122140          nls_cv_use_gnu_gettext=yes 
     
    133151          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 
    134152        AC_SUBST(MSGFMT) 
     153        BUILD_INCLUDED_LIBINTL=yes 
    135154        USE_INCLUDED_LIBINTL=yes 
    136155        CATOBJEXT=.gmo 
    137         INSTOBJEXT=.mo 
    138         DATADIRNAME=share 
    139         INTLDEPS='$(top_builddir)/intl/libintl.a' 
    140         INTLLIBS=$INTLDEPS 
    141         LIBS=`echo $LIBS | sed -e 's/-lintl//'` 
    142         nls_cv_header_intl=intl/libintl.h 
    143         nls_cv_header_libgt=intl/libgettext.h 
     156        INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV" 
     157        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 
    144158      fi 
    145159 
     
    157171      fi 
    158172 
    159       # We need to process the po/ directory. 
     173      dnl We need to process the po/ directory. 
    160174      POSUB=po 
     175    fi 
     176    AC_OUTPUT_COMMANDS( 
     177     [for ac_file in $CONFIG_FILES; do 
     178        # Support "outfile[:infile[:infile...]]" 
     179        case "$ac_file" in 
     180          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 
     181        esac 
     182        # PO directories have a Makefile.in generated from Makefile.in.in. 
     183        case "$ac_file" in */Makefile.in) 
     184          # Adjust a relative srcdir. 
     185          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 
     186          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 
     187          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 
     188          case "$ac_given_srcdir" in 
     189            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 
     190            /*) top_srcdir="$ac_given_srcdir" ;; 
     191            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;; 
     192          esac 
     193          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 
     194            rm -f "$ac_dir/POTFILES" 
     195            echo creating "$ac_dir/POTFILES" 
     196            sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" 
     197            echo creating "$ac_dir/Makefile" 
     198            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 
     199          fi 
     200          ;; 
     201        esac 
     202      done]) 
     203 
     204 
     205    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 
     206    dnl to 'yes' because some of the testsuite requires it. 
     207    if test "$PACKAGE" = gettext; then 
     208      BUILD_INCLUDED_LIBINTL=yes 
     209    fi 
     210 
     211    dnl intl/plural.c is generated from intl/plural.y. It requires bison, 
     212    dnl because plural.y uses bison specific features. It requires at least 
     213    dnl bison-1.26 because earlier versions generate a plural.c that doesn't 
     214    dnl compile. 
     215    dnl bison is only needed for the maintainer (who touches plural.y). But in 
     216    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put 
     217    dnl the rule in general Makefile. Now, some people carelessly touch the 
     218    dnl files or have a broken "make" program, hence the plural.c rule will 
     219    dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not 
     220    dnl present or too old. 
     221    AC_CHECK_PROGS([INTLBISON], [bison]) 
     222    if test -z "$INTLBISON"; then 
     223      ac_verc_fail=yes 
    161224    else 
    162       DATADIRNAME=share 
    163       nls_cv_header_intl=intl/libintl.h 
    164       nls_cv_header_libgt=intl/libgettext.h 
     225      dnl Found it, now check the version. 
     226      AC_MSG_CHECKING([version of bison]) 
     227changequote(<<,>>)dnl 
     228      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'` 
     229      case $ac_prog_version in 
     230        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 
     231        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) 
     232changequote([,])dnl 
     233           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 
     234        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 
     235      esac 
     236      AC_MSG_RESULT([$ac_prog_version]) 
    165237    fi 
    166     if test -z "$nsl_cv_header_intl"; then 
    167       # Clean out junk possibly left behind by a previous configuration. 
    168       rm -f intl/libintl.h 
    169     fi 
    170     AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) 
    171     AC_OUTPUT_COMMANDS( 
    172      [case "$CONFIG_FILES" in *po/Makefile.in*) 
    173         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile 
    174       esac]) 
    175  
    176  
    177     # If this is used in GNU gettext we have to set USE_NLS to `yes' 
    178     # because some of the sources are only built for this goal. 
    179     if test "$PACKAGE" = gettext; then 
    180       USE_NLS=yes 
    181       USE_INCLUDED_LIBINTL=yes 
     238    if test $ac_verc_fail = yes; then 
     239      INTLBISON=: 
    182240    fi 
    183241 
     
    191249 
    192250    dnl Make all variables we use known to autoconf. 
     251    AC_SUBST(BUILD_INCLUDED_LIBINTL) 
    193252    AC_SUBST(USE_INCLUDED_LIBINTL) 
    194253    AC_SUBST(CATALOGS) 
    195254    AC_SUBST(CATOBJEXT) 
    196     AC_SUBST(DATADIRNAME) 
    197255    AC_SUBST(GMOFILES) 
    198     AC_SUBST(INSTOBJEXT) 
    199256    AC_SUBST(INTLDEPS) 
    200257    AC_SUBST(INTLLIBS) 
     
    202259    AC_SUBST(POFILES) 
    203260    AC_SUBST(POSUB) 
     261 
     262    dnl For backward compatibility. Some configure.ins may be using this. 
     263    nls_cv_header_intl= 
     264    nls_cv_header_libgt= 
     265 
     266    dnl For backward compatibility. Some Makefiles may be using this. 
     267    DATADIRNAME=share 
     268    AC_SUBST(DATADIRNAME) 
     269 
     270    dnl For backward compatibility. Some Makefiles may be using this. 
     271    INSTOBJEXT=.mo 
     272    AC_SUBST(INSTOBJEXT) 
     273 
     274    dnl For backward compatibility. Some Makefiles may be using this. 
     275    GENCAT=gencat 
     276    AC_SUBST(GENCAT) 
    204277  ]) 
    205278 
    206 AC_DEFUN(MUTT_AM_GNU_GETTEXT, 
     279dnl Usage: Just like AM_WITH_NLS, which see. 
     280AC_DEFUN([MUTT_AM_GNU_GETTEXT], 
    207281  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl 
    208282   AC_REQUIRE([AC_PROG_CC])dnl 
     283   AC_REQUIRE([AC_CANONICAL_HOST])dnl 
    209284   AC_REQUIRE([AC_PROG_RANLIB])dnl 
    210285   AC_REQUIRE([AC_ISC_POSIX])dnl 
     
    216291   AC_REQUIRE([AC_FUNC_ALLOCA])dnl 
    217292   AC_REQUIRE([AC_FUNC_MMAP])dnl 
    218  
    219    AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ 
    220 unistd.h sys/param.h]) 
    221    AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ 
    222 strdup __argz_count __argz_stringify __argz_next]) 
    223  
    224    if test "${ac_cv_func_stpcpy+set}" != "set"; then 
    225      AC_CHECK_FUNCS(stpcpy) 
    226    fi 
    227    if test "${ac_cv_func_stpcpy}" = "yes"; then 
    228      AC_DEFINE(HAVE_STPCPY) 
    229    fi 
    230  
     293   AC_REQUIRE([jm_GLIBC21])dnl 
     294 
     295   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 
     296stdlib.h string.h unistd.h sys/param.h]) 
     297   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \ 
     298getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ 
     299strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) 
     300 
     301   MUTT_AM_ICONV 
     302   MUTT_AM_LANGINFO_CODESET 
    231303   MUTT_AM_LC_MESSAGES 
    232    MUTT_AM_WITH_NLS 
     304   MUTT_AM_WITH_NLS([$1],[$2],[$3]) 
    233305 
    234306   if test "x$CATOBJEXT" != "x"; then 
     
    238310       AC_MSG_CHECKING(for catalogs to be installed) 
    239311       NEW_LINGUAS= 
    240        for lang in ${LINGUAS=$ALL_LINGUAS}; do 
    241          case "$ALL_LINGUAS" in 
    242           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; 
    243          esac 
     312       for presentlang in $ALL_LINGUAS; do 
     313         useit=no 
     314         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do 
     315           # Use the presentlang catalog if desiredlang is 
     316           #   a. equal to presentlang, or 
     317           #   b. a variant of presentlang (because in this case, 
     318           #      presentlang can be used as a fallback for messages 
     319           #      which are not translated in the desiredlang catalog). 
     320           case "$desiredlang" in 
     321             "$presentlang"*) useit=yes;; 
     322           esac 
     323         done 
     324         if test $useit = yes; then 
     325           NEW_LINGUAS="$NEW_LINGUAS $presentlang" 
     326         fi 
    244327       done 
    245328       LINGUAS=$NEW_LINGUAS 
     
    253336   fi 
    254337 
    255    dnl The reference to <locale.h> in the installed <libintl.h> file 
    256    dnl must be resolved because we cannot expect the users of this 
    257    dnl to define HAVE_LOCALE_H. 
    258    if test $ac_cv_header_locale_h = yes; then 
    259      INCLUDE_LOCALE_H="#include <locale.h>" 
    260    else 
    261      INCLUDE_LOCALE_H="\ 
    262 /* The system does not provide the header <locale.h>.  Take care yourself.  */" 
    263    fi 
    264    AC_SUBST(INCLUDE_LOCALE_H) 
    265  
    266    dnl Determine which catalog format we have (if any is needed) 
    267    dnl For now we know about two different formats: 
    268    dnl   Linux libc-5 and the normal X/Open format 
    269    test -d intl || mkdir intl 
    270    if test "$CATOBJEXT" = ".cat"; then 
    271      AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) 
    272  
    273      dnl Transform the SED scripts while copying because some dumb SEDs 
    274      dnl cannot handle comments. 
    275      sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed 
    276    fi 
    277    dnl po2tbl.sed is always needed. 
    278    sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ 
    279      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed 
    280  
    281    dnl In the intl/Makefile.in we have a special dependency which makes 
    282    dnl only sense for gettext.  We comment this out for non-gettext 
    283    dnl packages. 
    284    if test "$PACKAGE" = "gettext"; then 
    285      GT_NO="#NO#" 
    286      GT_YES= 
    287    else 
    288      GT_NO= 
    289      GT_YES="#YES#" 
    290    fi 
    291    AC_SUBST(GT_NO) 
    292    AC_SUBST(GT_YES) 
    293  
    294338   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 
    295    dnl find the mkinstalldirs script in another subdir but ($top_srcdir). 
     339   dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 
    296340   dnl Try to locate is. 
    297341   MKINSTALLDIRS= 
     
    304348   AC_SUBST(MKINSTALLDIRS) 
    305349 
    306    dnl *** For now the libtool support in intl/Makefile is not for real. 
    307    l= 
    308    AC_SUBST(l) 
    309  
    310    dnl Generate list of files to be processed by xgettext which will 
    311    dnl be included in po/Makefile. 
    312    test -d po || mkdir po 
    313    if test "x$srcdir" != "x."; then 
    314      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then 
    315        posrcprefix="$srcdir/" 
    316      else 
    317        posrcprefix="../$srcdir/" 
    318      fi 
    319    else 
    320      posrcprefix="../" 
    321    fi 
    322    rm -f po/POTFILES 
    323    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ 
    324         < $srcdir/po/POTFILES.in > po/POTFILES 
     350   dnl Enable libtool support if the surrounding package wishes it. 
     351   INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) 
     352   AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 
    325353  ]) 
  • m4/lcmessage.m4

    r576 r2452  
    77# Please note that the actual code is *not* freely available. 
    88 
    9 # serial 1 
     9# serial 2 
    1010 
    11 AC_DEFUN(MUTT_AM_LC_MESSAGES, 
     11AC_DEFUN([MUTT_AM_LC_MESSAGES], 
    1212  [if test $ac_cv_header_locale_h = yes; then 
    1313    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 
     
    1515       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 
    1616    if test $am_cv_val_LC_MESSAGES = yes; then 
    17       AC_DEFINE(HAVE_LC_MESSAGES) 
     17      AC_DEFINE(HAVE_LC_MESSAGES, 1, 
     18        [Define if your <locale.h> file defines LC_MESSAGES.]) 
    1819    fi 
    1920  fi]) 
  • m4/progtest.m4

    r576 r2452  
    99# serial 1 
    1010 
    11 dnl MUTT_AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 
     11dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 
    1212dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 
    13 AC_DEFUN(MUTT_AM_PATH_PROG_WITH_TEST, 
     13AC_DEFUN([MUTT_AM_PATH_PROG_WITH_TEST], 
    1414[# Extract the first word of "$2", so it can be a program name with args. 
    1515set dummy $2; ac_word=[$]2