perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/lib/Apache Build.pm
Date Mon, 05 Apr 2004 21:43:47 GMT
stas        2004/04/05 14:43:47

  Modified:    lib/Apache Build.pm
  Log:
  remove duplicated C flags from ccopts
  
  Revision  Changes    Path
  1.159     +14 -0     modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -u -r1.158 -r1.159
  --- Build.pm	5 Apr 2004 04:38:29 -0000	1.158
  +++ Build.pm	5 Apr 2004 21:43:47 -0000	1.159
  @@ -439,11 +439,25 @@
       $$cflags .= " -Ae ";
   }
   
  +# XXX: there could be more, but this is just for cosmetics
  +my %cflags_dups = map { $_ => 1 } qw(-D_GNU_SOURCE -D_REENTRANT);
   sub ccopts {
       my($self) = @_;
   
       my $cflags = $self->perl_ccopts . ExtUtils::Embed::perl_inc() .
                    $self->ap_ccopts;
  +
  +    # remove duplicates of certain cflags coming from perl and ap/apr
  +    my @cflags = ();
  +    my %dups    = ();
  +    for (split /\s+/, $cflags) {
  +        if ($cflags_dups{$_}) {
  +            next if $dups{$_};
  +            $dups{$_}++;
  +        }
  +        push @cflags, $_;
  +    }
  +    $cflags = "@cflags";
   
       $cflags;
   }
  
  
  

Mime
View raw message