summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm23
1 files changed, 17 insertions, 6 deletions
diff --git a/Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm b/Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
index c76489bfd06..4392b7f5dbb 100644
--- a/Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
+++ b/Master/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
@@ -6,13 +6,11 @@ use File::Basename;
use Cwd ();
use Config;
use Text::ParseWords;
-use IO::File;
-use Data::Dumper;$Data::Dumper::Indent=1;
use IPC::Cmd qw(can_run);
use File::Temp qw(tempfile);
use vars qw($VERSION);
-$VERSION = '0.280209';
+$VERSION = '0.280217';
# More details about C/C++ compilers:
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
@@ -224,10 +222,23 @@ sub have_cplusplus {
}
sub lib_file {
- my ($self, $dl_file) = @_;
+ my ($self, $dl_file, %args) = @_;
$dl_file =~ s/\.[^.]+$//;
$dl_file =~ tr/"//d;
- return "$dl_file.$self->{config}{dlext}";
+
+ if (defined $args{module_name} and length $args{module_name}) {
+ # Need to create with the same name as DynaLoader will load with.
+ require DynaLoader;
+ if (defined &DynaLoader::mod2fname) {
+ my $lib = DynaLoader::mod2fname([split /::/, $args{module_name}]);
+ my ($dev, $lib_dir, undef) = File::Spec->splitpath($dl_file);
+ $dl_file = File::Spec->catpath($dev, $lib_dir, $lib);
+ }
+ }
+
+ $dl_file .= ".$self->{config}{dlext}";
+
+ return $dl_file;
}
@@ -289,7 +300,7 @@ sub _do_link {
my $objects = delete $args{objects};
$objects = [$objects] unless ref $objects;
- my $out = $args{$type} || $self->$type($objects->[0]);
+ my $out = $args{$type} || $self->$type($objects->[0], %args);
my @temp_files;
@temp_files =