--- support/apxs.in
+++ support/apxs.in
@@ -29,13 +29,11 @@
 
 my $destdir = "";
 my $ddi = rindex($0, "@exp_bindir@");
-if ($ddi >= 0) {
-  $destdir = substr($0, 0, $ddi);
-}
 
 my %config_vars = ();
 
-my $installbuilddir = "@exp_installbuilddir@";
+my $STAGING_DIR = "";
+my $installbuilddir = "${STAGING_DIR}@exp_installbuilddir@";
 get_config_vars($destdir . "$installbuilddir/config_vars.mk",\%config_vars);
 
 # read the configuration variables once
@@ -559,6 +557,8 @@
     &execute_cmds(@cmds);
 
     #   activate module via LoadModule/AddModule directive
+    #   disabled for cross-compiling
+    if (0) {
     if ($opt_a or $opt_A) {
         if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
             error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
@@ -663,6 +663,7 @@
             }
 	}
     }
+    }
 }
 
 sub error{
