1 use ExtUtils::MakeMaker;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
6 # if the last argument when calling Makefile.PL is RPATH=/... and ... is the
7 # path to librrd.so then the Makefile will be written such that RRDs.so knows
8 # where to find librrd.so later on ...
10 if ($ARGV[-1] =~ /RPATH=(\S+)/){
14 /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"};
15 /hpux/ && do{ $R = "+b$rp"};
16 /solaris/ && do{ $R = "-R$rp"};
20 # darwin works without this because librrd contains its
21 # install_name which will includes the final location of the
22 # library after it is installed. This install_name gets transfered
23 # to the perl shared object.
25 my $librrd = "-L../../src/.libs/ $R -lrrd";
29 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION
30 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}",
31 'INC' => '-I../../src',
32 # Perl will figure out which one is valid
33 'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"},
34 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }