Index: gs2-extensions/tdb/trunk/enable_tdb.sh
===================================================================
--- gs2-extensions/tdb/trunk/enable_tdb.sh	(revision 30183)
+++ gs2-extensions/tdb/trunk/enable_tdb.sh	(revision 30183)
@@ -0,0 +1,191 @@
+#!/bin/bash
+# Used to merge in the code needed to add TDB support to Greenstone. The script
+# is responsible for updating both Makefile.in and source code files. You can
+# later run 'disable_tdb.sh' to undo these changes.
+# @author John Thompson, University of Waikato, NZ
+
+echo
+echo '===== Merging TDB support code into Greenstone ====='
+echo
+
+# Test that GSDLHOME is set otherwise we won't be able to find the required files
+if [ "$GSDLHOME" == "" ] ; then echo 'Error! GSDLHOME not set. Please source setup.bash before running.' ; echo ; exit 0 ; fi
+
+echo ' - enabling TDB support in common function library'
+# - Symlink the source file into place
+ln -f -s $GSDLHOME/ext/tdb-edit/src/lib/tdbclass.h $GSDLHOME/common-src/src/lib/tdbclass.h
+ln -f -s $GSDLHOME/ext/tdb-edit/src/lib/tdbclass.cpp $GSDLHOME/common-src/src/lib/tdbclass.cpp
+# - Makefile.in
+MAKEFILE=$GSDLHOME/common-src/src/lib/Makefile.in
+# - I have no idea why this is commented out in the Makefile
+sed -i 's:#GSDL_DIR = ../../..:GSDL_DIR = ../../..:' ${MAKEFILE}
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  # - Test for extension support in the makefile
+  grep -q 'EXT_DEFINES' ${MAKEFILE}
+  if [ $? -eq 1 ]
+  then
+    # - No Extension variables yet - add them in with TDB parts
+    sed -i 's:AR = ar:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\nEXT_SOURCES = tdbclass.cpp\nEXT_OBJECTS = tdbclass.o\n\n&:' ${MAKEFILE}
+    sed -i 's:DEFS = @DEFS@ .*:& $(EXT_DEFINES):' ${MAKEFILE}
+    sed -i 's:INCLUDES = -I. .*:& $(EXT_INCLUDES):' ${MAKEFILE}
+    sed -i 's:unitool.cpp:& \\\n        $(EXT_SOURCES):' ${MAKEFILE}
+    sed -i 's:unitool.o:& \\\n        $(EXT_OBJECTS):' ${MAKEFILE}
+  else
+    # - Extension support already present - add TDB parts
+    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
+    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
+    sed -i 's:EXT_SOURCES =.*:& tdbclass.cpp:' ${MAKEFILE}
+    sed -i 's:EXT_OBJECTS =.*:& tdbclass.o:' ${MAKEFILE}
+  fi
+fi
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  echo Error! Update of ${MAKEFILE} failed.
+  exit
+fi
+
+echo ' - enabling TDB support in collection server'
+# - Makefile.in
+MAKEFILE=$GSDLHOME/runtime-src/src/colservr/Makefile.in
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  # - Test for extension support in the makefile
+  grep -q 'EXT_DEFINES' ${MAKEFILE}
+  if [ $? -eq 1 ]
+  then
+    sed -i 's:AR = ar:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\n\n&:' ${MAKEFILE}
+    sed -i 's:DEFS = @DEFS@:& $(EXT_DEFINES):' ${MAKEFILE}
+    sed -i 's:INCLUDES = -I. -I$(GSDL_DIR):& $(EXT_INCLUDES):' ${MAKEFILE}
+  else
+    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
+    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
+  fi
+fi
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  echo Error! Update of ${MAKEFILE} failed.
+  exit
+fi
+
+# - collectset.cpp
+SRCFILE=$GSDLHOME/runtime-src/src/colservr/collectset.cpp
+grep -q 'tdbclass.h' ${SRCFILE}
+if [ $? -eq 1 ]
+then
+  grep -q '@EXTENSION HEADERS@' ${SRCFILE}
+  if [ $? -eq 1 ]
+  then
+    sed -i 's:collectset\:\:collectset (text_t& gsdlhome, text_t& collecthome):// @EXTENSION HEADERS@\n#include "tdbclass.h //TDB\n\n&:' ${SRCFILE}
+    sed -i 's:    // Use GDBM if the infodb type is empty or not one of the values above:    // @EXTENSION DATASOURCES@\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer\n\n&:' ${SRCFILE}
+  else
+    sed -i 's:// @EXTENSION HEADERS@:&\n#include "tdbclass.h" //TDB:' ${SRCFILE}
+    sed -i 's:// @EXTENSION DATASOURCES@:&\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer:' ${SRCFILE}
+  fi
+fi
+grep -q 'tdbclass.h' ${SRCFILE}
+if [ $? -eq 1 ]
+then
+  echo Error! Update of ${SRCFILE} failed.
+  exit
+fi
+
+# - collectserver.cpp
+# There are now sanity tests in collectserver to ensure appropriate indexer and
+# infodbtype are compiled into colservr. While not fatal to leave this as is,
+# it does cause vast amounts of error messages in (Apache) logs
+SRCFILE=$GSDLHOME/runtime-src/src/colservr/collectserver.cpp
+grep -q 'TDB' ${SRCFILE}
+if [ $? -eq 1 ]
+then
+  grep -q '@EXTENSION DATASOURCES@' ${SRCFILE}
+  if [ $? -eq 1 ]
+  then
+    sed -i 's:  if (infodbtype=="gdbm") {:  // @EXTENSION DATASOURCES@\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing\n\n&:' ${SRCFILE}
+  else
+    sed -i 's:  // @EXTENSION DATASOURCES@:&\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing:' ${SRCFILE}
+  fi
+fi
+grep -q 'TDB' ${SRCFILE}
+if [ $? -eq 1 ]
+then
+  echo Error! Update of ${SRCFILE} failed.
+  exit
+fi
+
+echo ' - enabling TDB support in Greenstone receptionist'
+# - Makefile.in
+MAKEFILE=$GSDLHOME/runtime-src/src/recpt/Makefile.in
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  grep -q 'EXT_DEFINES' ${MAKEFILE}
+  if [ $? -eq 1 ]
+  then
+    sed -i 's:AR = ar:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\nEXT_LDFLAGS = -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\nEXT_LIBS = -ltdb\n\n&:' ${MAKEFILE}
+    sed -i 's:DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H:& $(EXT_DEFINES):' ${MAKEFILE}
+    sed -i 's:INCLUDES = -I. -I$(GSDL_DIR):& $(EXT_INCLUDES):' ${MAKEFILE}
+    sed -i 's:LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@:& $(EXT_LDFLAGS):' ${MAKEFILE}
+    sed -i 's:LIBS = @LIBS@ $(GDBM_LIBS):& $(EXT_LIBS):' ${MAKEFILE}
+  else
+    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
+    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
+    sed -i 's:EXT_LDFLAGS =.*:& -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib:' ${MAKEFILE}
+    sed -i 's:EXT_LIBS =.*:& -ltdb:' ${MAKEFILE}
+  fi
+fi
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  echo Error! Update of ${MAKEFILE} failed.
+fi
+
+
+echo ' - enabling TDB support in OAI Server receptionist'
+# - Makefile.in
+MAKEFILE=$GSDLHOME/runtime-src/src/oaiservr/Makefile.in
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  grep -q 'EXT_DEFINES' ${MAKEFILE}
+  if [ $? -eq 1 ]
+  then
+    sed -i 's:CC = @CC@:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\nEXT_LDFLAGS = -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\nEXT_LIBS = -ltdb\n\n&:' ${MAKEFILE}
+    sed -i 's:DEFS = @DEFS@:& $(EXT_DEFINES):' ${MAKEFILE}
+    sed -i 's:INCLUDES = -I$(COMMON_DIR)/src/lib:& $(EXT_INCLUDES):' ${MAKEFILE}
+    sed -i 's:LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@:& $(EXT_LDFLAGS):' ${MAKEFILE}
+    sed -i 's:LIBS = @LIBS@ $(GDBM_LIBS):& $(EXT_LIBS):' ${MAKEFILE}
+  else
+    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
+    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
+    sed -i 's:EXT_LDFLAGS =.*:& -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib:' ${MAKEFILE}
+    sed -i 's:EXT_LIBS =.*:& -ltdb:' ${MAKEFILE}
+  fi
+fi
+grep -q 'DUSE_TDB' ${MAKEFILE}
+if [ $? -eq 1 ]
+then
+  echo Error! Update of ${MAKEFILE} failed.
+fi
+
+echo
+echo '===================================================='
+echo
+echo 'TDB support has now been merged into Greenstone.'
+echo 'Please return to the main Greenstone directory and '
+echo 'rerun:'
+echo
+echo ' ./configure <any required arguments>'
+echo ' make'
+echo ' make install'
+echo
+echo 'to complete TDB installation.'
+echo
+echo '===================================================='
+echo
+
+exit 0
Index: gs2-extensions/tdb/trunk/src/enable_tdb.sh
===================================================================
--- gs2-extensions/tdb/trunk/src/enable_tdb.sh	(revision 30182)
+++ 	(revision )
@@ -1,191 +1,0 @@
-#!/bin/bash
-# Used to merge in the code needed to add TDB support to Greenstone. The script
-# is responsible for updating both Makefile.in and source code files. You can
-# later run 'disable_tdb.sh' to undo these changes.
-# @author John Thompson, University of Waikato, NZ
-
-echo
-echo '===== Merging TDB support code into Greenstone ====='
-echo
-
-# Test that GSDLHOME is set otherwise we won't be able to find the required files
-if [ "$GSDLHOME" == "" ] ; then echo 'Error! GSDLHOME not set. Please source setup.bash before running.' ; echo ; exit 0 ; fi
-
-echo ' - enabling TDB support in common function library'
-# - Symlink the source file into place
-ln -f -s $GSDLHOME/ext/tdb-edit/src/lib/tdbclass.h $GSDLHOME/common-src/src/lib/tdbclass.h
-ln -f -s $GSDLHOME/ext/tdb-edit/src/lib/tdbclass.cpp $GSDLHOME/common-src/src/lib/tdbclass.cpp
-# - Makefile.in
-MAKEFILE=$GSDLHOME/common-src/src/lib/Makefile.in
-# - I have no idea why this is commented out in the Makefile
-sed -i 's:#GSDL_DIR = ../../..:GSDL_DIR = ../../..:' ${MAKEFILE}
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  # - Test for extension support in the makefile
-  grep -q 'EXT_DEFINES' ${MAKEFILE}
-  if [ $? -eq 1 ]
-  then
-    # - No Extension variables yet - add them in with TDB parts
-    sed -i 's:AR = ar:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\nEXT_SOURCES = tdbclass.cpp\nEXT_OBJECTS = tdbclass.o\n\n&:' ${MAKEFILE}
-    sed -i 's:DEFS = @DEFS@ .*:& $(EXT_DEFINES):' ${MAKEFILE}
-    sed -i 's:INCLUDES = -I. .*:& $(EXT_INCLUDES):' ${MAKEFILE}
-    sed -i 's:unitool.cpp:& \\\n        $(EXT_SOURCES):' ${MAKEFILE}
-    sed -i 's:unitool.o:& \\\n        $(EXT_OBJECTS):' ${MAKEFILE}
-  else
-    # - Extension support already present - add TDB parts
-    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
-    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
-    sed -i 's:EXT_SOURCES =.*:& tdbclass.cpp:' ${MAKEFILE}
-    sed -i 's:EXT_OBJECTS =.*:& tdbclass.o:' ${MAKEFILE}
-  fi
-fi
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  echo Error! Update of ${MAKEFILE} failed.
-  exit
-fi
-
-echo ' - enabling TDB support in collection server'
-# - Makefile.in
-MAKEFILE=$GSDLHOME/runtime-src/src/colservr/Makefile.in
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  # - Test for extension support in the makefile
-  grep -q 'EXT_DEFINES' ${MAKEFILE}
-  if [ $? -eq 1 ]
-  then
-    sed -i 's:AR = ar:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\n\n&:' ${MAKEFILE}
-    sed -i 's:DEFS = @DEFS@:& $(EXT_DEFINES):' ${MAKEFILE}
-    sed -i 's:INCLUDES = -I. -I$(GSDL_DIR):& $(EXT_INCLUDES):' ${MAKEFILE}
-  else
-    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
-    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
-  fi
-fi
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  echo Error! Update of ${MAKEFILE} failed.
-  exit
-fi
-
-# - collectset.cpp
-SRCFILE=$GSDLHOME/runtime-src/src/colservr/collectset.cpp
-grep -q 'tdbclass.h' ${SRCFILE}
-if [ $? -eq 1 ]
-then
-  grep -q '@EXTENSION HEADERS@' ${SRCFILE}
-  if [ $? -eq 1 ]
-  then
-    sed -i 's:collectset\:\:collectset (text_t& gsdlhome, text_t& collecthome):// @EXTENSION HEADERS@\n#include "tdbclass.h //TDB\n\n&:' ${SRCFILE}
-    sed -i 's:    // Use GDBM if the infodb type is empty or not one of the values above:    // @EXTENSION DATASOURCES@\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer\n\n&:' ${SRCFILE}
-  else
-    sed -i 's:// @EXTENSION HEADERS@:&\n#include "tdbclass.h" //TDB:' ${SRCFILE}
-    sed -i 's:// @EXTENSION DATASOURCES@:&\n    if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} //TDB\n    if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} //TDBServer:' ${SRCFILE}
-  fi
-fi
-grep -q 'tdbclass.h' ${SRCFILE}
-if [ $? -eq 1 ]
-then
-  echo Error! Update of ${SRCFILE} failed.
-  exit
-fi
-
-# - collectserver.cpp
-# There are now sanity tests in collectserver to ensure appropriate indexer and
-# infodbtype are compiled into colservr. While not fatal to leave this as is,
-# it does cause vast amounts of error messages in (Apache) logs
-SRCFILE=$GSDLHOME/runtime-src/src/colservr/collectserver.cpp
-grep -q 'TDB' ${SRCFILE}
-if [ $? -eq 1 ]
-then
-  grep -q '@EXTENSION DATASOURCES@' ${SRCFILE}
-  if [ $? -eq 1 ]
-  then
-    sed -i 's:  if (infodbtype=="gdbm") {:  // @EXTENSION DATASOURCES@\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing\n\n&:' ${SRCFILE}
-  else
-    sed -i 's:  // @EXTENSION DATASOURCES@:&\n  if (infodbtype == "tdb") { return; } // TDB Do nothing\n  if (infodbtype == "tdbserver") { return; } // TDBServer Do nothing:' ${SRCFILE}
-  fi
-fi
-grep -q 'TDB' ${SRCFILE}
-if [ $? -eq 1 ]
-then
-  echo Error! Update of ${SRCFILE} failed.
-  exit
-fi
-
-echo ' - enabling TDB support in Greenstone receptionist'
-# - Makefile.in
-MAKEFILE=$GSDLHOME/runtime-src/src/recpt/Makefile.in
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  grep -q 'EXT_DEFINES' ${MAKEFILE}
-  if [ $? -eq 1 ]
-  then
-    sed -i 's:AR = ar:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\nEXT_LDFLAGS = -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\nEXT_LIBS = -ltdb\n\n&:' ${MAKEFILE}
-    sed -i 's:DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H:& $(EXT_DEFINES):' ${MAKEFILE}
-    sed -i 's:INCLUDES = -I. -I$(GSDL_DIR):& $(EXT_INCLUDES):' ${MAKEFILE}
-    sed -i 's:LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@:& $(EXT_LDFLAGS):' ${MAKEFILE}
-    sed -i 's:LIBS = @LIBS@ $(GDBM_LIBS):& $(EXT_LIBS):' ${MAKEFILE}
-  else
-    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
-    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
-    sed -i 's:EXT_LDFLAGS =.*:& -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib:' ${MAKEFILE}
-    sed -i 's:EXT_LIBS =.*:& -ltdb:' ${MAKEFILE}
-  fi
-fi
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  echo Error! Update of ${MAKEFILE} failed.
-fi
-
-
-echo ' - enabling TDB support in OAI Server receptionist'
-# - Makefile.in
-MAKEFILE=$GSDLHOME/runtime-src/src/oaiservr/Makefile.in
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  grep -q 'EXT_DEFINES' ${MAKEFILE}
-  if [ $? -eq 1 ]
-  then
-    sed -i 's:CC = @CC@:# Support for adding in extension classes\nEXT_DEFINES = -DUSE_TDB\nEXT_INCLUDES = -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib\nEXT_LDFLAGS = -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\nEXT_LIBS = -ltdb\n\n&:' ${MAKEFILE}
-    sed -i 's:DEFS = @DEFS@:& $(EXT_DEFINES):' ${MAKEFILE}
-    sed -i 's:INCLUDES = -I$(COMMON_DIR)/src/lib:& $(EXT_INCLUDES):' ${MAKEFILE}
-    sed -i 's:LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@:& $(EXT_LDFLAGS):' ${MAKEFILE}
-    sed -i 's:LIBS = @LIBS@ $(GDBM_LIBS):& $(EXT_LIBS):' ${MAKEFILE}
-  else
-    sed -i 's:EXT_DEFINES =.*:& -DUSE_TDB:' ${MAKEFILE}
-    sed -i 's:EXT_INCLUDES =.*:& -I$(GSDL_DIR)/ext/tdb-edit/linux/include -I$(GSDL_DIR)/ext/tdb-edit/darwin/include -I$(GSDL_DIR)/ext/tdb-edit/src/lib:' ${MAKEFILE}
-    sed -i 's:EXT_LDFLAGS =.*:& -L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib:' ${MAKEFILE}
-    sed -i 's:EXT_LIBS =.*:& -ltdb:' ${MAKEFILE}
-  fi
-fi
-grep -q 'DUSE_TDB' ${MAKEFILE}
-if [ $? -eq 1 ]
-then
-  echo Error! Update of ${MAKEFILE} failed.
-fi
-
-echo
-echo '===================================================='
-echo
-echo 'TDB support has now been merged into Greenstone.'
-echo 'Please return to the main Greenstone directory and '
-echo 'rerun:'
-echo
-echo ' ./configure <any required arguments>'
-echo ' make'
-echo ' make install'
-echo
-echo 'to complete TDB installation.'
-echo
-echo '===================================================='
-echo
-
-exit 0
