Changeset 21366

Show
Ignore:
Timestamp:
16.12.2009 14:11:07 (10 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
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/Makefile.in

    r19262 r21366  
    5555MODULEDIRS = @MODULEDIRS@ 
    5656 
     57ENABLE_JNI=@ENABLE_JNI@ 
     58ifeq ($(ENABLE_JNI), 1) 
     59COMPILE_TARGET=with-jni 
     60else 
     61COMPILE_TARGET=without-jni 
     62endif 
    5763 
    58 # we don't want to compile the jni stuff in indexers for gs2 
    59 all: 
     64 
     65# with some compilers, just calling another target is insufficient 
     66# so an extra echo stmt is added after each call to another target 
     67all:    $(COMPILE_TARGET) 
     68    @echo "Compile done" 
     69 
     70install: install-$(COMPILE_TARGET) 
     71    @echo "Install done" 
     72 
     73 
     74with-jni without-jni: 
    6075    for odir in $(SPECIAL_COMPILEDIRS); do \ 
    61     echo making gs2 in $$odir; \ 
    62     (cd $$odir && $(MAKE) $(MDEFINES) gs2) || exit 1; \ 
     76      if test -d $$odir; then \ 
     77        echo making $(COMPILE_TARGET) in $$odir; \ 
     78        (cd $$odir && $(MAKE) $(MDEFINES) $(COMPILE_TARGET)) || exit 1; \ 
     79      fi; \ 
    6380    done 
    6481    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \ 
    65       echo making $@ in $$odir; \ 
    66       (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 
     82      if test -d $$odir; then \ 
     83        echo making all in $$odir; \ 
     84        (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \ 
     85      fi; \ 
    6786    done 
    6887 
    69 install: all 
     88install-with-jni install-without-jni: all 
    7089    for idir in $(SPECIAL_INSTALLDIRS); do \ 
    71       echo installing $$idir; \ 
    72       (cd $$idir && $(MAKE) install-gs2) || exit 1; \ 
     90      if test -d $$idir; then \ 
     91        echo installing $$idir $(COMPILE_TARGET); \ 
     92        (cd $$idir && $(MAKE) install-$(COMPILE_TARGET)) || exit 1; \ 
     93      fi; \ 
    7394    done 
    7495    for idir in $(INSTALLDIRS); do \ 
    75       echo installing $$idir; \ 
    76       (cd $$idir && $(MAKE) install) || exit 1; \ 
     96      if test -d $$idir; then \ 
     97        echo installing $$idir; \ 
     98        (cd $$idir && $(MAKE) install) || exit 1; \ 
     99      fi; \ 
    77100    done 
    78101 
    79102apache-for-dist: 
    80     (cd runtime-src/packages && $(MAKE) apache-for-dist) || exit 1; 
     103    if test -d runtime-src; then \ 
     104      (cd runtime-src/packages && $(MAKE) apache-for-dist) || exit 1; \ 
     105    fi 
    81106 
    82 # include the Greenstone Server Interface Makefile here 
    83 include GSI-Makefile 
     107# For GS2: include the Greenstone Server Interface Makefile here 
     108# http://www.makelinux.net/make3/make3-CHP-3-SECT-7.html 
     109sinclude GSI-Makefile 
    84110 
    85111distclean: clean 
    86112    rm -f Makefile config.cache config.h config.log stamp-h config.status 
    87113    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \ 
    88       echo cleaning $@ in $$subdir; \ 
    89       (cd $$subdir && $(MAKE) distclean) || exit 1; \ 
     114      if test -d $$subdir; then \ 
     115        echo cleaning $@ in $$subdir; \ 
     116        (cd $$subdir && $(MAKE) distclean) || exit 1; \ 
     117      fi; \ 
    90118    done 
    91119 
    92120clean: 
    93121    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \ 
    94       echo cleaning $@ in $$subdir; \ 
    95       (cd $$subdir && $(MAKE) clean) || exit 1; \ 
     122      if test -d $$subdir; then \ 
     123        echo cleaning $@ in $$subdir; \ 
     124        (cd $$subdir && $(MAKE) clean) || exit 1; \ 
     125      fi; \ 
    96126    done 
    97127 
  • main/trunk/greenstone2/configure

    r21330 r21366  
    310310 
    311311ac_subdirs_all="$ac_subdirs_all common-src build-src runtime-src" 
    312 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 USE_APACHE_HTTPD 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' 
     312ac_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 USE_APACHE_HTTPD 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' 
    313313ac_subst_files='' 
    314314 
     
    860860  --disable-sqlite        Disable SQLite support 
    861861  --enable-apache-httpd  Enable Apache httpd support 
     862  --enable-jni    Enable JNI compilation 
    862863  --disable-mg    Disable MG compilation 
    863864  --disable-mgpp        Disable MGPP compilation 
     
    14491450 
    14501451 
     1452# Check whether --enable-jni or --disable-jni was given. 
     1453if test "${enable_jni+set}" = set; then 
     1454  enableval="$enable_jni" 
     1455  ENABLE_JNI=$enableval 
     1456else 
     1457  ENABLE_JNI=no 
     1458fi; 
     1459if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then 
     1460  ENABLE_JNI=1 
     1461  cat >>confdefs.h <<\_ACEOF 
     1462#define ENABLE_JNI 
     1463_ACEOF 
     1464 
     1465else 
     1466  ENABLE_JNI=0 
     1467fi 
     1468 
    14511469 
    14521470# Check whether --enable-mg or --disable-mg was given. 
     
    79207938s,@USE_SQLITE@,$USE_SQLITE,;t t 
    79217939s,@USE_APACHE_HTTPD@,$USE_APACHE_HTTPD,;t t 
     7940s,@ENABLE_JNI@,$ENABLE_JNI,;t t 
    79227941s,@ENABLE_MG@,$ENABLE_MG,;t t 
    79237942s,@ENABLE_MGPP@,$ENABLE_MGPP,;t t 
  • main/trunk/greenstone2/configure.in

    r21330 r21366  
    8181AC_SUBST(USE_APACHE_HTTPD) 
    8282 
     83dnl 
     84dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour) 
     85dnl 
     86AC_ARG_ENABLE(jni, [  --enable-jni    Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no) 
     87if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then 
     88  ENABLE_JNI=1 
     89  AC_DEFINE(ENABLE_JNI,[]) 
     90else 
     91  ENABLE_JNI=0 
     92fi 
     93AC_SUBST(ENABLE_JNI) 
    8394 
    8495dnl 
  • main/trunk/greenstone2/win32.mak

    r21330 r21366  
    4040ENABLE_MGPP = 1 
    4141ENABLE_LUCENE = 1 
     42# jni is disabled by default as this is the default for GS2 
     43ENABLE_JNI = 0 
    4244 
    4345 
     
    7779!IF $(USE_Z3950) 
    7880MAKECMD = $(MAKECMD) USE_Z3950=1 
     81!ENDIF 
     82!IF "$(ENABLE_JNI)" == "" 
     83MAKECMD = $(MAKECMD) ENABLE_JNI=0 
     84!ELSE 
     85MAKECMD = $(MAKECMD) ENABLE_JNI=$(ENABLE_JNI) 
    7986!ENDIF 
    8087!IF "$(ENABLE_MG)" == ""