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 |
|
---|
7 | dnl
|
---|
8 | dnl Disable accent folding
|
---|
9 | dnl
|
---|
10 | AC_ARG_ENABLE(accentfold, [ --disable-accentfold Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
|
---|
11 | if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
|
---|
12 | ENABLE_ACCENTFOLD=1
|
---|
13 | AC_DEFINE(ENABLE_ACCENTFOLD,[])
|
---|
14 | else
|
---|
15 | ENABLE_ACCENTFOLD=0
|
---|
16 | fi
|
---|
17 | AC_SUBST(ENABLE_ACCENTFOLD)
|
---|
18 |
|
---|
19 |
|
---|
20 | dnl
|
---|
21 | dnl Set compilation of JNI parts of MG and MGPP indexers (disabled by default, which is GS2's default behaviour)
|
---|
22 | dnl
|
---|
23 | AC_ARG_ENABLE(jni, [ --enable-jni Enable JNI compilation], ENABLE_JNI=$enableval, ENABLE_JNI=no)
|
---|
24 | if test $ENABLE_JNI = "yes" -o $ENABLE_JNI = "1" ; then
|
---|
25 | ENABLE_JNI=1
|
---|
26 | AC_DEFINE(ENABLE_JNI,[])
|
---|
27 | else
|
---|
28 | ENABLE_JNI=0
|
---|
29 | fi
|
---|
30 | AC_SUBST(ENABLE_JNI)
|
---|
31 |
|
---|
32 |
|
---|
33 | dnl
|
---|
34 | dnl Set compilation of MG (enabled by default)
|
---|
35 | dnl
|
---|
36 | AC_ARG_ENABLE(mg, [ --disable-mg Disable MG compilation], ENABLE_MG=$enableval, ENABLE_MG=yes)
|
---|
37 | if test $ENABLE_MG = "yes" -o $ENABLE_MG = "1" ; then
|
---|
38 | ENABLE_MG=1
|
---|
39 | AC_DEFINE(ENABLE_MG,[])
|
---|
40 | else
|
---|
41 | ENABLE_MG=0
|
---|
42 | fi
|
---|
43 | AC_SUBST(ENABLE_MG)
|
---|
44 |
|
---|
45 |
|
---|
46 | dnl
|
---|
47 | dnl Set compilation of MGPP (enabled by default)
|
---|
48 | dnl
|
---|
49 | AC_ARG_ENABLE(mgpp, [ --disable-mgpp Disable MGPP compilation], ENABLE_MGPP=$enableval, ENABLE_MGPP=yes)
|
---|
50 | if test $ENABLE_MGPP = "yes" -o $ENABLE_MGPP = "1" ; then
|
---|
51 | ENABLE_MGPP=1
|
---|
52 | AC_DEFINE(ENABLE_MGPP,[])
|
---|
53 | else
|
---|
54 | ENABLE_MGPP=0
|
---|
55 | fi
|
---|
56 | AC_SUBST(ENABLE_MGPP)
|
---|
57 |
|
---|
58 | dnl
|
---|
59 | dnl Set compilation of Lucene (enabled by default)
|
---|
60 | dnl
|
---|
61 | AC_ARG_ENABLE(lucene, [ --disable-lucene Disable Lucene compilation], ENABLE_LUCENE=$enableval, ENABLE_LUCENE=yes)
|
---|
62 | if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then
|
---|
63 | ENABLE_LUCENE=1
|
---|
64 | AC_DEFINE(ENABLE_LUCENE,[])
|
---|
65 | else
|
---|
66 | ENABLE_LUCENE=0
|
---|
67 | fi
|
---|
68 | AC_SUBST(ENABLE_LUCENE)
|
---|
69 |
|
---|
70 |
|
---|
71 | AC_DEFINE_UNQUOTED(COMPAT32BITFLAGS, $COMPAT32BITFLAGS)
|
---|
72 | AC_SUBST(COMPAT32BITFLAGS)
|
---|
73 |
|
---|
74 | dnl
|
---|
75 | dnl Make sure Javac and Java are available
|
---|
76 | dnl
|
---|
77 |
|
---|
78 | AC_PROG_JAVAC
|
---|
79 | AC_PROG_JAVA
|
---|
80 |
|
---|
81 | dnl
|
---|
82 | dnl Specify location of unac - if specified, will be passed to cascading configures
|
---|
83 | dnl
|
---|
84 | AC_ARG_WITH(unac, [ --with-unac=dir Use specified unac directory], UNAC_DIR=$withval)
|
---|
85 |
|
---|
86 | dnl
|
---|
87 | dnl Specify location of libiconv - if specified, will be passed to cascading configures
|
---|
88 | dnl
|
---|
89 | AC_ARG_WITH(libiconv, [ --with-libiconv-prefix=dir Use specified libiconv directory], LIBICONV_DIR=$withval)
|
---|
90 |
|
---|
91 | if test $ENABLE_ACCENTFOLD = 1; then
|
---|
92 | AC_CONFIG_SUBDIRS(packages/unac)
|
---|
93 | fi
|
---|
94 |
|
---|
95 | dnl AC_CONFIG_SUBDIRS(mg mgpp)
|
---|
96 |
|
---|
97 | if test $ENABLE_MG = 1; then
|
---|
98 | if test ! -d mg; then
|
---|
99 | echo "***** Folder mg does not exist, cannot ENABLE_MG.";
|
---|
100 | exit 1;
|
---|
101 | fi
|
---|
102 | AC_CONFIG_SUBDIRS(mg)
|
---|
103 | fi
|
---|
104 |
|
---|
105 | if test $ENABLE_MGPP = 1; then
|
---|
106 | if test ! -d mgpp; then
|
---|
107 | echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP.";
|
---|
108 | exit 1;
|
---|
109 | fi
|
---|
110 | AC_CONFIG_SUBDIRS(mgpp)
|
---|
111 | fi
|
---|
112 |
|
---|
113 | if test $ENABLE_LUCENE = 1; then
|
---|
114 | if test ! -d lucene-gs; then
|
---|
115 | echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.";
|
---|
116 | exit 1;
|
---|
117 | fi
|
---|
118 | fi
|
---|
119 |
|
---|
120 | AC_OUTPUT(Makefile)
|
---|