]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Perform run-time query in apxs for apr and apr-util's includes.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 21 May 2003 06:56:35 +0000 (06:56 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 21 May 2003 06:56:35 +0000 (06:56 +0000)
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

index 49ddcb4de0f61925543c1e8817044d2b20164dcf..5de9456787225937a40ce4df843dfebf982cac4a 100644 (file)
@@ -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);