Patch: fix the way apr-config and apu-config try to figure out the
absolute position of the dir where they live.
Before the patch this works fine if the script is called directly or
if it lives in a symlinked dir. But if the script itself is symlinked this
doesnt work.
This patch fixes this behaviour.
Remark: the symlinked stuff only works if "realpath" is installed.
There is no error message or warning if there is a symlinked apr-config or apu-config
and realpath is not installed. Would be nice to have such....


* apu-config.in
* apr-config.in

--- apu-config.in       Fri Mar 21 01:30:50 2003
+++ apu-config.in.xela  Sat Apr  5 00:36:52 2003
@@ -114,7 +114,8 @@
 # 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`"
+    thisdir="`realpath $0`"
+    thisdir="`dirname $thisdir`"
     APU_SOURCE_DIR="`realpath $APU_SOURCE_DIR`"
 fi
 if test -d $bindir; then
--- apr-config.in       Fri Mar 21 01:30:56 2003
+++ apr-config.in.xela  Sat Apr  5 00:34:15 2003
@@ -126,7 +126,8 @@
 # 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`"
+  thisdir="`realpath $0`"
+  thisdir="`dirname $thisdir`"
   APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
 fi
 if test -d $bindir; then

Reply via email to