From 5cbcc8cf8f9d2bbc25cb1e2c1a1da26bded349c8 Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Wed, 21 May 2003 06:56:35 +0000 Subject: [PATCH] Perform run-time query in apxs for apr and apr-util's includes. This is required when they are in disjoint directories from httpd. Otherwise, apxs won't pass their include information into the compiler and the compilation will fail. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99981 13f79535-47bb-0310-9956-ffa450edef68 --- support/apxs.in | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/support/apxs.in b/support/apxs.in index 49ddcb4de0..5de9456787 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -369,10 +369,22 @@ if (! -x "$apr_bindir/apr-config") { exit(1); } +my $apu_bindir = get_vars("APU_BINDIR"); + +if (! -x "$apu_bindir/apu-config") { + error("$apu_bindir/apu-config not found!"); + exit(1); +} + my $libtool = `$apr_bindir/apr-config --installbuilddir`; chomp($libtool); $libtool = "$libtool/libtool"; +my $apr_includedir = `$apr_bindir/apr-config --includes`; +chomp($apr_includedir); +my $apu_includedir = `$apu_bindir/apu-config --includes`; +chomp($apu_includedir); + if ($opt_c) { ## ## SHARED OBJECT COMPILATION @@ -435,7 +447,7 @@ if ($opt_c) { $la =~ s|\.c$|.la|; my $o = $s; $o =~ s|\.c$|.o|; - push(@cmds, "$libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $opt -c -o $lo $s && touch $slo"); + push(@cmds, "$libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $apr_includedir $apu_includedir $opt -c -o $lo $s && touch $slo"); unshift(@objs, $lo); } @@ -461,12 +473,6 @@ if ($opt_c) { } if ($opt_p == 1) { - my $apu_bindir = get_vars("APU_BINDIR"); - - if (! -x "$apu_bindir/apu-config") { - error("$apu_bindir/apu-config not found!"); - exit(1); - } my $apr_libs=`$apr_bindir/apr-config --cflags --ldflags --link-libtool --libs`; chomp($apr_libs); -- 2.50.1