Index: configure
===================================================================
--- configure	(revision 17661)
+++ configure	(working copy)
@@ -1739,7 +1739,12 @@
     HAS_IT="no"
     for LIBPATH in $LIBPATHS ; do
         if test x`ls $LIBPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
+            echo "$1  IS at $LIBPATH"
+            expr 1 > /dev/null
+            return
             HAS_IT="yes"
+        else
+            echo "$1 not at $LIBPATH"
         fi
     done
     expr $HAS_IT : "yes" > /dev/null
@@ -3090,6 +3095,7 @@
 
 echo "RUNPREFIX=$RUNPREFIX" >> $MYTH_CONFIG_MAK
 echo "PREFIX=$PREFIX" >> $MYTH_CONFIG_MAK
+echo "LIBDIRNAME=$libdir_name" >> $MYTH_CONFIG_MAK
 echo "LIBDIR=$libdir" >> $MYTH_CONFIG_MAK
 <<BLOCK_QUOTE
 echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak
Index: libs/libmythdb/mythdirs.cpp
===================================================================
--- libs/libmythdb/mythdirs.cpp	(revision 17661)
+++ libs/libmythdb/mythdirs.cpp	(working copy)
@@ -2,6 +2,7 @@
 #include <iostream>
 #include <QApplication>
 
+#include "mythconfig.h"  // for CONFIG_DARWIN
 #include "mythdirs.h"
 #include "mythverbose.h"
 
@@ -50,7 +51,7 @@
         confdir = QDir::homeDirPath() + "/.mythtv";
 
     sharedir = installprefix + "/share/mythtv/";
-    libdir = installprefix + "/lib/mythtv/";
+    libdir = installprefix + "/" + QString(LIBDIRNAME) + "/mythtv/";
     themedir = sharedir + "themes/";
     pluginsdir = libdir + "plugins/";
     translationsdir = sharedir + "i18n/";
Index: libs/libmythdb/libmythdb.pro
===================================================================
--- libs/libmythdb/libmythdb.pro	(revision 17661)
+++ libs/libmythdb/libmythdb.pro	(working copy)
@@ -37,6 +37,7 @@
 INSTALLS += inc inc2 inc3
 
 DEFINES += RUNPREFIX=\\\"$${RUNPREFIX}\\\"
+DEFINES += LIBDIRNAME=\\\"$${LIBDIRNAME}\\\"
 
 use_hidesyms {
     QMAKE_CXXFLAGS += -fvisibility=hidden
Index: settings.pro
===================================================================
--- settings.pro	(revision 17661)
+++ settings.pro	(working copy)
@@ -1,13 +1,20 @@
 CONFIG += $$CCONFIG
 
+# Where binaries, includes and runtime assets are installed by 'make install'
 isEmpty( PREFIX ) {
     PREFIX = /usr/local
 }
+# Where the binaries actually locate the assets/filters/plugins at runtime
 isEmpty( RUNPREFIX ) {
     RUNPREFIX = $$PREFIX
 }
+# Alternate library dir for OSes and packagers (e.g. lib64)
+isEmpty( LIBDIRNAME ) {
+    LIBDIRNAME = lib
+}
+# Where libraries, plugins and filters are installed
 isEmpty( LIBDIR ) {
-    LIBDIR = $${RUNPREFIX}/lib
+    LIBDIR = $${RUNPREFIX}/$${LIBDIRNAME}
 }
 
 LIBVERSION = 0.22
