From: gregor herrmann Date: Fri, 30 Sep 2011 11:40:27 +0000 (+0200) Subject: Pass CFLAGS also to perl_build. X-Git-Tag: 8.9.9~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a39dc4abe1b642c999dfff7029d991717d62a3c1;hp=3805701ed61c4712ac74f9c70ec021f2adf10b45;p=debhelper.git Pass CFLAGS also to perl_build. Closes: 497653 --- diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm index deb9a37..724e1e0 100644 --- a/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/Debian/Debhelper/Buildsystem/perl_build.pm @@ -7,6 +7,7 @@ package Debian::Debhelper::Buildsystem::perl_build; use strict; +use Debian::Debhelper::Dh_Lib qw(compat); use base 'Debian::Debhelper::Buildsystem'; sub DESCRIPTION { @@ -38,8 +39,12 @@ sub new { 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}"; + } + $this->do_perl("Build.PL", "installdirs=vendor", @flags, @_); } sub build {