diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh
index 4e30024985b2776ca9ff9b72ed29992ad0b62502..82f31a14dc429962d59003e24a9bbf665421ad5a 100644
--- a/BUILD/FINISH.sh
+++ b/BUILD/FINISH.sh
@@ -14,8 +14,7 @@ $make -k clean || true
 /bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache
 
 aclocal && autoheader && aclocal && automake && autoconf
-# TODO: remove when DBD will be OK
-#(cd bdb/dist && sh s_all)
+(cd bdb/dist && sh s_all)
 (cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
 if [ -d gemini ]
 then
diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am
index 2b52b13313393eb45828fcff20d6d2fb8320e713..69ff8f535fd23bcc8cf0838098393ee754fc66cd 100644
--- a/libmysqld/examples/Makefile.am
+++ b/libmysqld/examples/Makefile.am
@@ -11,7 +11,7 @@ DEFS = 		-DEMBEDDED_LIBRARY
 INCLUDES =	@MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \
 		-I$(top_srcdir) -I$(top_srcdir)/client $(openssl_includes)
 LIBS =		@LIBS@
-LDADD =		@CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS)
+LDADD =		@CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @bdb_libs_with_path@ @LIBDL@ $(CXXLDFLAGS)
 
 mysqltest_SOURCES =	mysqltest.c