apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r356957 - in /apr: apr-util/trunk/build/find_apu.m4 apr/trunk/build/find_apr.m4
Date Thu, 15 Dec 2005 00:16:01 GMT
Author: colm
Date: Wed Dec 14 16:15:52 2005
New Revision: 356957

URL: http://svn.apache.org/viewcvs?rev=356957&view=rev
Log:
Add a 5th argument to the APR_FIND_APR and the APR_FIND_APU macros which
accepts a macro to perform a detailed check on each installed copy of
apr/apr-util.

Modified:
    apr/apr-util/trunk/build/find_apu.m4
    apr/apr/trunk/build/find_apr.m4

Modified: apr/apr-util/trunk/build/find_apu.m4
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/build/find_apu.m4?rev=356957&r1=356956&r2=356957&view=diff
==============================================================================
--- apr/apr-util/trunk/build/find_apu.m4 (original)
+++ apr/apr-util/trunk/build/find_apu.m4 Wed Dec 14 16:15:52 2005
@@ -22,7 +22,8 @@
 dnl embedding APU into the application source, or locating an installed
 dnl copy of APU.
 dnl
-dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors)
+dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl              detailed-check)
 dnl
 dnl   where srcdir is the location of the bundled APU source directory, or
 dnl   empty if source is not bundled.
@@ -39,6 +40,14 @@
 dnl   implicit installed search are used, then the first (leftmost) version
 dnl   in the list that is found will be used.  Currently defaults to [0 1].
 dnl
+dnl   where detailed-check is an M4 macro which sets the apu_acceptable to
+dnl   either "yes" or "no". The macro will be invoked for each installed
+dnl   copy of APU found, with the apu_config variable set appropriately.
+dnl   Only installed copies of APU which are considered acceptable by
+dnl   this macro will be considered found. If no installed copies are
+dnl   considered acceptable by this macro, apu_found will be set to either
+dnl   either "no" or "reconfig".
+dnl
 dnl Sets the following variables on exit:
 dnl
 dnl   apu_found : "yes", "no", "reconfig"
@@ -111,16 +120,28 @@
       for lookdir in "$withval/bin" "$withval"
       do
         if $TEST_X "$lookdir/$apu_temp_apu_config_file"; then
-          apu_found="yes"
           apu_config="$lookdir/$apu_temp_apu_config_file"
+          ifelse([$5], [], [], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APU in $apu_config, but it is considered unacceptable])
+            continue
+          fi])
+          apu_found="yes"
           break 2
         fi
       done
     done
 
     if test "$apu_found" != "yes" && $TEST_X "$withval" && $withval --help
> /dev/null 2>&1 ; then
-      apu_found="yes"
       apu_config="$withval"
+      ifelse([$5], [], [apu_found="yes"], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" = "yes"; then
+                apu_found="yes"
+          fi])
     fi
 
     dnl if --with-apr-util is used, it is a fatal error for its argument
@@ -133,15 +154,29 @@
       for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
       do
         if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
+          apu_config="$apu_temp_apu_config_file" 
+          ifelse([$5], [], [], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APU in $apu_config, but we think it's bad])
+            continue
+          fi])
           apu_found="yes"
-          apu_config="$apu_temp_apu_config_file"
           break
         else
           dnl look in some standard places (apparently not in builtin/default)
           for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
             if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
-              apu_found="yes"
               apu_config="$lookdir/bin/$apu_temp_apu_config_file"
+              ifelse([$5], [], [], [
+              apu_acceptable="yes"
+              $5
+              if test "$apu_acceptable" != "yes"; then
+                AC_MSG_WARN([Found APU in $apu_config, but we think it's bad])
+                continue
+              fi])
+              apu_found="yes"
               break 2
             fi
           done

Modified: apr/apr/trunk/build/find_apr.m4
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/build/find_apr.m4?rev=356957&r1=356956&r2=356957&view=diff
==============================================================================
--- apr/apr/trunk/build/find_apr.m4 (original)
+++ apr/apr/trunk/build/find_apr.m4 Wed Dec 14 16:15:52 2005
@@ -21,7 +21,8 @@
 dnl embedding APR into the application source, or locating an installed
 dnl copy of APR.
 dnl
-dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors)
+dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl              detailed-check)
 dnl
 dnl   where srcdir is the location of the bundled APR source directory, or
 dnl   empty if source is not bundled.
@@ -38,6 +39,14 @@
 dnl   implicit installed search are used, then the first (leftmost) version
 dnl   in the list that is found will be used.  Currently defaults to [0 1].
 dnl
+dnl   where detailed-check is an M4 macro which sets the apr_acceptable to
+dnl   either "yes" or "no". The macro will be invoked for each installed
+dnl   copy of APR found, with the apr_config variable set appropriately.
+dnl   Only installed copies of APR which are considered acceptable by
+dnl   this macro will be considered found. If no installed copies are
+dnl   considered acceptable by this macro, apr_found will be set to either
+dnl   either "no" or "reconfig".
+dnl
 dnl Sets the following variables on exit:
 dnl
 dnl   apr_found : "yes", "no", "reconfig"
@@ -100,16 +109,28 @@
       for lookdir in "$withval/bin" "$withval"
       do
         if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
-          apr_found="yes"
           apr_config="$lookdir/$apr_temp_apr_config_file"
+          ifelse([$5], [], [], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APR in $apr_config, but we think it is considered unacceptable)
+            continue
+          fi])
+          apr_found="yes"
           break 2
         fi
       done
     done
 
     if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help
> /dev/null 2>&1 ; then
-      apr_found="yes"
       apr_config="$withval"
+      ifelse([$5], [], [apr_found="yes"], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" = "yes"; then
+                apr_found="yes"
+          fi])
     fi
 
     dnl if --with-apr is used, it is a fatal error for its argument
@@ -123,15 +144,29 @@
       for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
       do
         if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
-          apr_found="yes"
           apr_config="$apr_temp_apr_config_file"
+          ifelse([$5], [], [], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APR in $apr_config, but we think it's bad])
+            continue
+          fi])
+          apr_found="yes"
           break
         else
           dnl look in some standard places
           for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
             if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
-              apr_found="yes"
               apr_config="$lookdir/bin/$apr_temp_apr_config_file"
+              ifelse([$5], [], [], [
+              apr_acceptable="yes"
+              $5
+              if test "$apr_acceptable" != "yes"; then
+                AC_MSG_WARN([Found APR in $apr_config, but we think it's bad])
+                continue
+              fi])
+              apr_found="yes"
               break 2
             fi
           done



Mime
View raw message