900526
diff -up bind-9.9.4/contrib/dlz/config.dlz.in.libdb bind-9.9.4/contrib/dlz/config.dlz.in
900526
--- bind-9.9.4/contrib/dlz/config.dlz.in.libdb	2014-01-06 13:24:24.669256364 +0100
900526
+++ bind-9.9.4/contrib/dlz/config.dlz.in	2014-01-06 13:26:29.861420493 +0100
900526
@@ -257,7 +257,7 @@ case "$use_dlz_bdb" in
900526
 			# Check other locations for includes.
900526
 			# Order is important (sigh).
900526
 
900526
-			bdb_incdirs="/ /db48/ /db47/ /db46/ /db45/ /db44/ /db43/ /db42/ /db41/ /db4/ /db/"
900526
+			bdb_incdirs="/ /db48/ /db47/ /db46/ /db45/ /db44/ /db43/ /db42/ /db41/ /db4/ /libdb/ /db/"
900526
 			for d in $bdb_incdirs
900526
 			do
900526
 				if test -f "$dd/include${d}db.h"
900526
@@ -283,13 +283,7 @@ case "$use_dlz_bdb" in
900526
 			do
900526
 				if test -f "$dd/${target_lib}/lib${d}.so"
900526
 				then
900526
-					if test "$dd" != "/usr"
900526
-					then
900526
-						dlz_bdb_libs="-L${dd}/${target_lib} "
900526
-					else
900526
-						dlz_bdb_libs=""
900526
-					fi
900526
-					dlz_bdb_libs="${dlz_bdb_libs}-l${d}"
900526
+					dlz_bdb_libs="-L${dd}/${target_lib}/libdb -l${d}"
900526
 					break
900526
 				fi
900526
 			done