Ignore:
Timestamp:
2010-11-29T16:49:14+13:00 (13 years ago)
Author:
sjm84
Message:

Updated several configure scripts and Makefiles to make use of the JAVA, JAVAC and JAVACFLAGS environment variables, also added a --disable-java option to several of the configure scripts

File:
1 edited

Legend:

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

    r22378 r23356  
    66
    77PACKAGE=gsdl
    8 VERSION=2.82-svn
     8VERSION=2.x-svn
    99AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
    1010AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
     
    4848
    4949dnl
     50dnl Disable all Java compilation
     51dnl
     52AC_ARG_ENABLE(java, [  --disable-java          Disable Java compilation], ENABLE_JAVA=$enableval, ENABLE_JAVA=yes)
     53if test $ENABLE_JAVA = "yes" -o $ENABLE_JAVA = "1" ; then
     54  ENABLE_JAVA=1
     55  if test "x$JAVA_HOME" != "x" ; then
     56    echo "Detected JAVA_HOME is set, however this will not be used during compilation"
     57    echo "To control the version of 'javac' and 'java' set environment variables JAVAC"
     58    echo "and JAVA respectively"
     59    export JAVA_HOME=
     60  fi
     61else
     62  ENABLE_JAVA=0
     63fi
     64AC_SUBST(ENABLE_JAVA)
     65
     66dnl
    5067dnl Set use of z39.50
    5168dnl
     
    7491dnl Set use of JDBM (enabled by default)
    7592dnl
    76 AC_ARG_ENABLE(jdbm, [  --disable-jdbm        Disable JDBM compilation], USE_JDBM=$enableval, USE_JDBM=yes)
    77 if test $USE_JDBM = "yes" -o $USE_JDBM = "1" ; then
     93AC_ARG_ENABLE(jdbm, [  --disable-jdbm          Disable JDBM compilation], USE_JDBM=$enableval, USE_JDBM=yes)
     94if test $ENABLE_JAVA = "1" -a \( $USE_JDBM = "yes" -o $USE_JDBM = "1" \) ; then
    7895  USE_JDBM=1
    7996  AC_DEFINE(USE_JDBM,[])
     
    86103dnl Set use of GDBM (enabled by default)
    87104dnl
    88 AC_ARG_ENABLE(gdbm, [  --disable-gdbm        Disable GDBM compilation], USE_GDBM=$enableval, USE_GDBM=yes)
     105AC_ARG_ENABLE(gdbm, [  --disable-gdbm          Disable GDBM compilation], USE_GDBM=$enableval, USE_GDBM=yes)
    89106if test $USE_GDBM = "yes" -o $USE_GDBM = "1" ; then
    90107  USE_GDBM=1
     
    123140dnl
    124141if test -d runtime-src; then
    125    AC_ARG_ENABLE(apache-httpd, [  --enable-apache-httpd  Enable Apache httpd support], USE_APACHE_HTTPD=$enableval, USE_APACHE_HTTPD=no)
     142   AC_ARG_ENABLE(apache-httpd, [  --enable-apache-httpd   Enable Apache httpd support], USE_APACHE_HTTPD=$enableval, USE_APACHE_HTTPD=no)
    126143   if test $USE_APACHE_HTTPD = "yes" -o $USE_APACHE_HTTPD = "1" ; then
    127144     USE_APACHE_HTTPD=1
     
    136153dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
    137154dnl
    138 AC_ARG_ENABLE(jni, [  --enable-jni    Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
    139 if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
     155AC_ARG_ENABLE(jni, [  --enable-jni            Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
     156if test $ENABLE_JAVA = "1" -a \( $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" \) ; then
    140157  ENABLE_JNI=1
    141158  AC_DEFINE(ENABLE_JNI,[])
     
    148165dnl Set compilation of MG (enabled by default)
    149166dnl
    150 AC_ARG_ENABLE(mg, [  --disable-mg    Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
     167AC_ARG_ENABLE(mg, [  --disable-mg            Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
    151168if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then
    152169  ENABLE_MG=1
     
    161178dnl Set compilation of MGPP (enabled by default)
    162179dnl
    163 AC_ARG_ENABLE(mgpp, [  --disable-mgpp        Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
     180AC_ARG_ENABLE(mgpp, [  --disable-mgpp          Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
    164181if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then
    165182  ENABLE_MGPP=1
     
    174191dnl
    175192AC_ARG_ENABLE(lucene, [  --disable-lucene        Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes)
    176 if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then
     193if test $ENABLE_JAVA = "1" -a \( $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" \) ; then
    177194  ENABLE_LUCENE=1
    178195  AC_DEFINE(ENABLE_LUCENE,[])
Note: See TracChangeset for help on using the changeset viewer.