Skip to content

Commit

Permalink
improved plplot detection (cygwin related)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmx committed Feb 4, 2015
1 parent f5a1be8 commit bf00558
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Graphics/PLplot/Makefile.PL
Expand Up @@ -40,7 +40,6 @@ unlink ("OPTIONS!"); # remove file used to communicate with plplot.pd
# use $Config{"so"} to get the extension name
#
my $libname = "libplplotd." . $Config{"so"};
my $libname_static = "libplplotd.a";
my $incname = "plplot.h";
my $devnull = File::Spec->devnull(); # Portable null device.

Expand Down Expand Up @@ -77,14 +76,20 @@ foreach my $libdir (
# Add new library paths here!!
) {

next unless $libdir;
if (-e "$libdir/$libname") {
$plplot_lib_path = $libdir;
$ENV{LD_LIBRARY_PATH} .= ":$libdir";
last;
} elsif (-e "$libdir/$libname_static") {
} elsif (-e "$libdir/libplplotd.a") {
$plplot_lib_path = $libdir;
$ENV{LD_LIBRARY_PATH} .= ":$libdir";
$libname = $libname_static;
$libname = 'libplplotd.a';
last;
} elsif (-e "$libdir/libplplotd.dll.a") {
$plplot_lib_path = $libdir;
$ENV{LD_LIBRARY_PATH} .= ":$libdir";
$libname = 'libplplotd.dll.a';
last;
}

Expand Down

0 comments on commit bf00558

Please sign in to comment.