In the old days, apr lived in httpd/srclib. Now it can be anywhere, but ../apr
is a sensible alternative, hence buildconf's good choice of:

  apr_src_dir="srclib/apr ../apr"

Let's say source directories are /zzz/httpd and /zzz/apr. buildconf will
happily find the apr source in ../apr, and copy ../apr/build/find_apr.m4
to (/zzz/httpd/)build/find_apr.m4. The trouble is that find_apr.m4 looks
for apr in /usr /usr/local /usr/local/apr /opt/apr /usr/local/apache2
but not in ../  . 

The attached patch seems to get me further.

(Now I'm in apr trying it to buildconf with a modern libtool..
rather tricky as you at least need AC_CONFIG_MACRO_DIR and a few
more libtoolish .m4 files to sinclude..)

Cheers,

Patrick
Index: configure.in
===================================================================
--- configure.in        (revision 165173)
+++ 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