Imported Upstream version 6.0
[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             * sed          : Stream editor
12             * perl         : Practical Extraction and Report Language (perlpod)
13
14         Optional (depending on build targets):
15             * gettext     : Framework to help GNU packages produce multi-
16                             lingual messages.
17             * groff       : GNU troff text formatting system.
18             * ghostscript : An interpreter for the PostScript language and
19                             for PDF (ps2pdf)
20
21     Alternative for Windows/DOS:
22         * Open Watcom : http://www.openwatcom.org/
23
24     Required for DOS16 bit:
25         * Open Watcom : http://www.openwatcom.org/
26
27
28 BASIC INSTALLATION
29
30     To build the program type:
31
32         make
33
34
35     To strip the executables:
36
37         make strip
38
39
40     To install:
41
42         make install
43
44
45     Clean:
46
47         make clean
48
49
50         Mostly clean. The target mostlyclean will preserve the generated
51         documentation files.
52
53         make mostlyclean
54
55
56 INSTALLATION NAMES
57
58     By default the 'install' target will install the program in
59     /usr/bin, the language files in /usr/share/locale
60     and the man page in /usr/share/man. You can specify an
61     installation prefix other than /usr by modifying the
62     'prefix' variable. An Example:
63
64         make prefix=$HOME clean all
65         make prefix=$HOME install
66
67 DEBUG
68
69     A debug enabled build can be made by adding DEBUG=1
70     to the make command. Example:
71
72         make clean install DEBUG=1
73
74     With debug enabled dos2unix will print extra information
75     and you can debug the source code in gdb.
76
77 NATIVE LANGUAGE SUPPORT
78
79     Native Language Support (NLS) is by default enabled.
80     To disable NLS add ENABLE_NLS=. Example:
81
82         make clean install ENABLE_NLS=
83
84 LARGE FILE SUPPORT
85
86     Large File Support (LFS) is by default enabled. This enables
87     the use of 64 bit file system interface on 32 bit systems.
88     This makes it possible to open files larger than 2GB on 32 bit
89     systems, provided the OS has LFS support builtin.
90     To disable LFS make the LFS variable empty. Example:
91
92         Disable LFS:
93         make clean install LFS=
94
95 UNICODE SUPPORT
96
97     Unicode UTF-16 support is by default enabled for Windows and Unix.  To
98     disable make the UCS variable (Universal Character Set) empty.
99
100         Disable Unicode:
101         make clean install UCS=
102
103     Unicode UTF-16 is not supported by the DOS versions.
104
105
106 ESPERANTO X-NOTATION
107
108     For systems that don't support the Unicode or Latin-3 character set,
109     Esperanto messages in ASCII x-notation format can be selected. Add
110     EO_XNOTATION=1 tot the make command-line.  It will change the format of the
111     normal dos2unix 'eo' locale from Unicode to ASCII x-notation.
112
113         make clean install EO_XNOTATION=1
114
115 DOCUMENTATION
116
117     Manual pages are generated from Perl POD files. By default
118     the manual pages are are created in text and html format.
119     To create a manual in PDF format type:
120
121         make pdf
122
123     PDF generation requires GhostScript to be installed.
124
125 WINDOWS PORT
126
127     To compile a version for Windows, get the Mingw compiler
128     <http://www.mingw.org>, and use makefile mingw.mak:
129
130         make -f mingw.mak clean
131         make -f mingw.mak
132         make -f mingw.mak strip
133         make -f mingw.mak install
134
135     Or get the Open Watcom C compiler <http://www.openwatcom.org>
136     and type:
137
138         wmake -f wccwin32.mak clean
139         wmake -f wccwin32.mak
140
141
142     The win32 binaries built with MinGW32 are packed with a patched version of
143     MinGW's libintl-8.dll that has builtin support for relocation. See also
144     http://waterlan.home.xs4all.nl/libintl.html and
145     http://sourceforge.net/tracker/?func=detail&atid=302435&aid=3003879&group_id=2435
146
147
148 WINDOWS 64 BIT PORT
149
150     To compile a version for Windows, get the Mingw-w64 compiler
151     <http://mingw-w64.sourceforge.net>, and use makefile mingw64.mak:
152
153         make -f mingw64.mak clean
154         make -f mingw64.mak
155         make -f mingw64.mak strip
156         make -f mingw64.mak install
157
158 DOS PORT, 32 BIT
159
160     To compile a version for DOS, get the DJGPP compiler
161     <http://www.delorie.com/djgpp/>, and use makefile djgpp.mak:
162
163         make -f djgpp.mak clean
164         make -f djgpp.mak
165         make -f djgpp.mak strip
166         make -f djgpp.mak install
167
168     Or use the OpenWatcom compiler <http://www.openwatcom.org>.
169
170         wmake -f wccdos32.mak clean
171         wmake -f wccdos32.mak
172
173 DOS PORT, 16 BIT
174
175     To compile a version for DOS, use the Borland C compiler 3.1 or 4.0,
176     and use makefile bcc.mak:
177
178         make -f bcc.mak clean
179         make -f bcc.mak
180
181     Or use the OpenWatcom compiler <http://www.openwatcom.org>.
182
183         wmake -f wccdos16.mak clean
184         wmake -f wccdos16.mak
185
186 OS/2 PORT
187
188     Using Paul Smedley's build environment, available
189     at <http://os2ports.smedley.info>
190
191         make -f os2.mak clean
192         make -f os2.mak
193         make -f os2.mak strip
194         make -f os2.mak install
195