Imported Upstream version 6.0.5
[platform/upstream/dos2unix.git] / INSTALL.txt
1 PREREQUISITES
2
3     Using GCC:
4         Required
5             * gcc          : GNU C compiler
6             * GNU binutils : A collection of binary tools
7             * GNU make     : make
8             * sh           : POSIX type shell
9             * GNU coreutils: Core utilities package (chmod, install, mkdir,
10                              mv, rm, uname)
11
12         Optional (depending on build targets):
13             * perl         : Practical Extraction and Report Language (perlpod)
14                              perl >= 5.10.1 is required.
15             * gettext      : Framework to help GNU packages produce multi-
16                              lingual messages.
17             * po4a         : PO for anything.
18             * groff        : GNU troff text formatting system.
19             * ghostscript  : An interpreter for the PostScript language and
20                              for PDF (ps2pdf)
21
22
23     Using Watcom C:
24         Required
25             * Open Watcom  : http://www.openwatcom.org/
26
27
28     Using Microsoft Visual C++:
29         Required
30             * Visual C++   : You can get a free express version via this web page:
31                              http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
32
33
34
35 BASIC INSTALLATION
36
37     To build the program type:
38
39         make
40
41
42     To strip the executables:
43
44         make strip
45
46
47     To install:
48
49         make install
50
51
52     Clean:
53
54         make clean
55
56
57     Mostly clean.
58
59         The target mostlyclean will preserve the generated documentation files.
60
61         make mostlyclean
62
63
64 INSTALLATION NAMES
65
66     By default the 'install' target will install the program in
67     /usr/bin, the language files in /usr/share/locale
68     and the man page in /usr/share/man. You can specify an
69     installation prefix other than /usr by modifying the
70     'prefix' variable. An Example:
71
72         make prefix=$HOME clean all
73         make prefix=$HOME install
74
75
76 DEBUG
77
78     A debug enabled build can be made by adding DEBUG=1
79     to the make command. Example:
80
81         make clean install DEBUG=1
82
83     With debug enabled dos2unix will print extra information
84     and you can debug the source code in gdb.
85
86
87 NATIVE LANGUAGE SUPPORT
88
89     Native Language Support (NLS) is by default enabled.
90     To disable NLS add ENABLE_NLS=. Example:
91
92         make clean install ENABLE_NLS=
93
94
95 INTERNATIONAL MAN PAGES
96
97     Since dos2unix 6.0.5 all man pages are encoded in UTF-8, because even
98     Western-European man pages may contain Unicode characters not supported by
99     the Latin-1 (ISO-8859-1) character set.
100
101     Originally the Unix man system supported only man pages in Latin1 format.
102     Although the world is moving to Unicode format (UTF-8) there is still a lot
103     of Latin1 legacy around.
104
105     The English man page is a pure ASCII file and is readable on all platforms.
106
107     Non-English man pages are encoded in UTF-8. These do not show properly on
108     old systems.  Man pages in UTF-8 format are shown properly on Linux. Not
109     all roff implementations support UTF-8.
110
111     In order to show UTF-8 man pages properly on Cygwin you need to do the
112     following:
113
114     In /etc/man.conf, change the NROFF definition to use 'preconv'.
115
116         NROFF        /usr/bin/preconv | /usr/bin/nroff -c -mandoc 2>/dev/null
117
118     To view the man page set the correct locale. E.g. for Ukrainian:
119
120         export LANG=uk_UA.UTF-8
121         man dos2unix
122
123
124 LARGE FILE SUPPORT
125
126     Large File Support (LFS) is by default enabled. This enables
127     the use of 64 bit file system interface on 32 bit systems.
128     This makes it possible to open files larger than 2GB on 32 bit
129     systems, provided the OS has LFS support builtin.
130     To disable LFS make the LFS variable empty. Example:
131
132         Disable LFS:
133         make clean install LFS=
134
135     The gcc compiler from the mingw.org project does not support LFS.
136     It is advised to use the mingw-w64 compiler tool chain for LFS on
137     32 bit Windows.
138
139
140 UNICODE SUPPORT
141
142     Unicode UTF-16 support is by default enabled for Windows and Unix.  To
143     disable make the UCS variable (Universal Character Set) empty.
144
145         Disable Unicode:
146         make clean install UCS=
147
148     Unicode UTF-16 is not supported by the DOS and OS/2 versions.
149
150
151 DOCUMENTATION
152
153     Manual pages are generated from Perl POD files.
154
155     The manual pages in text and html format are by default only
156     created in English language. To create text and html manuals
157     for other languages type:
158
159         make txt
160         make html
161
162     Once the manuals in non-English languages have been created,
163     they will also be installed under share/doc/ when you type
164     'make install'
165
166     Manuals in PDF format are by default not created.
167     To create manuals in PDF format type:
168
169         make pdf
170
171     PDF generation requires GhostScript to be installed.
172
173
174 WINDOWS 32 BIT PORT
175
176     Using Mingw compiler <http://www.mingw.org>:
177
178         make -f mingw.mak clean
179         make -f mingw.mak
180         make -f mingw.mak strip
181         make -f mingw.mak install
182
183     Using MinGW-w64 compiler <http://mingw-w64.sourceforge.net>:
184     I am using the MSYS2 project <http://sourceforge.net/projects/msys2/>
185     which includes the MinGW-w64 compiler and an updated MSYS shell based
186     on Cygwin 1.7.
187
188         make -f mingw32.mak clean
189         make -f mingw32.mak
190         make -f mingw32.mak strip
191         make -f mingw32.mak install
192
193     Or use Open Watcom and type:
194
195         wmake -f wccwin32.mak clean
196         wmake -f wccwin32.mak
197         wmake -f wccwin32.mak install
198
199     Or use Microsoft Visual C++ and type:
200
201         nmake /f vc.mak clean
202         nmake /f vc.mak
203         nmake /f vc.mak install
204
205
206     The win32 binaries built with MinGW32 are packed with a patched version of
207     MinGW's libintl-8.dll that has builtin support for relocation. See also
208     http://waterlan.home.xs4all.nl/libintl.html and
209     http://sourceforge.net/p/mingw/bugs/1808/
210     The MSYS2 project has the relocation patch already included.
211
212
213 WINDOWS 64 BIT PORT
214
215     To compile a version for 64 bit Windows, get the Mingw-w64 compiler
216     <http://mingw-w64.sourceforge.net>, and use makefile mingw64.mak:
217     I am using the MSYS2 project <http://sourceforge.net/projects/msys2/>
218     which includes the MinGW-w64 compiler and an updated MSYS shell based
219     on Cygwin 1.7.
220
221         make -f mingw64.mak clean
222         make -f mingw64.mak
223         make -f mingw64.mak strip
224         make -f mingw64.mak install
225
226
227 DOS PORT, 32 BIT
228
229     To compile a version for DOS, get the DJGPP compiler
230     <http://www.delorie.com/djgpp/>, and use makefile djgpp.mak.
231     It may be troublesome to get djgpp working correctly on a
232     new Windows OS.
233
234         make -f djgpp.mak clean
235         make -f djgpp.mak
236         make -f djgpp.mak strip
237         make -f djgpp.mak install
238
239     Or use Open Watcom
240     Cross compiling from Windows 32 bit. This works.
241
242         wmake -f wccdos32.mak clean
243         wmake -f wccdos32.mak
244         wmake -f wccdos32.mak install
245
246
247 DOS PORT, 16 BIT
248
249     To compile a version for DOS, use the Borland C compiler 3.1 or 4.0,
250     and use makefile bcc.mak:
251
252         make -f bcc.mak clean
253         make -f bcc.mak
254
255     Or use Open Watcom
256
257         wmake -f wccdos16.mak clean
258         wmake -f wccdos16.mak
259         wmake -f wccdos16.mak install
260
261
262 OS/2 PORT
263
264     Using EMX
265
266         make -f emx.mak clean
267         make -f emx.mak
268         make -f emx.mak strip
269         make -f emx.mak install
270
271     Open Watcom
272
273         wmake -f wccos2.mak clean
274         wmake -f wccos2.mak
275         wmake -f wccos2.mak install
276