source: main/branches/64_bit_Greenstone/greenstone2/common-src/indexers/configure.ac@ 23508

Last change on this file since 23508 was 23508, checked in by sjm84, 13 years ago

Committing 64 bit changes into the branch

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