Index: /gsdl/trunk/lib/win32.mak
===================================================================
--- /gsdl/trunk/lib/win32.mak	(revision 15784)
+++ /gsdl/trunk/lib/win32.mak	(revision 15785)
@@ -35,4 +35,5 @@
 DLLDEBUG = 0
 STLPATH = "$(PACKAGES_DIR)\windows\stlport\stlport"
+USE_SQLITE = 0
 
 
@@ -51,10 +52,19 @@
 !ENDIF
 
+!IF $(USE_SQLITE)
+SQLITE_INCLUDES = -I$(PACKAGES_DIR)\windows\sqlite\sqlite-amalgamation-3.5.9
+SQLITE_OBJECTS = sqlitedbclass.obj
+SQLITE_SOURCES = sqlitedbclass.cpp
+!ELSE
+SQLITE_INCLUDES = 
+SQLITE_OBJECTS = 
+SQLITE_SOURCES = 
+!ENDIF
+
 
 AR = lib
 CC = cl
-DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN \
-       -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
-INCLUDES = -I"$(GSDL_DIR)" -I"$(INDEXERS_DIR)\mg\lib" -I"$(PACKAGES_DIR)\windows\gdbm\gdbm"
+DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
+INCLUDES = -I"$(GSDL_DIR)" -I"$(INDEXERS_DIR)\mg\lib" -I"$(PACKAGES_DIR)\windows\gdbm\gdbm" $(SQLITE_INCLUDES)
 
 !IF $(GSDL_VC4)
@@ -92,5 +102,6 @@
 	OIDtools.cpp \
 	phrases.cpp \
-	text_t.cpp
+	text_t.cpp \
+	$(SQLITE_SOURCES)
 
 OBJECTS = \
@@ -110,5 +121,6 @@
 	OIDtools.obj \
 	phrases.obj \
-	text_t.obj
+	text_t.obj \
+	$(SQLITE_OBJECTS)
 
 LIBRARY = gsdllib.lib	
Index: /gsdl/trunk/src/colservr/win32.mak
===================================================================
--- /gsdl/trunk/src/colservr/win32.mak	(revision 15784)
+++ /gsdl/trunk/src/colservr/win32.mak	(revision 15785)
@@ -34,4 +34,5 @@
 DLLDEBUG = 0
 STLPATH = "$(PACKAGES_DIR)\windows\stlport\stlport"
+USE_SQLITE = 1
 
 
@@ -50,13 +51,22 @@
 !ENDIF
 
+!IF $(USE_SQLITE)
+SQLITE_DEFINES = -DUSE_SQLITE
+SQLITE_INCLUDES = -I"$(PACKAGES_DIR)\windows\sqlite\sqlite-amalgamation-3.5.9"
+!ELSE
+SQLITE_DEFINES = 
+SQLITE_INCLUDES = 
+!ENDIF
+
 
 AR = lib
 CC = cl
-DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -DXML_STATIC -D_CRT_SECURE_NO_DEPRECATE
+DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
+        -DXML_STATIC $(SQLITE_DEFINES)
 # Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
 INCLUDES = -I"$(GSDL_DIR)" -I"$(GSDL_DIR)\lib" \
 	-I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text" \
 	-I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text" \
-	-I"$(PACKAGES_DIR)\windows\expat\expat" -I"$(PACKAGES_DIR)\windows\gdbm\gdbm"
+	-I"$(PACKAGES_DIR)\windows\expat\expat" -I"$(PACKAGES_DIR)\windows\gdbm\gdbm" $(SQLITE_INCLUDES)
 
 !IF $(GSDL_VC4)
Index: /gsdl/trunk/src/recpt/win32.mak
===================================================================
--- /gsdl/trunk/src/recpt/win32.mak	(revision 15784)
+++ /gsdl/trunk/src/recpt/win32.mak	(revision 15785)
@@ -39,6 +39,6 @@
 DLLDEBUG = 0
 ENABLE_ACCENTFOLD = 1
-
 STLPATH = "$(PACKAGES_DIR)\windows\stlport\stlport"
+USE_SQLITE = 0
 
 
@@ -61,4 +61,10 @@
 !ELSE
 ACCENTFOLD_LIBS = 
+!ENDIF
+
+!IF $(USE_SQLITE)
+SQLITE_LIBS = "$(PACKAGES_DIR)\windows\sqlite\sqlite-amalgamation-3.5.9\sqlite3.lib"
+!ELSE
+SQLITE_LIBS = 
 !ENDIF
 
@@ -76,5 +82,6 @@
 AR = lib
 CC = cl
-DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE -DGSDL_NOCACHE $(Z3950_DEFS)
+DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
+        -DGSDL_NOCACHE $(Z3950_DEFS)
 INCLUDES = -I. -I"$(GSDL_DIR)" -I"$(GSDL_DIR)\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
 	-I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mgpp\text" \
@@ -83,5 +90,5 @@
 LDFLAGS = 
 LIBS = "$(PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
-        "$(PACKAGES_DIR)\windows\gdbm\gdbm\gdbm.lib" $(ACCENTFOLD_LIBS) $(Z3950_LIBS)
+        "$(PACKAGES_DIR)\windows\gdbm\gdbm\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) $(Z3950_LIBS)
 
 !IF $(GSDL_VC4)
