Index: main/trunk/greenstone2/runtime-src/src/colservr/Makefile.in
===================================================================
--- main/trunk/greenstone2/runtime-src/src/colservr/Makefile.in	(revision 21455)
+++ main/trunk/greenstone2/runtime-src/src/colservr/Makefile.in	(revision 21472)
@@ -81,4 +81,24 @@
 
 
+# Currently not configurable, and always on
+USE_GDBM = 1
+ifeq ($(USE_GDBM), 1)
+GDBM_DEFINES = -DUSE_GDBM
+GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
+else
+GDBM_DEFINES = 
+GDBM_INCLUDES = 
+endif
+
+
+# Currently not configurable, and always on
+USE_JDBM = 1
+ifeq ($(USE_JDBM), 1)
+JDBM_DEFINES = -DUSE_JDBM
+else
+JDBM_DEFINES = 
+endif
+
+
 USE_SQLITE = @USE_SQLITE@
 ifeq ($(USE_SQLITE), 1)
@@ -96,10 +116,10 @@
 CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
 CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
-DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(SQLITE_DEFINES)
+DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
 # Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
-INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib -I$(COMMON_PACKAGES_DIR)/gdbm/include \
+INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib \
 	$(MG_INCLUDES) \
 	$(MGPP_INCLUDES) \
-	-I$(COMMON_PACKAGES_DIR)/expat/include $(SQLITE_INCLUDES)
+	-I$(COMMON_PACKAGES_DIR)/expat/include $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
 RANLIB = @RANLIB@
 
Index: main/trunk/greenstone2/runtime-src/src/colservr/collectset.cpp
===================================================================
--- main/trunk/greenstone2/runtime-src/src/colservr/collectset.cpp	(revision 21455)
+++ main/trunk/greenstone2/runtime-src/src/colservr/collectset.cpp	(revision 21472)
@@ -29,6 +29,4 @@
 #include "colservrconfig.h"
 #include "gsdlsitecfg.h"
-#include "gdbmclass.h"
-#include "jdbmnaiveclass.h"
 #include "gsdltools.h"
 #include "fileutil.h"
@@ -52,4 +50,12 @@
 
 #include <assert.h>
+
+#ifdef USE_GDBM
+#include "gdbmclass.h"
+#endif
+
+#ifdef USE_JDBM
+#include "jdbmnaiveclass.h"
+#endif
 
 #ifdef USE_SQLITE
@@ -355,4 +361,5 @@
 #endif
 
+#ifdef USE_JDBM
     if (infodbtype == "jdbm") {
 
@@ -360,8 +367,11 @@
 	db_ptr = jdbm_db_ptr;
     }
-  
+#endif
+
     // Use GDBM if the infodb type is empty or not one of the values above
     if (db_ptr == NULL) {
+#ifdef USE_GDBM
       db_ptr = new gdbmclass();
+#endif
     }
 
Index: main/trunk/greenstone2/runtime-src/src/colservr/win32.mak
===================================================================
--- main/trunk/greenstone2/runtime-src/src/colservr/win32.mak	(revision 21455)
+++ main/trunk/greenstone2/runtime-src/src/colservr/win32.mak	(revision 21472)
@@ -37,4 +37,6 @@
 DLL = 0
 DLLDEBUG = 0
+USE_GDBM = 1
+USE_JDBM = 1
 USE_SQLITE = 1
 USE_MSSQL = 0
@@ -62,4 +64,18 @@
 CXXFLAGS = $(CXXFLAGS) -MDd
 !ENDIF
+!ENDIF
+
+!IF $(USE_GDBM)
+GDBM_DEFINES = -DUSE_GDBM
+GDBM_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows"
+!ELSE
+GDBM_DEFINES = 
+GDBM_INCLUDES = 
+!ENDIF
+
+!IF $(USE_JDBM)
+JDBM_DEFINES = -DUSE_JDBM
+!ELSE
+JDBM_DEFINES = 
 !ENDIF
 
@@ -124,11 +140,11 @@
 CC = cl
 DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
-        -DXML_STATIC $(SQLITE_DEFINES) $(MSSQL_DEFINES) $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
+        -DXML_STATIC $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(MSSQL_DEFINES) \
+	$(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
 # Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
 INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" \
 	$(MG_INCLUDES) \
 	$(MGPP_INCLUDES) \
-	-I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
-	-I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" $(SQLITE_INCLUDES)
+	-I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
 
 !IF $(GSDL_VC4)
