Changeset 21365


Ignore:
Timestamp:
12/16/09 14:10:51 (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's build.xml will need to explicitly set ENABLE_JNI to compile mg and mgpp with jni.

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

Legend:

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

    r21327 r21365  
    6565
    6666
    67 all:
    68     for odir in $(INDEXERSDIR) $(COMPILEDIRS) $(MODULEDIRS); do \
     67with-jni without-jni:
     68    for odir in $(INDEXERSDIR); do \
    6969      echo making $@ in $$odir; \
    7070      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
    7171    done
     72    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
     73      echo making all in $$odir; \
     74      (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
     75    done
    7276
    73 install:
     77install-with-jni:
    7478    for odir in $(INDEXERSDIR); do \
    7579      echo making $@ in $$odir; \
    76       (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
     80      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
    7781    done
    7882    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar; then \
     
    8488    done
    8589
    86 gs2:
    87     for odir in $(INDEXERSDIR); do \
    88       echo making $@ in $$odir; \
    89       (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
    90     done
    91     for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
    92       echo making all in $$odir; \
    93       (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
    94     done
    95 
    96 install-gs2:
     90install-without-jni:
    9791    for odir in $(INDEXERSDIR); do \
    9892      echo making $@ in $$odir; \
  • main/trunk/greenstone2/common-src/configure

    r21327 r21365  
    312312ac_subdirs_all="$ac_subdirs_all packages"
    313313ac_subdirs_all="$ac_subdirs_all indexers"
    314 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 PACKAGE VERSION USE_FASTCGI USE_LANGACTION USE_CORBA MICO_DIR USE_Z3950 USE_YAZ ENABLE_ACCENTFOLD USE_SQLITE ENABLE_MG ENABLE_MGPP ENABLE_LUCENE LDFLAGS CFLAGS CC CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX AWK YACC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB COMPAT32BITFLAGS MICO_VER CPP EGREP U ANSI2KNR ALLOCA LIBOBJS STATIC gsdlos MODULEDIRS subdirs LTLIBOBJS'
     314ac_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 PACKAGE VERSION USE_FASTCGI USE_LANGACTION USE_CORBA MICO_DIR USE_Z3950 USE_YAZ ENABLE_ACCENTFOLD USE_SQLITE ENABLE_JNI ENABLE_MG ENABLE_MGPP ENABLE_LUCENE LDFLAGS CFLAGS CC CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX AWK YACC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB COMPAT32BITFLAGS MICO_VER CPP EGREP U ANSI2KNR ALLOCA LIBOBJS STATIC gsdlos MODULEDIRS subdirs LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    861861  --disable-accentfold    Disable Accent Folding for MGPP
    862862  --disable-sqlite        Disable SQLite support
     863  --enable-jni    Enable JNI compilation
    863864  --disable-mg        Disable MG compilation
    864865  --disable-mgpp        Disable MGPP compilation
     
    14391440
    14401441
     1442# Check whether --enable-jni or --disable-jni was given.
     1443if test "${enable_jni+set}" = set; then
     1444  enableval="$enable_jni"
     1445  ENABLE_JNI=$enableval
     1446else
     1447  ENABLE_JNI=no
     1448fi;
     1449if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
     1450  ENABLE_JNI=1
     1451  cat >>confdefs.h <<\_ACEOF
     1452#define ENABLE_JNI
     1453_ACEOF
     1454
     1455else
     1456  ENABLE_JNI=0
     1457fi
     1458
     1459
    14411460# Check whether --enable-mg or --disable-mg was given.
    14421461if test "${enable_mg+set}" = set; then
     
    78857904s,@ENABLE_ACCENTFOLD@,$ENABLE_ACCENTFOLD,;t t
    78867905s,@USE_SQLITE@,$USE_SQLITE,;t t
     7906s,@ENABLE_JNI@,$ENABLE_JNI,;t t
    78877907s,@ENABLE_MG@,$ENABLE_MG,;t t
    78887908s,@ENABLE_MGPP@,$ENABLE_MGPP,;t t
  • main/trunk/greenstone2/common-src/configure.in

    r21327 r21365  
    7575AC_DEFINE(USE_SQLITE, $USE_SQLITE)
    7676AC_SUBST(USE_SQLITE)
     77
     78dnl
     79dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
     80dnl
     81AC_ARG_ENABLE(jni, [  --enable-jni    Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
     82if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
     83  ENABLE_JNI=1
     84  AC_DEFINE(ENABLE_JNI,[])
     85else
     86  ENABLE_JNI=0
     87fi
     88AC_SUBST(ENABLE_JNI)
    7789
    7890dnl
  • main/trunk/greenstone2/common-src/win32.mak

    r21348 r21365  
    192192    set ENABLE_LUCENE=$(ENABLE_LUCENE)
    193193
    194     if EXIST "$(GSDLHOME)\runtime-src" call winMake.bat all gs2
    195     if EXIST "$(GSDLHOME)\runtime-src" call winMake.bat install gs2
    196     if NOT EXIST "$(GSDLHOME)\runtime-src" call winMake.bat all
    197     if NOT EXIST "$(GSDLHOME)\runtime-src" call winMake.bat install
     194!IF "$(ENABLE_JNI)" == "1"
     195    call winMake.bat all with-jni
     196    call winMake.bat install with-jni
     197!ELSE
     198    call winMake.bat all without-jni
     199    call winMake.bat install without-jni
     200!ENDIF
    198201
    199202    set DEBUG=
Note: See TracChangeset for help on using the changeset viewer.