Check out trunk. Check out APR trunk and APR-Util trunk into srclib/apr and srclib/apr-util. "./configure --with-included-apr". See error messages containing "apr-1-config" scroll by.
trunk/configure.in looks for apr-2-config, but it does so before srclib/apr is configured, when apr-2-config doesn't exist (unless the user configures srclib/apr first). The attached patch checks the version after the configure. It also attempts to handle the APR_FIND_APR() path (untested). On the APR-Util side, it bases the apu-config path on the APR major version and tells APR_FIND_APU() to find one that matches APR's major version (latter part untested). I wouldn't be at all surprised if other folks are already using APR trunk with httpd trunk daily and I've missed something basic, so comments appreciated ;)
Index: configure.in =================================================================== --- configure.in (revision 749280) +++ configure.in (working copy) @@ -73,18 +73,10 @@ AC_ARG_WITH(included-apr, APACHE_HELP_STRING(--with-included-apr,Use bundled copies of APR/APR-Util)) -# Default to APR 1.x -apr_version=1 - if test "x$with_included_apr" = "xyes"; then - # accept a bundled APR 2.x - if test -f "$srcdir/srclib/apr/apr-2-config"; then - apr_version=2 - fi apr_found=reconfig - apr_config="$srcdir/srclib/apr/apr-${apr_version}-config" else - APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, ${apr_version}) + APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, "1 2") fi if test "$apr_found" = "no"; then @@ -98,6 +90,14 @@ 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" + + dnl We have to find apr-N-config when we reconfigure APR. + for majorver in 1 2; do + test_apr_config="$srcdir/srclib/apr/apr-${majorver}-config" + if test -f $test_apr_config; then + apr_config=$test_apr_config + fi + done fi APR_SETIFNULL(CC, `$apr_config --cc`) @@ -110,22 +110,15 @@ APR_INCLUDEDIR=`$apr_config --includedir` APR_INCLUDES=`$apr_config --includes` APR_VERSION=`$apr_config --version` -APR_CONFIG="$APR_BINDIR/apr-`echo ${APR_VERSION} | sed 's,\..*,,'`-config" +apr_major_version=`echo ${APR_VERSION} | sed 's,\..*,,'` +APR_CONFIG="$APR_BINDIR/apr-${apr_major_version}-config" echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}" -# Default to APR-util 1.x -apu_version=1 - if test "x$with_included_apr" = "xyes"; then - # accept a bundled APU 2.x - if test -f "$srcdir/srclib/apr-util/apu-2-config"; then - apu_version=2 - fi apu_found=reconfig - apu_config="${srcdir}/srclib/apr-util/apu-${apu_version}-config" else - APR_FIND_APU("$srcdir/srclib/apr-util", "./srclib/apr-util", 1, ${apu_version}) + APR_FIND_APU("$srcdir/srclib/apr-util", "./srclib/apr-util", 1, ${apr_major_version}) fi if test "$apu_found" = "no"; then @@ -149,6 +142,8 @@ dnl We must be the last to build and the first to be cleaned AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apr-util" AP_CLEAN_SRCLIB_DIRS="apr-util $AP_CLEAN_SRCLIB_DIRS" + dnl APR and APR-Util major versions must match + apu_config="${srcdir}/srclib/apr-util/apu-${apr_major_version}-config" fi APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)