From f1352f994e3b5820f9fbad4f950d8598b6d578e7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 28 May 2005 12:52:26 +0000 Subject: [PATCH] make the bindings work on os x git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@600 a5681a0c-68f1-0310-ab6d-d61299d08faa --- bindings/perl-shared/Makefile.PL | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bindings/perl-shared/Makefile.PL b/bindings/perl-shared/Makefile.PL index e0a4614..75834ec 100644 --- a/bindings/perl-shared/Makefile.PL +++ b/bindings/perl-shared/Makefile.PL @@ -4,14 +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 = "-R" ; +my $R = ""; + for ($^O){ - /linux/ && do{ $R = "-Wl,--rpath -Wl,"}; - /hpux/ && do{ $R = "+b"}; + /linux/ && do{ $R = "-Wl,--rpath -Wl,\$(RPATH)"}; + /hpux/ && do{ $R = "+b\$(RPATH)"}; + /solaris/ && do{ $R = "-R\$(RPATH)"}; } -my $librrd = "-L../../src/.libs/ $R\$(RPATH) -lrrd"; +# 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', -- 2.11.0