[13703] | 1 |
|
---|
[21328] | 2 | dnl AC_INIT(mgpp/text/MGQuery.cpp)
|
---|
| 3 | dnl http://www.gnu.org/software/hello/manual/autoconf/Initializing-configure.html
|
---|
| 4 | AC_INIT()
|
---|
[22058] | 5 |
|
---|
[23356] | 6 | dnl
|
---|
| 7 | dnl Disable all Java compilation
|
---|
| 8 | dnl
|
---|
| 9 | AC_ARG_ENABLE(java, [ --disable-java Disable Java compilation], ENABLE_JAVA=$enableval, ENABLE_JAVA=yes)
|
---|
| 10 | if test $ENABLE_JAVA = "yes" -o $ENABLE_JAVA = "1" ; then
|
---|
| 11 | ENABLE_JAVA=1
|
---|
| 12 | if test "x$JAVA_HOME" != "x" ; then
|
---|
| 13 | echo "Detected JAVA_HOME is set, however this will not be used during compilation"
|
---|
| 14 | echo "To control the version of 'javac' and 'java' set environment variables JAVAC"
|
---|
| 15 | echo "and JAVA respectively"
|
---|
| 16 | export JAVA_HOME=
|
---|
| 17 | fi
|
---|
| 18 | else
|
---|
| 19 | ENABLE_JAVA=0
|
---|
| 20 | fi
|
---|
| 21 | AC_SUBST(ENABLE_JAVA)
|
---|
[22058] | 22 |
|
---|
| 23 | dnl
|
---|
| 24 | dnl Disable accent folding
|
---|
| 25 | dnl
|
---|
[21446] | 26 | AC_ARG_ENABLE(accentfold, [ --disable-accentfold Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
|
---|
| 27 | if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
|
---|
| 28 | ENABLE_ACCENTFOLD=1
|
---|
| 29 | AC_DEFINE(ENABLE_ACCENTFOLD,[])
|
---|
| 30 | else
|
---|
| 31 | ENABLE_ACCENTFOLD=0
|
---|
| 32 | fi
|
---|
[13703] | 33 | AC_SUBST(ENABLE_ACCENTFOLD)
|
---|
| 34 |
|
---|
[21328] | 35 |
|
---|
| 36 | dnl
|
---|
[21364] | 37 | dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
|
---|
| 38 | dnl
|
---|
| 39 | AC_ARG_ENABLE(jni, [ --enable-jni Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
|
---|
[23356] | 40 | if test $ENABLE_JAVA -a \( $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" \) ; then
|
---|
[21364] | 41 | ENABLE_JNI=1
|
---|
| 42 | AC_DEFINE(ENABLE_JNI,[])
|
---|
| 43 | else
|
---|
| 44 | ENABLE_JNI=0
|
---|
| 45 | fi
|
---|
| 46 | AC_SUBST(ENABLE_JNI)
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 | dnl
|
---|
[21328] | 50 | dnl Set compilation of MG (enabled by default)
|
---|
| 51 | dnl
|
---|
| 52 | AC_ARG_ENABLE(mg, [ --disable-mg Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
|
---|
| 53 | if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then
|
---|
| 54 | ENABLE_MG=1
|
---|
| 55 | AC_DEFINE(ENABLE_MG,[])
|
---|
| 56 | else
|
---|
| 57 | ENABLE_MG=0
|
---|
| 58 | fi
|
---|
| 59 | AC_SUBST(ENABLE_MG)
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | dnl
|
---|
| 63 | dnl Set compilation of MGPP (enabled by default)
|
---|
| 64 | dnl
|
---|
| 65 | AC_ARG_ENABLE(mgpp, [ --disable-mgpp Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
|
---|
| 66 | if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then
|
---|
| 67 | ENABLE_MGPP=1
|
---|
| 68 | AC_DEFINE(ENABLE_MGPP,[])
|
---|
| 69 | else
|
---|
| 70 | ENABLE_MGPP=0
|
---|
| 71 | fi
|
---|
| 72 | AC_SUBST(ENABLE_MGPP)
|
---|
| 73 |
|
---|
| 74 | dnl
|
---|
| 75 | dnl Set compilation of Lucene (enabled by default)
|
---|
| 76 | dnl
|
---|
| 77 | AC_ARG_ENABLE(lucene, [ --disable-lucene Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes)
|
---|
[23356] | 78 | if test $ENABLE_JAVA -a \( $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" \) ; then
|
---|
[21328] | 79 | ENABLE_LUCENE=1
|
---|
| 80 | AC_DEFINE(ENABLE_LUCENE,[])
|
---|
| 81 | else
|
---|
| 82 | ENABLE_LUCENE=0
|
---|
| 83 | fi
|
---|
| 84 | AC_SUBST(ENABLE_LUCENE)
|
---|
| 85 |
|
---|
[19802] | 86 | dnl
|
---|
[22378] | 87 | dnl Make sure Javac and Java are available if were are compiling Lucene
|
---|
[19802] | 88 | dnl
|
---|
[22378] | 89 | if test "$ENABLE_LUCENE" = "1" ; then
|
---|
| 90 | AC_PROG_JAVAC
|
---|
| 91 | AC_PROG_JAVA
|
---|
| 92 | fi
|
---|
[19810] | 93 |
|
---|
[13703] | 94 | dnl
|
---|
| 95 | dnl Specify location of unac - if specified, will be passed to cascading configures
|
---|
| 96 | dnl
|
---|
| 97 | AC_ARG_WITH(unac, [ --with-unac=dir Use specified unac directory], UNAC_DIR=$withval)
|
---|
| 98 |
|
---|
[20832] | 99 | dnl
|
---|
| 100 | dnl Specify location of libiconv - if specified, will be passed to cascading configures
|
---|
| 101 | dnl
|
---|
| 102 | AC_ARG_WITH(libiconv, [ --with-libiconv-prefix=dir Use specified libiconv directory], LIBICONV_DIR=$withval)
|
---|
| 103 |
|
---|
[13703] | 104 | if test $ENABLE_ACCENTFOLD = 1; then
|
---|
| 105 | AC_CONFIG_SUBDIRS(packages/unac)
|
---|
| 106 | fi
|
---|
| 107 |
|
---|
[21328] | 108 | dnl AC_CONFIG_SUBDIRS(mg mgpp)
|
---|
[13703] | 109 |
|
---|
[21328] | 110 | if test $ENABLE_MG = 1; then
|
---|
| 111 | if test ! -d mg; then
|
---|
| 112 | echo "***** Folder mg does not exist, cannot ENABLE_MG.";
|
---|
| 113 | exit 1;
|
---|
| 114 | fi
|
---|
| 115 | AC_CONFIG_SUBDIRS(mg)
|
---|
| 116 | fi
|
---|
| 117 |
|
---|
| 118 | if test $ENABLE_MGPP = 1; then
|
---|
| 119 | if test ! -d mgpp; then
|
---|
| 120 | echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP.";
|
---|
| 121 | exit 1;
|
---|
| 122 | fi
|
---|
| 123 | AC_CONFIG_SUBDIRS(mgpp)
|
---|
| 124 | fi
|
---|
| 125 |
|
---|
| 126 | if test $ENABLE_LUCENE = 1; then
|
---|
| 127 | if test ! -d lucene-gs; then
|
---|
| 128 | echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.";
|
---|
| 129 | exit 1;
|
---|
| 130 | fi
|
---|
| 131 | fi
|
---|
| 132 |
|
---|
[23356] | 133 | srclist="lucene-gs/Makefile"
|
---|
| 134 |
|
---|
| 135 | AC_OUTPUT(Makefile $srclist)
|
---|