Browse Source

MC goes Internationallsls./gmc Spanish translation almost complete -mig

Miguel de Icaza 27 years ago
parent
commit
ac70e34d02
10 changed files with 754 additions and 37 deletions
  1. 14 11
      Make.common.in
  2. 2 2
      Makefile.in
  3. 225 0
      NLS
  4. 9 0
      acconfig.h
  5. 400 2
      aclocal.m4
  6. 2 1
      autogen.sh
  7. 64 1
      config.h.in
  8. 36 6
      configure.in
  9. 2 2
      doc/Makefile.in
  10. 0 12
      edit/edit.h

+ 14 - 11
Make.common.in

@@ -14,16 +14,19 @@ prefix = @prefix@
 exec_prefix = $(prefix)
 binprefix =
 manprefix =
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib/mc
+
+bindir     = $(exec_prefix)/bin
+libdir     = $(exec_prefix)/lib/mc
 suppbindir = $(libdir)/bin
-tidir = $(libdir)/term
-extfsdir = $(libdir)/extfs
-icondir = $(prefix)/share/icons/mc
-mandir = $(prefix)/man/man1
-manext = 1
-man8dir = $(prefix)/man/man8
-man8ext = 8
+tidir      = $(libdir)/term
+extfsdir   = $(libdir)/extfs
+icondir    = $(prefix)/share/icons/mc
+mandir     = $(prefix)/man/man1
+datadir    = $(prefix)/share
+localedir  = $(datadir)/locale
+manext     = 1
+man8dir    = $(prefix)/man/man8
+man8ext   = 8
 xv_bindir = @xv_bindir@
 
 # Tools & program stuff
@@ -47,7 +50,7 @@ AWK_VAR_OPTION = @AWK_VAR_OPTION@
 # No way, to make make happy (except GNU), we cannot use := to append
 # something to these, so that's why there is a leading _
 XCFLAGS = @CFLAGS@
-XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC)
+XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) -DLOCALEDIR=\""$(localedir)/"\" 
 XLDFLAGS = @LDFLAGS@
 XDEFS = @DEFS@
 XLIBS = @LIBS@
@@ -56,7 +59,7 @@ XLIBS = @LIBS@
 # You shouldn't have to edit this :)
 mcsrcdir = $(rootdir)/src
 docdir   = $(rootdir)/doc
-datadir  = $(rootdir)/lib
+mclibdir = $(rootdir)/lib
 slangdir = $(rootdir)/slang
 vfsdir   = $(rootdir)/vfs
 xvdir    = $(rootdir)/xv

+ 2 - 2
Makefile.in

@@ -5,7 +5,7 @@ rootdir = $(srcdir)
 @MCFGR@@MCF@
 
 foreigndirs=nt os2
-unixdirs=vfs lib doc slang edit src tk xv gnome icons 
+unixdirs=vfs lib doc slang edit src tk xv gnome icons intl @POSUB@
 alldirs=$(unixdirs) $(foreigndirs) 
 subdirs=$(alldirs)
 
@@ -17,7 +17,7 @@ DISTMAIN =	configure configure.in NEWS README INSTALL INSTALL.FAST \
 		Makefile.in FAQ COPYING create_vcs install-sh \
 		config.h.in aclocal.m4 acconfig.h VERSION mcfn_install.in \
 		Make.common.in README.NT mc.spec.in mc.spec README.OS2 \
-		VERSION.in
+		VERSION.in ABOUT-NLS mkinstalldirs
 
 all: 
 	@for dir in ${unixdirs}; do \

+ 225 - 0
NLS

@@ -0,0 +1,225 @@
+Notes on the Free Translation Project
+*************************************
+
+   Free software is going international!  The Free Translation Project
+is a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do *not*
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work at translations should contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+One advise in advance
+=====================
+
+   If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias or message inheritance) as the
+implementation here.  It is also not possible to offer this additional
+functionality on top of a `catgets' implementation.  Future versions of
+GNU `gettext' will very likely convey even more functionality.  So it
+might be a good idea to change to GNU `gettext' as soon as possible.
+
+   So you need not provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+INSTALL Matters
+===============
+
+   Some packages are "localizable" when properly installed; the
+programs they contain can be made to speak your own native language.
+Most such packages use GNU `gettext'.  Other packages have their own
+ways to internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system provides
+usable `catgets' (if using this is selected by the installer) or
+`gettext' functions.  If neither is available, the GNU `gettext' own
+library will be used.  This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is *not* required.  Installers may use
+special options at configuration time for changing the default
+behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --with-catgets
+     ./configure --disable-nls
+
+will respectively bypass any pre-existing `catgets' or `gettext' to use
+the internationalizing routines provided within this package, enable
+the use of the `catgets' functions (if found on the locale system), or
+else, *totally* disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might be not what is desirable.  You
+should use the more recent version of the GNU `gettext' library.  I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   By default the configuration process will not test for the `catgets'
+function and therefore they will not be used.  The reasons are already
+given above: the emulation on top of `catgets' cannot provide all the
+extensions provided by the GNU `gettext' library.  If you nevertheless
+want to use the `catgets' functions use
+
+     ./configure --with-catgets
+
+to enable the test for `catgets' (this causes no harm if `catgets' is
+not available on your system).  If you really select this option we
+would like to hear about the reasons because we cannot think of any
+good one ourself.
+
+   Internationalized packages have usually many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+Using This Package
+==================
+
+   As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+ISO 639 `LL' two-letter code prior to using the programs in the
+package.  For example, let's suppose that you speak German.  At the
+shell prompt, merely execute `setenv LANG de' (in `csh'),
+`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash').  This
+can be done from your `.login' or `.profile' file, once and for all.
+
+   An operating system might already offer message localization for
+many of its programs, while other programs have been installed locally
+with the full capabilities of GNU `gettext'.  Just using `gettext'
+extended syntax for `LANG' would break proper localization of already
+available operating system programs.  In this case, users should set
+both `LANGUAGE' and `LANG' variables in their environment, as programs
+using GNU `gettext' give preference to `LANGUAGE'.  For example, some
+Swedish users would rather read translations in German than English for
+when Swedish is not available.  This is easily accomplished by setting
+`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
+
+Translating Teams
+=================
+
+   For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list, courtesy of Linux
+International.  You may reach your translation team at the address
+`LL@li.org', replacing LL by the two-letter ISO 639 code for your
+language.  Language codes are *not* the same as the country codes given
+in ISO 3166.  The following translation teams exist, as of August 1997:
+
+     Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
+     Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
+     `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
+     Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
+     `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
+     Swedish `sv', and Turkish `tr'.
+
+For example, you may reach the Chinese translation team by writing to
+`zh@li.org'.
+
+   If you'd like to volunteer to *work* at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is *not* the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+*actively* in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+   Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of August
+1997.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination.
+
+     Ready PO files    cs da de en es fi fr it ja ko nl no pl pt sl sv
+                     .-------------------------------------------------.
+     bash            |       []          []          []                |  3
+     bison           |       []          []          []                |  3
+     clisp           |       [] [] []    []                            |  4
+     cpio            |       []    []    []          []    []          |  5
+     diffutils       |       []    []    []                []       [] |  5
+     enscript        |       []    [] [] []          []          []    |  6
+     fileutils       | []    []    []    []       [] []    [] [] [] [] | 10
+     findutils       |       []    []    [] []    [] []    []       [] |  8
+     flex            |             []    []       []                [] |  4
+     gcal            |       []          []          []    []       [] |  5
+     gettext         |       []    []    []       [] [] [] [] [] [] [] | 11
+     grep            |       []    []    []       [] [] [] []    [] [] |  9
+     hello           |       []    []    []       [] [] [] [] [] [] [] | 10
+     id-utils        |       []          []                []          |  3
+     indent          |    [] []                   []       []          |  4
+     libc            |       []    []    []       [] []    []       [] |  7
+     m4              |       []          []    []    []             [] |  5
+     make            |       []    []    []       [] []    []          |  6
+     music           |                   []                []          |  2
+     ptx             |       []    []    []          [] [] [] []    [] |  8
+     recode          |    [] []    []    []          []    [] [] [] [] |  9
+     sh-utils        |       []          []          [] [] [] []    [] |  7
+     sharutils       |       []    []    []          []             [] |  5
+     tar             |       []          [] []    [] [] [] [] [] [] [] | 10
+     texinfo         |                   []                            |  1
+     textutils       | []    []    []    []       [] [] [] []       [] |  9
+     wdiff           | []    []    []    []          [] [] []       [] |  8
+                     `-------------------------------------------------'
+       16 languages    cs da de en es fi fr it ja ko nl no pl pt sl sv
+       27 packages      3  2 24  1 17  1 26  2  1 11 20  9 19  7  7 17  167
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If August 1997 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.
+

+ 9 - 0
acconfig.h

@@ -25,6 +25,8 @@
 
 @TOP@
 
+#undef PACKAGE
+
 /* Always defined */
 #undef D_INO_IN_DIRENT
 #undef IS_AIX
@@ -202,6 +204,13 @@
 /* Version of ncurses */
 #undef NCURSES_970530
 
+#undef HAVE_STPCPY
+
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_LC_MESSAGES
+
 @BOTTOM@
 
 #ifdef HAVE_LIBPT

+ 400 - 2
aclocal.m4

@@ -37,7 +37,8 @@ AC_DEFUN([GNOME_INIT_HOOK],
 	AC_ARG_WITH(gnome,
 	[  --with-gnome            Specify prefix for GNOME files],[
 	if test x$withval = xyes; then
-	    $1
+	    dnl Note that an empty true branch is not valid sh syntax.
+	    ifelse([$1], [], :, [$1])
         else
 	    LDFLAGS="$LDFLAGS -L$withval/lib"
 	    CFLAGS="$CFLAGS -I$withval/include"
@@ -61,7 +62,8 @@ AC_DEFUN([GNOME_INIT_HOOK],
 
 AC_DEFUN([GNOME_INIT],[
 	GNOME_INIT_HOOK([],fail)
-])dnl
+])
+dnl
 dnl XView & SlingShot library checking
 dnl (c) 1995 Jakub Jelinek
 dnl
@@ -1243,3 +1245,399 @@ case "x$ac_cv_prog_cc_stdc" in
 esac
 ])
 
+dnl aclocal.m4 generated automatically by aclocal 1.2f
+
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+
+# progtest.m4 from gettext 0.32
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file file 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 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(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])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+# lcmessage.m4 from gettext 0.32
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file file 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 1
+
+AC_DEFUN(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)
+    fi
+  fi])
+
+
+
+# gettext.m4 from gettext 0.32
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file file 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 3
+
+AC_DEFUN(AM_WITH_NLS,
+  [AC_MSG_CHECKING([whether NLS is requested])
+    dnl Default is enabled NLS
+    AC_ARG_ENABLE(nls,
+      [  --disable-nls           do not use Native Language Support],
+      USE_NLS=$enableval, USE_NLS=yes)
+    AC_MSG_RESULT($USE_NLS)
+    AC_SUBST(USE_NLS)
+
+    USE_INCLUDED_LIBINTL=no
+
+    dnl If we use NLS figure out what method
+    if test "$USE_NLS" = "yes"; then
+      AC_DEFINE(ENABLE_NLS)
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      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=
+	CATOBJEXT=NONE
+
+	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_CACHE_CHECK([for gettext in libintl],
+		 gt_cv_func_gettext_libintl,
+		 [AC_TRY_LINK([], [return (int) gettext ("")],
+		 gt_cv_func_gettext_libintl=yes,
+		 gt_cv_func_gettext_libintl=no)])])
+	   fi
+
+	   if test "$gt_cv_func_gettext_libc" = "yes" \
+	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
+	      AC_DEFINE(HAVE_GETTEXT)
+	      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)
+		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
+	])
+
+        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
+		   AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+		    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+		 fi
+		 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 Fall back on GNU gettext library.
+	  nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        INTLOBJS="\$(GETTOBJS)"
+        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+        AC_SUBST(MSGFMT)
+	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
+      fi
+
+      dnl Test whether we really found GNU xgettext.
+      if test "$XGETTEXT" != ":"; then
+	dnl If it is no GNU xgettext we define it as : so that the
+	dnl Makefiles still can work.
+	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+	  : ;
+	else
+	  AC_MSG_RESULT(
+	    [found xgettext programs is not GNU xgettext; ignore it])
+	  XGETTEXT=":"
+	fi
+      fi
+
+      # 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 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.
+    if test "$PACKAGE" = gettext; then
+      USE_NLS=yes
+      USE_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.in.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    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)
+  ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_PROG_RANLIB])dnl
+   AC_REQUIRE([AC_ISC_POSIX])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   AC_REQUIRE([AC_C_CONST])dnl
+   AC_REQUIRE([AC_C_INLINE])dnl
+   AC_REQUIRE([AC_TYPE_OFF_T])dnl
+   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+   AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h values.h sys/param.h])
+   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__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
+
+   AM_LC_MESSAGES
+   AM_WITH_NLS
+
+   if test "x$CATOBJEXT" != "x"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     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
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     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 Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   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
+  ])
+

+ 2 - 1
autogen.sh

@@ -3,7 +3,8 @@ test -z "$srcdir" && srcdir=.
 
 (
 cd $srcdir
-cat macros/gnome.m4 mc-aclocal.m4 > aclocal.m4
+cat macros/gnome.m4 mc-aclocal.m4 gettext.m4 > aclocal.m4
+autoheader
 autoconf
 )
 

+ 64 - 1
config.h.in

@@ -69,6 +69,9 @@
 /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
 #undef HAVE_SYS_WAIT_H
 
+/* Define as __inline if that's what the C compiler calls it.  */
+#undef inline
+
 /* Define if major, minor, and makedev are declared in <mkdev.h>.  */
 #undef MAJOR_IN_MKDEV
 
@@ -94,6 +97,9 @@
 /* Define if you need to in order for stat and other things to work.  */
 #undef _POSIX_SOURCE
 
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+#undef size_t
+
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
    automatically deduced at run-time.
@@ -112,6 +118,8 @@
 /* Define if the X Window System is missing or not being used.  */
 #undef X_DISPLAY_MISSING
 
+#undef PACKAGE
+
 /* Always defined */
 #undef D_INO_IN_DIRENT
 #undef IS_AIX
@@ -130,9 +138,12 @@
 #undef STAT_STATFS4
 #undef STAT_STATVFS
 
-/* Does your system provide the umode_t typedef? */
+/* Define umode_t if your system does not provide it */
 #undef umode_t
 
+/* Define nlink_t if your system does not provide it */
+#undef nlink_t
+
 /* Does the file command accepts the -L option */
 #undef FILE_L
 
@@ -256,12 +267,34 @@
 /* Version of ncurses */
 #undef NCURSES_970530
 
+#undef HAVE_STPCPY
+
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_LC_MESSAGES
+
+/* Define if you have the __argz_count function.  */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function.  */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function.  */
+#undef HAVE___ARGZ_STRINGIFY
+
 /* Define if you have the cfgetospeed function.  */
 #undef HAVE_CFGETOSPEED
 
 /* Define if you have the crypt function.  */
 #undef HAVE_CRYPT
 
+/* Define if you have the dcgettext function.  */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function.  */
+#undef HAVE_GETCWD
+
 /* Define if you have the getmntinfo function.  */
 #undef HAVE_GETMNTINFO
 
@@ -289,6 +322,9 @@
 /* Define if you have the memset function.  */
 #undef HAVE_MEMSET
 
+/* Define if you have the munmap function.  */
+#undef HAVE_MUNMAP
+
 /* Define if you have the pmap_getmaps function.  */
 #undef HAVE_PMAP_GETMAPS
 
@@ -310,6 +346,12 @@
 /* Define if you have the rresvport function.  */
 #undef HAVE_RRESVPORT
 
+/* Define if you have the setenv function.  */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function.  */
+#undef HAVE_SETLOCALE
+
 /* Define if you have the sigaction function.  */
 #undef HAVE_SIGACTION
 
@@ -337,9 +379,15 @@
 /* Define if you have the statvfs function.  */
 #undef HAVE_STATVFS
 
+/* Define if you have the stpcpy function.  */
+#undef HAVE_STPCPY
+
 /* Define if you have the strcasecmp function.  */
 #undef HAVE_STRCASECMP
 
+/* Define if you have the strchr function.  */
+#undef HAVE_STRCHR
+
 /* Define if you have the strdup function.  */
 #undef HAVE_STRDUP
 
@@ -358,6 +406,9 @@
 /* Define if you have the truncate function.  */
 #undef HAVE_TRUNCATE
 
+/* Define if you have the <argz.h> header file.  */
+#undef HAVE_ARGZ_H
+
 /* Define if you have the <crypt.h> header file.  */
 #undef HAVE_CRYPT_H
 
@@ -379,6 +430,9 @@
 /* Define if you have the <linux/ext2_fs.h> header file.  */
 #undef HAVE_LINUX_EXT2_FS_H
 
+/* Define if you have the <locale.h> header file.  */
+#undef HAVE_LOCALE_H
+
 /* Define if you have the <malloc.h> header file.  */
 #undef HAVE_MALLOC_H
 
@@ -394,6 +448,9 @@
 /* Define if you have the <ndir.h> header file.  */
 #undef HAVE_NDIR_H
 
+/* Define if you have the <nl_types.h> header file.  */
+#undef HAVE_NL_TYPES_H
+
 /* Define if you have the <rpc/pmap_clnt.h> header file.  */
 #undef HAVE_RPC_PMAP_CLNT_H
 
@@ -460,6 +517,12 @@
 /* Define if you have the <utime.h> header file.  */
 #undef HAVE_UTIME_H
 
+/* Define if you have the <values.h> header file.  */
+#undef HAVE_VALUES_H
+
+/* Define if you have the i library (-li).  */
+#undef HAVE_LIBI
+
 /* Define if you have the intl library (-lintl).  */
 #undef HAVE_LIBINTL
 

+ 36 - 6
configure.in

@@ -4,6 +4,12 @@ dnl
 AC_INIT(create_vcs)
 AC_CONFIG_HEADER(config.h)
 
+PACKAGE=mc
+VERSION=dummy
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "dummy")
+ALL_LINGUAS="es"
+
 dnl This is path where we're looking for headers in addition to /usr/include
 dnl and whatever cpp defaults to.
 include_additional_path="/usr/local/include /opt/gnu/include"
@@ -62,6 +68,9 @@ if test x"$X11_WWW" = x; then
     X11_WWW=lynx
 fi
 
+AM_GNU_GETTEXT
+AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+
 dnl
 dnl This part supplies reasonable defaults for CFLAGS, if they weren't
 dnl specified by ''CFLAGS=flags ./configure''
@@ -1394,12 +1403,33 @@ else
 fi
 AC_SUBST(PCENTRULE)
 
-AC_OUTPUT(Make.common Makefile doc/Makefile vfs/Makefile lib/Makefile \
-	lib/mc.ext tk/Makefile gnome/Makefile xv/Makefile src/Makefile \
-	slang/Makefile edit/Makefile icons/Makefile mcfn_install \
-	vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR \
-	vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar \
-	doc/mc.1 doc/mcedit.1 doc/mcserv.8)
+dnl
+dnl Output configuration filesn
+dnl
+
+AC_OUTPUT([
+Make.common 
+Makefile 
+doc/Makefile 
+vfs/Makefile 
+lib/Makefile
+tk/Makefile 
+gnome/Makefile 
+xv/Makefile 
+src/Makefile
+slang/Makefile 
+edit/Makefile 
+icons/Makefile 
+
+lib/mc.ext
+mcfn_install
+vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR
+vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar
+
+doc/mc.1 doc/mcedit.1 doc/mcserv.8
+
+intl/Makefile po/Makefile.in
+],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
 
 if test x$srcdir != x; then
     if test $srcdir != .; then

+ 2 - 2
doc/Makefile.in

@@ -57,9 +57,9 @@ mc.txt: mc.sgml
 ../src/fixhlp:
 	cd ../src; $(MAKE) fixhlp
 
-mc.hlp: mc.sgml ../src/fixhlp $(datadir)/xnc.hlp
+mc.hlp: mc.sgml ../src/fixhlp $(mclibdir)/xnc.hlp
 	$(LINUXDOCDIR)/bin/format -T hlp $(srcdir)/mc | ../src/fixhlp 58 mc.hlp.toc > mc.hlp.tmp
-	cat mc.hlp.toc mc.hlp.tmp $(datadir)/xnc.hlp > mc.hlp
+	cat mc.hlp.toc mc.hlp.tmp $(mclibdir)/xnc.hlp > mc.hlp
 	$(RMF) mc.hlp.toc mc.hlp.tmp
 
 mc.texi: mc.sgml

+ 0 - 12
edit/edit.h

@@ -385,18 +385,6 @@ void edit_paste_from_history (WEdit *edit);
 
 void edit_split_filename (WEdit * edit, char *name);
 
-#ifdef MIDNIGHT
-
-#    ifndef _
-#        define _(s) s
-#    endif
-
-
-#    define gettext(s) (s)
-#    define N_(s) s
-#    define gettext_noop(s) (s)
-#    endif
-
 /* put OS2/NT/WIN95 defines here */
 
 #    ifdef OS2_NT

Some files were not shown because too many files changed in this diff