Index: configure
===================================================================
--- configure	(revision 8381)
+++ configure	(working copy)
@@ -74,7 +74,16 @@
 valgrind="no"
 frontend="yes"
 backend="no"
+svn_revision=`( svnversion . 2>/dev/null ) || echo "Release 0.19.0"`
+ 
+echo "Source revision: $svn_revision"
 
+cat > libs/libmyth/vers.cpp <<EOF
+#include "vers.h"
+
+const char *myth_source_version = "$svn_revision";
+EOF
+
 if test x"$CC" != x"" ; then
     cc="$CC"
 fi
Index: libs/libmyth/libmyth.pro
===================================================================
--- libs/libmyth/libmyth.pro	(revision 8381)
+++ libs/libmyth/libmyth.pro	(working copy)
@@ -17,7 +17,7 @@
 HEADERS += uilistbtntype.h generictree.h screensaver.h
 HEADERS += managedlist.h DisplayRes.h volumebase.h audiooutputbase.h
 HEADERS += dbsettings.h screensaver-null.h output.h visual.h
-HEADERS += langsettings.h audiooutputnull.h
+HEADERS += langsettings.h audiooutputnull.h vers.h
 HEADERS += DisplayResScreen.h util-x11.h mythdeque.h qmdcodec.h
 HEADERS += exitcodes.h virtualkeyboard.h mythobservable.h mythevent.h
 
@@ -31,7 +31,7 @@
 SOURCES += dbsettings.cpp screensaver.cpp screensaver-null.cpp output.cpp
 SOURCES += langsettings.cpp mythdbcon.cpp audiooutputnull.cpp
 SOURCES += DisplayResScreen.cpp util-x11.cpp qmdcodec.cpp
-SOURCES += virtualkeyboard.cpp mythobservable.cpp
+SOURCES += virtualkeyboard.cpp mythobservable.cpp vers.cpp
 
 INCLUDEPATH += ../libmythsamplerate ../libmythsoundtouch ../..
 DEPENDPATH += ../libmythsamplerate ../libmythsoundtouch
@@ -58,7 +58,7 @@
 inc.files += uilistbtntype.h generictree.h managedlist.h
 inc.files += visual.h volumebase.h output.h langsettings.h qmdcodec.h
 inc.files += exitcodes.h mythconfig.h mythconfig.mak virtualkeyboard.h
-inc.files += mythevent.h mythobservable.h
+inc.files += mythevent.h mythobservable.h vers.h
 
 using_oss {
     DEFINES += USING_OSS
Index: libs/libmyth/vers.h
===================================================================
--- libs/libmyth/vers.h	(revision 0)
+++ libs/libmyth/vers.h	(revision 0)
@@ -0,0 +1,7 @@
+#ifndef VERS_H_
+#define VERS_H_
+
+extern const char *myth_source_version;
+
+#endif
+
Index: programs/mythfrontend/main.cpp
===================================================================
--- programs/mythfrontend/main.cpp	(revision 8381)
+++ programs/mythfrontend/main.cpp	(working copy)
@@ -47,6 +47,8 @@
 #include "langsettings.h"
 #include "livetvchain.h"
 
+#include "vers.h"
+
 #define NO_EXIT  0
 #define QUIT     1
 #define HALT     2
@@ -840,7 +842,8 @@
         }
         else if (!strcmp(a.argv()[argpos],"--version"))
         {
-            cout << MYTH_BINARY_VERSION << endl;
+            cout << "Source version: " << myth_source_version << endl;
+            cout << "API version: " << MYTH_BINARY_VERSION << endl;
 #ifdef MYTH_BUILD_CONFIG
             cout << "Options compiled in:" <<endl;
             cout << MYTH_BUILD_CONFIG << endl;
@@ -987,8 +990,9 @@
         return FRONTEND_EXIT_DB_OUTOFDATE;
     }
 
-    VERBOSE(VB_ALL, QString("%1 version: %2 www.mythtv.org")
-                            .arg(binname).arg(MYTH_BINARY_VERSION));
+    VERBOSE(VB_ALL, QString("%1 version: %2, %3 www.mythtv.org")
+                            .arg(binname).arg(myth_source_version)
+                            .arg(MYTH_BINARY_VERSION));
 
     VERBOSE(VB_ALL, QString("Enabled verbose msgs: %1").arg(verboseString));
 
Index: programs/mythbackend/main.cpp
===================================================================
--- programs/mythbackend/main.cpp	(revision 8381)
+++ programs/mythbackend/main.cpp	(working copy)
@@ -30,6 +30,7 @@
 #include "libmyth/mythcontext.h"
 #include "libmyth/mythdbcon.h"
 #include "libmyth/exitcodes.h"
+#include "libmyth/vers.h"
 #include "libmythtv/programinfo.h"
 #include "libmythtv/dbcheck.h"
 #include "libmythtv/jobqueue.h"
@@ -323,7 +324,8 @@
         } 
         else if (!strcmp(a.argv()[argpos],"--version"))
         {
-            cout << MYTH_BINARY_VERSION << endl;
+            cout << "Source version: " << myth_source_version << endl;
+            cout << "API version: " << MYTH_BINARY_VERSION << endl;
 #ifdef MYTH_BUILD_CONFIG
             cout << "Options compiled in:" <<endl;
             cout << MYTH_BUILD_CONFIG << endl;
@@ -517,8 +519,9 @@
     else
         jobqueue = new JobQueue(ismaster);
 
-    VERBOSE(VB_ALL, QString("%1 version: %2 www.mythtv.org")
-                            .arg(binname).arg(MYTH_BINARY_VERSION));
+    VERBOSE(VB_ALL, QString("%1 version: %2, %3 www.mythtv.org")
+                            .arg(binname).arg(myth_source_version)
+                            .arg(MYTH_BINARY_VERSION));
 
     VERBOSE(VB_ALL, QString("Enabled verbose msgs: %1").arg(verboseString));
 
Index: settings.pro
===================================================================
--- settings.pro	(revision 8381)
+++ settings.pro	(working copy)
@@ -42,6 +42,7 @@
 QMAKE_CFLAGS += $$ARCHFLAGS
 QMAKE_CFLAGS_SHLIB = -DPIC -fPIC
 QMAKE_CFLAGS_RELEASE = $${QMAKE_CXXFLAGS_RELEASE}
+QMAKE_CFLAGS_DEBUG = $${QMAKE_CXXFLAGS_DEBUG}
 QMAKE_CFLAGS += $$ECFLAGS
 
 profile {
