summaryrefslogtreecommitdiff
path: root/INSTALL.txt
blob: f02438914be84be88416f54d1ba4f5dc24a01143 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
PREREQUISITES

    Using GCC:
        Required
            * gcc          : GNU C compiler
            * GNU binutils : A collection of binary tools
            * GNU make     : make
            * sh           : POSIX type shell
            * GNU coreutils: Core utilities package (chmod, install, mkdir,
                             mv, rm, uname)
            * perl         : Practical Extraction and Report Language (perlpod)
                             For manuals in non-Latin1 (non-Western-European)
                             languages perl >= 5.10.1 is required.

        Optional (depending on build targets):
            * gettext     : Framework to help GNU packages produce multi-
                            lingual messages.
            * groff       : GNU troff text formatting system.
            * ghostscript : An interpreter for the PostScript language and
                            for PDF (ps2pdf)
            * iconv       : Character set conversion utility.


    Using Watcom C:
        Required
            * Open Watcom  : http://www.openwatcom.org/
            * perl         : Practical Extraction and Report Language (perlpod)
                             http://strawberryperl.com/


    Using Microsoft Visual C++:
        Required
            * Visual C++   : You can get a free express version via this web page:
                             http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
            * perl         : Practical Extraction and Report Language (perlpod)
                             http://strawberryperl.com/



BASIC INSTALLATION

    To build the program type:

        make


    To strip the executables:

        make strip


    To install:

        make install


    Clean:

        make clean


    Mostly clean.

        The target mostlyclean will preserve the generated documentation files.

        make mostlyclean


INSTALLATION NAMES

    By default the 'install' target will install the program in
    /usr/bin, the language files in /usr/share/locale
    and the man page in /usr/share/man. You can specify an
    installation prefix other than /usr by modifying the
    'prefix' variable. An Example:

        make prefix=$HOME clean all
        make prefix=$HOME install


DEBUG

    A debug enabled build can be made by adding DEBUG=1
    to the make command. Example:

        make clean install DEBUG=1

    With debug enabled dos2unix will print extra information
    and you can debug the source code in gdb.


NATIVE LANGUAGE SUPPORT

    Native Language Support (NLS) is by default enabled.
    To disable NLS add ENABLE_NLS=. Example:

        make clean install ENABLE_NLS=


INTERNATIONAL MAN PAGES

    Man pages for Latin1 (Western European) scripts are supported
    on all systems.

    Man pages for non-Latin1 scripts are only supported on modern
    Unix (like) systems. This is controlled via the make variable
    MAN_NONLATIN. When the value of MAN_NONLATIN is equal to 1
    (default for Unix) non-Latin manual pages are built. For DOS,
    Windows, OS/2 this variable is default empty.

    Enable non-Latin man pages:

        make install MAN_NONLATIN=1

    Disable non-Latin man pages:

        make install MAN_NONLATIN=

    Generation of non-Latin1 manuals requires Perl >= 5.10.1.


    Originally the Unix man system supported only man pages in Latin1
    format (ISO-8859-1). Although the world is moving to Unicode format
    (UTF-8) there is still a lot of Latin1 legacy around.

    The English man page is a pure ASCII file and is readable on all
    platforms.

    The non-English Latin script man pages are ASCII files and use GNU
    groff extension codes (see man groff_char) for the non-ASCII Latin1
    characters. This way the man pages show properly in UTF-8 environments
    (modern Linuxes) and legacy Latin1 (DJGPP, MinGW, Cygwin, old Unixes).
    GNU groff is wide spread, but there are also roff implementations
    around that don't support the GNU extensions.

    Man pages for non-Latin1 scripts are encoded in UTF-8. These do not
    show properly on old systems. Therefore these are not built for DOS,
    and Windows by default. Man pages in UTF-8 format are shown properly
    on Linux. Not all roff implementations support UTF-8.

    In order to show UTF-8 man pages properly on Cygwin you need to do the
    following:

    In /etc/man.conf, change the NROFF definition to use 'preconv'.

        NROFF        /usr/bin/preconv | /usr/bin/nroff -c -mandoc 2>/dev/null

    To view the man page set the correct locale. E.g. for Russian:

        export LANG=ru_RU.UTF-8
        man dos2unix


LARGE FILE SUPPORT

    Large File Support (LFS) is by default enabled. This enables
    the use of 64 bit file system interface on 32 bit systems.
    This makes it possible to open files larger than 2GB on 32 bit
    systems, provided the OS has LFS support builtin.
    To disable LFS make the LFS variable empty. Example:

        Disable LFS:
        make clean install LFS=

    The gcc compiler from the mingw.org project does not support LFS.
    It is advised to use the mingw-w64 compiler tool chain for LFS on
    32 bit Windows.


UNICODE SUPPORT

    Unicode UTF-16 support is by default enabled for Windows and Unix.  To
    disable make the UCS variable (Universal Character Set) empty.

        Disable Unicode:
        make clean install UCS=

    Unicode UTF-16 is not supported by the DOS and OS/2 versions.


ESPERANTO X-NOTATION

    For systems that don't support the Unicode or Latin-3 character set,
    Esperanto messages in ASCII x-notation format can be selected. Add
    EO_XNOTATION=1 to the make command-line.  It will change the format of the
    normal dos2unix 'eo' locale from Unicode to ASCII x-notation.

        make clean install EO_XNOTATION=1


DOCUMENTATION

    Manual pages are generated from Perl POD files.

    The manual pages in text and html format are by default only
    created in English language. To create text and html manuals
    for other languages type:

        make txt
        make html

    Once the manuals in non-English languages have been created,
    they will also be installed under share/doc/ when you type
    'make install'

    Creation of non-English manuals in text or html format require
    an installation of iconv.

    Manuals in PDF format are by default not created.
    To create manuals in PDF format type:

        make pdf

    PDF generation requires GhostScript to be installed.


WINDOWS 32 BIT PORT

    Using Mingw compiler <http://www.mingw.org>:

        make -f mingw.mak clean
        make -f mingw.mak
        make -f mingw.mak strip
        make -f mingw.mak install

    Using Mingw-w64 compiler <http://mingw-w64.sourceforge.net>:
    I used Ruben van Boxem release installed in c:\mingw32
    32 bit host, 32 bit target: i686-w64-mingw32-gcc-4.6.3-2-release-win32_rubenvb.7z

        make -f mingw32.mak clean
        make -f mingw32.mak
        make -f mingw32.mak strip
        make -f mingw32.mak install

    Or use Open Watcom and type:

        wmake -f wccwin32.mak clean
        wmake -f wccwin32.mak
        wmake -f wccwin32.mak install

    Or use Microsoft Visual C++ and type:

        nmake /f vc.mak clean
        nmake /f vc.mak
        nmake /f vc.mak install


    The win32 binaries built with MinGW32 are packed with a patched version of
    MinGW's libintl-8.dll that has builtin support for relocation. See also
    http://waterlan.home.xs4all.nl/libintl.html and
    http://sourceforge.net/tracker/?func=detail&atid=302435&aid=3003879&group_id=2435


WINDOWS 64 BIT PORT

    To compile a version for 64 bit Windows, get the Mingw-w64 compiler
    <http://mingw-w64.sourceforge.net>, and use makefile mingw64.mak:
    I used Ruben van Boxem release installed in c:\mingw64
    32 bit host, 64 bit target: x86_64-w64-mingw32-gcc-4.6.3-2-release-win32_rubenvb.7z

        make -f mingw64.mak clean
        make -f mingw64.mak
        make -f mingw64.mak strip
        make -f mingw64.mak install


DOS PORT, 32 BIT

    To compile a version for DOS, get the DJGPP compiler
    <http://www.delorie.com/djgpp/>, and use makefile djgpp.mak:

        make -f djgpp.mak clean
        make -f djgpp.mak
        make -f djgpp.mak strip
        make -f djgpp.mak install

    Or use Open Watcom

        wmake -f wccdos32.mak clean
        wmake -f wccdos32.mak
        wmake -f wccdos32.mak install


DOS PORT, 16 BIT

    To compile a version for DOS, use the Borland C compiler 3.1 or 4.0,
    and use makefile bcc.mak:

        make -f bcc.mak clean
        make -f bcc.mak

    Or use Open Watcom

        wmake -f wccdos16.mak clean
        wmake -f wccdos16.mak
        wmake -f wccdos16.mak install


OS/2 PORT

    Using EMX

        make -f emx.mak clean
        make -f emx.mak
        make -f emx.mak strip
        make -f emx.mak install

    Open Watcom

        wmake -f wccos2.mak clean
        wmake -f wccos2.mak
        wmake -f wccos2.mak install