package Debian::Debhelper::Buildsystem::perl_build;
use strict;
+use Debian::Debhelper::Dh_Lib qw(compat);
use base 'Debian::Debhelper::Buildsystem';
+use Config;
sub DESCRIPTION {
"Perl Module::Build (Build.PL)"
sub do_perl {
my $this=shift;
- $ENV{MODULEBUILDRC} = "/dev/null";
$this->doit_in_sourcedir("perl", @_);
}
sub configure {
my $this=shift;
+ my @flags;
$ENV{PERL_MM_USE_DEFAULT}=1;
- $this->do_perl("Build.PL", "installdirs=vendor", @_);
+ if ($ENV{CFLAGS} && ! compat(8)) {
+ push @flags, "config=optimize=$ENV{CFLAGS} $ENV{CPPFLAGS}";
+ }
+ if ($ENV{LDFLAGS} && ! compat(8)) {
+ push @flags, "config=ld=$Config{ld} $ENV{LDFLAGS}";
+ }
+ $this->do_perl("Build.PL", "installdirs=vendor", @flags, @_);
}
sub build {