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

Last change on this file since 32221 was 26156, checked in by kjdon, 12 years ago

had to add AC_SUBST for ARCH_DEP_FLAGS otherwise its not passed in to unac which needs it

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