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/xs/APR/APR Makefile.PL
Date Mon, 28 Jul 2003 17:32:35 GMT
stas        2003/07/28 10:32:34

  Modified:    .        Makefile.PL Changes
               xs/APR/APR Makefile.PL
  Log:
  move the definition of DEFINE='-DMP_HAVE_APR_LIBS' to the top level
  Makefile.PL, since it overrides MY::pasthru target which makes it
  impossible to define local DEFINE in subdirs.
  
  Revision  Changes    Path
  1.107     +21 -0     modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- Makefile.PL	18 Jun 2003 08:55:56 -0000	1.106
  +++ Makefile.PL	28 Jul 2003 17:32:33 -0000	1.107
  @@ -74,6 +74,7 @@
       NAME      => 'mod_perl',
       VERSION   => $VERSION,
       EXE_FILES => \@exe_files,
  +    DEFINE    => get_DEFINE(),
       macro     => {
           MODPERL_SRC        => $code->path,
           MODPERL_MAKEFILE   => basename($build->default_file('makefile')),
  @@ -94,6 +95,26 @@
   );
   
   post_configure();
  +
  +sub get_DEFINE {
  +
  +    # do we have apr libs?
  +    # XXX: this define is really needed in xs/APR/APR/Makefile.PL, but this 
  +    # top-level Makefile.PL overrides MY::pasthru, and defines DEFINE= which
  +    # overrides any local definition, not sure what's the right fix, for
  +    # now just define it here
  +    my $bin_prefix = $build->apxs(-q => 'PREFIX');
  +    my @apr_libs = grep $_, map { -x $_ && qx{$_ --link-ld} }
  +        map { qq{$bin_prefix/bin/$_-config} } qw(apr apu);
  +    my $opt_define = @apr_libs ? '-DMP_HAVE_APR_LIBS' : '';
  +
  +    # preserve any DEFINE opts from outside and combine them with our
  +    # local DEFINE
  +    @ARGV = grep defined,
  +        map { (/^DEFINE=(.*)/ && ($opt_define .= " $1")) ? undef : $_ } @ARGV;
  +
  +    return $opt_define;
  +}
   
   sub configure {
       set_modperl_version();
  
  
  
  1.199     +4 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.198
  retrieving revision 1.199
  diff -u -r1.198 -r1.199
  --- Changes	28 Jul 2003 13:38:07 -0000	1.198
  +++ Changes	28 Jul 2003 17:32:33 -0000	1.199
  @@ -12,6 +12,10 @@
   
   =item 1.99_10-dev
   
  +move the definition of DEFINE='-DMP_HAVE_APR_LIBS' to the top level
  +Makefile.PL, since it overrides MY::pasthru target which makes it
  +impossible to define local DEFINE in subdirs. [Stas]
  +
   make APR perl functions work outside mod_perl: several libraries
   weren't linked. Also LIBS needs to receive all libs in one
   string. [Stas]
  
  
  
  1.10      +0 -3      modperl-2.0/xs/APR/APR/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.PL	28 Jul 2003 13:38:05 -0000	1.9
  +++ Makefile.PL	28 Jul 2003 17:32:34 -0000	1.10
  @@ -9,11 +9,8 @@
       map { qq{$prefix/bin/$_-config} } qw(apr apu);
   chomp @libs;
   
  -my $define = @libs ? '-DMP_HAVE_APR_LIBS' : '';
  -
   ModPerl::BuildMM::WriteMakefile(
       'NAME'	   => 'APR',
       'VERSION_FROM' => 'APR.pm',
       'LIBS'         => [join ' ', @libs],
  -    'DEFINE'       => $define,
   );
  
  
  

Mime
View raw message