# library after it is installed. This install_name gets transfered
# to the perl shared object.
-my $librrd = "-L../../src/.libs/ $R -lrrd";
+my $librrd;
+if ($^O eq 'darwin'){
+ $librrd = '-lrrd';
+}
+else {
+ $librrd = "-L../../src/.libs/ $R -lrrd";
+}
WriteMakefile(
'NAME' => 'RRDs',
#'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"},
'depend' => {'RRDs.c' => "../../src/librrd.la"},
'LDFROM' => '$(OBJECT) '.$librrd,
- 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }
+ 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' },
+ ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : ()
);