summaryrefslogtreecommitdiff
path: root/build/find_apu.m4
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2002-05-16 23:06:30 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2002-05-16 23:06:30 +0000
commit0eccb7bc537a6538004ff6876e9241deb320c563 (patch)
tree85e0797d4bad10b2343333ecd88ad34b1ad61c60 /build/find_apu.m4
parentf533cfdf718a4aa538d60ec96d5ae0cfb4da2caf (diff)
downloadlibapr-util-0eccb7bc537a6538004ff6876e9241deb320c563.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-util/trunk@58645 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/find_apu.m4')
-rw-r--r--build/find_apu.m430
1 files changed, 17 insertions, 13 deletions
diff --git a/build/find_apu.m4 b/build/find_apu.m4
index 42325caf..d83bccf9 100644
--- a/build/find_apu.m4
+++ b/build/find_apu.m4
@@ -6,12 +6,14 @@ dnl library. It provides a standardized mechanism for using APU. It supports
dnl embedding APU into the application source, or locating an installed
dnl copy of APU.
dnl
-dnl APR_FIND_APU([srcdir, path])
+dnl APR_FIND_APU([srcdir, path, implicit-install-check])
dnl
dnl where srcdir is the location of the bundled APU source directory, or
dnl empty if source is not bundled.
dnl where path is the prefix to the location where the bundled APU will
dnl will be built.
+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
@@ -70,18 +72,20 @@ The directory given to --with-apr-util does not specify a prefix for an
installed APU, nor an APR-util build directory.])
fi
],[
- if apu-config --help > /dev/null 2>&1 ; then
- apu_found="yes"
- apu_config="apu-config"
- else
- dnl look in the 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/apu-config"; then
- apu_found="yes"
- apu_config="$lookdir/bin/apu-config"
- break
- fi
- done
+ if test -n "$3" && test "$3" = "1"; then
+ if apu-config --help > /dev/null 2>&1 ; then
+ apu_found="yes"
+ apu_config="apu-config"
+ else
+ dnl look in the 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/apu-config"; then
+ apu_found="yes"
+ apu_config="$lookdir/bin/apu-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