xref: /netbsd-src/external/lgpl3/gmp/dist/demos/perl/INSTALL (revision 7788a0781fe6ff2cce37368b4578a7ade0850cb1)
1Copyright 2001, 2003, 2004 Free Software Foundation, Inc.
2
3This file is part of the GNU MP Library.
4
5The GNU MP Library is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 3 of the License, or (at your
8option) any later version.
9
10The GNU MP Library is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
13License for more details.
14
15You should have received a copy of the GNU Lesser General Public License
16along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
17
18
19
20
21
22                  GMP PERL MODULE INSTALLATION
23
24
25This module can be compiled within the GMP source directory or moved
26elsewhere and compiled.  An installed GMP can be used, or a specified
27GMP build tree.  Both static and shared GMP builds will work.
28
29The simplest case is when GMP has been installed to a standard system
30location
31
32	perl Makefile.PL
33	make
34
35If not yet installed then the top-level GMP build directory must be
36specified
37
38	perl Makefile.PL GMP_BUILDDIR=/my/gmp/build
39	make
40
41In any case, with the module built, the sample program provided can be
42run
43
44	perl -Iblib/arch sample.pl
45
46If you built a shared version of libgmp but haven't yet installed it,
47then it might be necessary to add a run-time path to it.  For example
48
49	LD_LIBRARY_PATH=/my/gmp/build/.libs perl -Iblib/arch sample.pl
50
51Documentation is provided in pod format in GMP.pm, and will have been
52"man"-ified in the module build
53
54	man -l blib/man3/GMP.3pm
55or
56	man -M`pwd`/blib GMP
57
58A test script is provided, running a large number of more or less
59trivial checks
60
61	make test
62
63The module and its documentation can be installed in the usual way
64
65	make install
66
67This will be into /usr/local or wherever the perl Config module
68directs, but that can be controlled back at the Makefile.PL stage with
69the usual ExtUtils::MakeMaker options.
70
71Once installed, programs using the GMP module become simply
72
73	perl sample.pl
74
75And the documentation read directly too
76
77	man GMP
78