1 =====================================
2 Package "Bit::Vector" Version 6.4
3 =====================================
6 Copyright (c) 1995 - 2004 by Steffen Beyer.
14 + Preliminary steps for use with Perl prior to version 5.002
15 + Preliminary steps for use with ActiveState's port of Perl 5
16 + How to install additional languages
23 Perl version 5.000 or higher, and an ANSI C compiler. (!)
25 Module "Carp::Clan" version 5.0 or higher.
27 Note that in order to compile Perl modules which contain
28 C (and/or XS) code (such as this one), you always HAVE
29 to use the very same compiler your Perl itself was compiled
32 Many vendors nowadays ship their operating system already
33 comprising a precompiled version of Perl. Many times the
34 compilers used to compile this version of Perl are not
35 available to or not usually used by the users of these
38 In such cases building this module (or any other Perl
39 module containing C and/or XS code) will not work. You
40 will either have to get the compiler which was used to
41 compile Perl itself (see for example the section "Compiler:"
42 in the output of the command "perl -V"), or to build
43 your own Perl with the compiler of your choice (which
44 also allows you to take advantage of the various compile-
45 time switches Perl offers).
47 Note that Sun Solaris and Red Hat Linux frequently were
48 reported to suffer from this kind of problem.
50 Moreover, you usually cannot build any modules under
51 Windows 95/98 since the Win 95/98 command shell doesn't
52 support the "&&" operator. You will need the Windows NT
53 command shell ("cmd.exe") or the "4DOS" shell to be
54 installed on your Windows 95/98 system first. Note that
55 Windows NT and Windows 2000 are not affected and just
56 work fine. I don't know about Windows XP, however.
58 Note that ActiveState provides precompiled binaries of
59 this module for their Win32 port of Perl ("ActivePerl")
60 on their web site, which you should be able to install
61 simply by typing "ppm install Bit-Vector" in your MS-DOS
62 command shell (but note the "-" instead of "::" in the
63 package name!). This also works under Windows 95/98 (!).
65 If your firewall prevents "ppm" from downloading
66 this package, you can also download it manually from
67 http://www.activestate.com/ppmpackages/5.005/zips/ or
68 http://www.activestate.com/ppmpackages/5.6/zips/.
69 Follow the installation instructions included in
73 Preliminary steps for use with Perl prior to version 5.002:
74 -----------------------------------------------------------
76 Edit the file "Makefile.PL" and change the line
78 'VERSION_FROM' => 'Vector.pm',
82 Then edit the file "Vector.pm" and change the line
84 bootstrap Bit::Vector $VERSION;
86 bootstrap Bit::Vector;
88 Also edit the file "t/00____version.t" and change the line
96 Finally, edit the file "Vector.xs" and delete the line
101 Preliminary steps for use with ActiveState's port of Perl 5:
102 ------------------------------------------------------------
104 (For the Win32 platform)
106 Edit the file "Makefile.PL" and remove all of the "#" characters
107 which currently comment out the lines involved with the setting
108 of the attributes "ABSTRACT", "AUTHOR" and "CAPI".
114 =============================================================================
115 ALWAYS unpack and build Perl modules OUTSIDE the Perl source and installation
116 tree! (You might otherwise inadvertently corrupt your Perl installation!)
117 =============================================================================
119 Quick installation guide for experienced users:
120 -----------------------------------------------
122 UNIX: Win32/Borland C++: Win32/MS Visual C++:
123 ===== ================== ====================
125 % perl Makefile.PL % perl Makefile.PL % perl Makefile.PL
126 % make % dmake % nmake
127 % make test % dmake test % nmake test
128 % make install % dmake install % nmake install
130 Detailed installation guide:
131 ----------------------------
133 1) Change directory to the directory that has been created by unpacking this
134 package ("cd Bit-Vector-6.4").
136 2) Type "perl Makefile.PL" (or whatever the name and path of your Perl 5
139 This will create a "Makefile" with the appropriate parameters for your
140 system (for instance, where the install directories are, and so on).
142 See "man ExtUtils::MakeMaker" or "perldoc ExtUtils::MakeMaker" for
143 other useful options to this command, like setting a different
148 (For installation under Windows NT/95, use "dmake" (Borland C++) or
149 "nmake" (MS Visual C++) instead!)
151 This will create a dynamically linkable library file that will be linked
152 to Perl later, at runtime, provided your system supports dynamic linking.
154 Please refer to the MakeMaker documentation for instructions on how
155 to build a new Perl with statically linked libraries (invoke "perldoc
156 ExtUtils::MakeMaker" for this), if your system does NOT support dynamic
159 Should you encounter any compiler warnings or errors (like the redefi-
160 nition of certain types already defined by your system), please contact
161 me via e-mail at <sb@engelschall.com>, sending me your compiler output
162 (both STDOUT and STDERR). Thank you!
164 ======================================================================
165 BEWARE that you need an ANSI C compiler in order to successfully
166 compile this package!
167 ======================================================================
169 Also note that problems may arise with the c89 compiler of HP, although
170 it allegedly supports ANSI C!
172 I recommend the GNU C compiler ("gcc"), which is freely available on
173 the Internet (see ftp://ftp.gnu.org/pub/gnu/ and mirror sites thereof).
175 (HP users are strongly recommended to install the GNU assembler "gas"
176 first before installing the GNU C compiler "gcc", according to GNU.)
178 Should you get the error messages
180 Vector.c: 15: Unable to find include file 'EXTERN.h'.
181 Vector.c: 16: Unable to find include file 'perl.h'.
182 Vector.c: 17: Unable to find include file 'XSUB.h'.
184 then edit the file "Makefile.PL" and add a line similar to the
185 following so that it points to your Perl 5 distribution tree:
187 'INC' => '-I/usr/ctr/dlt/private/perl/perl5.003',
189 Then start over with the generation of the "Makefile" at 2).
191 4) Now issue "make test" (or "dmake test" or "nmake test", respectively).
193 The output should look somewhat like this:
195 PERL_DL_NONLAZY=1 /sw/bin/perl -Iblib/arch
196 -Iblib/lib -I/sw/pkg/perl/lib/5.00503/i386-freebsd
197 -I/sw/pkg/perl/lib/5.00503 -e 'use Test::Harness
198 qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
199 t/00____version.....ok
200 t/01________new.....ok
201 t/02____destroy.....ok
202 t/03_operations.....ok
203 t/04__functions.....ok
204 t/05_____primes.....ok
205 t/06_____subset.....ok
206 t/07____compare.....ok
207 t/08_____resize.....ok
208 t/09_parameters.....ok
209 t/10__intervals.....ok
210 t/11______shift.....ok
211 t/12_____string.....ok
212 t/13__increment.....ok
213 t/14______empty.....ok
214 t/15________add.....ok
215 t/16___subtract.....ok
216 t/17________gcd.....ok
217 t/28__chunklist.....ok
218 t/30_overloaded.....ok
219 t/40__auxiliary.....ok
220 All tests successful.
221 Files=21, Tests=68151, 29 wallclock secs
222 (19.75 cusr + 0.73 csys = 20.48 CPU)
224 (Note that the exact number of tests will depend on the number of bits
225 of a machine word/an unsigned long on your system!)
227 5) At last, type "make install" (or "dmake install", "nmake install").
229 6) Now you can run the "primes.pl" demo program from the "examples" sub-
230 directory, for instance. Start it with "perl examples/primes.pl" (or
231 whatever the name and path of your Perl 5 binary is).
233 It will ask you to enter a number which will serve as an upper limit for
234 the calculation of all prime numbers up to that limit, using the algorithm
235 known as "The Sieve of Erathostenes".
237 On my machine (SUN SPARCstation 20/61), calculating all the prime numbers
238 up to one million takes about 1 minute 30 seconds to 2 minutes (depending
239 on the load) when the algorithm is programmed in Perl. If the internal
240 method "Primes()" is used instead (implemented in C), the same machine
241 only takes about 1 second for this task.