X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=program%2Fbindings%2Fperl-shared%2FMakefile.PL;h=75834ecbeabaab8358bf87bd07d2223d3fa73994;hb=9ef95c7990129e90f3144a4904227481b6d9096b;hp=4fb14e56d82c36064b2837820398ad230e976470;hpb=fc8f2e02da5a53e08798f2f57c8405d6b436f45f;p=rrdtool-all.git diff --git a/program/bindings/perl-shared/Makefile.PL b/program/bindings/perl-shared/Makefile.PL index 4fb14e56..75834ecb 100644 --- a/program/bindings/perl-shared/Makefile.PL +++ b/program/bindings/perl-shared/Makefile.PL @@ -4,8 +4,21 @@ use Config; # the contents of the Makefile that is written. # Specify the location of the archive containing PIC compiled object files. -my $R = $^O eq 'linux' ? "-Wl,--rpath -Wl," : "-R" ; -my $librrd = "-L../../src/.libs/ $R\$(RPATH) -lrrd"; +my $R = ""; + + +for ($^O){ + /linux/ && do{ $R = "-Wl,--rpath -Wl,\$(RPATH)"}; + /hpux/ && do{ $R = "+b\$(RPATH)"}; + /solaris/ && do{ $R = "-R\$(RPATH)"}; +} + +# darwin works without this because librrd contains its +# install_name which will includes the final location of the +# library after it is installed. This install_name gets transfered +# to the perl shared object. + +my $librrd = "-L../../src/.libs/ $R -lrrd"; WriteMakefile( 'NAME' => 'RRDs',