summaryrefslogtreecommitdiff
path: root/apr-config.in
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2003-01-08 09:47:04 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2003-01-08 09:47:04 +0000
commit6d0d00ebc5ea7fea9cb1bcaa04e3d134d70f0e9e (patch)
treeabaf8dfeef07ee399909d326199aea02530f13b5 /apr-config.in
parentd5545ef73e14e789380cc368db5bb009f8dce76f (diff)
downloadlibapr-6d0d00ebc5ea7fea9cb1bcaa04e3d134d70f0e9e.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: http://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.in5
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