source: trunk/third/gettext/djgpp/README.in @ 18200

Revision 18200, 25.5 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18199, which included commits to RCS files with non-trunk default branches.
Line 
1This is a port of GNU Gettext @VER@ to MSDOS/DJGPP.
2
3
4        TO USE THE GNU GETTEXT LIBRARY YOU **MUST** MODIFY YOUR C-LIBRARY.
5        PLEASE, READ SECTION #2 (Installing the binary package) CAREFULLY
6        TO LEARN HOW TO INSTALL THE GNU GETTEXT LIBRARY AND HOW TO CHANGE
7        YOUR C-LIBRARY AND SYSTEM HEADER FILE.
8        TO USE THE GNU GETTEXT LIBRARY YOU **MUST** DOWNLOAD AND INSTALL
9        LICV17B.ZIP TOO. THIS IS **NOT** OPTIONAL.
10        IT IS NOT RECOMMED TO DOWNLOAD THE GNU DISTRIBUTION OF GETTEXT
11        BECAUSE ONLY THE DJGPP PORT WILL CONTAIN THE REQUIRED HEADER AND
12        OBJECT FILE TO PATCH THE C LIBRARY.
13
14
151.:     DJGPP specific changes.
16        =======================
17
18        The DJGPP specific changes are the followings:
19     1) The conflict existing between the BORLAND-compatibility gettext function
20        from DJGPP's libc.a defined in conio.h and the GNU gettext function from
21        libintl.a defined in libintl.h has been removed. But this conflict can not
22        be removed **WITHOUT** changing a system header file and libc.a.
23     1.1)  libc.a and system header changes.
24        In conio.c, the BORLAND-compatibility gettext function has been renamed
25        into _conio_gettext. In conio.h some code has been added to check if
26        libintl.h is included or not by the same source file. If libintl.h is NOT
27        included, the BORLAND-compatibility gettext function will be available as
28        gettext. If libintl.h has been included then the BORLAND-compatibility
29        gettext function will **ONLY** be available as _conio_gettext.
30        The BORLAND-compatibility gettext function is now available as gettext
31        and _conio_gettext.
32     1.2)  GNU gettext library changes.
33        If both headers, libintl.h and conio.h, are included in the same source
34        file the gettext keyword makes **ALWAYS** reference to the GNU gettext
35        function and **NEVER** to the BORLAND-compatibility gettext function.
36
37     2) The binary package gtxt@packageversion@b.zip contains all needed files to get NLS
38        support for the following DJGPP ports:
39          bison-1.32 (bsn132s.zip)
40          enscript-1.6.2 (ens162s.zip)
41          fileutils-4.0 (fil40s.zip)
42          grep-2.4 (grep24s.zip)
43          id-utils-3.2 (idu32s.zip)
44          make-3.79.1 (mak3791s.zip)
45          recode-3.6 (rcode36s.zip)
46          sed-3.02.80 (sed3028s.zip)
47          sharutils-4.2c (shar42cs.zip)
48          sh-utils-2.0j (shl20js.zip)
49          tar-1.12a (tar112as.zip)
50          texinfo-4.0 (txi40s.zip)
51          textutils-2.0 (txt20s.zip)
52
53        See section #4 for further information about this issue.
54        To implement NLS support for one of those packages you will also need
55        to download the following packages:
56          gtxt@packageversion@b.zip (binaries of GNU Gettext @VER@)
57          licv17b.zip (binaries of GNU libiconv 1.7)
58          fil40b.zip  (binaries of GNU Fileutils 4.0)
59          shl20jb.zip (binaries of GNU Sh-utils 2.0j)
60
61
622.:     Installing the binary package.
63        ==============================
64
652.1.:   To use this binary package you **MUST** install licv17b.zip or later
66        first. licv17b.zip provides the required functionality to recode the
67        .mo files at run time from the unix charsets used to create them to the
68        dos codepages used to display them. Copy the binary distribution into
69        the top DJGPP installation directory. If you are installing Gettext on
70        a dual DOS/WINDOWS 9X systems, you *MUST* first turn off the generation
71        of numeric tails for 8.3 aliases Windows creats for long file names.
72        For information about how to do this, please read the DJGPP FAQ List
73        V 2.30, chapter 22.19: "How to Set Up a Dual DOS/Windows Installation".
74        It should be noticed that neither the libintl.a library nor the
75        binaries (xgettext.exe, gettext.exe, etc.) contain any code to handle
76        nuneric tails of short file names. This implies that if you install
77        the binary packages in a DOS box of Win9X (LFN) **WITHOUT** turning
78        off the numeric tail generation you will **NOT** be able to use NLS
79        on plain DOS. Once again: if you want NLS support on both Win9X **AND**
80        on plain DOS you **MUST** turn off the numeric tail generation **BEFORE**
81        installing the binary package. After having installed the package
82        you can turn on numerical tail generation again if you wish.
83        All this also applies to any other package that has been compiled with
84        NLS support. You **MUST** turn off numeric tail generation every time
85        you install a package that has been compiled with NLS or the binaries
86        will **NOT** be able to find their .mo files (translations) when you
87        switch to plain DOS.
88
892.2.:   Copy the binary distribution into the top DJGPP installation directory,
90        just unzip it preserving the directory structure running *ONE* of the
91        following commands:
92          unzip32 gtxt@packageversion@b.zip      or
93          djtarx gtxt@packageversion@b.zip       or
94          pkunzip -d gtxt@packageversion@b.zip
95
962.3.:   Changing libc.a and conio.h.
97        Apart from the ussual directories, the binary package will create the
98        following directory:
99          %DJDIR%/gnu/gtxt-@treeversion@/djgpp/djdev-2.03
100        where %DJDIR% stands for the root of your DJGPP installation tree.
101        Cd into the djdev-2.03 directory. You will find the following files:
102          conio.diffs
103          conio.h
104          conio.o
105        conio.diffs is a patch file that documents the changes I have done against
106        the files of the original djdev203.zip and djlsr203.zip distributions.
107        This file is not needed by the average user. conio.h is the modified header
108        and conio.o is the recompiled new conio.c file that will replace the old
109        conio.o contained in libc.a.
110
111        For all commands that will follow now I will assume that you have
112        cd'ed into the %DJDIR%/gnu/gtxt-@treeversion@/djgpp/djdev-2.03 directory,
113        where %DJDIR% represents the path to your DJGPP installation. First,
114        you should backup your old header and library. For this task, run the
115        following command sequence (cp is the copy program from fil40b.zip):
116          cp /dev/env/DJDIR/include/conio.h /dev/env/DJDIR/include/conio.bak
117          cp /dev/env/DJDIR/lib/libc.a /dev/env/DJDIR/lib/libc.bak
118
119        Now you can copy the new header into your include directory
120        running the command:
121          cp conio.h /dev/env/DJDIR/include
122
123        Now you can substitute the old conio.o file in libc.a with the new one.
124        For this task you will need the ar program from binutils.
125        Run the command:
126          ar -rv /dev/env/DJDIR/lib/libc.a conio.o
127        You are done.
128
1292.3.:   The NLS controling environment variables, LANG and LANGUAGE, must be
130        set to their appropiate values. The exact way how these variables
131        should be set depends on your operating system:
132
133        * For Windows 98 systems:
134          - Click START;
135          - Choose Programs->Accessories->System Tools->System Information;
136          - Click Tools in the menu-bar, then choose "System Configuration";
137          - Use the tab provided there for editing your AUTOEXEC.BAT as
138            explained below.
139
140        * For Windows NT systems:
141          - Right-click "My Computer", then select "Properties";
142          - Click the "Environment" tab;
143          - Add a new variables LANG and LANGUAGE and set their values to the
144            wanted language codes file as explained below.
145
146        * For all other systems (DOS, Windows 3.X and Windows 95): use any
147          text editor, e.g. the standard EDIT, to edit the file AUTOEXEC.BAT
148          in the root directory of the boot drive (usually, C:).
149
150        The values of the two environment variables LANG and LANGUAGE should be
151        set like this:
152
153          set LANG=xx
154          set LANGUAGE=yy:zz
155
156        xx, yy and zz are place holders for the wanted language codes. For
157        posible values, please read below.
158        The LANG entry is obligatory, the LANGUAGE entry may be omited. The
159        LANG variable selects the locale charsets (dos codepage) to be used to
160        display the program's output and the catalog (.mo file) that contains
161        the translated strings to be used. The LANGUAGE variable allows you to
162        select an alternate catalog than the one stipulated by LANG. Replace
163        xx, yy and zz by the language code of the catalogs you want to use. It
164        should be noticed that LANGUAGE has *ALWAYS* higher priority than LANG.
165        The LANG variable not only selects a catalog, it also specifies the dos
166        codepage that will be used as locale charset. All this means that the
167        translation strings contained in the catalogs (.mo files) will be
168        recoded at runtime to the dos codepage stipulated by the value of LANG.
169        This runtime recoding is needed because the .mo files may have been
170        written using a charset that is not compatible with the charset that
171        will be used on the machine and OS where the .mo files contents will be
172        displayed. The .po files of the GNU packages, from which the .mo files
173        are generated, are typical examples of this. Usualy, they have been
174        written using some ISO-8859-nn charset (an unix charset) and shall be
175        displayed on a DOS/WIN95 machine that uses some dos codepage.
176
177        Some examples:
178        If you only want to use the catalog containing the translations for
179        your mother tongue (in my case the spanish translations) the above
180        lines will only use the LANG variable and will look like this:
181
182          set LANG=es
183
184        In this case, LANG defines the locale charset (CP850 in this case) to
185        be used for the on-the-fly recoding of the catalog (.mo file) contents
186        **AND AT THE SAME TIME** the translation/language (.mo file) to be used.
187
188        If you want to use the spanish (es) and german (de) catalogs the above
189        lines will look like this:
190
191          set LANG=es
192          set LANGUAGE=es:de
193
194        In this case a DJGPP binary that has been compiled with NLS support
195        will first search for the spanish translation of a string. If a
196        translation for that particular string can not be found in the spanish
197        .mo file then it will search for a german translation of that string in
198        the german .mo file and if a german translation of that string can also
199        not been found it will default to display the build-in english string.
200        No mather if a spanish, a german or an english build-in string is
201        selected, the string is always recoded to the dos codepage stipulated
202        by LANG. In this case: CP850. In the above example, LANGUAGE defines
203        the set of languages to be used and their priority (from left to right).
204        At the same time, LANG defines the locale charset (dos codepage) to be
205        used to recode **ALL** translated string, no matter which language
206        (.mo file) is used.
207        If you want to reverse this search order the above lines would look
208        like this one:
209
210          set LANG=es
211          set LANGUAGE=de:es
212
213        Now let us assume that an user wants to use the swedish catalogs on
214        a machine that loads codepage CP437 when it is booted. It should be
215        noticed that the locale charset for Sweden is CP850 and not CP437.
216        In this case, the lines must look like this:
217
218          set LANG=en_US
219          set LANGUAGE=sv
220
221        LANG reflects the available codepage/charset and LANGUAGE selects the
222        wanted translation catalog. en_US means CP437. Now, the contents of the
223        catalog are recoded to CP437 instead to CP850 because CP437 is the
224        codepage used to display messages on screen. Of course, not every
225        combination of catalogs and locale charset (dos codepages) makes sense.
226        E.G.: selecting as locale charset chinese (LANG=zh_TW) and the french
227        translations (LANGUAGE=fr) will certainly not generate an usefull
228        screen output.
229
230        The content of LANG is a language code. Examples are fr for french,
231        en_US for US english, etc. This language code is an alias for the
232        locale charset to be used for runtime recoding. The complete list of
233        all available aliases can be found in %DJDIR%/lib/charset.alias. This
234        file is a table with two entries: left entry is the alias (en_US,
235        de_AT, etc.), right entry is the corresponding dos codepage that will
236        be used for that language code (alias). It should be noticed that it is
237        also possible to select a codepage directely. E.G.: Instead of setting:
238
239          set LANG=en_US
240
241        you may directely set:
242
243          set LANG=CP437
244
245        cp437 or 437 are also valid settings for CP437. This overwrites any
246        settings in charset.alias. The settings in the environment always
247        overwrite the settings in charset.alias. Please note that if you omit
248        LANG, LANGUAGE will not be honored at all. Because the information
249        about which locale charset shall be used for recoding is needed,
250        if LANG is omitted by the user this information will not be available
251        and consequently LANGUAGE will be ignored and no translation at all
252        will be done.
253        If for some reason you want to disable NLS, then you should comment
254        out the LANG variable or remove them from your AUTOEXEC.BAT file or
255        select 'C' as your catalog:
256
257          set LANG=C
258
259        or clear it by setting:
260
261          set LANG=
262
263        You can also change during a DOS session in Win9X or on plain DOS the
264        values of the LANG and LANGUAGE variables by setting or clearing them
265        from the DOS prompt.
266
2672.5.:   To create an entry for the gettext info docs in your dir file
268        run from the top DJGPP installation directory the command:
269          install-info --info-dir=./info ./info/gettext.info
270
2712.6.:   The binaries distributed in this package have NLS support.
272        E.G. run the command:
273          xgettext
274        and the binary should talk to you in your mother tonge, if
275        supported.
276        For futher information about GNU gettext please read the info docs.
277
278
2793.:     Building the binaries from sources.
280        ===================================
281
2823.1.:   To build the binaries you will need the following binary packages:
283          djdev203.zip (or a later but NOT a prior version)
284          bsh203b.zip  (or a later but NOT a prior version)
285          gcc303b.zip, bnu2112b.zip, mak3791b.zip,
286          fil40b.zip, shl20jb.zip, txt20b.zip,
287          txi40b.zip, grep24b.zip, sed3028b.zip,
288          licv17b.zip
289
290        If you want to run the check you will need also:
291          dif272b.zip
292
293        If you want to recreate the html docs you will also need:
294          gro116b.zip  (or a later but NOT a prior version)
295          perl561b.zip (or a later but NOT a prior version)
296
297        All this packages can be found in the v2gnu directory of any
298        Simtel.NET mirror.
299        You must have licv17b.zip or a later version installed before
300        configuring or compiling the package or the configuration and build
301        process will fail due to unresolved references to libiconv.a
302        You will need bsh203b.zip or later and *NOT* a prior version or the
303        build will fail. The same applies to djdev203.zip.
304        This updated versions have been recompiled with djdev203.zip and know
305        about the "/dev/env" functionality introduced with djdev203.zip. All the
306        other packages are the ones I have used to build the binaries from this
307        sources. Previuos versions of this packages may do the job as well but
308        I have not tested this.
309
3103.2.:   Create a temporary directory and copy the source package into the
311        directory. If you download the source distribution from one of the
312        DJGPP archives, just unzip it preserving the directory structure
313        running *ONE* of the following commands:
314          unzip32 gtxt@packageversion@s.zip      or
315          djtarx gtxt@packageversion@s.zip       or
316          pkunzip -d gtxt@packageversion@s.zip
317
318        Source distributions downloaded from one of the GNU FTP sites need
319        some more work to unpack. First, you *MUST* use the `djtar' program
320        to unzip the package.  That is because some file names in the official
321        distributions need to be changed to avoid problems on the various
322        platforms supported by DJGPP. `djtar' can rename files on the fly given
323        a file with name mappings. The distribution includes a file
324        `djgpp/fnchange.lst' with the necessary mappings. So you need first
325        to retrieve that file, and then invoke `djtar' to unpack the
326        distribution. Here is how:
327
328          djtar -x -p -o @V@/djgpp/fnchange.lst @V@.tar.gz > lst
329          djtar -x -n lst @V@.tar.gz
330
331        (The name of the distribution archive and the top-level directory will
332        be different for versions other than @VER@.)
333
334        It is always recommended to download the DJGPP packages from some
335        Simtel.NET mirror and *NOT* the original GNU distribution because
336        only the binary distribution of the DJGPP port will contain the
337        files needed to patch libc.a. This are: conio.h and conio.o.
338
3393.3.:   This package is preconfigured for NLS support and for run time recoding
340        due to the functionality provided by libiconv.a from licv17b.zip.
341        This implies that licv17b.zip *MUST* be installed *before* you try to
342        compile the package or the build process will fail.
343        It should be noticed that when you compile your own binaries with NLS
344        you must also *always* link with libiconv.a
345        If you compile this package with a later version of libc.a or if you
346        prefer no NLS support at all you will have to reconfigure this package.
347        The configuration batch file of this package, located in the djgpp
348        directory, allows you to enable or disable NLS support and to compile
349        from a different partition than from where the sources are located.
350        config.bat always configures the package for NLS support enabled and
351        for in-place compilation if no options are given.
352        The available NLS options are:
353          NLS
354          no-NLS
355
356        If for some reason you want no NLS support you will have to reconfigure
357        the package. For this purpose cd into the top srcdir (gtxt-@treeversion@)
358        and run the following commands:
359          make distclean
360          djgpp\config no-NLS
361
362        This step is **NOT** optional and the "distclean" option must be used.
363        If you do not use the "distclean" option the config.cache file will not
364        be deleted. In this case you are **NOT** reconfiguring because the
365        configuration informations are read from the cache file instead of being
366        newly computed.
367        You **MUST** specify "no-NLS" or config.bat will default to "NLS".
368        To build the programs in a directory other than where the sources are,
369        you must add a parameter that specifies the source directory,
370        e.g:
371          x:\src\gnu\gtxt-@treeversion@\djgpp\config x:/src/gnu/gtxt-@treeversion@ no-NLS
372
373        Lets assume you want to build the binaries in a directory placed on a
374        different drive (z:\build in this case) from where the sources are,
375        then you will run the following commands:
376          z:
377          cd \build
378          x:\src\gnu\gtxt-@treeversion@\djgpp\config x:/src/gnu/gtxt-@treeversion@ no-NLS
379
380        If you want NLS support you will omit "no-NLS" or replace it by
381        "NLS" in the above examples.
382        The order of the "NLS" option and the srcdir option does *NOT* matter.
383        You *MUST* use forward slashes to specify the source directory.
384
385        This batch file will set same environment variables, make MSDOS
386        specific modifications to the Makefile.ins and supply all other
387        needed options to the configure script.
388
3893.4.:   To compile the package run from the top srcdir the command:
390          make
391
3923.5.:   Now you can run the tests if you like.
393        From the top srcdir run the command:
394          make check
395
396        Non test should fail.
397
3983.6.:   To install the binaries, header, library, catalogs, and info docs
399        run the following command from the top srcdir:
400          make install CATALOGS="xx.gmo yy.gmo zz.gmo"
401        or
402          make install CATALOGS="xx.gmo yy.gmo zz.gmo" prefix=z:/some/other/place
403
404        This will install the products into your DJGPP installation tree given
405        by the default prefix "/dev/env/DJDIR". If you prefer to install them
406        into some other directory you will have to set prefix to the appropiate
407        value. Replace xx, yy and zz by the language codes of the catalogs you
408        want to install.
409
4103.7.:   Now you have to set the LANG environment variable.
411        Please refer to section 2.3 for further information.
412
413
4144.:     NLS support for other DJGPP ports.
415        ==================================
416
417        This package contains all needed files to get NLS support for the
418        following DJGPP ports:
419          bison-1.32 (bsn132s.zip)
420          enscript-1.6.2 (ens162s.zip)
421          fileutils-4.0 (fil40s.zip)
422          grep-2.4 (grep24s.zip)
423          id-utils-3.2 (idu32s.zip)
424          make-3.79.1 (mak3791s.zip)
425          recode-3.6 (rcode36s.zip)
426          sed-3.02.80 (sed3028s.zip)
427          sharutils-4.2c (shar42cs.zip)
428          sh-utils-2.0j (shl20js.zip)
429          tar-1.12a (tar112as.zip)
430          texinfo-4.0 (txi40s.zip)
431          textutils-2.0 (txt20s.zip)
432
433        The files needed are placed in the NLS_for_djgpp_packages tree located
434        in djgpp directory. I will explane this using grep-2.4 as example.
435        This means that file names or command names may change from port to port.
436        The configuration batch files and the sed scripts of every package have
437        the same name as the original ones that this ones will replace. If you
438        are familiar with the original package you shall have no difficulties
439        in reconfigure the package for NLS support.
440        Please inspect the tree NLS_for_djgpp_packages to see what files will
441        be replaced.
442
4434.1.:   To reconfigure and recompile a source package with NLS support you
444        *MUST* install the gtxt@packageversion@b.zip and licv17b.zip packages
445        first. NLS support will **NOT** work with any prior version of the above
446        mentioned packages. Before installing gtxt@packageversion@b.zip and licv17b.zip
447        you *MUST* deinstall the old packages if you ever have installed them.
448        For this purpose use the provided manifest files from the old packages.
449        Old packages means previous beta releases of gtxt@packageversion@b.zip and licv17b.zip
450        *AND* also previous versions of gettext like gettext 0.10.32, etc.
451
4524.2.:   We will assume that the required sources will be unzipped into
453        a directory called src.
454        Copy grep24s.zip into /src and decompress them preserving the directory
455        structure running the command:
456          unzip32 *.zip
457        This will create the directory:
458          /src/gnu/grep-2.4
459
460        The binary package gtxt@packageversion@b.zip will create the directory:
461          %DJDIR%/gnu/gtxt-@treeversion@/djgpp/NLS_for_djgpp_packages/grep-2.4
462        This directory contains all needed files.
463        The files are:
464          grep-2.4/djgpp/config.bat  (new .bat file that replaces the original one.)
465          grep-2.4/djgpp/config.sed  (sed script needed to modify configure.)
466          grep-2.4/djgpp/config.site (defaults for configure.)
467
468        Now we will xcopy the needed files into the original grep-2.4 directory.
469        First we will cd into the grep-2.4 directory and then we will run the
470        following command:
471          xcopy %DJDIR%\gnu\gtxt-@treeversion@\djgpp\NLS_for_djgpp_packages\grep-2.4 /v/s/e
472
4734.3.:   Before the package can be reconfigured, the old configuration must be
474        cleared. Run the command:
475          make distclean
476
477        This will remove all Makefiles, config.h and config.cache file with old
478        configuration information. This step is *NOT* optional and it must be
479        used the "distclean" target.
480
4814.4.:   Now the package can be configured running the command:
482          djgpp\config
483        if you want to build the products in the /src/grep-2.4 directory, or:
484          c:\src\grep-2.4\djgpp\config c:/src/grep-2.4
485        if you want to build the products on a different drive or directory.
486        You can still configure without NLS support if you want. In this case
487        simply add the option "no-NLS" to the above commands.
488
4894.5.:   Now the package can be compiled and checked by running the commands:
490          make
491          make check
492        The first command will create also all the available translation
493        catalogs (.gmo files). Before running the tests you should clear
494        the LANGUAGE and/or LANG variable or the tests will probably fail.
495
4964.6.:   Now the products can be installed by running the command:
497          make install CATALOGS="xx.gmo yy.gmo"
498
499        Replace xx and yy by the appropiate language codeof the catalogs you
500        want to install. If you omit CATALOGS then all catalogs will be installed.
501        You can install into a temp directory if you want by specifying a prefix:
502          make install prefix=z:/tmp CATALOGS="xx.gmo yy.gmo zz.gmo"
503
5044.7.:   Now you have to set the LANG and LANGUAGE environment variable.
505        Please refer to 2.4.
506
507
508        Send GNU gettext specific bug reports to <bug-gnu-gettext@gnu.org>.
509        Send suggestions and bug reports concerning the DJGPP port to
510        comp.os.msdos.djgpp or <djgpp@delorie.com>.
511
512
513Enjoy.
514
515        Guerrero, Juan Manuel <st001906@hrz1.hrz.tu-darmstadt.de>
Note: See TracBrowser for help on using the repository browser.