Experimenting in DOS arcana.
[p5sagit/p5-mst-13.2.git] / README.dos
CommitLineData
4b7ae2b2 1If you read this file _as_is_, just ignore the funny characters you\r
2see. It is written in the POD format (see perlpod manpage) which is\r
3specially designed to be readable as is.\r
4\r
5=head1 NAME\r
6\r
7perldos - Perl under DOS, W31, W95.\r
8\r
9=head1 SYNOPSIS\r
10\r
11These are instructions for building Perl under DOS (or w??), using\r
12DJGPP v2.01 or later. Under w95 long filenames are supported.\r
13\r
14=head1 DESCRIPTION\r
15\r
16Before you start, you should glance through the README file\r
17found in the top-level directory where the Perl distribution\r
18was extracted. Make sure you read and understand the terms under\r
19which this software is being distributed.\r
20\r
21This port currently supports MakeMaker (the set of modules that\r
22is used to build extensions to perl). Therefore, you should be\r
23able to build and install most extensions found in the CPAN sites.\r
24\r
25=head2 Prerequisites\r
26\r
27=over 4\r
28\r
29=item DJGPP\r
30\r
31DJGPP is a port of GNU C/C++ compiler and development tools to 32-bit,\r
32protected-mode environment on Intel 32-bit CPUs running MS-DOS and compatible\r
33operating systems, by DJ Delorie <dj@delorie.com> and friends.\r
34\r
35For more details (FAQ), check out the home of DJGPP at:\r
36\r
37 http://www.delorie.com/djgpp/\r
38\r
39If you have questions about DJGPP, try posting to the DJGPP newsgroup:\r
40comp.os.msdos.djgpp, or use the email gateway djgpp@delorie.com.\r
41\r
42You can find the full DJGPP distribution on any SimTel.Net mirror all over\r
43the world. Like:\r
44\r
45 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2*\r
46\r
47You need the following files to build perl (or add new modules):\r
48\r
49 v2/djdev202.zip\r
50 v2/bnu27b.zip\r
51 v2gnu/gcc2721b.zip\r
52 v2gnu/bsh1147b.zip\r
53 v2gnu/mak3761b.zip\r
54 v2gnu/fil316b.zip\r
55 v2gnu/sed118b.zip\r
56 v2gnu/txt122b.zip\r
57 v2gnu/dif271b.zip\r
58 v2gnu/grep21b.zip\r
59 v2gnu/shl112b.zip\r
60 v2gnu/gawk303b.zip\r
61 v2misc/csdpmi4b.zip \r
62\r
63or possibly any newer version.\r
64\r
65=item Pthreads\r
66\r
67Thread support is not tested in this version of the djgpp perl.\r
68\r
69=back\r
70\r
71=head2 Shortcomings of Perl under DOS\r
72\r
73Perl under DOS lacks some features of perl under UNIX because of\r
74deficiencies in the UNIX-emulation, most notably:\r
75\r
76=over 4\r
77\r
78=item *\r
79\r
80fork() and pipe()\r
81\r
82=item *\r
83\r
84some features of the UNIX filesystem regarding link count and file dates\r
85\r
86=item *\r
87\r
88in-place operation is a little bit broken with short filenames\r
89\r
90=item *\r
91\r
92sockets\r
93\r
94=back\r
95\r
96=head2 Building\r
97\r
98=over 4\r
99\r
100=item *\r
101\r
102Unpack the source package F<perl5.6*.tar.gz> with djtarx. If you want\r
103to use long file names under w95 and also to get Perl to pass all its\r
104tests, don't forget to use\r
105\r
106 set LFN=y\r
107 set FNCASE=y\r
108\r
109before unpacking the archive.\r
110\r
111=item *\r
112\r
113Create a "symlink" or copy your bash.exe to sh.exe in your C<($DJDIR)/bin>\r
114directory.\r
115\r
116 ln -s bash.exe sh.exe\r
117\r
118And make the C<SHELL> environment variable point to this F<sh.exe>:\r
119\r
120 set SHELL=c:/djgpp/bin/sh.exe (use full path name!)\r
121\r
122You can do this in F<djgpp.env> too. Add this line BEFORE any section\r
123definition:\r
124\r
125 +SHELL=%DJDIR%/bin/sh.exe\r
126\r
127=item *\r
128\r
129If you have F<split.exe> and F<gsplit.exe> in your path, then rename \r
130F<split.exe> to F<djsplit.exe>, and F<gsplit.exe> to F<split.exe>.\r
131Copy or link F<gecho.exe> to F<echo.exe> if you don't have F<echo.exe>.\r
132Copy or link F<gawk.exe> to F<awk.exe> if you don't have F<awk.exe>.\r
133\r
134=item *\r
135\r
136Chdir to the djgpp subdirectory of perl toplevel and type the following\r
137command:\r
138\r
139 configure.bat\r
140\r
141This will do some preprocessing then run the Configure script for you.\r
142The Configure script is interactive, but in most cases you\r
143just need to press ENTER.\r
144\r
145If the script says that your package is incomplete, and asks whether\r
146to continue, just answer with Y (this can only happen if you don't use\r
147long filenames).\r
148\r
149When Configure asks about the extensions, I suggest IO and Fcntl,\r
150and if you want database handling then SDBM_File or GDBM_File\r
151(you need to install gdbm for this one). If you want to use the\r
152POSIX extension (this is the default), make sure that the stack\r
153size of your F<cc1.exe> is at least 512kbyte (you can check this\r
154with: C<stubedit cc1.exe>).\r
155\r
156You can use the Configure script in non-interactive mode too.\r
157When I built my F<perl.exe>, I used something like this:\r
158\r
159 configure.bat -des\r
160\r
161You can find more info about Configure's command line switches in\r
162the F<INSTALL> file.\r
163\r
164When the script ends, and you want to change some values in the\r
165generated F<config.sh> file, then run\r
166\r
167 sh Configure -S\r
168\r
169after you made your modifications.\r
170\r
171IMPORTANT: if you use this C<-S> switch, be sure to delete the CONFIG\r
172environment variable before running the script:\r
173\r
174 set CONFIG=\r
175\r
176=item *\r
177\r
178Now you can compile Perl. Type:\r
179\r
180 make\r
181\r
182=back\r
183\r
184=head2 Testing\r
185\r
186Type:\r
187\r
188 make test\r
189\r
190If you're lucky you should see "All tests successful". But there can be\r
191a few failed subtests (less than 5 hopefully) depending on some external\r
192conditions (e.g. some subtests fail under linux/dosemu or plain dos\r
193with short filenames only).\r
194\r
195=head2 Installation\r
196\r
197Type:\r
198\r
199 make install\r
200\r
201This will copy the newly compiled perl and libraries into your DJGPP\r
202directory structure. Perl.exe and the utilities go into C<($DJDIR)/bin>,\r
203and the library goes under C<($DJDIR)/lib/perl5>. The pod documentation\r
204goes under C<($DJDIR)/lib/perl5/pod>.\r
205\r
206=head1 AUTHOR\r
207\r
208Laszlo Molnar, F<laszlo.molnar@eth.ericsson.se>\r
209\r
210=head1 SEE ALSO\r
211\r
212perl(1).\r
213\r
214=cut\r
215\r