summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2003-03-23 03:29:23 +0000
committerJustin Erenkrantz <jerenkrantz@apache.org>2003-03-23 03:29:23 +0000
commitf05ffdec934e30673c5ae4ccb6cf27171e98e89a (patch)
tree7928b6e710db5deee33751817d16b230dd0805d4
parent2c962be4eefd064e9290b50f7919899114baba4e (diff)
downloadapr-f05ffdec934e30673c5ae4ccb6cf27171e98e89a.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: https://svn.apache.org/repos/asf/apr/apr/trunk@64447 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--apr-config.in15
2 files changed, 11 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 7969d7013..ad56b3d94 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
Changes with APR 0.9.3
-
+ *) Fix error in apr-config when symlinks are involved.
+ [Garrett Rooney <rooneg@electricjellyfish.net>]
Changes with APR 0.9.2
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