]> Raphaƫl G. Git Repositories - ihttpd/blob - SOURCES/httpd-2.4.9-apxs.patch
7016dec1d4b9a3f460e94b6b82cf6d8349a43a1a
[ihttpd] / SOURCES / httpd-2.4.9-apxs.patch
1 diff --git a/support/apxs.in b/support/apxs.in
2 index ad1287f..efcfcf6 100644
3 --- a/support/apxs.in
4 +++ b/support/apxs.in
5 @@ -25,7 +25,18 @@ package apxs;
6
7 my %config_vars = ();
8
9 -my $installbuilddir = "@exp_installbuilddir@";
10 +# Awful hack to make apxs libdir-agnostic:
11 +my $pkg_config = "/usr/bin/pkg-config";
12 +if (! -x "$pkg_config") {
13 + error("$pkg_config not found!");
14 + exit(1);
15 +}
16 +
17 +my $libdir = `pkg-config --variable=libdir apr-1`;
18 +chomp $libdir;
19 +
20 +my $installbuilddir = $libdir . "/httpd/build";
21 +
22 get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
23
24 # read the configuration variables once
25 @@ -275,7 +286,7 @@ if ($opt_g) {
26 $data =~ s|%NAME%|$name|sg;
27 $data =~ s|%TARGET%|$CFG_TARGET|sg;
28 $data =~ s|%PREFIX%|$prefix|sg;
29 - $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
30 + $data =~ s|%LIBDIR%|$libdir|sg;
31
32 my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
33
34 @@ -453,11 +464,11 @@ if ($opt_c) {
35 my $ldflags = "$CFG_LDFLAGS";
36 if ($opt_p == 1) {
37
38 - my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
39 + my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
40 chomp($apr_libs);
41 my $apu_libs="";
42 if ($apr_major_version < 2) {
43 - $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
44 + $apu_libs=`$apu_config --ldflags --link-libtool`;
45 chomp($apu_libs);
46 }
47
48 @@ -672,8 +683,8 @@ __DATA__
49
50 builddir=.
51 top_srcdir=%PREFIX%
52 -top_builddir=%PREFIX%
53 -include %INSTALLBUILDDIR%/special.mk
54 +top_builddir=%LIBDIR%/httpd
55 +include %LIBDIR%/httpd/build/special.mk
56
57 # the used tools
58 APACHECTL=apachectl