--- /dev/null
+diff -ur poldek-0.30.1.orig/configure.ac poldek-0.30.1/configure.ac
+--- poldek-0.30.1.orig/configure.ac 2014-03-26 19:23:01.000000000 +0000
++++ poldek-0.30.1/configure.ac 2015-07-12 20:28:29.254107458 +0000
+@@ -299,35 +299,13 @@
+ AC_CHECK_FUNCS(gzungetc)
+
+ DBLIB=""
+-if test "${is_rpm4_0_4}." = "no." ; then
+- dnl tocheck: -ldb-3.1 causes link with static lib from /usr/lib
+- dnl instead shared one from /lib
+- #AC_CHECK_LIB(db-3.1, db_create, [DBLIB="-ldb-3.1"],
+- # AC_CHECK_LIB(db-3.0, db_create, [DBLIB="-ldb-3.0"],
+- # AC_CHECK_LIB(db, db_create, [DBLIB="-ldb"])
+- # )
+- #)
+- CPPFLAGS="-I/usr/include/db3 $CPPFLAGS"
+-
+- AC_CHECK_LIB(db, db_create, [DBLIB="-ldb"],,[$LIBS])
+- # assume that librpm complied with --enable-db1
+- #if test "${ENABLE_STATIC}." = "yes."; then
+- # DBLIB="$DBLIB -ldb1"
+- #fi
+-else
+- AC_CHECK_LIB(db4, db_create, [DBLIB="-ldb4" DBINCLUDE="-I/usr/include/db4"],
+- [AC_CHECK_LIB(db-4.1, db_create, [DBLIB="-ldb-4.1" DBINCLUDE="-I/usr/include/db4.1"],
+- [AC_CHECK_LIB(db-4.0, db_create, [DBLIB="-ldb-4.0" DBINCLUDE="-I/usr/include/db4.0"],
+- [AC_CHECK_LIB(db-5.2, db_create, [DBLIB="-ldb-5.2" DBINCLUDE="-I/usr/include/db5.2"],,[$LIBS])],
+- [$LIBS])],, [$LIBS])],, [$LIBS])
++AC_CHECK_LIB(db-4.5, db_create, [DBLIB="-ldb-4.5" DBINCLUDE="-I/usr/include/db4.5"],,[$LIBS])
+
+- if test "${ENABLE_STATIC}." = "yes."; then
+- DBLIB="$DBLIB"
+- fi
+-
+- CPPFLAGS="$DBINCLUDE $CPPFLAGS"
++if test "${ENABLE_STATIC}." = "yes."; then
++ DBLIB="$DBLIB"
+ fi
+
++CPPFLAGS="$DBINCLUDE $CPPFLAGS"
+
+ AC_CHECK_LIB(popt, poptReadConfigFile)
+