diff options
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | build/find_apr.m4 | 43 |
2 files changed, 27 insertions, 21 deletions
@@ -1,3 +1,8 @@ +Changes for APR 1.1.1 + + *) find_apr.m4: Try installed APR before bundled copy if --with-apr not + passed to configure. [Justin Erenkrantz] + Changes for APR 1.1.0 *) Added apr_procattr_user_set and apr_procattr_group_set diff --git a/build/find_apr.m4 b/build/find_apr.m4 index d8a29dd81..9228c769b 100644 --- a/build/find_apr.m4 +++ b/build/find_apr.m4 @@ -118,8 +118,28 @@ AC_DEFUN([APR_FIND_APR], [ AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.]) fi ],[ - dnl if we have a bundled source directory, use it - if test -d "$1"; then + dnl If we allow installed copies, check those before using bundled copy. + if test -n "$3" && test "$3" = "1"; then + for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config + do + if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then + apr_found="yes" + apr_config="$apr_temp_apr_config_file" + break + else + dnl look in some standard places + for lookdir in /usr /usr/local /usr/local/apr /opt/apr /usr/local/apache2; do + if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then + apr_found="yes" + apr_config="$lookdir/bin/$apr_temp_apr_config_file" + break 2 + fi + done + fi + done + fi + dnl if we have not found anything yet and have bundled source, use that + if test "$apr_found" = "no" && test -d "$1"; then apr_temp_abs_srcdir="`cd $1 && pwd`" apr_found="reconfig" apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apr_version.h\"`" @@ -140,25 +160,6 @@ AC_DEFUN([APR_FIND_APR], [ apr_config="$1/$apr_temp_apr_config_file" fi fi - if test "$apr_found" = "no" && test -n "$3" && test "$3" = "1"; then - for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config - do - if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then - apr_found="yes" - apr_config="$apr_temp_apr_config_file" - break - else - dnl look in some standard places - for lookdir in /usr /usr/local /usr/local/apr /opt/apr /usr/local/apache2; do - if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then - apr_found="yes" - apr_config="$lookdir/bin/$apr_temp_apr_config_file" - break 2 - fi - done - fi - done - fi ]) AC_MSG_RESULT($apr_found) |