X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=bindings%2Fperl-shared%2FMakefile.PL;h=75834ecbeabaab8358bf87bd07d2223d3fa73994;hb=09c461fdc5a65f621827c0cb156f7d8dde87cc95;hp=2b59fdb0eccab426679915fd5e4a5f1148e2e5f4;hpb=b837c0527f117b54845242ee7626df6d88394444;p=rrdtool.git diff --git a/bindings/perl-shared/Makefile.PL b/bindings/perl-shared/Makefile.PL index 2b59fdb..75834ec 100644 --- a/bindings/perl-shared/Makefile.PL +++ b/bindings/perl-shared/Makefile.PL @@ -4,16 +4,28 @@ use Config; # the contents of the Makefile that is written. # Specify the location of the archive containing PIC compiled object files. -my $librrd = "-L../../src/.libs/ -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', 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", - 'INC' => '-I../../src -I../../libraries/gd1.3', - # where to look for the necessary libraries + 'INC' => '-I../../src', # Perl will figure out which one is valid - 'depend' => {'RRDs.c' => "../../src/.libs/librrd_private.a"}, 'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' } );