]> granicus.if.org Git - apache/commitdiff
* Teach apxs to work with APR 2.x where there is no separate APR-UTIL
authorRuediger Pluem <rpluem@apache.org>
Wed, 25 Mar 2009 07:31:56 +0000 (07:31 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 25 Mar 2009 07:31:56 +0000 (07:31 +0000)
  any longer.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758167 13f79535-47bb-0310-9956-ffa450edef68

support/apxs.in

index 08638c01630ad3278e27d29a2a1daa6f7bc7ebc9..87a9a7d43dfac63f899d4b7434507a540180bb9b 100644 (file)
@@ -342,11 +342,16 @@ if (! -x "$apr_config") {
     exit(1);
 }
 
-my $apu_config = get_vars("APU_CONFIG");
+my $apr_major_version = (split /\./, `$apr_config --version`)[0];
 
-if (! -x "$apu_config") {
-    error("$apu_config not found!");
-    exit(1);
+my $apu_config = "";
+if ($apr_major_version < 2) {
+    $apu_config = get_vars("APU_CONFIG");
+
+    if (! -x "$apu_config") {
+        error("$apu_config not found!");
+        exit(1);
+    }
 }
 
 my $libtool = `$apr_config --apr-libtool`;
@@ -354,8 +359,11 @@ chomp($libtool);
 
 my $apr_includedir = `$apr_config --includes`;
 chomp($apr_includedir);
-my $apu_includedir = `$apu_config --includes`;
-chomp($apu_includedir);
+my $apu_includedir = "";
+if ($apr_major_version < 2) {
+    $apu_includedir = `$apu_config --includes`;
+    chomp($apu_includedir);
+}
 
 if ($opt_c) {
     ##
@@ -446,8 +454,11 @@ if ($opt_c) {
         
         my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
         chomp($apr_libs);
-        my $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
-        chomp($apu_libs);
+        my $apu_libs="";
+        if ($apr_major_version < 2) {
+            $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
+            chomp($apu_libs);
+        }
         
         $opt .= " ".$apu_libs." ".$apr_libs;
     }