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