summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES4
-rw-r--r--apr-config.in5
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index bbb0a5020..9278595eb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,8 @@
Changes with APR 0.9.2
+
+ *) Allow apr-config to work in symlinked install directories when
+ 'realpath' is available. [Justin Erenkrantz]
+
*) Namespace protect the header files in include/arch
[Thom May]
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