On Mon, Sep 12, 2005 at 10:59:07AM +0100, Joe Orton wrote:
> On Sun, Sep 11, 2005 at 11:26:04PM -0700, Sander Temme wrote:
> > Trying to scratch a personal itch tonight. I'd like to build my  
> > checked out tree against a checkout of {apr,apu}, which sit somewhere  
> > else on my system. As far as I can tell, this is currently not  
> > possible. I tried to point buildconf to my working copies: it borks.  
> > The following patch to buildconf (also attached) unborks:
> 
> You have to buildconf both the apr and apr-util source trees before
> doing so in the httpd tree, which is not unreasonable IMO.  I think it'd
> be surprising behaviour for the httpd buildconf to go and regenerate the
> configure script in the external directories so -0 on the patch.

I think the problem is that although buildconf claims to look in srclib/apr
and ../apr, configure.in only runs APR_FIND_APR on srclib/apr, so never
looks in ../apr. I have been running with the attached patch instead,
but I think the aim is the same.. (There is a problem here..)

Cheers,

Patrick
Index: configure.in
===================================================================
--- configure.in        (revision 240059)
+++ configure.in        (working copy)
@@ -61,21 +61,24 @@
 
 echo $ac_n "${nl}Configuring Apache Portable Runtime library ...${nl}"
 
-APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1)
+apr_src_dirs="srclib/apr ../apr"
+for apr_src_dir in $apr_src_dirs; do
+  APR_FIND_APR("$srcdir/$apr_src_dir", "./srclib/apr", 1, 1)
 
+  if test "$apr_found" = "reconfig"; then
+    APR_SUBDIR_CONFIG("$apr_src_dir",
+                      [$apache_apr_flags --prefix=$prefix 
--exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir 
--bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir],
+                      [--enable-layout=*|\'--enable-layout=*])
+    dnl We must be the first to build and the last to be cleaned
+    AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS"
+    AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS apr"
+  fi
+done
+
 if test "$apr_found" = "no"; then
   AC_MSG_ERROR([APR not found.  Please read the documentation.])
 fi
 
-if test "$apr_found" = "reconfig"; then
-  APR_SUBDIR_CONFIG(srclib/apr,
-                    [$apache_apr_flags --prefix=$prefix 
--exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir 
--bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir],
-                    [--enable-layout=*|\'--enable-layout=*])
-  dnl We must be the first to build and the last to be cleaned
-  AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS"
-  AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS apr"
-fi
-
 APR_SETIFNULL(CC, `$apr_config --cc`)
 APR_SETIFNULL(CPP, `$apr_config --cpp`)
 APR_ADDTO(CFLAGS, `$apr_config --cflags`)
@@ -90,8 +93,10 @@
 echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
 
 APR_FIND_APU("$srcdir/srclib/apr-util", "./srclib/apr-util", 1, 1)
-
 if test "$apu_found" = "no"; then
+  APR_FIND_APU("$srcdir/../apr-util", "./../apr-util", 1, 1)
+fi
+if test "$apu_found" = "no"; then
   AC_MSG_ERROR([APR-util not found.  Please read the documentation.])
 fi
 

Reply via email to