summaryrefslogtreecommitdiffstats
path: root/support/apxs.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:28 +0000
commitb1a1c1d95059e2fefd7b5671eb110ab690409a84 (patch)
tree97ecfcc9425e2d09d2cd669594d626a616f324a3 /support/apxs.in
parentReleasing progress-linux version 2.4.38-3+deb10u10progress5u1. (diff)
downloadapache2-b1a1c1d95059e2fefd7b5671eb110ab690409a84.tar.xz
apache2-b1a1c1d95059e2fefd7b5671eb110ab690409a84.zip
Merging upstream version 2.4.59.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'support/apxs.in')
-rw-r--r--support/apxs.in22
1 files changed, 16 insertions, 6 deletions
diff --git a/support/apxs.in b/support/apxs.in
index ad1287f..b2705fa 100644
--- a/support/apxs.in
+++ b/support/apxs.in
@@ -23,10 +23,20 @@ package apxs;
## Configuration
##
+# are we building in a cross compile environment? If so, destdir contains
+# the base directory of the cross compiled environment, otherwise destdir
+# is the empty string.
+
+my $destdir = "";
+my $ddi = rindex($0, "@exp_bindir@");
+if ($ddi >= 0) {
+ $destdir = substr($0, 0, $ddi);
+}
+
my %config_vars = ();
my $installbuilddir = "@exp_installbuilddir@";
-get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
+get_config_vars($destdir . "$installbuilddir/config_vars.mk",\%config_vars);
# read the configuration variables once
@@ -41,10 +51,10 @@ my $CFG_CFLAGS = join ' ', map { get_vars($_) }
qw(SHLTCFLAGS CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS);
my $CFG_LDFLAGS = join ' ', map { get_vars($_) }
qw(LDFLAGS NOTEST_LDFLAGS SH_LDFLAGS);
-my $includedir = get_vars("includedir");
+my $includedir = $destdir . get_vars("includedir");
my $CFG_INCLUDEDIR = eval qq("$includedir");
my $CFG_CC = get_vars("CC");
-my $libexecdir = get_vars("libexecdir");
+my $libexecdir = $destdir . get_vars("libexecdir");
my $CFG_LIBEXECDIR = eval qq("$libexecdir");
my $sbindir = get_vars("sbindir");
my $CFG_SBINDIR = eval qq("$sbindir");
@@ -335,7 +345,7 @@ if ($opt_q) {
}
}
-my $apr_config = get_vars("APR_CONFIG");
+my $apr_config = $destdir . get_vars("APR_CONFIG");
if (! -x "$apr_config") {
error("$apr_config not found!");
@@ -346,7 +356,7 @@ my $apr_major_version = (split /\./, `$apr_config --version`)[0];
my $apu_config = "";
if ($apr_major_version < 2) {
- $apu_config = get_vars("APU_CONFIG");
+ $apu_config = $destdir . get_vars("APU_CONFIG");
if (! -x "$apu_config") {
error("$apu_config not found!");
@@ -501,7 +511,7 @@ if ($opt_i or $opt_e) {
# use .so unambigiously for installed shared library modules
$t =~ s|\.[^./\\]+$|\.so|;
if ($opt_i) {
- push(@cmds, "$installbuilddir/instdso.sh SH_LIBTOOL='" .
+ push(@cmds, $destdir . "$installbuilddir/instdso.sh SH_LIBTOOL='" .
"$libtool' $f $CFG_LIBEXECDIR");
push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
}