1 --- httpd-2.4.43/support/apxs.in.apxs 2020-03-20 15:00:44.000000000 +0200
2 +++ httpd-2.4.43/support/apxs.in 2020-04-02 15:16:23.516349733 +0300
7 -my $installbuilddir = "@exp_installbuilddir@";
8 +# Awful hack to make apxs libdir-agnostic:
9 +my $pkg_config = "/usr/bin/pkg-config";
10 +if (! -x "$pkg_config") {
11 + error("$pkg_config not found!");
15 +my $libdir = `pkg-config --variable=libdir apr-1`;
18 +my $installbuilddir = $libdir . "/httpd/build";
20 get_config_vars($destdir . "$installbuilddir/config_vars.mk",\%config_vars);
22 # read the configuration variables once
24 $data =~ s|%NAME%|$name|sg;
25 $data =~ s|%TARGET%|$CFG_TARGET|sg;
26 $data =~ s|%PREFIX%|$prefix|sg;
27 - $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
28 + $data =~ s|%LIBDIR%|$libdir|sg;
30 my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
33 my $ldflags = "$CFG_LDFLAGS";
36 - my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
37 + my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
40 if ($apr_major_version < 2) {
41 - $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
42 + $apu_libs=`$apu_config --ldflags --link-libtool`;
50 -top_builddir=%PREFIX%
51 -include %INSTALLBUILDDIR%/special.mk
52 +top_builddir=%LIBDIR%/httpd
53 +include %LIBDIR%/httpd/build/special.mk