[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] look for installed APR and APRUTIL

From: Matt Kraai <kraai_at_alumni.cmu.edu>
Date: 2002-10-24 22:21:57 CEST

On Thu, Oct 24, 2002 at 10:43:47AM -0500, Karl Fogel wrote:
> If we have in-tree apr and/or apr-util, we should try them first,
> where "try" means see if they satisfy whatever version requirement
> Subversion has.
>
> The fact that APR is under development doesn't matter -- the fact that
> the user put it in the tree is sufficient indication that the user
> wanted to compile against it. (They should be able to ignore it by
> using --with-apr=foo, of course.)
>
> Do you agree/disagree with any of this? (And if agree, can you make
> the patch do it? :-) )

The following patch is halfway there. It checks first for local APR
and APRUTIL libraries, then for installed copies, but it never checks
the version (neither does the current code).

Matt

* ac-helpers/apr.m4
  Check for installed APR.

* ac-helpers/aprutil.m4
  Check for installed APRUTIL.

* ac-helpers/find_apr.m4
  Prefer local to installed APR.

* ac-helpers/find_apu.m4
  Prefer local to installed APRUTIL.

Index: ac-helpers/aprutil.m4
===================================================================
--- ac-helpers/aprutil.m4 (revision 3466)
+++ ac-helpers/aprutil.m4 (working copy)
@@ -14,7 +14,7 @@
 [
   AC_MSG_NOTICE([Apache Portable Runtime Utility (APRUTIL) library configuration])
 
- APR_FIND_APU("$srcdir/apr-util", "./apr-util")
+ APR_FIND_APU("$srcdir/apr-util", "./apr-util", 1)
 
   if test $apu_found = "no"; then
     AC_MSG_WARN([APRUTIL not found])
Index: ac-helpers/apr.m4
===================================================================
--- ac-helpers/apr.m4 (revision 3466)
+++ ac-helpers/apr.m4 (working copy)
@@ -9,7 +9,7 @@
 [
   AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration])
 
- APR_FIND_APR("$srcdir/apr", "./apr")
+ APR_FIND_APR("$srcdir/apr", "./apr", 1)
 
   if test $apr_found = "no"; then
     AC_MSG_WARN([APR not found])
Index: ac-helpers/find_apr.m4
===================================================================
--- ac-helpers/find_apr.m4 (revision 3466)
+++ ac-helpers/find_apr.m4 (working copy)
@@ -73,7 +73,17 @@
 build directory, or an apr-config file.])
     fi
   ],[
- if test -n "$3" && test "$3" = "1"; then
+ dnl if we have a bundled source directory, use it
+ if test -d "$1"; then
+ apr_temp_abs_srcdir="`cd $1 && pwd`"
+ apr_found="reconfig"
+ if test -n "$2"; then
+ apr_config="$2/apr-config"
+ else
+ apr_config="$1/apr-config"
+ fi
+ fi
+ if test "$apr_found" = "no" && test -n "$3" && test "$3" = "1"; then
       if apr-config --help > /dev/null 2>&1 ; then
         apr_found="yes"
         apr_config="apr-config"
@@ -88,25 +98,6 @@
         done
       fi
     fi
- dnl if we have a bundled source directory, then we may have more work
- if test -d "$1"; then
- apr_temp_abs_srcdir="`cd $1 && pwd`"
- if test "$apr_found" = "yes" \
- && test "`$apr_config --srcdir`" = "$apr_temp_abs_srcdir"; then
- dnl the installed apr-config represents our source directory, so
- dnl pretend we didn't see it and just use our bundled source
- apr_found="no"
- fi
- dnl We could not find an apr-config; use the bundled one
- if test "$apr_found" = "no"; then
- apr_found="reconfig"
- if test -n "$2"; then
- apr_config="$2/apr-config"
- else
- apr_config="$1/apr-config"
- fi
- fi
- fi
   ])
 
   AC_MSG_RESULT($apr_found)
Index: ac-helpers/find_apu.m4
===================================================================
--- ac-helpers/find_apu.m4 (revision 3466)
+++ ac-helpers/find_apu.m4 (working copy)
@@ -72,7 +72,16 @@
 installed APU, nor an APR-util build directory.])
     fi
   ],[
- if test -n "$3" && test "$3" = "1"; then
+ dnl if we have a bundled source directory, use it
+ if test -d "$1"; then
+ apu_found="reconfig"
+ if test -n "$2"; then
+ apu_config="$2/apu-config"
+ else
+ apu_config="$1/apu-config"
+ fi
+ fi
+ if test "$apu_found" = "no" && test -n "$3" && test "$3" = "1"; then
       if apu-config --help > /dev/null 2>&1 ; then
         apu_found="yes"
         apu_config="apu-config"
@@ -87,25 +96,6 @@
         done
       fi
     fi
- dnl if we have a bundled source directory, then we may have more work
- if test -d "$1"; then
- apu_temp_abs_srcdir="`cd $1 && pwd`"
- if test "$apu_found" = "yes" \
- && test "`$apu_config --srcdir`" = "$apu_temp_abs_srcdir"; then
- dnl the installed apu-config represents our source directory, so
- dnl pretend we didn't see it and just use our bundled source
- apu_found="no"
- fi
- dnl We could not find an apu-config; use the bundled one
- if test "$apu_found" = "no"; then
- apu_found="reconfig"
- if test -n "$2"; then
- apu_config="$2/apu-config"
- else
- apu_config="$1/apu-config"
- fi
- fi
- fi
   ])
 
   AC_MSG_RESULT($apu_found)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 24 22:25:31 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.