X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=bindings%2Fperl-shared%2FMakefile.PL;h=75834ecbeabaab8358bf87bd07d2223d3fa73994;hb=6d3241b67db4ecf44be1611d49badea07d74feac;hp=1701ded92832acf39530725f1d3635f1698eb600;hpb=d13a11d9abb791a0755bddb8a74ed36be59a82ad;p=rrdtool.git diff --git a/bindings/perl-shared/Makefile.PL b/bindings/perl-shared/Makefile.PL index 1701ded..75834ec 100644 --- a/bindings/perl-shared/Makefile.PL +++ b/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',