summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2005-02-24 08:14:55 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2005-02-24 08:14:55 +0000
commite9d7f35ed8ac1c4688377b7f30bf7d0f2ccafef4 (patch)
tree4625ebd7f9721fd55161a67dfdbd6427d5446d90
parent44e2945e7998db58d4c4d28e032f49c51051eb75 (diff)
downloadlibapr-e9d7f35ed8ac1c4688377b7f30bf7d0f2ccafef4.tar.gz
* build/find_apr.m4:
Try installed APR before bundled copy if --with-apr not passed to configure. MFC: r155175 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.1.x@155178 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES5
-rw-r--r--build/find_apr.m443
2 files changed, 27 insertions, 21 deletions
diff --git a/CHANGES b/CHANGES
index eb6a40958..cc1cf50f1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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)