summaryrefslogtreecommitdiffstats
path: root/support/apxs.in
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2002-09-19 07:43:16 +0200
committerJustin Erenkrantz <jerenkrantz@apache.org>2002-09-19 07:43:16 +0200
commit28bcef27bb7bef75289a25950e24117db8ae2493 (patch)
treef95b73c770c6562db1c73fef6217bfc4de13ff8f /support/apxs.in
parentFix a bunch of little problems that the directive quick-reference (diff)
downloadapache2-28bcef27bb7bef75289a25950e24117db8ae2493.tar.xz
apache2-28bcef27bb7bef75289a25950e24117db8ae2493.zip
Rework the apxs -cp command to work when the source dir isn't available by
querying apr-config and apu-config at link-time instead. (Note that the $apr_config value in configure.in isn't sufficient as we need to know where apr-config will be when we execute apxs later on - hence the --bindir option to apr-config and apu-config.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96905 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/apxs.in')
-rw-r--r--support/apxs.in21
1 files changed, 19 insertions, 2 deletions
diff --git a/support/apxs.in b/support/apxs.in
index 9782c89f45..ed3de518ce 100644
--- a/support/apxs.in
+++ b/support/apxs.in
@@ -450,10 +450,27 @@ if ($opt_c) {
}
if ($opt_p == 1) {
- $opt .= " ".get_vars("EXTRA_LDFLAGS")." ".get_vars("AP_LIBS");
+ my $apr_bindir = get_vars("APR_BINDIR");
+ my $apu_bindir = get_vars("APU_BINDIR");
+
+ if (! -x "$apr_bindir/apr-config") {
+ error("$apr_bindir/apr-config not found!");
+ exit(1);
+ }
+ if (! -x "$apu_bindir/apu-config") {
+ error("$apu_bindir/apu-config not found!");
+ exit(1);
+ }
+
+ my $apr_libs=`$apr_bindir/apr-config --ldflags --link-libtool --libs`;
+ chomp($apr_libs);
+ my $apu_libs=`$apu_bindir/apu-config --ldflags --link-libtool --libs`;
+ chomp($apu_libs);
+
+ $opt .= " ".$apu_libs." ".$apr_libs;
}
else {
- $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version";
+ $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version";
}
push(@cmds, "$installbuilddir/libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");