use ExtUtils::MakeMaker;
use Config;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.

# Specify the location of the archive containing PIC compiled object files.
my $librrd = "-L../src/.libs/ @RRD_PRIVATE_LINK@"  ;

WriteMakefile(
    'NAME'         => 'RRDs',
    'VERSION_FROM' => '@top_srcdir@/perl-shared/RRDs.pm', # finds $VERSION
    'DEFINE'	   => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}",
    'INC'          => '-I@top_srcdir@ -I@top_srcdir@/src -I@top_srcdir@/gd1.3',
    'CCFLAGS'      => "$Config{ccflags} -DHAVE_CONFIG_H",
    # where to look for the necessary libraries 
    # Perl will figure out which one is valid
    'depend'	   => {'RRDs.c' => "@top_srcdir@/src/.libs/librrd_private.a"},
    'dynamic_lib'  => {'OTHERLDFLAGS' => "$librrd -lm"},
    'realclean'    => {FILES => 't/demo?.rrd t/demo?.gif' }
);
