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

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

Updated several configure scripts and Makefiles to make use of the JAVA, JAVAC and JAVACFLAGS environment variables, also added a --disable-java option to several of the configure scripts

  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 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
86
87AC_DEFINE_UNQUOTED(COMPAT32BITFLAGS, $COMPAT32BITFLAGS)
88AC_SUBST(COMPAT32BITFLAGS)
89
90dnl
91dnl Make sure Javac and Java are available if were are compiling Lucene
92dnl
93if test "$ENABLE_LUCENE" = "1" ; then
94 AC_PROG_JAVAC
95 AC_PROG_JAVA
96fi
97
98dnl
99dnl Specify location of unac - if specified, will be passed to cascading configures
100dnl
101AC_ARG_WITH(unac, [ --with-unac=dir Use specified unac directory], UNAC_DIR=$withval)
102
103dnl
104dnl Specify location of libiconv - if specified, will be passed to cascading configures
105dnl
106AC_ARG_WITH(libiconv, [ --with-libiconv-prefix=dir Use specified libiconv directory], LIBICONV_DIR=$withval)
107
108if test $ENABLE_ACCENTFOLD = 1; then
109AC_CONFIG_SUBDIRS(packages/unac)
110fi
111
112dnl AC_CONFIG_SUBDIRS(mg mgpp)
113
114if test $ENABLE_MG = 1; then
115if test ! -d mg; then
116echo "***** Folder mg does not exist, cannot ENABLE_MG.";
117exit 1;
118fi
119AC_CONFIG_SUBDIRS(mg)
120fi
121
122if test $ENABLE_MGPP = 1; then
123if test ! -d mgpp; then
124echo "***** Folder mgpp does not exist, cannot ENABLE_MGPP.";
125exit 1;
126fi
127AC_CONFIG_SUBDIRS(mgpp)
128fi
129
130if test $ENABLE_LUCENE = 1; then
131if test ! -d lucene-gs; then
132echo "***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.";
133exit 1;
134fi
135fi
136
137srclist="lucene-gs/Makefile"
138
139AC_OUTPUT(Makefile $srclist)
Note: See TracBrowser for help on using the repository browser.