Alien::GMP - Alien package for the GNU Multiple Precision library.
In your Build.PL:
use Module::Build; use Alien::GMP; my $builder = Module::Build->new( ... configure_requires => { 'Alien::GMP' => '0', ... }, extra_compiler_flags => Alien::GMP->cflags, extra_linker_flags => Alien::GMP->libs, ... ); $build->create_build_script;
In your Makefile.PL:
use ExtUtils::MakeMaker; use Config; use Alien::GMP; WriteMakefile( ... CONFIGURE_REQUIRES => { 'Alien::GMP' => '0', }, CCFLAGS => Alien::GMP->cflags . " $Config{ccflags}", LIBS => [ Alien::GMP->libs ], ... );
This distribution installs GMP so that it can be used by other Perl distributions. If already installed for your operating system, and it can be found, this distribution will use the GMP that comes with your operating system, otherwise it will download it from the Internet, build and install it for you.
This Alien will provide the C++ bindings for GMP (libgmpxx) if possible. If you do not have a C++ compiler, or if your operating system vendor provides a GMP package without the needed C++ files then it will not be available. To use the C++ bindings, you can use the alt method to create a C++ instance of this GMP Alien. For example:
alt
use ExtUtils::MakeMaker; use Config; use Alien::GMP; WriteMakefile( ... CONFIGURE_REQUIRES => { 'Alien::GMP' => '0', }, CCFLAGS => Alien::GMP->alt('gmpxx')->cflags . " $Config{ccflags}", LIBS => [ Alien::GMP->alt('gmpxx')->libs ], ... );
This module supports Inline's with functionality.
GMP
Richard Simões <rsimoes AT cpan DOT org>
<rsimoes AT cpan DOT org>
Copyright © 2012 Richard Simões. This module is released under the terms of the GNU Lesser General Public License ("LGPL") v. 3.0 and may be modified and/or redistributed under the same or any compatible license. The GNU Multiple Precision library itself is copyrighted by the Free Software Foundation and is also distributed under terms of the LGPL v. 3.0.
To install Alien::GMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alien::GMP
CPAN shell
perl -MCPAN -e shell install Alien::GMP
For more information on module installation, please visit the detailed CPAN module installation guide.