Index: configure
===================================================================
--- configure	(revision 17439)
+++ configure	(working copy)
@@ -180,6 +180,8 @@
   echo "  --enable-directx         enable DirectX   (Microsoft video)"
   echo ""
   echo "  --enable-mac-bundle      produce standalone OS X apps (e.g. mythfrontend.app)"
+  echo "  --runtime-prefix=PREFIX  prefix to be used at runtime"
+  echo "                           (e.g. .. or /myth/latest)"
   echo ""
   echo "  --with-bindings=LIST     install the bindings specified in the"
   echo "                           comma-separated list"
@@ -1160,6 +1162,7 @@
 CONFIG_DEFINES=""
 CONFIG_INCLUDEPATH=""
 PROFILEFLAGS=""
+RUNPREFIX=$PREFIX
 audio_alsa="default"
 audio_alsa_libs="-lasound"
 audio_arts="default"
@@ -1395,6 +1398,8 @@
   ;;
   --enable-mac-bundle) enable mac_bundle
   ;;
+  --runtime-prefix=*) RUNPREFIX="$optval"
+  ;;
   --previous|--prev)
       echo "No history of previous configure parameters."
   ;;
@@ -2889,6 +2894,7 @@
 echo "DistCC                    $distcc$distcc_txt"
 echo "qmake                     $(which $qmake)"
 echo "install prefix            $PREFIX"
+echo "runtime prefix            $RUNPREFIX"
 <<BLOCK_QUOTE
 echo "source path               $source_path"
 echo "C compiler                $cc"
@@ -3076,6 +3082,7 @@
 echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
 
 echo "PREFIX=$PREFIX" >> $MYTH_CONFIG_MAK
+echo "RUNPREFIX=$RUNPREFIX" >> $MYTH_CONFIG_MAK
 echo "LIBDIR=$libdir" >> $MYTH_CONFIG_MAK
 <<BLOCK_QUOTE
 echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak
Index: libs/libmyth/mythcontext.cpp
===================================================================
--- libs/libmyth/mythcontext.cpp	(revision 17439)
+++ libs/libmyth/mythcontext.cpp	(working copy)
@@ -221,7 +221,7 @@
     Settings *m_settings;          ///< connection stuff, theme, button style
     Settings *m_qtThemeSettings;   ///< everything else theme-related
 
-    QString   m_installprefix;     ///< Compile-time PREFIX, or generated
+    QString   m_installprefix;     ///< Compile-time RUNPREFIX, or generated
                                    ///< from enviroment ($MYTHTVDIR or $cwd)
     QString   m_installlibdir;     ///< Compile-time LIBDIR, or generated
 
@@ -314,7 +314,7 @@
 MythContextPrivate::MythContextPrivate(MythContext *lparent)
     : parent(lparent),
       m_settings(new Settings()), m_qtThemeSettings(new Settings()),
-      m_installprefix(PREFIX), m_installlibdir(LIBDIR),
+      m_installprefix(RUNPREFIX), m_installlibdir(LIBDIR),
       m_gui(false), m_backend(false), m_themeloaded(false),
       m_menuthemepathname(QString::null), m_themepathname(QString::null),
       m_backgroundimage(NULL),
@@ -368,15 +368,6 @@
             m_installlibdir = prefixDir.canonicalPath();
         }
     }
-    else if (prefixDir.path().contains(".app/Contents/MacOS"))
-    {
-        prefixDir.cd("../Resources");
-        if (QDir(prefixDir.canonicalPath() + "/bin").exists() ||
-            QDir(prefixDir.canonicalPath() + "/share").exists())
-            m_installprefix = prefixDir.canonicalPath();
-        if (QDir(prefixDir.canonicalPath() + "/lib").exists())
-            m_installlibdir = prefixDir.canonicalPath() + "/lib";
-    }
 
     VERBOSE(VB_IMPORTANT, QString("Using runtime prefix = %1, libdir = %2")
                           .arg(m_installprefix).arg(m_installlibdir));
Index: settings.pro
===================================================================
--- settings.pro	(revision 17439)
+++ settings.pro	(working copy)
@@ -3,6 +3,12 @@
 isEmpty( PREFIX ) {
     PREFIX = /usr/local
 }
+isEmpty( RUNPREFIX ) {
+    RUNPREFIX = $$PREFIX
+}
+isEmpty( LIBDIR ) {
+    LIBDIR = $${RUNPREFIX}/lib
+}
 
 LIBVERSION = 0.22
 VERSION = 0.22.0
@@ -90,6 +96,7 @@
 DEFINES += _GNU_SOURCE
 DEFINES += _FILE_OFFSET_BITS=64
+DEFINES += RUNPREFIX=\\\"$${RUNPREFIX}\\\"
 DEFINES += PREFIX=\\\"$${PREFIX}\\\"
 DEFINES += LIBDIR=\\\"$${LIBDIR}\\\"
 
 # construct linking path
