Tomas Hozza b74606
diff -up bind-9.10.1b1/contrib/dlz/config.dlz.in.libdb bind-9.10.1b1/contrib/dlz/config.dlz.in
Tomas Hozza b74606
--- bind-9.10.1b1/contrib/dlz/config.dlz.in.libdb	2014-08-04 12:33:09.320735111 +0200
Tomas Hozza b74606
+++ bind-9.10.1b1/contrib/dlz/config.dlz.in	2014-08-04 12:41:46.888241910 +0200
Tomas Hozza b74606
@@ -263,7 +263,7 @@ case "$use_dlz_bdb" in
Tomas Hozza c45bcb
 			# Check other locations for includes.
Tomas Hozza c45bcb
 			# Order is important (sigh).
Tomas Hozza c45bcb
 
Tomas Hozza b74606
-			bdb_incdirs="/db53 /db51 /db48 /db47 /db46 /db45 /db44 /db43 /db42 /db41 /db4 /db"
Tomas Hozza b74606
+			bdb_incdirs="/db53 /db51 /db48 /db47 /db46 /db45 /db44 /db43 /db42 /db41 /db4 /libdb /db"
Tomas Hozza b74606
 			# include a blank element first
Tomas Hozza b74606
 			for d in "" $bdb_incdirs
Tomas Hozza c45bcb
 			do
Tomas Hozza b74606
@@ -288,16 +288,9 @@ case "$use_dlz_bdb" in
Tomas Hozza b74606
 			bdb_libnames="db53 db-5.3 db51 db-5.1 db48 db-4.8 db47 db-4.7 db46 db-4.6 db45 db-4.5 db44 db-4.4 db43 db-4.3 db42 db-4.2 db41 db-4.1 db"
Tomas Hozza b74606
 			for d in $bdb_libnames
Tomas Hozza 242146
 			do
Tomas Hozza b74606
-				if test "$dd" = "/usr"
Tomas Hozza b74606
+				if test -f "$dd/${target_lib}/lib${d}.so"
Tomas Hozza 242146
 				then
Tomas Hozza b74606
-					AC_CHECK_LIB($d, db_create, dlz_bdb_libs="-l${d}")
Tomas Hozza b74606
-					if test $dlz_bdb_libs != "yes"
Tomas Hozza f992a0
-					then
Tomas Hozza b74606
-						break
Tomas Hozza f992a0
-					fi
Tomas Hozza b74606
-				elif test -f "$dd/${target_lib}/lib${d}.so"
Tomas Hozza b74606
-				then
Tomas Hozza b74606
-					dlz_bdb_libs="-L${dd}/${target_lib} -l${d}"
Tomas Hozza 1a8c6b
+					dlz_bdb_libs="-L${dd}/${target_lib}/libdb -l${d}"
Tomas Hozza f992a0
 					break
Tomas Hozza f992a0
 				fi
Tomas Hozza f992a0
 			done