You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2020/02/21 00:36:36 UTC

svn commit: r1874288 - in /httpd/httpd/branches/2.4.x: ./ CHANGES support/apxs.in

Author: ylavic
Date: Fri Feb 21 00:36:36 2020
New Revision: 1874288

URL: http://svn.apache.org/viewvc?rev=1874288&view=rev
Log:
Merge r1872042, r1872062 from trunk:


Add support for cross compiling to apxs. If apxs is being executed from somewhere
other than its target location, add that prefix to includes and library directories.
Without this, apxs would fail to find config_vars.mk and exit.


Allow instdso.sh to be found while cross compiling.


Submitted by: minfrin
Reviewed by: minfrin, jim, ylavic

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/support/apxs.in

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1872042,1872062

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1874288&r1=1874287&r2=1874288&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Fri Feb 21 00:36:36 2020
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.42
 
+  *) Add support for cross compiling to apxs. If apxs is being executed from somewhere
+     other than its target location, add that prefix to includes and library directories.
+     Without this, apxs would fail to find config_vars.mk and exit. [Graham Leggett]
+
   *) mod_ssl: Disable client verification on ACME ALPN challenges. Fixes github
      issue mod_md#172 (https://github.com/icing/mod_md/issues/172).
      [Michael Kaufmann <mail michael-kaufmann.ch>, Stefan Eissing]

Modified: httpd/httpd/branches/2.4.x/support/apxs.in
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/apxs.in?rev=1874288&r1=1874287&r2=1874288&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/apxs.in (original)
+++ httpd/httpd/branches/2.4.x/support/apxs.in Fri Feb 21 00:36:36 2020
@@ -23,10 +23,15 @@ 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 = substr($0, 0, rindex($0, "@exp_bindir@"));
+
 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 +46,10 @@ my $CFG_CFLAGS     = join ' ', map { get
   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 +340,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 +351,7 @@ my $apr_major_version = (split /\./, `$a
 
 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 +506,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");
         }