--- configure.in.orig	2002-09-03 07:48:38.000000000 +1000
+++ configure.in	2002-09-03 07:45:23.000000000 +1000
@@ -18,13 +18,14 @@
 AC_CHECK_LIB(gdbm, gdbm_open,
 	[have_gdbm=true],[have_gdbm=false])
 if test "x$have_gdbm" = "xfalse";then
-  AC_MSG_WARN(WARNING: tdbtest is disabled. It needs gdbm.)
+  AC_MSG_WARN(WARNING: tdbspeed and tdbtest are disabled. They need gdbm.)
 fi
 AC_CHECK_LIB(dl, dlopen,[have_dllib=true],[have_dllib=false])
 if test "x$have_dllib" = "xfalse";then
   AC_MSG_WARN(WARNING: tdbtorture is disabled. It needs libdl.)
 fi
 
+AM_CONDITIONAL(BUILD_TDBSPEED,$have_gdbm)
 AM_CONDITIONAL(BUILD_TDBTEST,$have_gdbm)
 AM_CONDITIONAL(BUILD_TDBTORTURE,$have_dllib)
 
--- Makefile.am.orig	2002-09-03 07:48:50.000000000 +1000
+++ Makefile.am	2002-09-03 07:42:58.000000000 +1000
@@ -1,6 +1,12 @@
 CFLAGS = @CFLAGS@ @WARNS@
 LDADD=libtdb.la
 
+if BUILD_TDBSPEED
+TDBSPEED = tdbspeed
+else
+TDBSPEED =
+endif
+
 if BUILD_TDBTEST
 TDBTEST = tdbtest
 else
@@ -13,7 +19,7 @@
 TDBTORTURE =
 endif
 
-noinst_PROGRAMS=tdbspeed tdbiterate $(TDBTEST) $(TDBTORTURE)
+noinst_PROGRAMS=tdbiterate $(TDBSPEED) $(TDBTEST) $(TDBTORTURE)
 bin_PROGRAMS=tdbtool tdbdump
 
 lib_LTLIBRARIES=libtdb.la
