~ubuntu-branches/ubuntu/feisty/libapache2-mod-perl2/feisty-security

« back to all changes in this revision

Viewing changes to xs/APR/APR/Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2004-08-19 06:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040819062348-jxl4koqbtvgm8v2t
Tags: 1.99.14-4
Remove the LFS CFLAGS, and build-dep against apache2-*-dev (>= 2.0.50-10)
as we're backing out of the apache2/apr ABI transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
use Apache::Build ();
7
7
use Config;
8
8
 
9
 
use constant WIN32 => Apache::Build::WIN32;
 
9
use constant WIN32   => Apache::Build::WIN32;
 
10
use constant SOLARIS => $^O eq 'solaris';
 
11
 
 
12
my %args = (
 
13
    'NAME'         => 'APR',
 
14
    'VERSION_FROM' => 'APR.pm',
 
15
);
10
16
 
11
17
my $libs = '';
12
 
if (my $apr_bindir = ModPerl::BuildMM::build_config()->apr_bindir()) {
 
18
my $build = ModPerl::BuildMM::build_config();
 
19
 
 
20
if (my $apr_bindir = $build->apr_bindir()) {
13
21
 
14
22
    # XXX: this works only with libapr 0.9.2+
15
23
    my $ext = WIN32 ? '.bat' : '';
24
32
    $libs =~ s{(\w+)\.lib}{-l$1}g;
25
33
}
26
34
 
27
 
ModPerl::BuildMM::WriteMakefile(
28
 
    'NAME'         => 'APR',
29
 
    'VERSION_FROM' => 'APR.pm',
30
 
    'LIBS'         => [$libs],
31
 
);
 
35
if (SOLARIS && $libs) {
 
36
    # EU::MM sets LD_RUN_PATH (for linking) based on -L options in LIBS.
 
37
    # LD_RUN_PATH is getting overridden by the specified -R path.
 
38
    # The -R specified is from the perl config's lddflags.
 
39
    # Therefore -R has to be added with the appropriate paths rather
 
40
    # than using LD_RUN_PATH, because it gets overridden.
 
41
 
 
42
    # make sure that all -L, -R from libs are moved
 
43
    # to the beginning of lddflags.
 
44
    my $extralddflags = join " ", $libs =~ /(-[LR]\S+)/g;
 
45
 
 
46
    # -R makes sure that these paths will be used
 
47
    $extralddflags =~ s{-L(\S+)}{-L$1 -R$1}g;
 
48
    $args{LDDLFLAGS} = $extralddflags . " " . $build->perl_config('lddlflags');
 
49
 
 
50
    # -R are now copied to LDDFLAGS, but leave -L's in LIBS --
 
51
    # EU::MM needs it.
 
52
    $libs =~ s{-R\S+}{}g;
 
53
}
 
54
 
 
55
$args{LIBS} = [$libs] if $libs;
 
56
 
 
57
ModPerl::BuildMM::WriteMakefile(%args);