Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 77 lines (58 sloc) 3.145 kB
aa3b8dd @leto Initial commit of Math::GMPz 0.26
authored
1 This module wraps all of the 'mpz' (integer) functions that
bfcb85c @leto Upgrade to 0.28
authored
2 the Gnu MP (GMP) library provides. Requires gmp-4.2.0 or later.
aa3b8dd @leto Initial commit of Math::GMPz 0.26
authored
3
4 You therefore need the GMP library installed on your computer. See:
5 http://gmplib.org/
6
7 To build this module you need perl 5.6.0 or later. I'm not sure of all
8 the requirements to get it to build with earlier versions of perl, but
9 it's definite that the XS code relating to operator overloading will
10 not compile with perl versions prior to 5.6.
11
12 No OO interface - just plain access to GMP's integer functions.
13
14 Build in the usual way:
15
16 perl Makefile.PL
17 make
18 make test
19 make install
20
21 When building this module, the GMP library will need to be accessible.
22 If it's not in a location where your compiler finds it by default,
23 then instead of running 'perl Makefile.PL', you'll need to run:
24
ee258b6 added a section about how to install on Mac OS X
Bob Kuo authored
25 perl Makefile.PL INC="-I/path/to/gmp_include" LIBS="-L/path/to/gmp_lib -lgmp"
aa3b8dd @leto Initial commit of Math::GMPz 0.26
authored
26
27 ==============
28 64-bit support
29 ==============
30
31 If your perl's Config reports that 'use64bitint' is defined, or that
32 'use64bitall' is defined, or that 'usemorebits' is defined, or that
33 'ivsize' is 8, then Math::GMPz will, by default, be built to enable
34 you to use the 64-bit long long int values with the new() function
35 and the overloaded operators. Else attempts to use long long int
36 values with Math::GMPz will probably fail. If necessary, you can
37 override the default by opening up the Makefile.PL and uncommenting
38 the appropriate line (just a few lines down from the top of the file
39 ... the comments in that file should make it clear).
40
41 Similarly, if your perl's Config reports that 'uselongdouble' is
42 defined, or that 'usemorebits' is defined, or that 'dblsize' > 8,
43 then Math::GMPz will, by default, be built to enable you to use the
44 long double values with the new() function and the overloaded
45 operators. Else, attempts to use long doubles will probably fail.
46 If you need, you can override the default by opening up the
47 Makefile.PL and uncommenting the appropriate line (just a few lines
48 down from the top of the file ... the comments in that file should
49 make it clear).
50
51 I believe it to be both unnecessary and inadvisable to override the
52 default - but if you do find that you need to override the default,
53 please let me know. That you have found it necessary to override the
54 default is something I probably ought to know about.
55
56 I am contactable by email at sisyphus at(@) cpan dot (.) org.
57
58 ==========
ee258b6 added a section about how to install on Mac OS X
Bob Kuo authored
59 MAC OS X
60 ==========
61
62 If you have MacPorts installed, you may need to install gmp +universal
63 for the bindings to work. After installing you'll need to run:
64
65 perl Makefile.PL INC="-I/opt/local/include" LIBS="-L/opt/local/lib -lgmp"
66
67 ==========
aa3b8dd @leto Initial commit of Math::GMPz 0.26
authored
68 MS WINDOWS
69 ==========
70 If building with an MSVC++ compiler against a MinGW-built gmp lib, you'll
71 need to additionally link to MinGW's libgcc.a and libcoldname.a. First,
72 create copies of the 3 '.a' files (named libgmp.lib, libgcc.lib, and
73 libcoldname.lib) and then run:
74
bfcb85c @leto Upgrade to 0.28
authored
75 perl Makefile.PL INC="-IC:/path/to/gmp_include" LIBS="-LC:/path/to/gcc_lib -lgcc -LC:/path/to/coldname_lib -lcoldname -LC:/path/to/gmp_lib -lgmp"
aa3b8dd @leto Initial commit of Math::GMPz 0.26
authored
76
Something went wrong with that request. Please try again.