Ignore:
Timestamp:
2009-12-09T21:49:32+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/common-src/indexers/configure.ac

    r20832 r21328  
    33dnl
    44
    5 AC_INIT(mgpp/text/MGQuery.cpp)
    6 AC_ARG_ENABLE(accentfolding, [  --disable-accentfold    Disable Accent Folding support], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
     5dnl AC_INIT(mgpp/text/MGQuery.cpp)
     6dnl http://www.gnu.org/software/hello/manual/autoconf/Initializing-configure.html
     7AC_INIT()
     8AC_ARG_ENABLE(accentfolding, [  --disable-accentfolding    Disable Accent Folding support], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
    79AC_DEFINE_UNQUOTED(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
    810AC_SUBST(ENABLE_ACCENTFOLD)
     11
     12
     13dnl
     14dnl Set compilation of MG (enabled by default)
     15dnl
     16AC_ARG_ENABLE(mg, [  --disable-mg        Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
     17if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then
     18  ENABLE_MG=1
     19  AC_DEFINE(ENABLE_MG,[])
     20else
     21  ENABLE_MG=0
     22fi
     23AC_SUBST(ENABLE_MG)
     24
     25
     26dnl
     27dnl Set compilation of MGPP (enabled by default)
     28dnl
     29AC_ARG_ENABLE(mgpp, [  --disable-mgpp        Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
     30if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then
     31  ENABLE_MGPP=1
     32  AC_DEFINE(ENABLE_MGPP,[])
     33else
     34  ENABLE_MGPP=0
     35fi
     36AC_SUBST(ENABLE_MGPP)
     37
     38dnl
     39dnl Set compilation of Lucene (enabled by default)
     40dnl
     41AC_ARG_ENABLE(lucene, [  --disable-lucene        Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes)
     42if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then
     43  ENABLE_LUCENE=1
     44  AC_DEFINE(ENABLE_LUCENE,[])
     45else
     46  ENABLE_LUCENE=0
     47fi
     48AC_SUBST(ENABLE_LUCENE)
     49
    950
    1051AC_DEFINE_UNQUOTED(COMPAT32BITFLAGS, $COMPAT32BITFLAGS)
     
    3273fi
    3374
    34 AC_CONFIG_SUBDIRS(mg mgpp)
     75dnl AC_CONFIG_SUBDIRS(mg mgpp)
     76
     77if test $ENABLE_MG = 1; then
     78if test ! -d mg; then
     79echo "***** Folder mg does not exist, cannot ENABLE_MG.";
     80exit 1;
     81fi
     82AC_CONFIG_SUBDIRS(mg)
     83fi
     84
     85if test $ENABLE_MGPP = 1; then
     86if test ! -d mgpp; then
     87echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP.";
     88exit 1;
     89fi
     90AC_CONFIG_SUBDIRS(mgpp)
     91fi
     92
     93if test $ENABLE_LUCENE = 1; then
     94if test ! -d lucene-gs; then
     95echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.";
     96exit 1;
     97fi
     98fi
    3599
    36100AC_OUTPUT(Makefile)
Note: See TracChangeset for help on using the changeset viewer.