summaryrefslogtreecommitdiff
path: root/build/find_apr.m4
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2005-02-24 08:07:33 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2005-02-24 08:07:33 +0000
commit8a330fec0ff00b9d33ea3ac589c0e8669e350a85 (patch)
tree2cb71ac02ddc312261caad05e84d201a2d8d6278 /build/find_apr.m4
parentc5820007158413de6ba666eb49e3007f22f3e82b (diff)
downloadlibapr-8a330fec0ff00b9d33ea3ac589c0e8669e350a85.tar.gz
* build/find_apr.m4:
Try installed APR before bundled copy if --with-apr not passed to configure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@155175 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/find_apr.m4')
-rw-r--r--build/find_apr.m443
1 files changed, 22 insertions, 21 deletions
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)