|
|
0e3136 |
diff --git a/support/apxs.in b/support/apxs.in
|
|
|
0e3136 |
index b2705fa..c331631 100644
|
|
|
0e3136 |
--- a/support/apxs.in
|
|
|
0e3136 |
+++ b/support/apxs.in
|
|
|
0e3136 |
@@ -35,7 +35,18 @@ if ($ddi >= 0) {
|
|
|
0e3136 |
|
|
|
0e3136 |
my %config_vars = ();
|
|
|
0e3136 |
|
|
|
0e3136 |
-my $installbuilddir = "@exp_installbuilddir@";
|
|
|
0e3136 |
+# Awful hack to make apxs libdir-agnostic:
|
|
|
0e3136 |
+my $pkg_config = "/usr/bin/pkg-config";
|
|
|
0e3136 |
+if (! -x "$pkg_config") {
|
|
|
0e3136 |
+ error("$pkg_config not found!");
|
|
|
0e3136 |
+ exit(1);
|
|
|
0e3136 |
+}
|
|
|
0e3136 |
+
|
|
|
0e3136 |
+my $libdir = `pkg-config --variable=libdir apr-1`;
|
|
|
0e3136 |
+chomp $libdir;
|
|
|
0e3136 |
+
|
|
|
0e3136 |
+my $installbuilddir = $libdir . "/httpd/build";
|
|
|
0e3136 |
+
|
|
|
0e3136 |
get_config_vars($destdir . "$installbuilddir/config_vars.mk",\%config_vars);
|
|
|
0e3136 |
|
|
|
0e3136 |
# read the configuration variables once
|
|
|
0e3136 |
@@ -285,7 +296,7 @@ if ($opt_g) {
|
|
|
0e3136 |
$data =~ s|%NAME%|$name|sg;
|
|
|
0e3136 |
$data =~ s|%TARGET%|$CFG_TARGET|sg;
|
|
|
0e3136 |
$data =~ s|%PREFIX%|$prefix|sg;
|
|
|
0e3136 |
- $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
|
|
|
0e3136 |
+ $data =~ s|%LIBDIR%|$libdir|sg;
|
|
|
0e3136 |
|
|
|
0e3136 |
my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
|
|
|
0e3136 |
|
|
|
0e3136 |
@@ -463,11 +474,11 @@ if ($opt_c) {
|
|
|
0e3136 |
my $ldflags = "$CFG_LDFLAGS";
|
|
|
0e3136 |
if ($opt_p == 1) {
|
|
|
0e3136 |
|
|
|
0e3136 |
- my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
|
|
|
0e3136 |
+ my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
|
|
|
0e3136 |
chomp($apr_libs);
|
|
|
0e3136 |
my $apu_libs="";
|
|
|
0e3136 |
if ($apr_major_version < 2) {
|
|
|
0e3136 |
- $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
|
|
|
0e3136 |
+ $apu_libs=`$apu_config --ldflags --link-libtool`;
|
|
|
0e3136 |
chomp($apu_libs);
|
|
|
0e3136 |
}
|
|
|
0e3136 |
|
|
|
0e3136 |
@@ -682,8 +693,8 @@ __DATA__
|
|
|
0e3136 |
|
|
|
0e3136 |
builddir=.
|
|
|
0e3136 |
top_srcdir=%PREFIX%
|
|
|
0e3136 |
-top_builddir=%PREFIX%
|
|
|
0e3136 |
-include %INSTALLBUILDDIR%/special.mk
|
|
|
0e3136 |
+top_builddir=%LIBDIR%/httpd
|
|
|
0e3136 |
+include %LIBDIR%/httpd/build/special.mk
|
|
|
0e3136 |
|
|
|
0e3136 |
# the used tools
|
|
|
0e3136 |
APACHECTL=apachectl
|