Skip to content

Commit

Permalink
Fix error in apr-config when symlinks are involved.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Justin Erenkrantz committed Mar 23, 2003
1 parent 2c962be commit f05ffde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -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

Expand Down
15 changes: 9 additions & 6 deletions apr-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f05ffde

Please sign in to comment.