Changeset 21472


Ignore:
Timestamp:
2010-01-15T15:16:03+13:00 (11 years ago)
Author:
mdewsnip
Message:

Created USE_GDBM and USE_JDBM defines that work similar to USE_SQLITE and USE_MSSQL for controlling which infodb types are compiled in. Currently these are not configurable through the configure scripts and are always on.

Location:
main/trunk/greenstone2/runtime-src/src/colservr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/colservr/Makefile.in

    r21324 r21472  
    8181
    8282
     83# Currently not configurable, and always on
     84USE_GDBM = 1
     85ifeq ($(USE_GDBM), 1)
     86GDBM_DEFINES = -DUSE_GDBM
     87GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
     88else
     89GDBM_DEFINES =
     90GDBM_INCLUDES =
     91endif
     92
     93
     94# Currently not configurable, and always on
     95USE_JDBM = 1
     96ifeq ($(USE_JDBM), 1)
     97JDBM_DEFINES = -DUSE_JDBM
     98else
     99JDBM_DEFINES =
     100endif
     101
     102
    83103USE_SQLITE = @USE_SQLITE@
    84104ifeq ($(USE_SQLITE), 1)
     
    96116CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
    97117CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
    98 DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(SQLITE_DEFINES)
     118DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
    99119# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
    100 INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib -I$(COMMON_PACKAGES_DIR)/gdbm/include \
     120INCLUDES = -I. -I$(GSDL_DIR) -I$(COMMON_DIR)/src/lib \
    101121    $(MG_INCLUDES) \
    102122    $(MGPP_INCLUDES) \
    103     -I$(COMMON_PACKAGES_DIR)/expat/include $(SQLITE_INCLUDES)
     123    -I$(COMMON_PACKAGES_DIR)/expat/include $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
    104124RANLIB = @RANLIB@
    105125
  • main/trunk/greenstone2/runtime-src/src/colservr/collectset.cpp

    r21453 r21472  
    2929#include "colservrconfig.h"
    3030#include "gsdlsitecfg.h"
    31 #include "gdbmclass.h"
    32 #include "jdbmnaiveclass.h"
    3331#include "gsdltools.h"
    3432#include "fileutil.h"
     
    5250
    5351#include <assert.h>
     52
     53#ifdef USE_GDBM
     54#include "gdbmclass.h"
     55#endif
     56
     57#ifdef USE_JDBM
     58#include "jdbmnaiveclass.h"
     59#endif
    5460
    5561#ifdef USE_SQLITE
     
    355361#endif
    356362
     363#ifdef USE_JDBM
    357364    if (infodbtype == "jdbm") {
    358365
     
    360367    db_ptr = jdbm_db_ptr;
    361368    }
    362  
     369#endif
     370
    363371    // Use GDBM if the infodb type is empty or not one of the values above
    364372    if (db_ptr == NULL) {
     373#ifdef USE_GDBM
    365374      db_ptr = new gdbmclass();
     375#endif
    366376    }
    367377
  • main/trunk/greenstone2/runtime-src/src/colservr/win32.mak

    r21435 r21472  
    3737DLL = 0
    3838DLLDEBUG = 0
     39USE_GDBM = 1
     40USE_JDBM = 1
    3941USE_SQLITE = 1
    4042USE_MSSQL = 0
     
    6264CXXFLAGS = $(CXXFLAGS) -MDd
    6365!ENDIF
     66!ENDIF
     67
     68!IF $(USE_GDBM)
     69GDBM_DEFINES = -DUSE_GDBM
     70GDBM_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows"
     71!ELSE
     72GDBM_DEFINES =
     73GDBM_INCLUDES =
     74!ENDIF
     75
     76!IF $(USE_JDBM)
     77JDBM_DEFINES = -DUSE_JDBM
     78!ELSE
     79JDBM_DEFINES =
    6480!ENDIF
    6581
     
    124140CC = cl
    125141DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
    126         -DXML_STATIC $(SQLITE_DEFINES) $(MSSQL_DEFINES) $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
     142        -DXML_STATIC $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES) $(MSSQL_DEFINES) \
     143    $(MG_DEFS) $(MGPP_DEFS) $(LUCENE_DEFS)
    127144# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
    128145INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" \
    129146    $(MG_INCLUDES) \
    130147    $(MGPP_INCLUDES) \
    131     -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3" -I"$(COMMON_PACKAGES_DIR)\gdbm\gdbm-1.8.3\windows" \
    132     -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" $(SQLITE_INCLUDES)
     148    -I"$(COMMON_PACKAGES_DIR)\windows\expat\expat" $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
    133149
    134150!IF $(GSDL_VC4)
Note: See TracChangeset for help on using the changeset viewer.