[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 |
|
---|
[26156] | 23 | dnl AC_MSG_CHECKING(to see if architecture is 64-bit)
|
---|
| 24 | dnl arch_64bit=no
|
---|
| 25 | dnl case "$host_cpu" in
|
---|
| 26 | dnl x86_64) arch_64bit=yes ;;
|
---|
| 27 | dnl esac
|
---|
| 28 | if test -z "$ARCH_DEP_FLAGS" ; then
|
---|
| 29 | ARCH_DEP_FLAGS=
|
---|
| 30 | fi
|
---|
| 31 | AC_SUBST(ARCH_DEP_FLAGS)
|
---|
| 32 |
|
---|
[22058] | 33 | dnl
|
---|
| 34 | dnl Disable accent folding
|
---|
| 35 | dnl
|
---|
[21446] | 36 | AC_ARG_ENABLE(accentfold, [ --disable-accentfold Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
|
---|
| 37 | if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
|
---|
| 38 | ENABLE_ACCENTFOLD=1
|
---|
| 39 | AC_DEFINE(ENABLE_ACCENTFOLD,[])
|
---|
| 40 | else
|
---|
| 41 | ENABLE_ACCENTFOLD=0
|
---|
| 42 | fi
|
---|
[13703] | 43 | AC_SUBST(ENABLE_ACCENTFOLD)
|
---|
| 44 |
|
---|
[21328] | 45 |
|
---|
| 46 | dnl
|
---|
[21364] | 47 | dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
|
---|
| 48 | dnl
|
---|
| 49 | AC_ARG_ENABLE(jni, [ --enable-jni Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
|
---|
[23356] | 50 | if test $ENABLE_JAVA -a \( $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" \) ; then
|
---|
[21364] | 51 | ENABLE_JNI=1
|
---|
| 52 | AC_DEFINE(ENABLE_JNI,[])
|
---|
| 53 | else
|
---|
| 54 | ENABLE_JNI=0
|
---|
| 55 | fi
|
---|
| 56 | AC_SUBST(ENABLE_JNI)
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | dnl
|
---|
[21328] | 60 | dnl Set compilation of MG (enabled by default)
|
---|
| 61 | dnl
|
---|
| 62 | AC_ARG_ENABLE(mg, [ --disable-mg Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
|
---|
| 63 | if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then
|
---|
| 64 | ENABLE_MG=1
|
---|
| 65 | AC_DEFINE(ENABLE_MG,[])
|
---|
| 66 | else
|
---|
| 67 | ENABLE_MG=0
|
---|
| 68 | fi
|
---|
| 69 | AC_SUBST(ENABLE_MG)
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | dnl
|
---|
| 73 | dnl Set compilation of MGPP (enabled by default)
|
---|
| 74 | dnl
|
---|
| 75 | AC_ARG_ENABLE(mgpp, [ --disable-mgpp Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
|
---|
| 76 | if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then
|
---|
| 77 | ENABLE_MGPP=1
|
---|
| 78 | AC_DEFINE(ENABLE_MGPP,[])
|
---|
| 79 | else
|
---|
| 80 | ENABLE_MGPP=0
|
---|
| 81 | fi
|
---|
| 82 | AC_SUBST(ENABLE_MGPP)
|
---|
| 83 |
|
---|
| 84 | dnl
|
---|
| 85 | dnl Set compilation of Lucene (enabled by default)
|
---|
| 86 | dnl
|
---|
| 87 | AC_ARG_ENABLE(lucene, [ --disable-lucene Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes)
|
---|
[23356] | 88 | if test $ENABLE_JAVA -a \( $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" \) ; then
|
---|
[21328] | 89 | ENABLE_LUCENE=1
|
---|
| 90 | AC_DEFINE(ENABLE_LUCENE,[])
|
---|
| 91 | else
|
---|
| 92 | ENABLE_LUCENE=0
|
---|
| 93 | fi
|
---|
| 94 | AC_SUBST(ENABLE_LUCENE)
|
---|
| 95 |
|
---|
[19802] | 96 | dnl
|
---|
[22378] | 97 | dnl Make sure Javac and Java are available if were are compiling Lucene
|
---|
[19802] | 98 | dnl
|
---|
[22378] | 99 | if test "$ENABLE_LUCENE" = "1" ; then
|
---|
| 100 | AC_PROG_JAVAC
|
---|
| 101 | AC_PROG_JAVA
|
---|
| 102 | fi
|
---|
[19810] | 103 |
|
---|
[13703] | 104 | dnl
|
---|
| 105 | dnl Specify location of unac - if specified, will be passed to cascading configures
|
---|
| 106 | dnl
|
---|
| 107 | AC_ARG_WITH(unac, [ --with-unac=dir Use specified unac directory], UNAC_DIR=$withval)
|
---|
| 108 |
|
---|
[20832] | 109 | dnl
|
---|
| 110 | dnl Specify location of libiconv - if specified, will be passed to cascading configures
|
---|
| 111 | dnl
|
---|
| 112 | AC_ARG_WITH(libiconv, [ --with-libiconv-prefix=dir Use specified libiconv directory], LIBICONV_DIR=$withval)
|
---|
| 113 |
|
---|
[13703] | 114 | if test $ENABLE_ACCENTFOLD = 1; then
|
---|
| 115 | AC_CONFIG_SUBDIRS(packages/unac)
|
---|
| 116 | fi
|
---|
| 117 |
|
---|
[21328] | 118 | dnl AC_CONFIG_SUBDIRS(mg mgpp)
|
---|
[13703] | 119 |
|
---|
[21328] | 120 | if test $ENABLE_MG = 1; then
|
---|
| 121 | if test ! -d mg; then
|
---|
| 122 | echo "***** Folder mg does not exist, cannot ENABLE_MG.";
|
---|
| 123 | exit 1;
|
---|
| 124 | fi
|
---|
| 125 | AC_CONFIG_SUBDIRS(mg)
|
---|
| 126 | fi
|
---|
| 127 |
|
---|
| 128 | if test $ENABLE_MGPP = 1; then
|
---|
| 129 | if test ! -d mgpp; then
|
---|
| 130 | echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP.";
|
---|
| 131 | exit 1;
|
---|
| 132 | fi
|
---|
| 133 | AC_CONFIG_SUBDIRS(mgpp)
|
---|
| 134 | fi
|
---|
| 135 |
|
---|
| 136 | if test $ENABLE_LUCENE = 1; then
|
---|
| 137 | if test ! -d lucene-gs; then
|
---|
| 138 | echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.";
|
---|
| 139 | exit 1;
|
---|
| 140 | fi
|
---|
| 141 | fi
|
---|
| 142 |
|
---|
[23356] | 143 | srclist="lucene-gs/Makefile"
|
---|
| 144 |
|
---|
| 145 | AC_OUTPUT(Makefile $srclist)
|
---|