Subject: | Improved ext. libraries detection |
Hi,
please find enclosed patch enhancing ext. lib. detection logic.
The patch is focused mostly on strawberryperl users but could be handy also for other platforms.
--
kmx
please find enclosed patch enhancing ext. lib. detection logic.
The patch is focused mostly on strawberryperl users but could be handy also for other platforms.
--
kmx
Subject: | PDL-2.4.8.diff |
diff -ru PDL-2.4.8.orig\Graphics\PLplot\Makefile.PL PDL-2.4.8\Graphics\PLplot\Makefile.PL
--- PDL-2.4.8.orig\Graphics\PLplot\Makefile.PL Tue Mar 22 02:40:18 2011
+++ PDL-2.4.8\Graphics\PLplot\Makefile.PL Mon Apr 18 23:00:17 2011
@@ -69,6 +69,7 @@
'/opt/lib',
'/ops/tools/lib',
'/sw/lib/', # default FINK installation
+ split(/ /, $Config{libpth}),
$PDL::Config{WHERE_PLPLOT_LIBS},
# Add new library paths here!!
) {
@@ -103,6 +104,7 @@
'/ops/tools/include/plplot',
'/ops/tools/include',
'/sw/include/plplot/', # default FINK installation
+ $Config{usrinc}.'/plplot',
$PDL::Config{WHERE_PLPLOT_INCLUDE},
# Add new header paths here!!
) {
diff -ru PDL-2.4.8.orig\IO\GD\Makefile.PL PDL-2.4.8\IO\GD\Makefile.PL
--- PDL-2.4.8.orig\IO\GD\Makefile.PL Fri Mar 18 17:16:31 2011
+++ PDL-2.4.8\IO\GD\Makefile.PL Tue Apr 19 00:22:02 2011
@@ -6,6 +6,7 @@
#
use ExtUtils::MakeMaker;
+use Config;
PDL::Core::Dev->import();
BEGIN
@@ -26,10 +27,12 @@
'/usr/lib',
'/usr/local/lib',
'/lib',
+ split(/ /, $Config{libpth}),
);
@inc_locations = (
'/usr/include',
'/usr/local/include',
+ $Config{usrinc},
);
#
diff -ru PDL-2.4.8.orig\IO\HDF\Makefile.PL PDL-2.4.8\IO\HDF\Makefile.PL
--- PDL-2.4.8.orig\IO\HDF\Makefile.PL Wed Mar 23 02:28:33 2011
+++ PDL-2.4.8\IO\HDF\Makefile.PL Mon Apr 18 23:55:07 2011
@@ -35,7 +35,8 @@
'/opt/local/lib',
'/usr/lib',
'/usr/lib/hdf',
- '/opt/lib'
+ '/opt/lib',
+ split(/ /, $Config{libpth}),
);
@HDF_inc_locations = (
'/usr/local/include',
@@ -43,7 +44,8 @@
'/opt/local/include',
'/usr/include',
'/usr/include/hdf',
- '/opt/include'
+ '/opt/include',
+ $Config{usrinc},
);
# get locations from perldl.conf, if specified there:
diff -ru PDL-2.4.8.orig\Lib\FFTW\Makefile.PL PDL-2.4.8\Lib\FFTW\Makefile.PL
--- PDL-2.4.8.orig\Lib\FFTW\Makefile.PL Sat Jul 24 20:39:28 2010
+++ PDL-2.4.8\Lib\FFTW\Makefile.PL Tue Apr 19 00:24:13 2011
@@ -2,6 +2,7 @@
# Makefile.PL for a package defined by PP code.
use ExtUtils::MakeMaker;
+use Config;
PDL::Core::Dev->import();
@@ -33,8 +34,8 @@
# Look for FFTW includes/libs
# default locations:
- @FFTW_inc_locations = ('/usr/local/include');
- @FFTW_lib_locations = ('/lib','/usr/lib','/usr/local/lib');
+ @FFTW_inc_locations = ('/usr/local/include', $Config{usrinc});
+ @FFTW_lib_locations = ('/lib','/usr/lib','/usr/local/lib',split(/ /, $Config{libpth}));
# get locations from perldl.conf, if specified there:
@FFTW_inc_locations = @{$PDL::Config{FFTW_INC}} if( defined $PDL::Config{FFTW_INC} );
diff -ru PDL-2.4.8.orig\Lib\GIS\Proj\Makefile.PL PDL-2.4.8\Lib\GIS\Proj\Makefile.PL
--- PDL-2.4.8.orig\Lib\GIS\Proj\Makefile.PL Fri Mar 25 01:04:51 2011
+++ PDL-2.4.8\Lib\GIS\Proj\Makefile.PL Tue Apr 19 00:24:38 2011
@@ -6,6 +6,7 @@
#
use ExtUtils::MakeMaker;
+use Config;
PDL::Core::Dev->import();
use lib '../../../inc';
@@ -27,11 +28,13 @@
'/lib64',
'/usr/lib',
'/usr/local/lib',
- '/lib'
+ '/lib',
+ split(/ /, $Config{libpth}),
);
@inc_locations = (
'/usr/include',
- '/usr/local/include'
+ '/usr/local/include',
+ $Config{usrinc},
);
#
diff -ru PDL-2.4.8.orig\Lib\Transform\Proj4\Makefile.PL PDL-2.4.8\Lib\Transform\Proj4\Makefile.PL
--- PDL-2.4.8.orig\Lib\Transform\Proj4\Makefile.PL Fri Mar 25 01:04:56 2011
+++ PDL-2.4.8\Lib\Transform\Proj4\Makefile.PL Tue Apr 19 00:27:00 2011
@@ -27,11 +27,13 @@
'/lib64',
'/usr/lib',
'/usr/local/lib',
- '/lib'
+ '/lib',
+ split(/ /, $Config{libpth}),
);
@inc_locations = (
'/usr/include',
- '/usr/local/include'
+ '/usr/local/include',
+ $Config{usrinc},
);
#