diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2003-01-08 09:47:04 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2003-01-08 09:47:04 +0000 |
commit | d476fe973afcfbfe0cdbde9bdb30475afb5eed3e (patch) | |
tree | abaf8dfeef07ee399909d326199aea02530f13b5 /apr-config.in | |
parent | ab5b096500491068a16f422dedc8279781bc7abf (diff) | |
download | apr-d476fe973afcfbfe0cdbde9bdb30475afb5eed3e.tar.gz |
Allow apr-config to work in symlinked install directories when 'realpath' is
available.
(Darwin and FreeBSD have realpath. Solaris doesn't.)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64278 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'apr-config.in')
-rw-r--r-- | apr-config.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apr-config.in b/apr-config.in index e3ab2dc16..ce54bf317 100644 --- a/apr-config.in +++ b/apr-config.in @@ -121,6 +121,11 @@ fi thisdir="`dirname $0`" thisdir="`cd $thisdir && pwd`" +# If we have the realpath program, use it to resolve symlinks. +# Otherwise, being in a symlinked dir may result in incorrect output. +if test -x `which realpath 2>/dev/null`; then + thisdir="`realpath $thisdir`" +fi if test -d $bindir; then tmpbindir="`cd $bindir && pwd`" else |