You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by je...@apache.org on 2002/02/01 04:11:16 UTC

cvs commit: apr/build find_apr.m4

jerenkrantz    02/01/31 19:11:16

  Modified:    build    find_apr.m4
  Log:
  Add a path argument that makes it easier for programs (such as SVN)
  that require absolute paths instead of relative ones.
  
  Revision  Changes    Path
  1.6       +13 -6     apr/build/find_apr.m4
  
  Index: find_apr.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/find_apr.m4,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- find_apr.m4	12 Dec 2001 04:30:33 -0000	1.5
  +++ find_apr.m4	1 Feb 2002 03:11:16 -0000	1.6
  @@ -6,10 +6,12 @@
   dnl embedding APR into the application source, or locating an installed
   dnl copy of APR.
   dnl
  -dnl APR_FIND_APR([srcdir])
  +dnl APR_FIND_APR([srcdir, path])
   dnl
   dnl   where srcdir is the location of the bundled APR source directory, or
   dnl   empty if source is not bundled.
  +dnl   where path is the prefix to the location where the bundled APR will
  +dnl   will be built.
   dnl
   dnl
   dnl Sets the following variables on exit:
  @@ -149,15 +151,20 @@
       if test "$apr_found" = "no" && test -n "$1" && test -x "$1/configure"; then
         apr_found="reconfig"
         apr_srcdir="$1"
  +      if test -n "$2"; then
  +        apr_builddir="$2/"
  +      else
  +        apr_builddir=""
  +      fi
         apr_libdir=""
  -      apr_la_file="$apr_srcdir/libapr.la"
  -      apr_vars="$apr_srcdir/APRVARS"
  -      if test -f "$apr_srcdir/apr-config.in"; then
  -        apr_config="$apr_srcdir/apr-config"
  +      apr_la_file="$apr_builddir$apr_srcdir/libapr.la"
  +      apr_vars="$apr_builddir$apr_srcdir/APRVARS"
  +      if test -f "$apr_builddir$apr_srcdir/apr-config.in"; then
  +        apr_config="$apr_builddir$apr_srcdir/apr-config"
         else
           apr_config=""
         fi
  -      apr_includes="-I$apr_srcdir/include"
  +      apr_includes="-I$apr_builddir$apr_srcdir/include"
       fi
     ])
   
  
  
  

Re: cvs commit: apr/build find_apr.m4

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Feb 01, 2002 at 03:11:16AM -0000, jerenkrantz@apache.org wrote:
> jerenkrantz    02/01/31 19:11:16
> 
>   Modified:    build    find_apr.m4
>   Log:
>   Add a path argument that makes it easier for programs (such as SVN)
>   that require absolute paths instead of relative ones.

Note: I don't think it is just SVN. Whenever an application includes
apr(util) in their build, they are going to have to reference the pieces of
APR from *anywhere* in their source tree. That implies they will do a lot of
".." munging, or they will use absolute paths.

Thus, I believe the better solution is simply for find_apr.m4 to always
return absolute paths in its "output variables".

I'll investigate. I'd also like to switch the code over to using apr-config
exclusively.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/