You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by st...@apache.org on 2003/07/18 20:36:05 UTC

cvs commit: httpd-apreq-2 Makefile.PL

stas        2003/07/18 11:36:05

  Added:       .        Makefile.PL
  Log:
  start working on the top-level Makefile.PL to make the httpd-apreq-2
  disto buildable via CPAN
  
  Revision  Changes    Path
  1.1                  httpd-apreq-2/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  require 5.006;
  
  use strict;
  use warnings;
  
  use Getopt::Long qw(GetOptions);
  use Config;
  
  use constant PERL_PATH => $Config{perlpath}; # XXX
  
  my @opts = qw(with-apache2-apxs with-perl);
  
  my %opts;
  
  # grab from @ARGV only the options that we expect
  GetOptions(\%opts, (map "$_=s", @opts));
  
  $opts{"with-perl"} = PERL_PATH;
  
  my $opts = join " ", map {"--$_=$opts{$_}"} @opts;
  
  qx{./configure $opts};
  
  push @ARGV, ('-apxs', $opts{"with-apache2-apxs"}) 
      if exists $opts{"with-apache2-apxs"};
  
  qx{cd "glue/perl" && $perl Makefile.PL @ARGV};