Index: Tomboy/Makefile.am
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/Makefile.am,v
retrieving revision 1.46
diff -u -r1.46 Makefile.am
--- Tomboy/Makefile.am	20 Nov 2006 21:20:37 -0000	1.46
+++ Tomboy/Makefile.am	21 Nov 2006 07:15:14 -0000
@@ -86,6 +86,7 @@
 	    -e "s|\@target\@|$(TARGET)|g" 		\
 	    -e "s|\@wrapper\@|$(WRAPPER)|g"		\
 	    -e "s|\@extragac\@|$(EXTRA_GAC_PREFIX)|g"	\
+	    -e "s|\@top_srcdir\@|$(PWD)/..|g"	\
 	    < $< > $@
 	chmod +x $(WRAPPER)
 
Index: Tomboy/tomboy.in
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/tomboy.in,v
retrieving revision 1.7
diff -u -r1.7 tomboy.in
--- Tomboy/tomboy.in	19 Oct 2005 09:55:23 -0000	1.7
+++ Tomboy/tomboy.in	21 Nov 2006 07:15:14 -0000
@@ -1,13 +1,14 @@
 #!/bin/sh
 
-if [ -e ./@target@ ] && [ -e ./Makefile.am ] ; then
+if (test "x--uninstalled" = "x$1") || (test "x--uninstalled" = "x$2") ; then
     echo "*** Running uninstalled @target@ ***"
 
-    export LD_LIBRARY_PATH="../libtomboy/.libs:$LD_LIBRARY_PATH"
-    export TOMBOY_WRAPPER_PATH="$PWD/@wrapper@"
+    export LD_LIBRARY_PATH="@top_srcdir@/libtomboy/.libs:$LD_LIBRARY_PATH"
+    export TOMBOY_WRAPPER_PATH="@top_srcdir@/Tomboy/@wrapper@"
 
-    THIS_EXE="--debug ./@target@"
+    THIS_EXE="--debug @top_srcdir@/Tomboy/@target@"
 else
+	cd @bindir@
     export LD_LIBRARY_PATH="@pkglibdir@:$LD_LIBRARY_PATH"
     export TOMBOY_WRAPPER_PATH="@bindir@/@wrapper@"
 
