summaryrefslogtreecommitdiff
path: root/www/ap2-perl/patches/patch-aa
blob: 3ac748331b369a094f0b4e57d79c6d9fc6b1d0b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-aa,v 1.1 2003/06/03 19:17:20 epg Exp $

--- lib/Apache/Build.pm.orig	Fri Jan 10 23:16:12 2003
+++ lib/Apache/Build.pm
@@ -771,6 +771,14 @@ my %wanted_apr_config = map { $_, 1} qw(
     HAS_INLINE HAS_FORK
 );
 
+sub get_apr_includes {
+    $_ = `apr-config --includes`;
+    chomp;
+    s/^\s*-I//;
+    s/\s*$//;
+    return $_;
+}
+
 sub get_apr_config {
     my $self = shift;
 
@@ -779,7 +787,7 @@ sub get_apr_config {
     my $dir = $self->ap_includedir;
 
     my $header;
-    for my $d ($dir, "$dir/../srclib/apr/include") {
+    for my $d ($dir, "$dir/../srclib/apr/include", get_apr_includes()) {
         $header = "$d/apr.h";
         last if -e $header;
     }
@@ -1150,6 +1158,8 @@ sub includes {
     my @inc = $self->file_path("src/modules/perl", "xs");
 
     push @inc, $self->mp_include_dir;
+
+    push @inc, get_apr_includes();
 
     unless ($self->ap_prefix_is_source_tree) {
         my $ainc = $self->apxs('-q' => 'INCLUDEDIR');