diff options
author | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2002-05-16 23:06:30 +0000 |
---|---|---|
committer | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2002-05-16 23:06:30 +0000 |
commit | 4b6fda9bbc2c788349b53ac1228effb662ca5c02 (patch) | |
tree | 63a594b1e6c7cf2ce96f6e5724011f46db8145ef /build/find_apr.m4 | |
parent | 59cbe26c1ab0b9711f21bc26b682195cd3b130fe (diff) | |
download | libapr-4b6fda9bbc2c788349b53ac1228effb662ca5c02.tar.gz |
Make it so that the installed programs must explicitly set a value in
the APR_FIND_APR, APR_FIND_APU macros to allow searching in the "default"
locations when no --with-apr{-util} value is specified.
Searching for default locations arbitrarily may result in locations
being used that are out-of-date. (A variation on this may be to ignore
directories that are equivalent to our prefix, but this seems safer.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/find_apr.m4')
-rw-r--r-- | build/find_apr.m4 | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/build/find_apr.m4 b/build/find_apr.m4 index df0148d58..a334cc168 100644 --- a/build/find_apr.m4 +++ b/build/find_apr.m4 @@ -6,7 +6,7 @@ dnl library. It provides a standardized mechanism for using APR. It supports dnl embedding APR into the application source, or locating an installed dnl copy of APR. dnl -dnl APR_FIND_APR([srcdir [, builddir]]) +dnl APR_FIND_APR([srcdir [, builddir, implicit-install-check]]) dnl dnl where srcdir is the location of the bundled APR source directory, or dnl empty if source is not bundled. @@ -14,6 +14,8 @@ dnl dnl where blddir is the location where the bundled APR will will be built, dnl or empty if the build will occur in the srcdir. dnl +dnl where implicit-install-check set to 1 indicates if there is no +dnl --with-apr option specified, we will look for installed copies. dnl dnl Sets the following variables on exit: dnl @@ -71,19 +73,20 @@ AC_DEFUN(APR_FIND_APR, [ build directory, or an apr-config file.]) fi ],[ - dnl always look in the builtin/default places - if apr-config --help > /dev/null 2>&1 ; then - apr_found="yes" - apr_config="apr-config" - else - dnl look in some standard places (apparently not in builtin/default) - for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do - if $TEST_X "$lookdir/bin/apr-config"; then - apr_found="yes" - apr_config="$lookdir/bin/apr-config" - break - fi - done + if test -n "$3" && test "$3" = "1"; then + if apr-config --help > /dev/null 2>&1 ; then + apr_found="yes" + apr_config="apr-config" + else + dnl look in some standard places (apparently not in builtin/default) + for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do + if $TEST_X "$lookdir/bin/apr-config"; then + apr_found="yes" + apr_config="$lookdir/bin/apr-config" + break + fi + done + fi fi dnl if we have a bundled source directory, then we may have more work if test -d "$1"; then |