Index: i18n/translate.pro
===================================================================
--- i18n/translate.pro	(revision 8973)
+++ i18n/translate.pro	(working copy)
@@ -1,3 +1,10 @@
+include ( ../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 SOURCES += ../libs/libmyth/dbsettings.cpp
 SOURCES += ../libs/libmyth/langsettings.cpp
 SOURCES += ../libs/libmyth/managedlist.cpp
Index: i18n/i18n.pro
===================================================================
--- i18n/i18n.pro	(revision 8973)
+++ i18n/i18n.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../settings.pro )
 
 TEMPLATE = app
Index: configure
===================================================================
--- configure	(revision 8973)
+++ configure	(working copy)
@@ -570,12 +570,15 @@
 
 # find source path
 source_path="`dirname $0`"
+source_path="`cd \"$source_path\"; pwd`"
 source_path_used="yes"
-if test -z "$source_path" -o "$source_path" = "." ; then
+if test -z "$source_path" -o "$source_path" = "`pwd`"; then
     source_path=`pwd`
     source_path_used="no"
 else
+    build_path="`pwd`"
     source_path="`cd \"$source_path\"; pwd`"
+    CONFIG_INCLUDEPATH="$CONFIG_INCLUDEPATH $build_path"
 fi
 
 FFMPEG_CONFIGURATION=""
@@ -2224,6 +2227,22 @@
 
 MYTH_CONFIG_H=libs/libmyth/mythconfig.h
 MYTH_CONFIG_MAK=libs/libmyth/mythconfig.mak
+
+# build tree in object directory if source path is different from current one
+if test "$source_path_used" = "yes" ; then
+
+    FILES=`cd $source_path;find -iname \*.pro |sed -e "s/^.\///"`
+    DIRS=`echo $FILES |xargs -n 1 |sed -e "s/\/*[^\/]*$//;/^$/D" |sort -u`
+    for dir in $DIRS ; do
+            mkdir -p $dir
+            ln -sf "$source_path/$dir" $dir/sourcedir
+    done
+    for f in $FILES ; do
+        ln -sf "$source_path/$f" $f
+    done
+fi
+
+
 echo "Creating $MYTH_CONFIG_H and $MYTH_CONFIG_MAK"
 
 date >> config.log
@@ -2232,6 +2251,8 @@
 echo "/* Automatically generated by configure - do not modify */" > $TMPH
 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
 
+echo "SRC_PATH=$source_path" >> $MYTH_CONFIG_MAK
+echo "BUILD_PATH=$build_path" >> $MYTH_CONFIG_MAK
 echo "PREFIX=$prefix" >> $MYTH_CONFIG_MAK
 #echo "libdir=$libdir" >> $MYTH_CONFIG_MAK
 #echo "bindir=$bindir" >> $MYTH_CONFIG_MAK
@@ -2705,20 +2726,6 @@
   echo "#define always_inline"  >> $TMPH
 fi
 
-# build tree in object directory if source path is different from current one
-if test "$source_path_used" = "yes" ; then
-    DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
-          libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
-    FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
-    for dir in $DIRS ; do
-            mkdir -p $dir
-    done
-    for f in $FILES ; do
-        ln -sf "$source_path/$f" $f
-    done
-fi
-echo "SRC_PATH='$source_path'" >> $MYTH_CONFIG_MAK
-
 if test "$amr_wb" = "yes" ; then
   echo "#define AMR_WB 1" >> $TMPH
   echo "AMR_WB=yes" >> $MYTH_CONFIG_MAK
Index: version.pro
===================================================================
--- version.pro	(revision 8973)
+++ version.pro	(working copy)
@@ -5,7 +5,7 @@
 #        "exported" is reported as the revision.           #
 ############################################################
 
-SVNTREEDIR = $$system(pwd)
+SVNTREEDIR = $${SOURCE}
 
 SOURCES += version.cpp
 
Index: themes/themes.pro
===================================================================
--- themes/themes.pro	(revision 8973)
+++ themes/themes.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../settings.pro )
 
 QMAKE_STRIP = echo
Index: libs/libmythtv/nuppeldecoder.cpp
===================================================================
--- libs/libmythtv/nuppeldecoder.cpp	(revision 8973)
+++ libs/libmythtv/nuppeldecoder.cpp	(working copy)
@@ -12,7 +12,7 @@
 using namespace std;
 
 // MythTV headers
-#include "mythconfig.h"
+#include "config.h"
 #include "nuppeldecoder.h"
 #include "NuppelVideoPlayer.h"
 #include "remoteencoder.h"
Index: libs/libmythtv/NuppelVideoRecorder.cpp
===================================================================
--- libs/libmythtv/NuppelVideoRecorder.cpp	(revision 8973)
+++ libs/libmythtv/NuppelVideoRecorder.cpp	(working copy)
@@ -4,7 +4,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "mythconfig.h"
+#include "config.h"
 #ifdef HAVE_SYS_SOUNDCARD_H
     #include <sys/soundcard.h>
 #elif HAVE_SOUNDCARD_H
Index: libs/libmythtv/avformatdecoder.cpp
===================================================================
--- libs/libmythtv/avformatdecoder.cpp	(revision 8973)
+++ libs/libmythtv/avformatdecoder.cpp	(working copy)
@@ -8,7 +8,7 @@
 using namespace std;
 
 // MythTV headers
-#include "mythconfig.h" // for CONFIG_DTS
+#include "config.h" // for CONFIG_DTS
 #include "avformatdecoder.h"
 #include "RingBuffer.h"
 #include "NuppelVideoPlayer.h"
Index: libs/libmythtv/libmythtv.pro
===================================================================
--- libs/libmythtv/libmythtv.pro	(revision 8973)
+++ libs/libmythtv/libmythtv.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -7,9 +12,9 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH += ../.. ..
-INCLUDEPATH += ../libmyth ../libavcodec ../libavutil ../libmythmpeg2
-INCLUDEPATH += ./dvbdev ./mpeg
+INCLUDEPATH += $${SOURCE} $${SOURCE}/.. $${SOURCE}/../libmyth
+INCLUDEPATH += $${SOURCE}/../libavcodec $${SOURCE}/../libavutil
+INCLUDEPATH += $${SOURCE}/../libmythmpeg2 $${SOURCE}/dvbdev $${SOURCE}/mpeg
 DEPENDPATH  += ../libmyth ../libavcodec ../libavformat ../libavutil
 DEPENDPATH  += ../libmythmpeg2 ../libmythdvdnav
 DEPENDPATH  += ./dvbdev ./mpeg
Index: libs/libmythtv/videosource.cpp
===================================================================
--- libs/libmythtv/videosource.cpp	(revision 8973)
+++ libs/libmythtv/videosource.cpp	(working copy)
@@ -20,7 +20,7 @@
 #include <qdir.h>
 
 // MythTV headers
-#include "mythconfig.h"
+#include "config.h"
 #include "mythwidgets.h"
 #include "mythcontext.h"
 #include "mythdbcon.h"
Index: libs/libmythtv/ivtvdecoder.cpp
===================================================================
--- libs/libmythtv/ivtvdecoder.cpp	(revision 8973)
+++ libs/libmythtv/ivtvdecoder.cpp	(working copy)
@@ -8,7 +8,7 @@
 
 using namespace std;
 
-#include "mythconfig.h"
+#include "config.h"
 #include "ivtvdecoder.h"
 #include "RingBuffer.h"
 #include "NuppelVideoPlayer.h"
Index: libs/libmythtv/tv_rec.cpp
===================================================================
--- libs/libmythtv/tv_rec.cpp	(revision 8973)
+++ libs/libmythtv/tv_rec.cpp	(working copy)
@@ -16,7 +16,7 @@
 #include <qsocket.h>
 
 // MythTV headers
-#include "mythconfig.h"
+#include "config.h"
 #include "tv_rec.h"
 #include "osd.h"
 #include "mythcontext.h"
Index: libs/libmythtv/sitypes.cpp
===================================================================
--- libs/libmythtv/sitypes.cpp	(revision 8973)
+++ libs/libmythtv/sitypes.cpp	(working copy)
@@ -36,7 +36,7 @@
 #include <qdeepcopy.h>
 
 #include "sitypes.h"
-#include "mythconfig.h"
+#include "config.h"
 #include "mythcontext.h"
 
 // Set EIT_DEBUG_SID to a valid serviceid to enable EIT debugging
Index: libs/libmythmpeg2/libmythmpeg2.pro
===================================================================
--- libs/libmythmpeg2/libmythmpeg2.pro	(revision 8973)
+++ libs/libmythmpeg2/libmythmpeg2.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -22,7 +27,7 @@
 inc.path = $${PREFIX}/include/mythtv/mpeg2dec/
 inc.files = mpeg2.h
 
-INCLUDEPATH += ../../libs/libavcodec
+INCLUDEPATH += $${SOURCE}/../../libs/libavcodec
 
 INSTALLS += inc
 
Index: libs/libmythsoundtouch/libmythsoundtouch.pro
===================================================================
--- libs/libmythsoundtouch/libmythsoundtouch.pro	(revision 8973)
+++ libs/libmythsoundtouch/libmythsoundtouch.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -7,7 +12,7 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH += ../../libs/libavcodec ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libavcodec ../..
 
 QMAKE_CXXFLAGS_RELEASE += -fPIC -DPIC
 QMAKE_CXXFLAGS_DEBUG   += -fPIC -DPIC
Index: libs/libavformat/libavformat.pro
===================================================================
--- libs/libavformat/libavformat.pro	(revision 8973)
+++ libs/libavformat/libavformat.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -7,7 +12,7 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH += ../ ../../ ../libavcodec ../libavutil ../libmythtv
+INCLUDEPATH += ../ ../../ $${SOURCE}/../libavcodec $${SOURCE}/../libavutil ../libmythtv
 
 DEFINES += HAVE_AV_CONFIG_H _LARGEFILE_SOURCE
 
Index: libs/libmythsamplerate/libmythsamplerate.pro
===================================================================
--- libs/libmythsamplerate/libmythsamplerate.pro	(revision 8973)
+++ libs/libmythsamplerate/libmythsamplerate.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -7,7 +12,7 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH += ../../ 
+INCLUDEPATH += $${SOURCE}/../../ 
 
 QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -DHAVE_AV_CONFIG_H -I.. -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
 QMAKE_CFLAGS_DEBUG = -g -DHAVE_AV_CONFIG_H -I.. -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
Index: libs/libmythui/libmythui.pro
===================================================================
--- libs/libmythui/libmythui.pro	(revision 8973)
+++ libs/libmythui/libmythui.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -7,8 +12,8 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH += ../libmyth
-INCLUDEPATH += ../..
+INCLUDEPATH += $${SOURCE}/../libmyth
+INCLUDEPATH += $${SOURCE}/../..
 
 DEPENDPATH += ../libmyth .
 
Index: libs/libmyth/libmyth.pro
===================================================================
--- libs/libmyth/libmyth.pro	(revision 8973)
+++ libs/libmyth/libmyth.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
  
 TEMPLATE = lib
@@ -33,7 +38,7 @@
 SOURCES += DisplayResScreen.cpp util-x11.cpp qmdcodec.cpp
 SOURCES += virtualkeyboard.cpp mythobservable.cpp
 
-INCLUDEPATH += ../libmythsamplerate ../libmythsoundtouch ../..
+INCLUDEPATH += $${SOURCE}/../libmythsamplerate $${SOURCE}/../libmythsoundtouch ../..
 DEPENDPATH += ../libmythsamplerate ../libmythsoundtouch
 
 
Index: libs/libavcodec/libavcodec.pro
===================================================================
--- libs/libavcodec/libavcodec.pro	(revision 8973)
+++ libs/libavcodec/libavcodec.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -7,7 +12,7 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH = ../ ../../ ../libavutil
+INCLUDEPATH += ../ ../../  $${SOURCE}/../libavutil
 
 DEFINES += HAVE_AV_CONFIG_H _LARGEFILE_SOURCE
 
Index: libs/libavutil/libavutil.pro
===================================================================
--- libs/libavutil/libavutil.pro	(revision 8973)
+++ libs/libavutil/libavutil.pro	(working copy)
@@ -1,4 +1,10 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+    INCLUDEPATH += $$SRC_PATH
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
@@ -8,7 +14,7 @@
 target.path = $${PREFIX}/lib
 INSTALLS = target
 
-INCLUDEPATH = ../ ../../
+INCLUDEPATH += ../ ../../
 
 DEFINES += HAVE_AV_CONFIG_H _LARGEFILE_SOURCE
 
Index: libs/libmythdvdnav/libmythdvdnav.pro
===================================================================
--- libs/libmythdvdnav/libmythdvdnav.pro	(revision 8973)
+++ libs/libmythdvdnav/libmythdvdnav.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = lib
Index: programs/mythuitest/mythuitest.pro
===================================================================
--- programs/mythuitest/mythuitest.pro	(revision 8973)
+++ programs/mythuitest/mythuitest.pro	(working copy)
@@ -1,14 +1,17 @@
-INCLUDEPATH += ../../libs/libmythui ../../libs/libmyth
-
-LIBS += -L../../libs/libmyth -L../../libs/libmythui
-
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = app
 TARGET = mythuitest
 CONFIG += thread opengl
 
+INCLUDEPATH += $${SOURCE}/../../libs/libmythui $${SOURCE}/../../libs/libmyth
+LIBS += -L../../libs/libmyth -L../../libs/libmythui
 LIBS += -lmythui-$$LIBVERSION -lmyth-$$LIBVERSION $$EXTRA_LIBS
 
 isEmpty(QMAKE_EXTENSION_SHLIB) {
Index: programs/programs-libs.pro
===================================================================
--- programs/programs-libs.pro	(revision 8973)
+++ programs/programs-libs.pro	(working copy)
@@ -1,5 +1,7 @@
-INCLUDEPATH += ../../libs/ ../../libs/libmyth ../../libs/libmythtv  ../..
-INCLUDEPATH += ../../libs/libavutil ../../libs/libavformat ../../libs/libavcodec
+INCLUDEPATH += $${SOURCE}/../../libs/ $${SOURCE}/../../libs/libmyth 
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv  $${SOURCE}/../..
+INCLUDEPATH += $${SOURCE}/../../libs/libavutil $${SOURCE}/../../libs/libavformat 
+INCLUDEPATH += $${SOURCE}/../../libs/libavcodec
 
 LIBS += -L../../libs/libmyth -L../../libs/libmythtv
 LIBS += -L../../libs/libavutil -L../../libs/libavcodec -L../../libs/libavformat
Index: programs/mythfrontend/main.cpp
===================================================================
--- programs/mythfrontend/main.cpp	(revision 8973)
+++ programs/mythfrontend/main.cpp	(working copy)
@@ -14,7 +14,7 @@
 #include <iostream>
 using namespace std;
 
-#include "mythconfig.h"
+#include "config.h"
 #include "tv.h"
 #include "proglist.h"
 #include "progfind.h"
Index: programs/mythfrontend/mythfrontend.pro
===================================================================
--- programs/mythfrontend/mythfrontend.pro	(revision 8973)
+++ programs/mythfrontend/mythfrontend.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 include ( ../../version.pro )
 include ( ../programs-libs.pro )
Index: programs/mythjobqueue/mythjobqueue.pro
===================================================================
--- programs/mythjobqueue/mythjobqueue.pro	(revision 8973)
+++ programs/mythjobqueue/mythjobqueue.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro)
 include ( ../programs-libs.pro)
 
Index: programs/mythtvosd/mythtvosd.pro
===================================================================
--- programs/mythtvosd/mythtvosd.pro	(revision 8973)
+++ programs/mythtvosd/mythtvosd.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 
 TEMPLATE = app
@@ -8,7 +13,7 @@
 INSTALLS = target
 
 LIBS += $$EXTRA_LIBS 
-INCLUDEPATH += ../../libs/libmyth
+INCLUDEPATH += $${SOURCE}/../../libs/libmyth
 
 QMAKE_CLEAN += $(TARGET)
 
Index: programs/mythtranscode/mythtranscode.pro
===================================================================
--- programs/mythtranscode/mythtranscode.pro	(revision 8973)
+++ programs/mythtranscode/mythtranscode.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro)
 include ( ../programs-libs.pro)
 
@@ -17,6 +22,6 @@
 HEADERS += replex/element.h replex/mpg_common.h replex/multiplex.h \
            replex/pes.h     replex/ringbuffer.h
 
-INCLUDEPATH += replex
-INCLUDEPATH += ../../libs/libavcodec ../../libs/libavformat \
-               ../../libs/libavutil  ../../libs/libmythmpeg2
+INCLUDEPATH += $${SOURCE}/replex
+INCLUDEPATH += $${SOURCE}/../../libs/libavcodec $${SOURCE}/../../libs/libavformat \
+               $${SOURCE}/../../libs/libavutil  $${SOURCE}/../../libs/libmythmpeg2
Index: programs/mythcommflag/mythcommflag.pro
===================================================================
--- programs/mythcommflag/mythcommflag.pro	(revision 8973)
+++ programs/mythcommflag/mythcommflag.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include (../../settings.pro)
 include ( ../programs-libs.pro )
 
Index: programs/mythbackend/mythbackend.pro
===================================================================
--- programs/mythbackend/mythbackend.pro	(revision 8973)
+++ programs/mythbackend/mythbackend.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 include ( ../../version.pro )
 include ( ../programs-libs.pro )
Index: programs/mythbackend/main.cpp
===================================================================
--- programs/mythbackend/main.cpp	(revision 8973)
+++ programs/mythbackend/main.cpp	(working copy)
@@ -10,7 +10,7 @@
 #include <signal.h>
 #include <cerrno>
 
-#include "mythconfig.h"
+#include "config.h"
 #ifdef CONFIG_DARWIN
     #include <sys/aio.h>    // O_SYNC
 #endif
Index: programs/programs.pro
===================================================================
--- programs/programs.pro	(revision 8973)
+++ programs/programs.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../settings.pro )
 
 TEMPLATE = subdirs
Index: programs/mythlcdserver/mythlcdserver.pro
===================================================================
--- programs/mythlcdserver/mythlcdserver.pro	(revision 8973)
+++ programs/mythlcdserver/mythlcdserver.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 include ( ../programs-libs.pro )
 
Index: programs/mythtv/mythtv.pro
===================================================================
--- programs/mythtv/mythtv.pro	(revision 8973)
+++ programs/mythtv/mythtv.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 include ( ../programs-libs.pro )
 
Index: programs/mythfilldatabase/mythfilldatabase.pro
===================================================================
--- programs/mythfilldatabase/mythfilldatabase.pro	(revision 8973)
+++ programs/mythfilldatabase/mythfilldatabase.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../../settings.pro )
 include ( ../programs-libs.pro )
 
Index: programs/mythshutdown/mythshutdown.pro
===================================================================
--- programs/mythshutdown/mythshutdown.pro	(revision 8973)
+++ programs/mythshutdown/mythshutdown.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include (../../settings.pro)
 include (../programs-libs.pro)
 
Index: programs/mythwelcome/mythwelcome.pro
===================================================================
--- programs/mythwelcome/mythwelcome.pro	(revision 8973)
+++ programs/mythwelcome/mythwelcome.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include (../../settings.pro)
 include (../programs-libs.pro)
 
Index: setup/setup.pro
===================================================================
--- setup/setup.pro	(revision 8973)
+++ setup/setup.pro	(working copy)
@@ -1,4 +1,9 @@
 include ( ../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
 include ( ../settings.pro )
 
 TEMPLATE = app
@@ -6,7 +11,7 @@
 TARGET = mythtv-setup
 target.path = $${PREFIX}/bin
 
-INCLUDEPATH += ../libs/libmythtv ../libs ../libs/libmyth
+INCLUDEPATH += $${SOURCE}/../libs/libmythtv $${SOURCE}/../libs $${SOURCE}/../libs/libmyth
 
 LIBS += -L../libs/libmyth -L../libs/libmythtv -L../libs/libavcodec
 LIBS += -L../libs/libavformat -L../libs/libavutil
Index: filters/linearblend/linearblend.pro
===================================================================
--- filters/linearblend/linearblend.pro	(revision 8973)
+++ filters/linearblend/linearblend.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv $${SOURCE}/../..
 
 # Input
 SOURCES += filter_linearblend.c
Index: filters/convert/convert.pro
===================================================================
--- filters/convert/convert.pro	(revision 8973)
+++ filters/convert/convert.pro	(working copy)
@@ -1,6 +1,13 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 
-INCLUDEPATH += ../../libs/libmythtv
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv
 
 # Input
 SOURCES += filter_convert.c
Index: filters/quickdnr/quickdnr.pro
===================================================================
--- filters/quickdnr/quickdnr.pro	(revision 8973)
+++ filters/quickdnr/quickdnr.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv ../../libs/libavcodec ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv $${SOURCE}/../../libs/libavcodec $${SOURCE}/../..
 
 # Input
 SOURCES += filter_quickdnr.c
Index: filters/postprocess/postprocess.pro
===================================================================
--- filters/postprocess/postprocess.pro	(revision 8973)
+++ filters/postprocess/postprocess.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv
 DEPENDPATH  += ../../libs/libmythtv
 
 SOURCES += filter_postprocess.c
Index: filters/onefield/onefield.pro
===================================================================
--- filters/onefield/onefield.pro	(revision 8973)
+++ filters/onefield/onefield.pro	(working copy)
@@ -1,6 +1,13 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 
-INCLUDEPATH += ../../libs/libmythtv
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv
 
 # Input
 SOURCES += filter_onefield.c
Index: filters/bobdeint/bobdeint.pro
===================================================================
--- filters/bobdeint/bobdeint.pro	(revision 8973)
+++ filters/bobdeint/bobdeint.pro	(working copy)
@@ -1,6 +1,13 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 
-INCLUDEPATH += ../../libs/libmythtv
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv
 
 # Input
 SOURCES += filter_bobdeint.c
Index: filters/filter-avcodec.pro
===================================================================
--- filters/filter-avcodec.pro	(revision 8973)
+++ filters/filter-avcodec.pro	(working copy)
@@ -3,7 +3,7 @@
 # This eliminates a linker warning
 CONFIG += qt
 
-INCLUDEPATH += ../../libs/libavcodec ../../libs/libavutil
+INCLUDEPATH += $${SOURCE}/../../libs/libavcodec $${SOURCE}/../../libs/libavutil
 DEPENDPATH  += ../../libs/libavcodec ../../libs/libavutil
 
 LIBS += -L../../libs/libavutil -lmythavutil-$${LIBVERSION}
Index: filters/adjust/adjust.pro
===================================================================
--- filters/adjust/adjust.pro	(revision 8973)
+++ filters/adjust/adjust.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv ../../libs/libavcodec ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv $${SOURCE}/../../libs/libavcodec $${SOURCE}/../..
 
 # Input
 SOURCES += filter_adjust.c
Index: filters/force/force.pro
===================================================================
--- filters/force/force.pro	(revision 8973)
+++ filters/force/force.pro	(working copy)
@@ -1,6 +1,13 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 
-INCLUDEPATH += ../../libs/libmythtv
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv
 
 # Input
 SOURCES += filter_force.c
Index: filters/crop/crop.pro
===================================================================
--- filters/crop/crop.pro	(revision 8973)
+++ filters/crop/crop.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv ../../libs/libavcodec ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv $${SOURCE}/../../libs/libavcodec $${SOURCE}/../..
 
 # Input
 SOURCES += filter_crop.c
Index: filters/kerneldeint/kerneldeint.pro
===================================================================
--- filters/kerneldeint/kerneldeint.pro	(revision 8973)
+++ filters/kerneldeint/kerneldeint.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv ../../libs/libavcodec ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv $${SOURCE}/../../libs/libavcodec $${SOURCE}/../..
 
 # Input
 SOURCES += filter_kerneldeint.c
Index: filters/invert/invert.pro
===================================================================
--- filters/invert/invert.pro	(revision 8973)
+++ filters/invert/invert.pro	(working copy)
@@ -1,6 +1,13 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 
-INCLUDEPATH += ../../libs/libmythtv
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv
 
 # Input
 SOURCES += filter_invert.c
Index: filters/denoise3d/denoise3d.pro
===================================================================
--- filters/denoise3d/denoise3d.pro	(revision 8973)
+++ filters/denoise3d/denoise3d.pro	(working copy)
@@ -1,7 +1,14 @@
+include ( ../../config.mak )
+SOURCE=.
+exists ( sourcedir ) {
+    SOURCE=$$system( readlink sourcedir )
+    VPATH=$$SOURCE
+}
+
 include ( ../filter-common.pro )
 include ( ../filter-avcodec.pro )
 
-INCLUDEPATH += ../../libs/libmythtv ../../libs/libavcodec ../..
+INCLUDEPATH += $${SOURCE}/../../libs/libmythtv $${SOURCE}/../../libs/libavcodec $${SOURCE}/../..
 
 # Input
 SOURCES += filter_denoise3d.c
