summaryrefslogtreecommitdiff
path: root/apr-config.in
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2003-03-23 03:29:23 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2003-03-23 03:29:23 +0000
commit00563fc453e031a34f9c8806e2d7e9d4c817d0b0 (patch)
tree7928b6e710db5deee33751817d16b230dd0805d4 /apr-config.in
parentcbb40d004d0fc3d3c27282891208d914cc141df3 (diff)
downloadlibapr-00563fc453e031a34f9c8806e2d7e9d4c817d0b0.tar.gz
Fix error in apr-config when symlinks are involved.
Submitted by: Garrett Rooney <rooneg@electricjellyfish.net> Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64447 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'apr-config.in')
-rw-r--r--apr-config.in15
1 files changed, 9 insertions, 6 deletions
diff --git a/apr-config.in b/apr-config.in
index ed7bbfabb..0bb228c99 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -123,17 +123,20 @@ 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`"
- APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
-fi
if test -d $bindir; then
tmpbindir="`cd $bindir && pwd`"
else
tmpbindir=""
fi
+# 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`"
+ APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
+ if test -n $tmpbindir; then
+ tmpbindir="`realpath $tmpbindir`"
+ fi
+fi
if test "$tmpbindir" = "$thisdir"; then
location=installed
elif test "$APR_SOURCE_DIR" = "$thisdir"; then