--- a/Configure
+++ b/Configure
@@ -1354,7 +1354,7 @@ libswanted_uselargefiles=''
 : set usesocks on the Configure command line to enable socks.
 : List of libraries we want.
 : If anyone needs extra -lxxx, put those in a hint file.
-libswanted='gdbm gdbm_compat db dl m c crypt'
+libswanted='gdbm gdbm_compat db-4.7 dl m c crypt'
 : We probably want to search /usr/shlib before most other libraries.
 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -18918,10 +18918,10 @@ EOCP
 		echo "I can't use Berkeley DB with your <db.h>.  I'll disable Berkeley DB." >&4
 		i_db=$undef
 		case " $libs " in
-		*"-ldb "*)
+		*"-ldb-4.7 "*)
 			: Remove db from list of libraries to use
-			echo "Removing unusable -ldb from library list" >&4
-			set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'`
+			echo "Removing unusable -ldb-4.7 from library list" >&4
+			set `echo X $libs | $sed -e 's/-ldb-4.7 / /' -e 's/-ldb-4.7$//'`
 			shift
 			libs="$*"
 			echo "libs = $libs" >&4
--- a/ext/DB_File/Makefile.PL
+++ b/ext/DB_File/Makefile.PL
@@ -25,7 +25,7 @@ else {
     if ($^O eq 'MSWin32')
       { $LIBS = $Config{cc} =~ /gcc/ ? '-ldb' : '-llibdb' }
     else
-      { $LIBS = '-ldb' }
+      { $LIBS = '-ldb-4.7' }
 }
 
 # Solaris is special.
--- a/ext/DB_File/config.in
+++ b/ext/DB_File/config.in
@@ -92,6 +92,6 @@ HASH	=	u_int32_t
 #    below (by removing the leading #) and edit the line to use the name
 #    you have picked.
  
-#DBNAME = -ldb-2.4.10
+DBNAME = -ldb-4.7
 
 # end of file config.in
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -410,11 +410,11 @@ libdb_needs_pthread="N"
 
 if echo " $libswanted " | grep -v " pthread " >/dev/null
 then
-   if echo " $libswanted " | grep " db " >/dev/null
+   if echo " $libswanted " | grep " db-4.7 " >/dev/null
    then
      for DBDIR in $glibpth
      do
-       DBLIB="$DBDIR/libdb.so"
+       DBLIB="$DBDIR/libdb-4.7.so"
        if [ -f $DBLIB ]
        then
          if nm -u $DBLIB | grep pthread >/dev/null
