|
|
008793 |
--- httpd-2.4.3/support/apxs.in.apxs
|
|
|
008793 |
+++ httpd-2.4.3/support/apxs.in
|
|
|
008793 |
@@ -25,7 +25,18 @@ package apxs;
|
|
|
008793 |
|
|
|
008793 |
my %config_vars = ();
|
|
|
008793 |
|
|
|
008793 |
-my $installbuilddir = "@exp_installbuilddir@";
|
|
|
008793 |
+# Awful hack to make apxs libdir-agnostic:
|
|
|
008793 |
+my $pkg_config = "/usr/bin/pkg-config";
|
|
|
008793 |
+if (! -x "$pkg_config") {
|
|
|
008793 |
+ error("$pkg_config not found!");
|
|
|
008793 |
+ exit(1);
|
|
|
008793 |
+}
|
|
|
008793 |
+
|
|
|
008793 |
+my $libdir = `pkg-config --variable=libdir apr-1`;
|
|
|
008793 |
+chomp $libdir;
|
|
|
008793 |
+
|
|
|
008793 |
+my $installbuilddir = $libdir . "/httpd/build";
|
|
|
008793 |
+
|
|
|
008793 |
get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
|
|
|
008793 |
|
|
|
008793 |
# read the configuration variables once
|
|
|
008793 |
@@ -275,7 +286,7 @@ if ($opt_g) {
|
|
|
008793 |
$data =~ s|%NAME%|$name|sg;
|
|
|
008793 |
$data =~ s|%TARGET%|$CFG_TARGET|sg;
|
|
|
008793 |
$data =~ s|%PREFIX%|$prefix|sg;
|
|
|
008793 |
- $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
|
|
|
008793 |
+ $data =~ s|%LIBDIR%|$libdir|sg;
|
|
|
008793 |
|
|
|
008793 |
my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
|
|
|
008793 |
|
|
|
008793 |
@@ -453,11 +464,11 @@ if ($opt_c) {
|
|
|
008793 |
my $ldflags = "$CFG_LDFLAGS";
|
|
|
008793 |
if ($opt_p == 1) {
|
|
|
008793 |
|
|
|
008793 |
- my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
|
|
|
008793 |
+ my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
|
|
|
008793 |
chomp($apr_libs);
|
|
|
008793 |
my $apu_libs="";
|
|
|
008793 |
if ($apr_major_version < 2) {
|
|
|
008793 |
- $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
|
|
|
008793 |
+ $apu_libs=`$apu_config --ldflags --link-libtool`;
|
|
|
008793 |
chomp($apu_libs);
|
|
|
008793 |
}
|
|
|
008793 |
|
|
|
008793 |
@@ -672,8 +683,8 @@ __DATA__
|
|
|
008793 |
|
|
|
008793 |
builddir=.
|
|
|
008793 |
top_srcdir=%PREFIX%
|
|
|
008793 |
-top_builddir=%PREFIX%
|
|
|
008793 |
-include %INSTALLBUILDDIR%/special.mk
|
|
|
008793 |
+top_builddir=%LIBDIR%/httpd
|
|
|
008793 |
+include %LIBDIR%/httpd/build/special.mk
|
|
|
008793 |
|
|
|
008793 |
# the used tools
|
|
|
008793 |
APXS=apxs
|