Ignore:
Timestamp:
2009-12-09T21:41:14+13:00 (14 years ago)
Author:
ak19
Message:

Changes to makefiles, configure files, and source code to work with the new configure flags that allow indexers to be individually compiled up by setting each indexer to be enabled or disabled (enable-mg, enable-mgpp, enable-lucene)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/colservr/collectserver.cpp

    r20799 r21324  
    2929#include <assert.h>
    3030#include "display.h"
     31
     32void check_if_valid_buildtype(const text_t& buildtype)
     33{
     34  if (buildtype=="mg") {
     35#ifndef ENABLE_MG
     36    cerr << "Warning: Greenstone installation has not been compiled to support buildtype 'mg'." << endl;
     37#endif
     38  }
     39
     40  else if (buildtype=="mgpp") {
     41#ifndef ENABLE_MGPP
     42    cerr << "Warning: Greenstone installation has not been compiled to support buildtype 'mgpp'." << endl;
     43#endif
     44  }
     45
     46  else if (buildtype=="lucene") {
     47#ifndef ENABLE_LUCENE
     48    cerr << "Warning: Greenstone installation has not been compiled to support buildtype 'lucene'." << endl;
     49#endif
     50  }
     51
     52  else {
     53    cerr << "Error: buildtype '" << buildtype << "' is not a recognized indexer for Greenstone." << endl;
     54  }
     55
     56}
     57
    3158
    3259
     
    202229    else if (key == "httpprefix") collectinfo.httpprefix = value;
    203230    else if (key == "receptionist") collectinfo.receptionist = value;
    204     else if (key == "buildtype") collectinfo.buildType = value;
     231    else if (key == "buildtype") {
     232      check_if_valid_buildtype(value); // prints warning if value (indexer) is invalid
     233      collectinfo.buildType = value;
     234    }
    205235    // backwards compatibility - searchytpes is now a format statement
    206236    else if (key == "searchtype") { // means buildtype is mgpp
    207237      if (collectinfo.buildType.empty()) {
     238    check_if_valid_buildtype("mgpp"); // prints warning if value (indexer) is invalid
    208239    collectinfo.buildType = "mgpp";
    209240      }
Note: See TracChangeset for help on using the changeset viewer.