Merge r395211, r410828 from trunk: * configure.in: Add --with-included-apr flag to force use of the bundled copies of APR and APR-util. * configure.in: Use common variables for the required APR/APR-util version. Reviewed by: jorton Index: configure.in =================================================================== --- configure.in (revision 410829) +++ configure.in (working copy) @@ -61,8 +61,19 @@ echo $ac_n "${nl}Configuring Apache Portable Runtime library ...${nl}" -APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1) +AC_ARG_WITH(included-apr, +APACHE_HELP_STRING(--with-included-apr,Use bundled copies of APR/APR-Util)) +# Only APR 1.x is supported. +apr_version=1 + +if test "x$with_included_apr" = "xyes"; then + apr_found=reconfig + apr_config="$srcdir/srclib/apr/apr-${apr_version}-config" +else + APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, ${apr_version}) +fi + if test "$apr_found" = "no"; then AC_MSG_ERROR([APR not found. Please read the documentation.]) fi @@ -89,8 +100,16 @@ echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}" -APR_FIND_APU("$srcdir/srclib/apr-util", "./srclib/apr-util", 1, 1) +# Only APR-util 1.x is supported. +apu_version=1 +if test "x$with_included_apr" = "xyes"; then + 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}) +fi + if test "$apu_found" = "no"; then AC_MSG_ERROR([APR-util not found. Please read the documentation.]) fi