httpd/httpd-2.1.10-apxs.patch

72 lines
1.9 KiB
Diff
Raw Normal View History

2005-12-02 10:43:00 +00:00
- remove unnecessary stuff which runs httpd during build
- drop unnecessary --libs output from ap?-?-config
- make multilib-safe
2005-12-02 10:43:00 +00:00
--- httpd-2.2.2/support/apxs.in.apxs
+++ httpd-2.2.2/support/apxs.in
@@ -25,7 +25,15 @@
my %config_vars = ();
-my $installbuilddir = "@exp_installbuilddir@";
+# Awful hack to make apxs libdir-agnostic:
+my $pkg_config = "/usr/bin/pkg-config";
+if (! -x "$pkg_config") {
+ error("$pkg_config not found!");
+ exit(1);
+}
+
+my $installbuilddir = `pkg-config --variable=libdir apr-1` . "httpd/build";
+
get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
# read the configuration variables once
@@ -184,34 +192,6 @@
2005-12-02 10:43:00 +00:00
}
}
-##
-## Initial shared object support check
-##
-my $httpd = get_vars("sbindir") . "/" . get_vars("progname");
-$httpd = eval qq("$httpd");
-$httpd = eval qq("$httpd");
-my $envvars = get_vars("sbindir") . "/envvars";
-$envvars = eval qq("$envvars");
-$envvars = eval qq("$envvars");
-
-#allow apxs to be run from the source tree, before installation
-if ($0 =~ m:support/apxs$:) {
- ($httpd = $0) =~ s:support/apxs$::;
-}
-
-unless (-x "$httpd") {
- error("$httpd not found or not executable");
- exit 1;
-}
-
-unless (grep /mod_so/, `. $envvars && $httpd -l`) {
- error("Sorry, no shared object support for Apache");
- error("available under your platform. Make sure");
- error("the Apache module mod_so is compiled into");
- error("your server binary `$httpd'.");
- exit 1;
-}
-
sub get_config_vars{
my ($file, $rh_config) = @_;
@@ -433,9 +413,9 @@
2005-12-02 10:43:00 +00:00
if ($opt_p == 1) {
- my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
+ my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
chomp($apr_libs);
- my $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
+ my $apu_libs=`$apu_config --ldflags --link-libtool`;
chomp($apu_libs);
$opt .= " ".$apu_libs." ".$apr_libs;