]> granicus.if.org Git - apache/commitdiff
Teach apxs how to find ap{ru}-$AP{RU}_MAJOR_VERSION-config
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 2 Aug 2004 02:38:16 +0000 (02:38 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 2 Aug 2004 02:38:16 +0000 (02:38 +0000)
(httpd-2.1+ will be APR 1.0 or higher which uses this convention.)

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

acinclude.m4
configure.in
support/apxs.in

index 75b40ed3360888a21349addd6a85e70e1092df1b..bf214addc30e2d99856b5b18986c8756fd497b73 100644 (file)
@@ -90,8 +90,10 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
   APACHE_SUBST(DSO_MODULES)
   APACHE_SUBST(APR_BINDIR)
   APACHE_SUBST(APR_INCLUDEDIR)
+  APACHE_SUBST(APR_VERSION)
   APACHE_SUBST(APU_BINDIR)
   APACHE_SUBST(APU_INCLUDEDIR)
+  APACHE_SUBST(APU_VERSION)
 
   abs_srcdir="`(cd $srcdir && pwd)`"
 
index 0922b924c9265fc1a6cc3b69f7d5532ecf099c8f..944159c7a7a946f95939f941845dfe7ba2437fda 100644 (file)
@@ -85,6 +85,7 @@ APR_ADDTO(INCLUDES, `$apr_config --includes`)
 SHLIBPATH_VAR=`$apr_config --shlib-path-var`
 APR_BINDIR=`$apr_config --bindir`
 APR_INCLUDEDIR=`$apr_config --includedir`
+APR_VERSION=`$apr_config --version`
 
 echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
 
@@ -107,6 +108,7 @@ APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)
 APR_ADDTO(INCLUDES, `$apu_config --includes`)
 APU_BINDIR=`$apu_config --bindir`
 APU_INCLUDEDIR=`$apu_config --includedir`
+APU_VERSION=`$apu_config --version`
 
 dnl In case we picked up CC and CPP from APR, get that info into the
 dnl config cache so that PCRE uses it.  Otherwise, CC and CPP used for
index 7581c2c2dd9d262a4283249a5e753f58d35fae4b..8ad0799224f8850d390323ece6643167754c27b0 100644 (file)
@@ -324,26 +324,32 @@ if ($opt_q) {
 }
 
 my $apr_bindir = get_vars("APR_BINDIR");
+my $apr_version = get_vars("APR_VERSION");
+$apr_version =~ s/(\d+)\.(\d).(\d)/$1/;
+my $apr_config="$apr_bindir/apr-$apr_version-config";
 
-if (! -x "$apr_bindir/apr-config") {
+if (! -x "$apr_config") {
     error("$apr_bindir/apr-config not found!");
     exit(1);
 }
 
 my $apu_bindir = get_vars("APU_BINDIR");
+my $apu_version = get_vars("APU_VERSION");
+$apu_version =~ s/(\d+)\.(\d).(\d)/$1/;
+my $apu_config="$apu_bindir/apu-$apu_version-config";
 
-if (! -x "$apu_bindir/apu-config") {
-    error("$apu_bindir/apu-config not found!");
+if (! -x "$apu_config") {
+    error("$apu_config not found!");
     exit(1);
 }
 
-my $libtool = `$apr_bindir/apr-config --installbuilddir`;
+my $libtool = `$apr_config --installbuilddir`;
 chomp($libtool);
 $libtool = "$libtool/libtool";
 
-my $apr_includedir = `$apr_bindir/apr-config --includes`;
+my $apr_includedir = `$apr_config --includes`;
 chomp($apr_includedir);
-my $apu_includedir = `$apu_bindir/apu-config --includes`;
+my $apu_includedir = `$apu_config --includes`;
 chomp($apu_includedir);
 
 if ($opt_c) {
@@ -435,15 +441,15 @@ if ($opt_c) {
 
     if ($opt_p == 1) {
         
-        my $apr_libs=`$apr_bindir/apr-config --cflags --ldflags --link-libtool --libs`;
+        my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
         chomp($apr_libs);
-        my $apu_libs=`$apu_bindir/apu-config --ldflags --link-libtool --libs`;
+        my $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
         chomp($apu_libs);
         
         $opt .= " ".$apu_libs." ".$apr_libs;
     }
     else {
-        my $apr_ldflags=`$apr_bindir/apr-config --ldflags`;
+        my $apr_ldflags=`$apr_config --ldflags`;
         chomp($apr_ldflags);
         $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags";
     }