source: main/trunk/greenstone2/common-src/indexers/configure.ac@ 21446

Last change on this file since 21446 was 21446, checked in by ak19, 14 years ago

Configure files updated to correctly set all the variables that can be ENABLED/DISABLED.

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