diff -urN rpm-4.9.1.2.old/configure.ac rpm-4.9.1.2/configure.ac
--- rpm-4.9.1.2.old/configure.ac	2012-04-19 12:18:27.584725220 +0200
+++ rpm-4.9.1.2/configure.ac	2012-04-19 12:34:50.302722933 +0200
@@ -846,13 +846,7 @@
 AC_SUBST(RPMCANONGNU)
 AC_DEFINE_UNQUOTED([RPMCANONVENDOR],["${RPMCANONVENDOR}"],[canonical vendor])
 
-if test X"$prefix" = XNONE ; then
-    usrprefix="$ac_default_prefix"
-else
-    usrprefix=$prefix
-fi
-
-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
+RPMCONFIGDIR="`echo ${libexecdir}/rpm/`"
 AC_SUBST(RPMCONFIGDIR)
 
 AC_SUBST(OBJDUMP)
diff -urN rpm-4.9.1.2.old/rpm.am rpm-4.9.1.2/rpm.am
--- rpm-4.9.1.2.old/rpm.am	2012-04-19 12:18:27.584725220 +0200
+++ rpm-4.9.1.2/rpm.am	2012-04-19 12:24:49.035724332 +0200
@@ -1,7 +1,5 @@
 # Internal binaries
-## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
-rpmlibexecdir = $(prefix)/lib/rpm
+rpmlibexecdir = $(pkglibexecdir)
 
 # Host independent config files
-## HACK: it probably should be $(datadir)/rpm
-rpmconfigdir = $(prefix)/lib/rpm
+rpmconfigdir = $(pkglibexecdir)
