From: "Juan Manuel Guerrero" Organization: Darmstadt University of Technology To: Bruno Haible Date: Mon, 12 Mar 2001 15:07:15 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: gettext pretest available CC: Eli Zaretskii , djgpp-workers AT delorie DOT com In-reply-to: <15019.44290.970366.625720@honolulu.ilog.fr> References: <439E9106868 AT HRZ1 DOT hrz DOT tu-darmstadt DOT de> X-mailer: Pegasus Mail for Windows (v2.54DE) Message-ID: <465C8DC1374@HRZ1.hrz.tu-darmstadt.de> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 11 Mar 2001 17:51:14 +0100 (CET), Bruno Haible wrote: > > > If in the future, > > > a GNU maintainer of GNU gettext decides to rename _LIBINTL_H or to remove > > > __USE_GNU_GETTEXT at all, then DJGPP's libc.a will become > > > automatically broken. > > > > The macro __USE_GNU_GETTEXT will not change. The other one may change. > > > > > Anyway, I will use _LIBINTL_H and resend appropiate patches for > > > DJGPP's CVS tree. > > > > Thanks. Thank you for the advise. In this case I will use __USE_GNU_GETTEXT. > > > If you prefer something different, it will be ok for me as long > > > as your solution DTRT. > > > > I hope the solution I put in - based on yours - does the right thing; > > I didn't test it. I will test it as soon as possible. I have tried to compile gettext-20010309.tgz out of the box and I have found the following difficulties: 1) ./m4/gettext.m4 This file *still* contains the following line: [case " $CONFIG_FILES " in *" po/Makefile.in "*) makeing it completely impossible to give an alternative for po/Makefile.in. But MSDOS/DJGPP needs the alternative: po/Makefile:po/Makefile.in-in. Maskefile.in.in is an ilicit MSDOS filename. 2) ./po/Makefile.in.in If a previous version of msgfmt.exe is **not** installed then the compilation will fail with the following error message: Making all in po make.exe[2]: Entering directory `z:/_/gettext-/po' file=./`echo da | sed 's,.*/,,'`.gmo \ && rm -f $file && msgfmt --statistics -o $file da.po z:/tmp/dj200000: msgfmt: command not found make.exe[2]: *** [da.gmo] Error 127 make.exe[2]: Leaving directory `z:/_/gettext-/po' make.exe[1]: *** [all-recursive] Error 1 make.exe[1]: Leaving directory `z:/_/gettext-' make.exe: *** [all-recursive-am] Error 2 From the above output it can be clearly seen that msgfmt.exe is expected to be found somewhere on the path. This is a comparison between po/Makefile.in.in from gettext-2001-02-05 and gettext-20010309: gettext-2001-02-05: GENCAT = @GENCAT@ GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ MSGMERGE = PATH=../src:$$PATH msgmerge gettext-20010309: GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge It can be clearly seen that: PATH=../src:$$PATH has been omited. This omission breaks the compilation process because the programs are searched along the path but not in the src/ subdirectory. If the programs can *not* be found along the patch then the compilation must fail. It is completelly unclear to me why this has been changed at all. 3) ./tests/Makefile.am The testsuit dies with the following error message: Making check in tests make.exe[1]: Entering directory `z:/_/gettext-/tests' gcc -g -O2 tstgettext.c -o tstgettext In file included from tstgettext.c:3: ../src/gettext.c:23: getopt.h: No such file or directory (ENOENT) In file included from tstgettext.c:3: ../src/gettext.c:28: error.h: No such file or directory (ENOENT) ../src/gettext.c:29: system.h: No such file or directory (ENOENT) ../src/gettext.c:37: libgnuintl.h: No such file or directory (ENOENT) make.exe[1]: *** [tstgettext] Error 1 make.exe[1]: *** No rule to make target `cake', needed by `all-local'. make.exe[1]: Target `check' not remade because of errors. make.exe[1]: Leaving directory `z:/_/gettext-/tests' make.exe[1]: Entering directory `z:/_/gettext-' make.exe[1]: Leaving directory `z:/_/gettext-' make.exe: *** [check-recursive] Error 1 make.exe: Target `check' not remade because of errors. The reason for this can be found in tests/Makefile.am. There appeares the following line: EXTRA_PROGRAMS = tstgettext cake That line must look like this: EXTRA_PROGRAMS = tstgettext$(EXEEXT) cake$(EXEEXT) Please note that there are probably more issues that must/should be fixed like this: XGETTEXT = ../src/xgettext Probably the above line should look like this: XGETTEXT = ../src/xgettext$(EXEEXT) 4) ./djgpp/config.bat and ./djgpp/edtests.bat Last but not least the whole package can *not* configured at all because the batch files are distributed with UNIX style EOL instead of MSDOS style EOL. command.com ***refuses*** to run such batch files. It always issues the error message: command or file not found. This is very confusing, especially for newbes. The file can be seen, it can be edited but it can not be started. command.com simply refuses to execute it. IMHO, all MSDOS batch files in a GNU distribution should be converted to MSDOS style EOL or they are simple useless. I submite a patch that will change the following files: ./intl/config.charset ./m4/gettext.m4 ./djgpp/config.site ./djgpp/README.in ./po/Makefile.in.in ./tests/Makefile.am Regards, Guerrero, Juan Manuel diff -acprNC5 gettext-20010309.orig/djgpp/config.site gettext-20010309/djgpp/config.site *** gettext-20010309.orig/djgpp/config.site Fri Mar 9 16:53:42 2001 --- gettext-20010309/djgpp/config.site Sun Mar 11 17:36:14 2001 *************** ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR *** 33,43 **** # package was configured. NM=${NM='nm'} LD=${LD='ld'} # We always use our own binaries. ! GMSGFMT=${GMSGFMT='/dev/env/DJDIR/bin/msgfmt'} ! MSGFMT=${MSGFMT='/dev/env/DJDIR/bin/msgfmt'} ! XGETTEXT=${XGETTEXT='/dev/env/DJDIR/bin/xgettext'} # Force the test for 'ln -s' to report 'cp -p'. ac_cv_prog_LN_S='cp -p' --- 33,42 ---- # package was configured. NM=${NM='nm'} LD=${LD='ld'} # We always use our own binaries. ! GMSGFMT=${GMSGFMT='msgfmt'} ! MSGFMT=${MSGFMT='msgfmt'} # Force the test for 'ln -s' to report 'cp -p'. ac_cv_prog_LN_S='cp -p' diff -acprNC5 gettext-20010309.orig/djgpp/README.in gettext-20010309/djgpp/README.in *** gettext-20010309.orig/djgpp/README.in Fri Mar 9 16:53:54 2001 --- gettext-20010309/djgpp/README.in Sun Mar 11 17:28:46 2001 *************** This is a port of GNU Gettext @VER@ to M *** 110,119 **** --- 110,124 ---- djtar -x -n lst @V AT DOT tar DOT gz (The name of the distribution archive and the top-level directory will be different for versions other than @VER@.) + It is always recommended to download the DJGPP packages from some + Simtel.NET mirror and *not* the original GNU distribution because + only the binary distribution of the DJGPP port will contain the + files needed to patch libc.a. This are: conio.h and conio.o. + 2.3.: Changing libc.a and conio.h. Apart from the ussual directories, the binary package will create the following directory: %DJDIR%/gnu/gtxt- AT treeversion@/djgpp/djdev-2.03 where %DJDIR% stands for the root of your DJGPP installation tree. *************** This is a port of GNU Gettext @VER@ to M *** 160,183 **** The line must be completely shifted to the left in your djgpp.env file. Please note the plus sign at the beginning of the line. This plus sign should **NOT** be omited or a lot of shell scripts, in this and in other packages, that try to reset this value will stop working. The ! LANG entry is obligatory, the LANGUAGE entry is may be omited. The LANGUAGE variable allows you to select an alternate catalog that the one stipulated by LANG. Replace xx, yy and zz by the language code of the catalogs you want to use. Some examples: If you only want to use the catalog containig the translations for your mother tongue (in my case the spanish translations) the above ! lines will only use the LANG variable and will look like: +LANG=es If you want to use the spanish (es) and german (de) catalogs ! the above lines will look like: +LANG=es +LANGUAGE=es:de In this case a DJGPP binary that has been compiled with NLS support --- 165,188 ---- The line must be completely shifted to the left in your djgpp.env file. Please note the plus sign at the beginning of the line. This plus sign should **NOT** be omited or a lot of shell scripts, in this and in other packages, that try to reset this value will stop working. The ! LANG entry is obligatory, the LANGUAGE entry may be omited. The LANGUAGE variable allows you to select an alternate catalog that the one stipulated by LANG. Replace xx, yy and zz by the language code of the catalogs you want to use. Some examples: If you only want to use the catalog containig the translations for your mother tongue (in my case the spanish translations) the above ! lines will only use the LANG variable and will look like this: +LANG=es If you want to use the spanish (es) and german (de) catalogs ! the above lines will look like this: +LANG=es +LANGUAGE=es:de In this case a DJGPP binary that has been compiled with NLS support *************** This is a port of GNU Gettext @VER@ to M *** 250,261 **** 3.3.: This package is preconfigured for NLS support and for on-the-fly recoding with the functionality provided by libiconv.a from licv16b.zip. This implies that licv16b.zip *MUST* be installed *before* you try to compile the package or the build process will fail. If you compile this package with a later version of libc.a or if you ! prefer no NLS support you will have to reconfigure this package. The configuration batch file of this package, located in the djgpp directory, allows you to enable or disable NLS support and to compile from a different partition than from where the sources are located. config.bat always configures the package for NLS support enabled and for in-place compilation if no options are given. --- 255,268 ---- 3.3.: This package is preconfigured for NLS support and for on-the-fly recoding with the functionality provided by libiconv.a from licv16b.zip. This implies that licv16b.zip *MUST* be installed *before* you try to compile the package or the build process will fail. + It should be noticed that when you compile your own binaries with NLS + you must *always* link with libiconv.a If you compile this package with a later version of libc.a or if you ! prefer no NLS support at all you will have to reconfigure this package. The configuration batch file of this package, located in the djgpp directory, allows you to enable or disable NLS support and to compile from a different partition than from where the sources are located. config.bat always configures the package for NLS support enabled and for in-place compilation if no options are given. diff -acprNC5 gettext-20010309.orig/m4/gettext.m4 gettext-20010309/m4/gettext.m4 *** gettext-20010309.orig/m4/gettext.m4 Mon Mar 5 14:56:08 2001 --- gettext-20010309/m4/gettext.m4 Sun Mar 11 17:28:46 2001 *************** return (int) gettext ("") + _nl_msg_cat_ *** 150,160 **** # We need to process the po/ directory. POSUB=po fi 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 BUILD_INCLUDED_LIBINTL --- 150,160 ---- # We need to process the po/ directory. POSUB=po fi 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 BUILD_INCLUDED_LIBINTL diff -acprNC5 gettext-20010309.orig/po/Makefile.in.in gettext-20010309/po/Makefile.in.in *** gettext-20010309.orig/po/Makefile.in.in Fri Mar 9 21:02:24 2001 --- gettext-20010309/po/Makefile.in.in Sun Mar 11 17:29:42 2001 *************** INSTALL_DATA = @INSTALL_DATA@ *** 29,42 **** MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` CC = @CC@ GENCAT = @GENCAT@ ! GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ ! XGETTEXT = @XGETTEXT@ ! MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ --- 29,42 ---- MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` CC = @CC@ GENCAT = @GENCAT@ ! GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ MSGFMT = @MSGFMT@ ! XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ ! MSGMERGE = PATH=../src:$$PATH msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ diff -acprNC5 gettext-20010309.orig/tests/Makefile.am gettext-20010309/tests/Makefile.am *** gettext-20010309.orig/tests/Makefile.am Mon Mar 5 14:56:08 2001 --- gettext-20010309/tests/Makefile.am Sun Mar 11 17:34:54 2001 *************** xg-test1.ok.po: $(top_srcdir)/src/xgette *** 45,55 **** # Two auxiliary programs used by the tests. INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ LDADD = ../intl/libintl.la @LIBICONV@ ! EXTRA_PROGRAMS = tstgettext cake tstgettext_SOURCES = tstgettext.c setlocale.c tstgettext_LDADD = ../lib/libnlsut.a $(LDADD) cake_SOURCES = plural-1-prg.c setlocale.c all-local: $(EXTRA_PROGRAMS) CLEANFILES = $(EXTRA_PROGRAMS) --- 45,55 ---- # Two auxiliary programs used by the tests. INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ LDADD = ../intl/libintl.la @LIBICONV@ ! EXTRA_PROGRAMS = tstgettext$(EXEEXT) cake$(EXEEXT) tstgettext_SOURCES = tstgettext.c setlocale.c tstgettext_LDADD = ../lib/libnlsut.a $(LDADD) cake_SOURCES = plural-1-prg.c setlocale.c all-local: $(EXTRA_PROGRAMS) CLEANFILES = $(EXTRA_PROGRAMS)