1 |
|
---|
2 | dnl AC_INIT(mgpp/text/MGQuery.cpp)
|
---|
3 | dnl http://www.gnu.org/software/hello/manual/autoconf/Initializing-configure.html
|
---|
4 | AC_INIT()
|
---|
5 |
|
---|
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)
|
---|
22 |
|
---|
23 | dnl
|
---|
24 | dnl Disable accent folding
|
---|
25 | dnl
|
---|
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
|
---|
33 | AC_SUBST(ENABLE_ACCENTFOLD)
|
---|
34 |
|
---|
35 |
|
---|
36 | dnl
|
---|
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)
|
---|
40 | if test $ENABLE_JAVA -a \( $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" \) ; then
|
---|
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
|
---|
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)
|
---|
78 | if test $ENABLE_JAVA -a \( $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" \) ; then
|
---|
79 | ENABLE_LUCENE=1
|
---|
80 | AC_DEFINE(ENABLE_LUCENE,[])
|
---|
81 | else
|
---|
82 | ENABLE_LUCENE=0
|
---|
83 | fi
|
---|
84 | AC_SUBST(ENABLE_LUCENE)
|
---|
85 |
|
---|
86 |
|
---|
87 | AC_DEFINE_UNQUOTED(COMPAT32BITFLAGS, $COMPAT32BITFLAGS)
|
---|
88 | AC_SUBST(COMPAT32BITFLAGS)
|
---|
89 |
|
---|
90 | dnl
|
---|
91 | dnl Make sure Javac and Java are available if were are compiling Lucene
|
---|
92 | dnl
|
---|
93 | if test "$ENABLE_LUCENE" = "1" ; then
|
---|
94 | AC_PROG_JAVAC
|
---|
95 | AC_PROG_JAVA
|
---|
96 | fi
|
---|
97 |
|
---|
98 | dnl
|
---|
99 | dnl Specify location of unac - if specified, will be passed to cascading configures
|
---|
100 | dnl
|
---|
101 | AC_ARG_WITH(unac, [ --with-unac=dir Use specified unac directory], UNAC_DIR=$withval)
|
---|
102 |
|
---|
103 | dnl
|
---|
104 | dnl Specify location of libiconv - if specified, will be passed to cascading configures
|
---|
105 | dnl
|
---|
106 | AC_ARG_WITH(libiconv, [ --with-libiconv-prefix=dir Use specified libiconv directory], LIBICONV_DIR=$withval)
|
---|
107 |
|
---|
108 | if test $ENABLE_ACCENTFOLD = 1; then
|
---|
109 | AC_CONFIG_SUBDIRS(packages/unac)
|
---|
110 | fi
|
---|
111 |
|
---|
112 | dnl AC_CONFIG_SUBDIRS(mg mgpp)
|
---|
113 |
|
---|
114 | if test $ENABLE_MG = 1; then
|
---|
115 | if test ! -d mg; then
|
---|
116 | echo "***** Folder mg does not exist, cannot ENABLE_MG.";
|
---|
117 | exit 1;
|
---|
118 | fi
|
---|
119 | AC_CONFIG_SUBDIRS(mg)
|
---|
120 | fi
|
---|
121 |
|
---|
122 | if test $ENABLE_MGPP = 1; then
|
---|
123 | if test ! -d mgpp; then
|
---|
124 | echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP.";
|
---|
125 | exit 1;
|
---|
126 | fi
|
---|
127 | AC_CONFIG_SUBDIRS(mgpp)
|
---|
128 | fi
|
---|
129 |
|
---|
130 | if test $ENABLE_LUCENE = 1; then
|
---|
131 | if test ! -d lucene-gs; then
|
---|
132 | echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.";
|
---|
133 | exit 1;
|
---|
134 | fi
|
---|
135 | fi
|
---|
136 |
|
---|
137 | srclist="lucene-gs/Makefile"
|
---|
138 |
|
---|
139 | AC_OUTPUT(Makefile $srclist)
|
---|