Permalink
Browse files

Add some reasonable guesses to PKG_CONFIG_PATH in hopes of making it …

…easier to install Math::GSL
  • Loading branch information...
1 parent 288d7b5 commit 36e1be616e4249d1b2e565e030e91c0adc21aa88 @leto committed Mar 11, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 Build.PL
View
@@ -150,6 +150,9 @@ if (defined $gv) {
close $fh or die "Could not close $path_system : $!";
+modify_env();
+
+print "Asking ExtUtils::PkgConfig with ENV{PKG_CONFIG_PATH}=" . ($ENV{PKG_CONFIG_PATH} || '') . "\n";
my %gsl_pkgcfg = ExtUtils::PkgConfig->find ('gsl');
my $pkgcfg_ver = $gsl_pkgcfg{'modversion'};
@@ -272,3 +275,8 @@ sub swig_version {
die "Can't parse SWIG version from this output:\n$out";
}
}
+
+sub modify_env {
+ $ENV{PKG_CONFIG_PATH} ||= '';
+ $ENV{PKG_CONFIG_PATH} = '/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/pkgconfig:/usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig:' . $ENV{PKG_CONFIG_PATH};
+}

0 comments on commit 36e1be6

Please sign in to comment.