Changeset 21364


Ignore:
Timestamp:
12/16/09 14:09:53 (11 years ago)
Author:
ak19
Message:

New configuration and compilation flag ENABLE_JNI added which will be disabled by default for GS2 since in general GS doesn't need mg and mgpp compiled up with jni. GS3

Location:
main/trunk/greenstone2/common-src/indexers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/Makefile.in

    r21328 r21364  
    6161
    6262
    63 all install clean:
     63clean:
    6464    for odir in $(INDEXERDIRS); do \
    6565      if test -d $$odir; then \
     
    6767        (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
    6868      fi; \
     69        done
     70
     71with-jni:
     72    for odir in $(INDEXERDIRS); do \
     73      if test -d $$odir; then \
     74        echo making all in $$odir; \
     75        (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
     76      fi; \
     77        done
     78
     79install-with-jni:
     80    for odir in $(INDEXERDIRS); do \
     81      if test -d $$odir; then \
     82        echo making install in $$odir; \
     83        (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
     84      fi; \
     85        done
     86
     87# make everything except jni stuff
     88without-jni:
     89    for odir in $(UNAC) $(LUCENE); do \
     90          echo making $@ in $$odir; \
     91          (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
     92        done
     93    for odir in $(MG) $(MGPP); do \
     94          echo making $@ in $$odir; \
     95          (cd $$odir && $(MAKE) $(MDEFINES) nojava) || exit 1; \
     96        done
     97
     98install-without-jni:
     99    for odir in $(UNAC) $(LUCENE); do \
     100          echo making $@ in $$odir; \
     101          (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
     102        done
     103    for odir in $(MG) $(MGPP); do \
     104          echo making $@ in $$odir; \
     105          (cd $$odir && $(MAKE) $(MDEFINES) install-nojava) || exit 1; \
    69106        done
    70107
     
    109146        done
    110147
    111 # make everything except jni stuff
    112 gs2:
    113     for odir in $(UNAC) $(LUCENE); do \
    114           echo making $@ in $$odir; \
    115           (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
    116         done
    117     for odir in $(MG) $(MGPP); do \
    118           echo making $@ in $$odir; \
    119           (cd $$odir && $(MAKE) $(MDEFINES) nojava) || exit 1; \
    120         done
    121 
    122 install-gs2:
    123     for odir in $(UNAC) $(LUCENE); do \
    124           echo making $@ in $$odir; \
    125           (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
    126         done
    127     for odir in $(MG) $(MGPP); do \
    128           echo making $@ in $$odir; \
    129           (cd $$odir && $(MAKE) $(MDEFINES) install-nojava) || exit 1; \
    130         done
    131 
    132148distclean:
    133149    for odir in $(INDEXERDIRS); do \
  • main/trunk/greenstone2/common-src/indexers/configure

    r21328 r21364  
    275275ac_subdirs_all="$ac_subdirs_all mg"
    276276ac_subdirs_all="$ac_subdirs_all mgpp"
    277 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ENABLE_ACCENTFOLD ENABLE_MG ENABLE_MGPP ENABLE_LUCENE COMPAT32BITFLAGS JAVAC JAVA uudecode subdirs LIBOBJS LTLIBOBJS'
     277ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ENABLE_ACCENTFOLD ENABLE_JNI ENABLE_MG ENABLE_MGPP ENABLE_LUCENE COMPAT32BITFLAGS JAVAC JAVA uudecode subdirs LIBOBJS LTLIBOBJS'
    278278ac_subst_files=''
    279279
     
    787787  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
    788788  --disable-accentfolding    Disable Accent Folding support
     789  --enable-jni    Enable JNI compilation
    789790  --disable-mg        Disable MG compilation
    790791  --disable-mgpp        Disable MGPP compilation
     
    12461247
    12471248
     1249# Check whether --enable-jni or --disable-jni was given.
     1250if test "${enable_jni+set}" = set; then
     1251  enableval="$enable_jni"
     1252  ENABLE_JNI=$enableval
     1253else
     1254  ENABLE_JNI=no
     1255fi;
     1256if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
     1257  ENABLE_JNI=1
     1258  cat >>confdefs.h <<\_ACEOF
     1259#define ENABLE_JNI
     1260_ACEOF
     1261
     1262else
     1263  ENABLE_JNI=0
     1264fi
     1265
     1266
     1267
    12481268# Check whether --enable-mg or --disable-mg was given.
    12491269if test "${enable_mg+set}" = set; then
     
    14081428CLASS_TEST=Test.class
    14091429cat << \EOF > $JAVA_TEST
    1410 /* #line 1410 "configure" */
     1430/* #line 1430 "configure" */
    14111431public class Test {
    14121432}
     
    15781598        ac_cv_prog_uudecode_base64=yes
    15791599else
    1580         echo "configure: 1580: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
     1600        echo "configure: 1600: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
    15811601        echo "configure: failed file was:" >&5
    15821602        cat Test.uue >&5
     
    16961716CLASS_TEST=Test.class
    16971717cat << \EOF > $JAVA_TEST
    1698 /* #line 1698 "configure" */
     1718/* #line 1718 "configure" */
    16991719public class Test {
    17001720}
     
    17331753TEST=Test
    17341754cat << \EOF > $JAVA_TEST
    1735 /* [#]line 1735 "configure" */
     1755/* [#]line 1755 "configure" */
    17361756public class Test {
    17371757public static void main (String args[]) {
     
    24902510s,@LIBS@,$LIBS,;t t
    24912511s,@ENABLE_ACCENTFOLD@,$ENABLE_ACCENTFOLD,;t t
     2512s,@ENABLE_JNI@,$ENABLE_JNI,;t t
    24922513s,@ENABLE_MG@,$ENABLE_MG,;t t
    24932514s,@ENABLE_MGPP@,$ENABLE_MGPP,;t t
  • main/trunk/greenstone2/common-src/indexers/configure.ac

    r21328 r21364  
    99AC_DEFINE_UNQUOTED(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
    1010AC_SUBST(ENABLE_ACCENTFOLD)
     11
     12
     13dnl
     14dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
     15dnl
     16AC_ARG_ENABLE(jni, [  --enable-jni    Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
     17if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
     18  ENABLE_JNI=1
     19  AC_DEFINE(ENABLE_JNI,[])
     20else
     21  ENABLE_JNI=0
     22fi
     23AC_SUBST(ENABLE_JNI)
    1124
    1225
  • main/trunk/greenstone2/common-src/indexers/winMake.bat

    r21328 r21364  
    4545    if ""%2"" == ""javaonly"" goto java
    4646    if ""%2"" == ""nojava"" goto nojava
    47     if ""%2"" == ""gs2"" goto gs2
     47    if ""%2"" == ""without-jni"" goto without-jni
    4848
    4949:all
     50:with-jni
    5051    if NOT EXIST "bin" mkdir bin
    5152
     
    8788    for %%I in (lib srclib libcharset\lib) do if exist packages\windows\iconv\iconv\%%I\^*.obj del packages\windows\iconv\iconv\%%I\*.obj;
    8889    for %%I in (lib srclib libcharset\lib) do if exist packages\windows\iconv\iconv\%%I\^*.lib del packages\windows\iconv\iconv\%%I\*.lib;
     90    goto done
    8991
    9092:java
     
    131133    goto done
    132134
    133 :gs2
     135:without-jni
    134136    if NOT EXIST "bin" mkdir bin
    135137
Note: See TracChangeset for help on using the changeset viewer.