]> granicus.if.org Git - mutt/commitdiff
Gettext update. (From E.G.E., of course.)
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 7 Jun 2001 20:02:36 +0000 (20:02 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 7 Jun 2001 20:02:36 +0000 (20:02 +0000)
m4/gettext.m4
m4/lcmessage.m4
m4/progtest.m4
po/zh_TW.Big5.po

index 5297916219dc97fa4b4b333272a2a45ab0736990..bbc076934db203d51ef0a8f00d6c17e5d492f311 100644 (file)
@@ -5,15 +5,42 @@
 # Slightly modified by Thomas Roessler <roessler@guug.de>
 #
 
-#
 # This file can be copied and used freely without restrictions.  It can
 # be used in projects which are not available under the GNU Public License
 # but which still want to provide support for the GNU gettext functionality.
 # Please note that the actual code is *not* freely available.
 
-# serial 105
-
-AC_DEFUN(MUTT_AM_WITH_NLS,
+# serial 109
+
+dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
+dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). Otherwise, a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.
+dnl LIBDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([MUTT_AM_WITH_NLS],
   [AC_MSG_CHECKING([whether NLS is requested])
     dnl Default is enabled NLS
     AC_ARG_ENABLE(nls,
@@ -22,11 +49,15 @@ AC_DEFUN(MUTT_AM_WITH_NLS,
     AC_MSG_RESULT($USE_NLS)
     AC_SUBST(USE_NLS)
 
+    BUILD_INCLUDED_LIBINTL=no
     USE_INCLUDED_LIBINTL=no
+    INTLLIBS=
 
     dnl If we use NLS figure out what method
     if test "$USE_NLS" = "yes"; then
-      AC_DEFINE(ENABLE_NLS)
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
       AC_MSG_CHECKING([whether included gettext is requested])
       AC_ARG_WITH(included-gettext,
         [  --with-included-gettext    Use the GNU gettext library included here],
@@ -37,87 +68,74 @@ AC_DEFUN(MUTT_AM_WITH_NLS,
       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
         dnl User does not insist on using GNU NLS library.  Figure out what
-        dnl to use.  If gettext or catgets are available (in this order) we
-        dnl use this.  Else we have to fall back to GNU NLS library.
-       dnl catgets is only used if permitted by option --with-catgets.
-       nls_cv_header_intl=
-       nls_cv_header_libgt=
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
        CATOBJEXT=NONE
 
+        dnl Add a version number to the cache macros.
+        define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
+        define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
+
        AC_CHECK_HEADER(libintl.h,
-         [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
-           [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
-              gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
-          if test "$gt_cv_func_gettext_libc" != "yes"; then
-            AC_CHECK_LIB(intl, bindtextdomain,
-              [AC_CHECK_LIB(intl, gettext,
-                gt_cv_func_gettext_libintl=yes,
-                gt_cv_func_gettext_libintl=no)])
-          fi
-          
-          if test "$gt_cv_func_gettext_libintl" = yes; then
-            LIBS="$LIBS -lintl"
+         [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+           [AC_TRY_LINK([#include <libintl.h>
+extern int _nl_msg_cat_cntr;],
+              [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
+              gt_cv_func_gnugettext_libc=yes,
+              gt_cv_func_gnugettext_libc=no)])
+
+          if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+            AC_CACHE_CHECK([for GNU gettext in libintl],
+              gt_cv_func_gnugettext_libintl,
+              [gt_save_LIBS="$LIBS"
+               LIBS="$LIBS -lintl $LIBICONV"
+               AC_TRY_LINK([#include <libintl.h>
+extern int _nl_msg_cat_cntr;],
+                 [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
+                 gt_cv_func_gnugettext_libintl=yes,
+                 gt_cv_func_gnugettext_libintl=no)
+               LIBS="$gt_save_LIBS"])
           fi
 
-          if test "$gt_cv_func_gettext_libc" = "yes" \
-             || test "$gt_cv_func_gettext_libintl" = "yes"; then
-             AC_DEFINE(HAVE_GETTEXT)
-             MUTT_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-               [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-             if test "$MSGFMT" != "no"; then
-               AC_CHECK_FUNCS(dcgettext)
-               AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-               MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-                 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-               AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-                              return _nl_msg_cat_cntr],
-                 [CATOBJEXT=.gmo
-                  DATADIRNAME=share],
-                 [CATOBJEXT=.mo
-                  DATADIRNAME=lib])
-               INSTOBJEXT=.mo
-             fi
-           fi
+          dnl If an already present or preinstalled GNU gettext() is found,
+          dnl use it.  But if this macro is used in GNU gettext, and GNU
+          dnl gettext is already preinstalled in libintl, we update this
+          dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+          if test "$gt_cv_func_gnugettext_libc" = "yes" \
+             || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+                  && test "$PACKAGE" != gettext; }; then
+            AC_DEFINE(HAVE_GETTEXT, 1,
+               [Define if the GNU gettext() function is already present or preinstalled.])
+
+            if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+              dnl If iconv() is in a separate libiconv library, then anyone
+              dnl linking with libintl{.a,.so} also needs to link with
+              dnl libiconv.
+              INTLLIBS="-lintl $LIBICONV"
+            fi
+
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $INTLLIBS"
+            AC_CHECK_FUNCS(dcgettext)
+            LIBS="$gt_save_LIBS"
+
+            MUTT_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+              [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+            if test "$MSGFMT" != "no"; then
+              AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+            fi
+
+            MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+              [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+
+            CATOBJEXT=.gmo
+          fi
        ])
 
         if test "$CATOBJEXT" = "NONE"; then
-         AC_MSG_CHECKING([whether catgets can be used])
-         AC_ARG_WITH(catgets,
-           [  --with-catgets             Use catgets functions if available],
-           nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
-         AC_MSG_RESULT($nls_cv_use_catgets)
-
-         if test "$nls_cv_use_catgets" = "yes"; then
-           dnl No gettext in C library.  Try catgets next.
-           AC_CHECK_LIB(i, main)
-           AC_CHECK_FUNC(catgets,
-             [AC_DEFINE(HAVE_CATGETS)
-              INTLOBJS="\$(CATOBJS)"
-              AC_PATH_PROG(GENCAT, gencat, no)dnl
-              if test "$GENCAT" != "no"; then
-                AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
-                if test "$GMSGFMT" = "no"; then
-                  MUTT_AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
-                   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
-                fi
-                MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-                  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-                USE_INCLUDED_LIBINTL=yes
-                CATOBJEXT=.cat
-                INSTOBJEXT=.cat
-                DATADIRNAME=lib
-                INTLDEPS='$(top_builddir)/intl/libintl.a'
-                INTLLIBS=$INTLDEPS
-                LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-                nls_cv_header_intl=intl/libintl.h
-                nls_cv_header_libgt=intl/libgettext.h
-              fi])
-         fi
-        fi
-
-        if test "$CATOBJEXT" = "NONE"; then
-         dnl Neither gettext nor catgets in included in the C library.
+         dnl GNU gettext is not found in the C library.
          dnl Fall back on GNU gettext library.
          nls_cv_use_gnu_gettext=yes
         fi
@@ -132,15 +150,11 @@ AC_DEFUN(MUTT_AM_WITH_NLS,
         MUTT_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
         AC_SUBST(MSGFMT)
+       BUILD_INCLUDED_LIBINTL=yes
        USE_INCLUDED_LIBINTL=yes
         CATOBJEXT=.gmo
-        INSTOBJEXT=.mo
-        DATADIRNAME=share
-       INTLDEPS='$(top_builddir)/intl/libintl.a'
-       INTLLIBS=$INTLDEPS
-       LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-        nls_cv_header_intl=intl/libintl.h
-        nls_cv_header_libgt=intl/libgettext.h
+       INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
+       LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
       fi
 
       dnl Test whether we really found GNU xgettext.
@@ -156,29 +170,73 @@ AC_DEFUN(MUTT_AM_WITH_NLS,
        fi
       fi
 
-      # We need to process the po/ directory.
+      dnl We need to process the po/ directory.
       POSUB=po
-    else
-      DATADIRNAME=share
-      nls_cv_header_intl=intl/libintl.h
-      nls_cv_header_libgt=intl/libgettext.h
     fi
-    if test -z "$nsl_cv_header_intl"; then
-      # Clean out junk possibly left behind by a previous configuration.
-      rm -f intl/libintl.h
-    fi
-    AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
     AC_OUTPUT_COMMANDS(
-     [case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac])
-
-
-    # If this is used in GNU gettext we have to set USE_NLS to `yes'
-    # because some of the sources are only built for this goal.
+     [for ac_file in $CONFIG_FILES; do
+        # Support "outfile[:infile[:infile...]]"
+        case "$ac_file" in
+          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+        esac
+        # PO directories have a Makefile.in generated from Makefile.in.in.
+        case "$ac_file" in */Makefile.in)
+          # Adjust a relative srcdir.
+          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+          case "$ac_given_srcdir" in
+            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+            /*) top_srcdir="$ac_given_srcdir" ;;
+            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+          esac
+          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+            rm -f "$ac_dir/POTFILES"
+            echo creating "$ac_dir/POTFILES"
+            sed -e "/^#/d" -e "/^[     ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
+            echo creating "$ac_dir/Makefile"
+            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          fi
+          ;;
+        esac
+      done])
+
+
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
     if test "$PACKAGE" = gettext; then
-      USE_NLS=yes
-      USE_INCLUDED_LIBINTL=yes
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+    dnl because plural.y uses bison specific features. It requires at least
+    dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+    dnl compile.
+    dnl bison is only needed for the maintainer (who touches plural.y). But in
+    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+    dnl the rule in general Makefile. Now, some people carelessly touch the
+    dnl files or have a broken "make" program, hence the plural.c rule will
+    dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+    dnl present or too old.
+    AC_CHECK_PROGS([INTLBISON], [bison])
+    if test -z "$INTLBISON"; then
+      ac_verc_fail=yes
+    else
+      dnl Found it, now check the version.
+      AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+      case $ac_prog_version in
+        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+      esac
+      AC_MSG_RESULT([$ac_prog_version])
+    fi
+    if test $ac_verc_fail = yes; then
+      INTLBISON=:
     fi
 
     dnl These rules are solely for the distribution goal.  While doing this
@@ -190,22 +248,39 @@ AC_DEFUN(MUTT_AM_WITH_NLS,
     done
 
     dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
     AC_SUBST(USE_INCLUDED_LIBINTL)
     AC_SUBST(CATALOGS)
     AC_SUBST(CATOBJEXT)
-    AC_SUBST(DATADIRNAME)
     AC_SUBST(GMOFILES)
-    AC_SUBST(INSTOBJEXT)
     AC_SUBST(INTLDEPS)
     AC_SUBST(INTLLIBS)
     AC_SUBST(INTLOBJS)
     AC_SUBST(POFILES)
     AC_SUBST(POSUB)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
   ])
 
-AC_DEFUN(MUTT_AM_GNU_GETTEXT,
+dnl Usage: Just like AM_WITH_NLS, which see.
+AC_DEFUN([MUTT_AM_GNU_GETTEXT],
   [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
    AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_CANONICAL_HOST])dnl
    AC_REQUIRE([AC_PROG_RANLIB])dnl
    AC_REQUIRE([AC_ISC_POSIX])dnl
    AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -215,21 +290,18 @@ AC_DEFUN(MUTT_AM_GNU_GETTEXT,
    AC_REQUIRE([AC_TYPE_SIZE_T])dnl
    AC_REQUIRE([AC_FUNC_ALLOCA])dnl
    AC_REQUIRE([AC_FUNC_MMAP])dnl
+   AC_REQUIRE([jm_GLIBC21])dnl
 
-   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h sys/param.h])
-   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-strdup __argz_count __argz_stringify __argz_next])
-
-   if test "${ac_cv_func_stpcpy+set}" != "set"; then
-     AC_CHECK_FUNCS(stpcpy)
-   fi
-   if test "${ac_cv_func_stpcpy}" = "yes"; then
-     AC_DEFINE(HAVE_STPCPY)
-   fi
+   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
+getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
+strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
 
+   MUTT_AM_ICONV
+   MUTT_AM_LANGINFO_CODESET
    MUTT_AM_LC_MESSAGES
-   MUTT_AM_WITH_NLS
+   MUTT_AM_WITH_NLS([$1],[$2],[$3])
 
    if test "x$CATOBJEXT" != "x"; then
      if test "x$ALL_LINGUAS" = "x"; then
@@ -237,10 +309,21 @@ strdup __argz_count __argz_stringify __argz_next])
      else
        AC_MSG_CHECKING(for catalogs to be installed)
        NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
+           # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
        done
        LINGUAS=$NEW_LINGUAS
        AC_MSG_RESULT($LINGUAS)
@@ -252,47 +335,8 @@ strdup __argz_count __argz_stringify __argz_next])
      fi
    fi
 
-   dnl The reference to <locale.h> in the installed <libintl.h> file
-   dnl must be resolved because we cannot expect the users of this
-   dnl to define HAVE_LOCALE_H.
-   if test $ac_cv_header_locale_h = yes; then
-     INCLUDE_LOCALE_H="#include <locale.h>"
-   else
-     INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>.  Take care yourself.  */"
-   fi
-   AC_SUBST(INCLUDE_LOCALE_H)
-
-   dnl Determine which catalog format we have (if any is needed)
-   dnl For now we know about two different formats:
-   dnl   Linux libc-5 and the normal X/Open format
-   test -d intl || mkdir intl
-   if test "$CATOBJEXT" = ".cat"; then
-     AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
-     dnl Transform the SED scripts while copying because some dumb SEDs
-     dnl cannot handle comments.
-     sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
-   fi
-   dnl po2tbl.sed is always needed.
-   sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
-
-   dnl In the intl/Makefile.in we have a special dependency which makes
-   dnl only sense for gettext.  We comment this out for non-gettext
-   dnl packages.
-   if test "$PACKAGE" = "gettext"; then
-     GT_NO="#NO#"
-     GT_YES=
-   else
-     GT_NO=
-     GT_YES="#YES#"
-   fi
-   AC_SUBST(GT_NO)
-   AC_SUBST(GT_YES)
-
    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
    dnl Try to locate is.
    MKINSTALLDIRS=
    if test -n "$ac_aux_dir"; then
@@ -303,23 +347,7 @@ strdup __argz_count __argz_stringify __argz_next])
    fi
    AC_SUBST(MKINSTALLDIRS)
 
-   dnl *** For now the libtool support in intl/Makefile is not for real.
-   l=
-   AC_SUBST(l)
-
-   dnl Generate list of files to be processed by xgettext which will
-   dnl be included in po/Makefile.
-   test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-       < $srcdir/po/POTFILES.in > po/POTFILES
+   dnl Enable libtool support if the surrounding package wishes it.
+   INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
+   AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
   ])
index e8eebea855c117345afd347ce6fbafa7ba82028e..96a0c614e1f80d8057939276832174961b725c8b 100644 (file)
@@ -6,14 +6,15 @@
 # but which still want to provide support for the GNU gettext functionality.
 # Please note that the actual code is *not* freely available.
 
-# serial 1
+# serial 2
 
-AC_DEFUN(MUTT_AM_LC_MESSAGES,
+AC_DEFUN([MUTT_AM_LC_MESSAGES],
   [if test $ac_cv_header_locale_h = yes; then
     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
     if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES)
+      AC_DEFINE(HAVE_LC_MESSAGES, 1,
+        [Define if your <locale.h> file defines LC_MESSAGES.])
     fi
   fi])
index 5e5ee589928cf6827ec73c37caa5c0f5935916fc..45271d0f38ca7e0127d45c84e5db6d1291a8b2a1 100644 (file)
@@ -8,9 +8,9 @@
 
 # serial 1
 
-dnl MUTT_AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(MUTT_AM_PATH_PROG_WITH_TEST,
+AC_DEFUN([MUTT_AM_PATH_PROG_WITH_TEST],
 [# Extract the first word of "$2", so it can be a program name with args.
 set dummy $2; ac_word=[$]2
 AC_MSG_CHECKING([for $ac_word])
index 12e8c311f76604492508ff576bd083a9abd923ea..a80d873ed9a131da8ce19a798ed84bbae8ae947a 100644 (file)
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Mutt 1.3.10\n"
-"POT-Creation-Date: 2001-06-07 11:00+0200\n"
+"POT-Creation-Date: 2001-06-07 19:54+0100\n"
 "PO-Revision-Date: 2000-10-15 08:22+0800\n"
 "Last-Translator: Anthony Wong <ypwong@debian.org>\n"
 "Language-Team: Chinese <zh@li.org>\n"
@@ -82,6 +82,7 @@ msgstr "無法配合二個同樣名稱,繼續?"
 
 #. For now, editing requires a file, no piping
 #: attach.c:123
+#, c-format
 msgid "Mailcap compose entry requires %%s"
 msgstr "Mailcap 編輯項目需要 %%s"
 
@@ -106,6 +107,7 @@ msgstr "沒有 %s 的 mailcap 組成登錄,正在建立空的檔案。"
 
 #. For now, editing requires a file, no piping
 #: attach.c:250
+#, c-format
 msgid "Mailcap Edit entry requires %%s"
 msgstr "編輯 Mailcap 項目時需要 %%s"
 
@@ -402,15 +404,15 @@ msgstr "信件已印出"
 msgid ""
 "Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "
 msgstr ""
-"反方向 1)日期 2)發信人 3)收信時間 4)標題 5)收信人 6)序列 "
-"7)不排 8)大小 9)分數:"
+"反方向 1)日期 2)發信人 3)收信時間 4)標題 5)收信人 6)序列 7)不排 8)大小 9)分"
+"數:"
 
 #: commands.c:456
 msgid ""
 "Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "
 msgstr ""
-"排序 1)日期 2)發信人 3)收信時間 4)標題 5)收信人 6)序列 "
-"7)不排序 8)大小 9)分數:"
+"排序 1)日期 2)發信人 3)收信時間 4)標題 5)收信人 6)序列 7)不排序 8)大小 9)分"
+"數:"
 
 #: commands.c:457
 msgid "dfrsotuzc"
@@ -529,8 +531,8 @@ msgstr "<預設值>"
 #, fuzzy
 msgid "(e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "
 msgstr ""
-"(1)加密, (2)簽名, (3)用別的身份簽, (4)兩者皆要, (5)選擇 mic "
-"æ¼\94ç®\97æ³\95 æ\88\96 (6)æ\94¾æ£\84ï¼\9f"
+"(1)加密, (2)簽名, (3)用別的身份簽, (4)兩者皆要, (5)選擇 mic 演算法 或 (6)放"
+"棄?"
 
 #: compose.c:133
 #, fuzzy
@@ -1029,8 +1031,7 @@ msgstr "[-- 自動顯示 %s 的 stderr 內容 --]\n"
 #: handler.c:1587
 msgid "[-- Error: message/external-body has no access-type parameter --]\n"
 msgstr ""
-"[-- 錯誤:message/external-body 沒有存取類型 (access-type) "
-"的參數 --]\n"
+"[-- 錯誤:message/external-body 沒有存取類型 (access-type) 的參數 --]\n"
 
 #: handler.c:1604
 #, c-format
@@ -1157,7 +1158,7 @@ msgstr ""
 #: imap/auth.c:104
 #, fuzzy
 msgid "No authenticators available"
-msgstr "SASL 驗證失敗。"
+msgstr "APOP 驗證失敗。"
 
 #: imap/auth_anon.c:39
 msgid "Authenticating (anonymous)..."
@@ -1228,7 +1229,7 @@ msgstr "已完成製造郵箱。"
 #: imap/command.c:289
 #, fuzzy
 msgid "Mailbox closed"
-msgstr "郵箱已刪除。"
+msgstr "已完成製造郵箱。"
 
 #. something is wrong because the server reported fewer messages
 #. * than we previously saw
@@ -2262,10 +2263,8 @@ msgid ""
 "under certain conditions; type `mutt -vv' for details.\n"
 msgstr ""
 "版權所有 (C) 1996-2000 Michael R. Elkins 及其他人仕。\n"
-"Mutt 不提供任何保證:需要更詳細的資料,請鍵入 `mutt "
-"-vv'。\n"
-"Mutt 是一個自由軟體, "
-"歡迎您在某些特定的條件上,重新將它分發。\n"
+"Mutt 不提供任何保證:需要更詳細的資料,請鍵入 `mutt -vv'。\n"
+"Mutt 是一個自由軟體, 歡迎您在某些特定的條件上,重新將它分發。\n"
 "若需要更詳細的資料, 請鍵入 `mutt -vv'\n"
 
 #: main.c:51
@@ -2355,11 +2354,10 @@ msgid ""
 "  -Z\t\topen the first folder with new message, exit immediately if none\n"
 "  -h\t\tthis help message"
 msgstr ""
-"用法: mutt [ -nRzZ ] [ -e <命令> ] [ -F <檔案> ] [ -m <類型> ] [ -f "
-"<檔案> ]\n"
-"        mutt [ -nx ] [ -e <命令> ] [ -a <檔案> ] [ -F <檔案> ] [ -H "
-"<檔案> ] [ -i <檔案> ] [ -s <主題> ] [ -b <地址> ] [ -c <地址> ] "
-"<地址> [ ... ]\n"
+"用法: mutt [ -nRzZ ] [ -e <命令> ] [ -F <檔案> ] [ -m <類型> ] [ -f <檔案"
+"> ]\n"
+"        mutt [ -nx ] [ -e <命令> ] [ -a <檔案> ] [ -F <檔案> ] [ -H <檔案> ] "
+"[ -i <檔案> ] [ -s <主題> ] [ -b <地址> ] [ -c <地址> ] <地址> [ ... ]\n"
 "        mutt [ -n ] [ -e <命令> ] [ -F <檔案> ] -p\n"
 "        mutt -v[v]\n"
 "\n"
@@ -2440,6 +2438,7 @@ msgid "Mailbox is empty."
 msgstr "信箱內空無一物。"
 
 #: mbox.c:129 mbox.c:286
+#, c-format
 msgid "Reading %s... %d (%d%%)"
 msgstr "讀取 %s 中… %d (%d%%)"
 
@@ -3493,8 +3492,7 @@ msgstr "顯示 MIME 附件"
 
 #: recvcmd.c:419
 msgid "Can't decode all tagged attachments.  MIME-forward the others?"
-msgstr ""
-"未能把所有已標簽的附件解碼。要用 MIME 轉寄其它的嗎?"
+msgstr "未能把所有已標簽的附件解碼。要用 MIME 轉寄其它的嗎?"
 
 #: recvcmd.c:544
 msgid "Forward MIME encapsulated?"
@@ -3515,8 +3513,7 @@ msgstr "沒有找到郵寄論壇!"
 
 #: recvcmd.c:787
 msgid "Can't decode all tagged attachments.  MIME-encapsulate the others?"
-msgstr ""
-"未能把所有已標簽的附件解碼。要用 MIME 包封其它的嗎?"
+msgstr "未能把所有已標簽的附件解碼。要用 MIME 包封其它的嗎?"
 
 #: remailer.c:480
 msgid "Append"
@@ -3773,17 +3770,15 @@ msgstr "主信件不存在。"
 #~ msgstr "MIC 演算法:"
 
 #~ msgid "This doesn't make sense if you don't want to sign the message."
-#~ msgstr ""
-#~ "如果您不想把信件簽名,這樣做就沒有什麼意思啦。"
+#~ msgstr "如果您不想把信件簽名,這樣做就沒有什麼意思啦。"
 
 #~ msgid "Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160"
-#~ msgstr ""
-#~ "不明的 MIC 演算法。有效的如下: pgp-md5, pgp-sha1, pgp-rmd160"
+#~ msgstr "不明的 MIC 演算法。有效的如下: pgp-md5, pgp-sha1, pgp-rmd160"
 
 #~ msgid ""
 #~ "\n"
-#~ "SHA1 implementation Copyright (C) 1995-1997 Eric A. Young "
-#~ "<eay@cryptsoft.com>\n"
+#~ "SHA1 implementation Copyright (C) 1995-1997 Eric A. Young <eay@cryptsoft."
+#~ "com>\n"
 #~ "\n"
 #~ "    Redistribution and use in source and binary forms, with or without\n"
 #~ "    modification, are permitted under certain conditions.\n"
@@ -3884,8 +3879,7 @@ msgstr "主信件不存在。"
 #~ msgstr "改變附件的字符集"
 
 #~ msgid "recode this attachment to/from the local charset"
-#~ msgstr ""
-#~ "重新將附件編碼至本地字符集,或由本地字符集重新編碼"
+#~ msgstr "重新將附件編碼至本地字符集,或由本地字符集重新編碼"
 
 #~ msgid "%d kept."
 #~ msgstr "%d 保留了。"