httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r758167 - /httpd/httpd/trunk/support/apxs.in
Date Wed, 25 Mar 2009 07:31:58 GMT
Author: rpluem
Date: Wed Mar 25 07:31:56 2009
New Revision: 758167

URL: http://svn.apache.org/viewvc?rev=758167&view=rev
Log:
* Teach apxs to work with APR 2.x where there is no separate APR-UTIL
  any longer.

Modified:
    httpd/httpd/trunk/support/apxs.in

Modified: httpd/httpd/trunk/support/apxs.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/apxs.in?rev=758167&r1=758166&r2=758167&view=diff
==============================================================================
--- httpd/httpd/trunk/support/apxs.in (original)
+++ httpd/httpd/trunk/support/apxs.in Wed Mar 25 07:31:56 2009
@@ -342,11 +342,16 @@
     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 @@
 
 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 @@
         
         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;
     }



Mime
View raw message