apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: [PATCH] fix apr-config with symlinks
Date Sun, 23 Mar 2003 03:16:10 GMT
--On Saturday, March 22, 2003 10:12 PM -0500 Garrett Rooney 
<rooneg@electricjellyfish.net> wrote:

> here's a diff that fixes it on my freebsd 5.0 machine.  (note, a similar
> thing will need to be done for apu-config.in, as it looks like it makes the
> same mistake).

Not all systems have 'realpath.'  Try this.  If it works, I can commit it to 
all the variants...  *sigh*  -- justin

Index: apr-config.in
===================================================================
RCS file: /home/cvs/apr/apr-config.in,v
retrieving revision 1.31
diff -u -r1.31 apr-config.in
--- apr-config.in	6 Mar 2003 00:14:41 -0000	1.31
+++ apr-config.in	23 Mar 2003 03:14:46 -0000
@@ -123,16 +123,19 @@

 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 -d $tmpbindir; then
+    tmpbindir="`realpath $tmpbindir`"
+  fi
 fi
 if test "$tmpbindir" = "$thisdir"; then
   location=installed


Mime
View raw message