]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1875429 from trunk:
authorEric Covener <covener@apache.org>
Fri, 20 Mar 2020 13:00:44 +0000 (13:00 +0000)
committerEric Covener <covener@apache.org>
Fri, 20 Mar 2020 13:00:44 +0000 (13:00 +0000)
fix apxs for non-destdir builds

subtr(...,0, -1) chops off a character and leaves relative path.

(you will need to re-run configure)

Reviewed By: +1: covener, gbechis, rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1875475 13f79535-47bb-0310-9956-ffa450edef68

support/apxs.in

index f7110978e6a960b2bef79e7e8e34d5e7260b8f03..b2705faf5b713a61c52f2de7f143513d6cc2c8c4 100644 (file)
@@ -26,7 +26,12 @@ package apxs;
 #   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 = substr($0, 0, rindex($0, "@exp_bindir@"));
+
+my $destdir = "";
+my $ddi = rindex($0, "@exp_bindir@");
+if ($ddi >= 0) {
+  $destdir = substr($0, 0, $ddi);
+}
 
 my %config_vars = ();