--- Tomboy/tomboy.in.orig	2005-10-19 10:55:23.000000000 +0100
+++ Tomboy/tomboy.in	2006-02-15 09:42:46.000000000 +0000
@@ -1,12 +1,13 @@
 #!/bin/sh
 
-if [ -e ./@target@ ] && [ -e ./Makefile.am ] ; then
+dn=`dirname $0`
+if [ -e "$dn/@target@" ] && [ -e "$dn/Makefile.am" ] ; then
     echo "*** Running uninstalled @target@ ***"
 
-    export LD_LIBRARY_PATH="../libtomboy/.libs:$LD_LIBRARY_PATH"
-    export TOMBOY_WRAPPER_PATH="$PWD/@wrapper@"
+    export LD_LIBRARY_PATH="$dn/../libtomboy/.libs:$LD_LIBRARY_PATH"
+    export TOMBOY_WRAPPER_PATH="$dn/@wrapper@"
 
-    THIS_EXE="--debug ./@target@"
+    THIS_EXE="--debug $dn/@target@"
 else
     export LD_LIBRARY_PATH="@pkglibdir@:$LD_LIBRARY_PATH"
     export TOMBOY_WRAPPER_PATH="@bindir@/@wrapper@"
