Subject: | Makefile.PL fails when gmp library location not found by default. |
Hi,
On my Win32 box, my gmp library is installed in a location where it's
not found by default. In such situations, I expect the following to
work:
perl Makefile.PL INC="-I/path/to/gmp_header" LIBS="-
L/path/to/gmp_library -lgmp"
But that will (with Math-GMP-2.05) only work if I apply the attached
patch to the Makefile.PL. (Actually, the *minimum* change required to
render that command workable is to simply remove the "unlink $output->
{MAKEFILE} if $makefile;" from the Makefile.PL.)
Cheers,
Rob
Subject: | makefile_pl.diff |
--- Makefile.PL_orig Sun May 24 21:16:15 2009
+++ Makefile.PL Sun May 24 21:15:52 2009
@@ -11,29 +11,3 @@
'LIBS' => ['-lgmp'],
'NO_META' => 1,
);
-
-if (!exists $output->{EXTRALIBS} or $output->{EXTRALIBS} !~ /lgmp/) {
-
- my $makefile = exists $output->{MAKEFILE}
- ? "\nRemoving ($output->{MAKEFILE})\n" : '';
-
- warn qq{
-==========================================================
-
-WARNING! No GMP libraries were detected!
-
-Please see the INSTALL file.
-
-===========================================================
-
-};
-
- ## Do not let make proceed
- unlink $output->{MAKEFILE} if $makefile;
-
- exit 1;
-}
-
-exit 0;
-
-# end of Makefile.PL