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