-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
323 lines (252 loc) · 10.9 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
AC_INIT(eustagger_lite.cc)
dnl flag orokorrak zehaztu
AC_SUBST(CCFLAGS,["-g -fpic -Wall"])
dnl C/C++ konpiladoreak bilatu
AC_PROG_CC
AC_PROG_CXX
AC_LANG(C)
AC_LANG(C++)
AC_PROG_MAKE_SET
AC_HEADER_STDC
dnl BOOST goiburuak non daude?
AC_ARG_WITH(boost-include,
[ --with-boost-include=DIR Path of BOOST headers],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_INCLUDE_BOOST=$withval
else
AC_MSG_ERROR([Please specify a suitable BOOST include directory: --with-boost-include=DIR])
fi ,
CONF_INCLUDE_BOOST="")
dnl PCRE++ goiburuak non daude?
AC_ARG_WITH(pcreplusplus-include,
[ --with-pcreplusplus-include=DIR Path of PCRE++ headers],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_INCLUDE_PCREPLUSPLUS=$withval
else
AC_MSG_ERROR([Please specify a suitable PCRE++ include directory: --with-pcreplusplus-include=DIR"])
fi ,
CONF_INCLUDE_PCREPLUSPLUS="")
dnl PCRE++ liburutegia non dago?
AC_ARG_WITH(pcreplusplus-lib,
[ --with-pcreplusplus-lib=DIR Path of PCRE lib],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_LD_PCREPLUSPLUS=-L$withval;
[LDFLAGS="${LDFLAGS} -L${withval}"]
else
AC_MSG_ERROR([Please specify a suitable PCRE++ library directory: --with-pcreplusplus-lib=DIR])
fi ,
)
dnl FOMA goiburuak non daude?
AC_ARG_WITH(foma-include,
[ --with-foma-include=DIR Path of FOMA headers],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_INCLUDE_FOMA=$withval
else
AC_MSG_ERROR([Please specify a suitable FOMA include directory: --with-foma-include=DIR])
fi ,
CONF_INCLUDE_FOMA="")
dnl FOMA liburutegia non dago?
AC_ARG_WITH(foma-lib,
[ --with-foma-lib=DIR Path of FOMA lib],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_LD_FOMA=-L$withval;
[LDFLAGS="${LDFLAGS} -L${withval}"]
else
AC_MSG_ERROR([Please specify a suitable FOMA library directory: --with-foma-lib=DIR])
fi ,
)
dnl VISLCG3 goiburuak non daude?
AC_ARG_WITH(vislcg3-include,
[ --with-vislcg3-include=DIR Path of VISLCG3 headers],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_INCLUDE_VISLCG3=$withval
else
AC_MSG_ERROR([Please specify a suitable VISLCG3 include directory: --with-vislcg3-include=DIR])
fi ,
CONF_INCLUDE_VISLCG3="")
dnl VISLCG3 liburutegia non dago?
AC_ARG_WITH(vislcg3-lib,
[ --with-vislcg3-lib=DIR Path of VISLCG3 lib],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_LD_VISLCG3=-L$withval;
[LDFLAGS="${LDFLAGS} -L${withval}"]
else
AC_MSG_ERROR([Please specify a suitable VISLCG3 library directory: --with-vislcg3-lib=DIR])
fi ,
)
dnl SWIPL goiburuak non daude?
AC_ARG_WITH(swipl-include,
[ --with-swipl-include=DIR Path of SWIPL headers],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_INCLUDE_SWIPL=$withval
else
AC_MSG_ERROR([Please specify a suitable SWIPL include directory: --with-swipl-include=DIR])
fi ,
CONF_INCLUDE_SWIPL="")
dnl SWIPL liburutegia non dago?
AC_ARG_WITH(swipl-lib,
[ --with-swipl-lib=DIR Path of SWIPL lib],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_LD_SWIPL=-L$withval;
[LDFLAGS="${LDFLAGS} -L${withval}"]
else
AC_MSG_ERROR([Please specify a suitable SWIPL library directory: --with-swipl-lib=DIR])
fi ,
)
dnl swipl-ld eta swipl programak non daude?
AC_ARG_WITH(swipl-bin,
[ --with-swipl-bin=DIR Path of swipl & swipl-ld programs],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_SWIPLLD=$withval
[PATH="${PATH}:${withval}"]
else
AC_MSG_ERROR([Please specify a correct PATH for swipl & swipl-ld programs: --with-swipl-bin=DIR])
fi ,
CONF_SWIPLLD="")
dnl bison programa non dago?
AC_ARG_WITH(bison,
[ --with-bison=PROGRAM Path of bison program],
if test [ x$withval != x ] -a [ -f $withval ]; then
CONF_BISON=$withval
else
AC_MSG_ERROR([Please specify a correct PATH for bison program: --with-bison=PROGRAMPATH])
fi ,
CONF_BISON="")
dnl flex programa non dago?
AC_ARG_WITH(flex,
[ --with-flex=PROGRAN Path of flex program],
if test [ x$withval != x ] -a [ -f $withval ]; then
CONF_FLEX=$withval
else
AC_MSG_ERROR([Please specify a correct PATH for flex program: --with-flex=PROGRAMPATH])
fi ,
CONF_FLEX="")
dnl Freeling goiburuak non daude?
AC_ARG_WITH(freeling-include,
[ --with-freeling-include=DIR Path of Freeling 3.0 headers],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_INCLUDE_FREELING=$withval
else
AC_MSG_ERROR([Please specify a suitable Freeling 3.0 include directory: --with-freeling-include=DIR"])
fi ,
CONF_INCLUDE_FREELING="")
dnl Freeling liburutegia non dago?
AC_ARG_WITH(freeling-lib,
[ --with-freeling-lib=DIR Path of Freeling 3.0 lib],
if test [ x$withval != x ] -a [ -d $withval ]; then
CONF_LD_FREELING=-L$withval;
[LDFLAGS="${LDFLAGS} -L${withval}"]
else
AC_MSG_ERROR([Please specify a suitable Freeling 3.0 library directory: --with-freeling-lib=DIR])
fi ,
)
dnl boost bilatu, kasu hoentan config.hpp bilatuko dugu
if test "$CONF_INCLUDE_BOOST" = "" ; then
AC_CHECK_HEADER(boost/config.hpp,, AC_MSG_ERROR([Please specify a suitable BOOST include directory: --with-boost-include=DIR]))
else
AC_CHECK_FILE($CONF_INCLUDE_BOOST/boost/config.hpp,CONF_INCLUDE_BOOST=-I$CONF_INCLUDE_BOOST,AC_MSG_ERROR([Please specify a suitable BOOST include directory which contains general boost subdir: --with-boost-include=DIR]))
fi
AC_SUBST(CONF_INCLUDE_BOOST)
dnl pcre++.h bilatu
if test "$CONF_INCLUDE_PCREPLUSPLUS" = "" ; then
AC_CHECK_HEADER(pcre++.h,, AC_MSG_ERROR([Please specify a suitable PCRE include directory: --with-pcreplusplus-include=DIR]))
else
AC_CHECK_FILE($CONF_INCLUDE_PCREPLUSPLUS/pcre++.h,CONF_INCLUDE_PCREPLUSPLUS=-I$CONF_INCLUDE_PCREPLUSPLUS,AC_MSG_ERROR([Please specify a suitable PCRE include directory: --with-pcreplusplus-include=DIR]))
fi
AC_SUBST(CONF_INCLUDE_PCREPLUSPLUS)
dnl pcre++ liburutegia bilatu
AC_CHECK_LIB(pcre++,
main,
,
AC_MSG_ERROR([libpcre++ not found. Please specify a suitable PCRE++ library directory: --with-pcreplusplus-lib=DIR]))
AC_SUBST(CONF_LD_PCREPLUSPLUS)
dnl fomalib.h bilatu
if test "$CONF_INCLUDE_FOMA" = "" ; then
AC_CHECK_HEADER(fomalib.h,, AC_MSG_ERROR([Please specify a suitable FOMA include directory: --with-foma-include=DIR]),-)
else
AC_CHECK_FILE($CONF_INCLUDE_FOMA/fomalib.h,CONF_INCLUDE_FOMA=-I$CONF_INCLUDE_FOMA,AC_MSG_ERROR([Please specify a suitable FOMA include directory: --with-foma-include=DIR]))
fi
AC_SUBST(CONF_INCLUDE_FOMA)
dnl foma liburutegia bilatu
AC_CHECK_LIB(foma,
main,
,
AC_MSG_ERROR([libfoma not found. Please specify a suitable FOMA library directory: --with-foma-lib=DIR]))
AC_SUBST(CONF_LD_FOMA)
dnl cg3.h bilatu
if test "$CONF_INCLUDE_VISLCG3" = "" ; then
AC_CHECK_HEADER(cg3.h,, AC_MSG_ERROR([Please specify a suitable VISLCG3 include directory: --with-vislcg3-include=DIR]))
else
AC_CHECK_FILE($CONF_INCLUDE_VISLCG3/cg3.h,CONF_INCLUDE_VISLCG3=-I$CONF_INCLUDE_VISLCG3,AC_MSG_ERROR([Please specify a suitable VISLCG3 include directory: --with-vislcg3-include=DIR]))
fi
AC_SUBST(CONF_INCLUDE_VISLCG3)
dnl libcg3.so liburutegia bilatu
AC_CHECK_LIB(cg3,
main,
,
AC_MSG_ERROR([libcg3 not found. Please specify a suitable VISLCG3 library directory: --with-vislcg3-lib=DIR]))
AC_SUBST(CONF_LD_VISLCG3)
dnl SWI-Prolog.h bilatu
if test "$CONF_INCLUDE_SWIPL" = "" ; then
AC_CHECK_HEADER(SWI-Prolog.h,, AC_MSG_ERROR([Please specify a suitable SWIPL include directory: --with-swipl-include=DIR]))
else
AC_CHECK_FILE($CONF_INCLUDE_SWIPL/SWI-Prolog.h,CONF_INCLUDE_SWIPL=-I$CONF_INCLUDE_SWIPL,AC_MSG_ERROR([Please specify a suitable SWIPL include directory: --with-swipl-include=DIR]))
fi
AC_SUBST(CONF_INCLUDE_SWIPL)
dnl libswipl.a liburutegia bilatu
AC_CHECK_LIB(swipl,
main,
,
AC_MSG_ERROR([libswipl not found. Please specify a suitable SWIPL library directory: --with-swipl-lib=DIR]))
AC_SUBST(CONF_LD_SWIPL)
dnl swipl-ld programa bilatu
if test "$CONF_SWIPLLD" = "" ; then
AC_CHECK_PROG(CONF_SWIPLLD_HELP,swipl-ld,yes,no)
if test "$CONF_SWIPLLD_HELP" = "no" ; then
AC_MSG_ERROR([Program swipl-ld not found in PATH. Please specify a correct PATH for swipl & swipl-ld programs: --with-swipl-bin=DIR])
fi
else
AC_CHECK_FILE($CONF_SWIPLLD/swipl-ld,,AC_MSG_ERROR([Please specify a correct PATH for swipl & swipl-ld programs: --with-swipl-bin=DIR]))
fi
AC_SUBST(CONF_SWIPLLD)
dnl bison programa bilatu
if test "$CONF_BISON" = "" ; then
AC_CHECK_PROG(CONF_BISON, bison, bison)
fi
if test "$CONF_BISON" = "" ; then
AC_MSG_ERROR([Program bison not found in PATH. Please specify a suitable bison program path: --with-bison=PATH])
fi
AC_SUBST(CONF_BISON)
dnl flex programa bilatu
if test "$CONF_FLEX" = "" ; then
AC_CHECK_PROG(CONF_FLEX, flex, flex)
fi
if test "$CONF_FLEX" = "" ; then
AC_MSG_ERROR([Program flex not found in PATH. Please specify a suitable flex program path: --with-flex=PATH])
fi
AC_SUBST(CONF_FLEX)
dnl freeling goiburuak bilatu
if test "$CONF_INCLUDE_PCREPLUSPLUS" = "" ; then
AC_CHECK_HEADER(freeling.h,, AC_MSG_ERROR([Please specify a suitable Freeling 3.0 include directory: --with-freeling-include=DIR]))
else
AC_CHECK_FILE($CONF_INCLUDE_FREELING/freeling.h,CONF_INCLUDE_FREELING=-I$CONF_INCLUDE_FREELING,AC_MSG_ERROR([Please specify a suitable Freeling include directory: --with-freeling-include=DIR]))
fi
AC_SUBST(CONF_INCLUDE_FREELING)
dnl freeling liburutegia bilatu
AC_CHECK_LIB(freeling,
main,
,
AC_MSG_ERROR([libfreeling not found. Please specify a suitable Freeling 3.0 library directory: --with-freeling-lib=DIR]))
AC_SUBST(CONF_LD_FREELING)
dnl Makefilean aldagaiak ordeztu
MAKEFILE_FILES="Makefile aurreprozesua_raw/Makefile morfologia/Makefile morfosintaxia_raw/Makefile habil/Makefile cg3manager/Makefile analisitresnak/Makefile"
SUBDIRS="aurreprozesua_raw morfologia morfosintaxia_raw habil cg3manager analisitresnak"
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(SUBDIRS)
AC_SUBST(DBXMLSTR)
AC_SUBST(prefix)
AC_SUBST(CC)
AC_SUBST(CXX)
dnl Makefile idatzi
AC_OUTPUT($MAKEFILE_FILES)