1 | dnl Process this file with autoconf to produce a configure script |
---|
2 | AC_INIT(Singular/matpol.h) |
---|
3 | AC_PREFIX_DEFAULT(`pwd`) |
---|
4 | OUTPUT_MAKEFILES="Makefile doc/Makefile" |
---|
5 | |
---|
6 | |
---|
7 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
8 | dnl Version business -- set these here |
---|
9 | dnl |
---|
10 | # make them to env variables |
---|
11 | # pass them indirectly to subsequent configures |
---|
12 | SINGULAR_MAJOR_VERSION=1 |
---|
13 | SINGULAR_MINOR_VERSION=2 |
---|
14 | SINGULAR_SUB_VERSION=0 |
---|
15 | SINGULAR_VERSION="${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION}" |
---|
16 | VERSION_DATE="June 1998" |
---|
17 | export SINGULAR_MINOR_VERSION |
---|
18 | export SINGULAR_MAJOR_VERSION |
---|
19 | export SINGULAR_SUB_VERSION |
---|
20 | export SINGULAR_VERSION |
---|
21 | export VERSION_DATE |
---|
22 | |
---|
23 | dnl substitue them into the Makefiles |
---|
24 | AC_SUBST(SINGULAR_MAJOR_VERSION) |
---|
25 | AC_SUBST(SINGULAR_MINOR_VERSION) |
---|
26 | AC_SUBST(SINGULAR_SUB_VERSION) |
---|
27 | |
---|
28 | |
---|
29 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
30 | dnl Those are needed to check for libs and headers, later on |
---|
31 | dnl |
---|
32 | AC_PROG_CC |
---|
33 | AC_PROG_CPP |
---|
34 | AC_AIX |
---|
35 | |
---|
36 | |
---|
37 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
38 | dnl Set exec_prefix, bindir, libdir, includedir to some sensible values |
---|
39 | dnl |
---|
40 | # expand prefix and pass it to subsequent configures |
---|
41 | if test "x$prefix" = xNONE; then |
---|
42 | prefix=${ac_default_prefix} |
---|
43 | ac_configure_args="$ac_configure_args --prefix=${prefix}" |
---|
44 | fi |
---|
45 | |
---|
46 | # expand exec_prefix |
---|
47 | if test "x$exec_prefix" = xNONE; then |
---|
48 | if test -r "singuname.sh"; then |
---|
49 | if (/bin/sh singuname.sh >/dev/null 2>&1) then |
---|
50 | exec_prefix=${prefix}/`/bin/sh singuname.sh` |
---|
51 | ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}" |
---|
52 | else |
---|
53 | AC_MSG_ERROR(Unknown architecture: Check singuname.sh) |
---|
54 | fi |
---|
55 | else |
---|
56 | AC_MSG_ERROR(Need singuname.sh) |
---|
57 | fi |
---|
58 | fi |
---|
59 | |
---|
60 | # expand bindir |
---|
61 | if test "x$bindir" = 'x${exec_prefix}/bin'; then |
---|
62 | bindir="${exec_prefix}/bin" |
---|
63 | ac_configure_args="$ac_configure_args --bindir=${bindir}" |
---|
64 | fi |
---|
65 | |
---|
66 | # expand libdir |
---|
67 | if test "x$libdir" = 'x${exec_prefix}/lib'; then |
---|
68 | libdir="${exec_prefix}/lib/${SINGULAR_VERSION}" |
---|
69 | ac_configure_args="$ac_configure_args --libdir=${libdir}" |
---|
70 | fi |
---|
71 | |
---|
72 | # expand includedir |
---|
73 | if test "x$includedir" = 'x${prefix}/include'; then |
---|
74 | includedir="${exec_prefix}/include/${SINGULAR_VERSION}" |
---|
75 | ac_configure_args="$ac_configure_args --includedir=${includedir}" |
---|
76 | fi |
---|
77 | |
---|
78 | # construct name of installed Singular executable |
---|
79 | SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION} |
---|
80 | export SINGULAR |
---|
81 | AC_SUBST(SINGULAR) |
---|
82 | |
---|
83 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
84 | dnl Check for various libraries and headers |
---|
85 | dnl |
---|
86 | dnl After this part, the variables 'ac_<package>_ok' is 'yes' |
---|
87 | dnl if '<package>' is already existent on the system, otherwise |
---|
88 | dnl undefined. |
---|
89 | dnl |
---|
90 | |
---|
91 | # add -I to CPPFLAGS and -L to LDFLAGS, just to be sure |
---|
92 | LDFLAGS="-L${libdir} ${LDFLAGS}" |
---|
93 | CPPFLAGS="-I${includedir} ${CPPFLAGS}" |
---|
94 | |
---|
95 | # check for AIX |
---|
96 | AC_MSG_CHECKING(whether _AIX is defined) |
---|
97 | AC_CACHE_VAL(ac_cv_is_aix, |
---|
98 | AC_EGREP_CPP(yes, |
---|
99 | [#ifdef _AIX |
---|
100 | yes |
---|
101 | #endif |
---|
102 | ], ac_cv_is_aix=yes, ac_cv_is_aix=no, 1)) |
---|
103 | if test "$ac_cv_is_aix" = yes; then |
---|
104 | AC_MSG_RESULT(yes) |
---|
105 | else |
---|
106 | AC_MSG_RESULT(no) |
---|
107 | fi |
---|
108 | |
---|
109 | AC_CHECK_LIB(m, atof) |
---|
110 | AC_CHECK_LIB(bsd, socket) |
---|
111 | AC_CHECK_LIB(socket, listen) |
---|
112 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
113 | AC_CHECK_LIB(gmp, mpq_init) |
---|
114 | AC_CHECK_LIB(smallgmp, mpz_init) |
---|
115 | AC_CHECK_LIB(MP, IMP_PutGmpInt) |
---|
116 | AC_CHECK_LIB(MPT, MPT_GetTree) |
---|
117 | AC_CHECK_LIB(singcf, atof) |
---|
118 | AC_CHECK_LIB(singfac, atof) |
---|
119 | |
---|
120 | AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h MPT.h factory.h factor.h) |
---|
121 | |
---|
122 | if test "$ac_cv_lib_gmp_mpq_init" = yes && \ |
---|
123 | test "$ac_cv_header_gmp_h" = yes; then |
---|
124 | ac_gmp_ok=yes |
---|
125 | fi |
---|
126 | |
---|
127 | if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \ |
---|
128 | test "$ac_cv_header_smallgmp_h" = yes && \ |
---|
129 | test "$ac_cv_header_gmp_h" = yes; then |
---|
130 | ac_smallgmp_ok=yes |
---|
131 | fi |
---|
132 | |
---|
133 | if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ |
---|
134 | test "$ac_cv_lib_MPT_MPT_GetTree" && \ |
---|
135 | test "$ac_cv_header_MP_h" = yes && \ |
---|
136 | test "$ac_cv_header_MPT_h" = yes; then |
---|
137 | ac_MP_ok=yes |
---|
138 | fi |
---|
139 | |
---|
140 | if test "$ac_cv_lib_singcf_atof" = yes && \ |
---|
141 | test "$ac_cv_header_factory_h" = yes; then |
---|
142 | ac_factory_ok=yes |
---|
143 | fi |
---|
144 | |
---|
145 | if test "$ac_cv_lib_singfac_atof" = yes && \ |
---|
146 | test "$ac_cv_header_factor_h" = yes; then |
---|
147 | ac_libfac_ok=yes |
---|
148 | fi |
---|
149 | |
---|
150 | |
---|
151 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
152 | dnl Check command line arguments |
---|
153 | dnl |
---|
154 | AC_ARG_ENABLE(smallgmp, \ |
---|
155 | [ --enable-PACKAGE configure and build PACKAGE |
---|
156 | --disable-PACKAGE do not configure and build PACKAGE |
---|
157 | where PACKAGE can be: |
---|
158 | smallgmp minimal version of gmp written in C only]) |
---|
159 | AC_ARG_ENABLE(gmp, \ |
---|
160 | [ gmp Gnu Multiple Precision package]) |
---|
161 | AC_ARG_ENABLE(MP, \ |
---|
162 | [ MP Multi Protocol library]) |
---|
163 | AC_ARG_ENABLE(factory, \ |
---|
164 | [ factory polynomial factorization library]) |
---|
165 | AC_ARG_ENABLE(libfac, \ |
---|
166 | [ libfac char set and modp poly factorization library]) |
---|
167 | AC_ARG_ENABLE(sgroup, \ |
---|
168 | [ sgroup numerical semigroup computations]) |
---|
169 | AC_ARG_ENABLE(Singular, \ |
---|
170 | [ Singular CAS for Polynomial Computations]) |
---|
171 | |
---|
172 | AC_ARG_WITH(MP,\ |
---|
173 | [ --with-PACKAGE use PACKAGE, provide dependent functionality |
---|
174 | --without-PACKAGE do not use PACKAGE, disable dependent functionality |
---|
175 | where PACKAGE can be: |
---|
176 | MP Multi Protocol library]) |
---|
177 | AC_ARG_WITH(factory, \ |
---|
178 | [ factory polynomial factorization library]) |
---|
179 | AC_ARG_WITH(libfac, \ |
---|
180 | [ libfac char set and modp poly factorization library]) |
---|
181 | AC_ARG_WITH(gmp, \ |
---|
182 | [ --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic |
---|
183 | where PACKAGE can be gmp or smallgmp |
---|
184 | All additional --enable and --with options are passed to subsequent calls |
---|
185 | to configure of the packages to be built. See also configure --help in |
---|
186 | these packages (resp. subdirs). ]) |
---|
187 | |
---|
188 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
189 | dnl Check whether or not to configure and build various packages |
---|
190 | dnl |
---|
191 | AC_MSG_CHECKING(whether to configure and build gmp lib) |
---|
192 | if test "$enable_gmp" != yes && test "$enable_gmp" != no; then |
---|
193 | if test "$ac_gmp_ok" != yes && test -d gmp; then |
---|
194 | AC_MSG_RESULT(yes) |
---|
195 | enable_gmp=yes |
---|
196 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
197 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
198 | OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in" |
---|
199 | else |
---|
200 | AC_MSG_RESULT(no) |
---|
201 | enable_gmp=no |
---|
202 | fi |
---|
203 | elif test "$enable_gmp" = yes; then |
---|
204 | if test ! -d gmp; then |
---|
205 | AC_MSG_RESULT(no) |
---|
206 | AC_MSG_ERROR(Can not find gmp subdir) |
---|
207 | else |
---|
208 | AC_MSG_RESULT(yes) |
---|
209 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
210 | OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in" |
---|
211 | fi |
---|
212 | else |
---|
213 | AC_MSG_RESULT(no) |
---|
214 | fi |
---|
215 | |
---|
216 | AC_MSG_CHECKING(whether to configure and build smallgmp lib) |
---|
217 | if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then |
---|
218 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ |
---|
219 | test "$enable_gmp" != yes && test -d smallgmp; then |
---|
220 | AC_MSG_RESULT(yes) |
---|
221 | enable_smallgmp=yes |
---|
222 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp" |
---|
223 | ac_configure_args="$ac_configure_args --enable-smallgmp --enable-gmp" |
---|
224 | else |
---|
225 | AC_MSG_RESULT(no) |
---|
226 | enable_smallgmp=no |
---|
227 | fi |
---|
228 | elif test "$enable_smallgmp" = yes; then |
---|
229 | if test ! -d smallgmp; then |
---|
230 | AC_MSG_RESULT(no) |
---|
231 | AC_MSG_ERROR(Can not find smallgmp subdir) |
---|
232 | else |
---|
233 | AC_MSG_RESULT(yes) |
---|
234 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp" |
---|
235 | if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then |
---|
236 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
237 | fi |
---|
238 | fi |
---|
239 | else |
---|
240 | AC_MSG_RESULT(${enable_smallgmp}) |
---|
241 | fi |
---|
242 | |
---|
243 | # Check whether we have at least one of smallgmp or gmp |
---|
244 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ |
---|
245 | test "$enable_smallgmp" != yes && test "$enable_gmp" != yes; then |
---|
246 | AC_MSG_ERROR(can neither find nor built gmp or smallgmp) |
---|
247 | fi |
---|
248 | |
---|
249 | # Check whether we need to cheat subsequent configures with --enable-gmp |
---|
250 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes; then |
---|
251 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
252 | fi |
---|
253 | |
---|
254 | AC_MSG_CHECKING(whether to configure and build MP lib) |
---|
255 | if test "$enable_MP" != yes && test "$enable_MP" != no; then |
---|
256 | if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \ |
---|
257 | (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then |
---|
258 | AC_MSG_RESULT(yes) |
---|
259 | enable_MP=yes |
---|
260 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
261 | ac_configure_args="$ac_configure_args --enable-MP" |
---|
262 | else |
---|
263 | AC_MSG_RESULT(no) |
---|
264 | enable_MP=no |
---|
265 | fi |
---|
266 | elif test "$enable_MP" = yes; then |
---|
267 | if test ! -d MP; then |
---|
268 | AC_MSG_RESULT(no) |
---|
269 | AC_MSG_ERROR(can not build MP without MP directory) |
---|
270 | fi |
---|
271 | if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then |
---|
272 | AC_MSG_RESULT(yes) |
---|
273 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
274 | else |
---|
275 | AC_MSG_RESULT(no) |
---|
276 | AC_MSG_ERROR(can not build MP without gmp) |
---|
277 | fi |
---|
278 | else |
---|
279 | AC_MSG_RESULT(no) |
---|
280 | fi |
---|
281 | |
---|
282 | AC_MSG_CHECKING(whether to configure and build factory lib) |
---|
283 | if test "$enable_factory" != yes && test "$enable_factory" != no; then |
---|
284 | if test "$with_factory" != no && test "$ac_factory_ok" != yes && \ |
---|
285 | test -d factory; then |
---|
286 | enable_factory=yes |
---|
287 | AC_MSG_RESULT(yes) |
---|
288 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
289 | ac_configure_args="$ac_configure_args --enable-factory" |
---|
290 | else |
---|
291 | enable_factory=no |
---|
292 | AC_MSG_RESULT(no) |
---|
293 | fi |
---|
294 | elif test "$enable_factory" = yes; then |
---|
295 | if test -d factory; then |
---|
296 | AC_MSG_RESULT(yes) |
---|
297 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
298 | else |
---|
299 | AC_MSG_RESULT(no) |
---|
300 | AC_MSG_ERROR(can not build factory without factory directory) |
---|
301 | fi |
---|
302 | else |
---|
303 | AC_MSG_RESULT(no) |
---|
304 | fi |
---|
305 | |
---|
306 | AC_MSG_CHECKING(whether to configure and build libfac lib) |
---|
307 | if test "$enable_libfac" != yes && test "$enable_libfac" != no; then |
---|
308 | if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \ |
---|
309 | test -d libfac && \ |
---|
310 | (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then |
---|
311 | enable_libfac=yes |
---|
312 | AC_MSG_RESULT(yes) |
---|
313 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
314 | ac_configure_args="$ac_configure_args --enable-libfac" |
---|
315 | else |
---|
316 | enable_libfac=no |
---|
317 | AC_MSG_RESULT(no) |
---|
318 | fi |
---|
319 | elif test "$enable_libfac" = yes; then |
---|
320 | if test ! -d libfac; then |
---|
321 | AC_MSG_RESULT(no) |
---|
322 | AC_MSG_ERROR(can not build libfac without libfac directory) |
---|
323 | fi |
---|
324 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
325 | AC_MSG_RESULT(yes) |
---|
326 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
327 | else |
---|
328 | AC_MSG_RESULT(no) |
---|
329 | AC_MSG_ERROR(Can not build libfac without factory) |
---|
330 | fi |
---|
331 | else |
---|
332 | AC_MSG_RESULT(no) |
---|
333 | fi |
---|
334 | |
---|
335 | AC_MSG_CHECKING(whether to configure and build sgroup lib) |
---|
336 | if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then |
---|
337 | if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \ |
---|
338 | test -d sgroup && \ |
---|
339 | (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
340 | enable_sgroup=yes |
---|
341 | AC_MSG_RESULT(yes) |
---|
342 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
343 | ac_configure_args="$ac_configure_args --enable-sgroup" |
---|
344 | else |
---|
345 | enable_sgroup=no |
---|
346 | AC_MSG_RESULT(no) |
---|
347 | fi |
---|
348 | elif test "$enable_sgroup" = yes; then |
---|
349 | if test ! -d sgroup; then |
---|
350 | AC_MSG_RESULT(no) |
---|
351 | AC_MSG_ERROR(can not build sgroup without sgroup directory) |
---|
352 | fi |
---|
353 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
354 | AC_MSG_RESULT(yes) |
---|
355 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
356 | else |
---|
357 | AC_MSG_RESULT(no) |
---|
358 | AC_MSG_ERROR(Can not build sgroup without MP) |
---|
359 | fi |
---|
360 | else |
---|
361 | AC_MSG_RESULT(no) |
---|
362 | fi |
---|
363 | |
---|
364 | AC_MSG_CHECKING(whether to configure and build Singular) |
---|
365 | if test "$enable_Singular" != yes && test "$enable_Singular" != no; then |
---|
366 | if test "$with_Singular" != no && test -d Singular; then |
---|
367 | enable_Singular=yes |
---|
368 | AC_MSG_RESULT(yes) |
---|
369 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
370 | ac_configure_args="$ac_configure_args --enable-Singular" |
---|
371 | else |
---|
372 | enable_Singular=no |
---|
373 | AC_MSG_RESULT(no) |
---|
374 | fi |
---|
375 | elif test "$enable_Singular" = yes; then |
---|
376 | if test -d Singular; then |
---|
377 | AC_MSG_RESULT(yes) |
---|
378 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
379 | else |
---|
380 | AC_MSG_RESULT(no) |
---|
381 | AC_MSG_ERROR(can not build Singular without Singular directory) |
---|
382 | fi |
---|
383 | else |
---|
384 | AC_MSG_RESULT(no) |
---|
385 | fi |
---|
386 | |
---|
387 | |
---|
388 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
389 | dnl Check whether or not to use various packages |
---|
390 | dnl |
---|
391 | AC_MSG_CHECKING(which apint package to use) |
---|
392 | if test "$with_apint" = gmp; then |
---|
393 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
394 | AC_MSG_RESULT(gmp) |
---|
395 | else |
---|
396 | AC_MSG_RESULT(none) |
---|
397 | AC_MSG_ERROR(can not use with gmp without finding or building it) |
---|
398 | fi |
---|
399 | elif test "$with_apint" = smallgmp; then |
---|
400 | if test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then |
---|
401 | AC_MSG_RESULT(smallgmp) |
---|
402 | else |
---|
403 | AC_MSG_RESULT(none) |
---|
404 | AC_MSG_ERROR(can not use with smallgmp without finding or building it) |
---|
405 | fi |
---|
406 | elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then |
---|
407 | AC_MSG_RESULT(gmp) |
---|
408 | ac_configure_args="$ac_configure_args --with-apint=gmp" |
---|
409 | else |
---|
410 | dnl now we are sure that we have the smallgmp --otherwise enable |
---|
411 | dnl checks had thrown an error |
---|
412 | AC_MSG_RESULT(smallgmp) |
---|
413 | ac_configure_args="$ac_configure_args --with-apint=smallgmp" |
---|
414 | fi |
---|
415 | |
---|
416 | AC_MSG_CHECKING(whether to use with MP) |
---|
417 | if test "$with_MP" = yes; then |
---|
418 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
419 | AC_MSG_RESULT(yes) |
---|
420 | else |
---|
421 | AC_MSG_RESULT(none) |
---|
422 | AC_MSG_ERROR(can not use with MP without finding or building it) |
---|
423 | fi |
---|
424 | elif test "$with_MP" = no; then |
---|
425 | AC_MSG_RESULT(no) |
---|
426 | elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
427 | AC_MSG_RESULT(yes) |
---|
428 | ac_configure_args="$ac_configure_args --with-MP" |
---|
429 | else |
---|
430 | AC_MSG_RESULT(no) |
---|
431 | ac_configure_args="$ac_configure_args --without-MP" |
---|
432 | fi |
---|
433 | |
---|
434 | AC_MSG_CHECKING(whether to use with factory) |
---|
435 | if test "$with_factory" = yes; then |
---|
436 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
437 | AC_MSG_RESULT(yes) |
---|
438 | else |
---|
439 | AC_MSG_RESULT(none) |
---|
440 | AC_MSG_ERROR(can not use with factory without finding or building it) |
---|
441 | fi |
---|
442 | elif test "$with_factory" = no; then |
---|
443 | AC_MSG_RESULT(no) |
---|
444 | elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
445 | AC_MSG_RESULT(yes) |
---|
446 | ac_configure_args="$ac_configure_args --with-factory" |
---|
447 | else |
---|
448 | AC_MSG_RESULT(no) |
---|
449 | ac_configure_args="$ac_configure_args --without-factory" |
---|
450 | fi |
---|
451 | |
---|
452 | AC_MSG_CHECKING(whether to use with libfac) |
---|
453 | if test "$with_libfac" = yes; then |
---|
454 | if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
455 | AC_MSG_RESULT(yes) |
---|
456 | else |
---|
457 | AC_MSG_RESULT(none) |
---|
458 | AC_MSG_ERROR(can not use with libfac without finding or building it) |
---|
459 | fi |
---|
460 | elif test "$with_libfac" = no; then |
---|
461 | AC_MSG_RESULT(no) |
---|
462 | elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
463 | AC_MSG_RESULT(yes) |
---|
464 | ac_configure_args="$ac_configure_args --with-libfac" |
---|
465 | else |
---|
466 | AC_MSG_RESULT(no) |
---|
467 | ac_configure_args="$ac_configure_args --without-libfac" |
---|
468 | fi |
---|
469 | |
---|
470 | AC_MSG_CHECKING(whether to use with Singular) |
---|
471 | if test "$with_Singular" != no && test "$with_Singular" != yes; then |
---|
472 | if test "$enable_Singular" = yes; then |
---|
473 | with_Singular=yes |
---|
474 | else |
---|
475 | with_Singular=no |
---|
476 | fi |
---|
477 | ac_configure_args="$ac_configure_args --with-Singular=$with_Singular" |
---|
478 | fi |
---|
479 | |
---|
480 | if test "$with_Singular" != no; then |
---|
481 | AC_MSG_RESULT(yes) |
---|
482 | else |
---|
483 | AC_MSG_RESULT(no) |
---|
484 | fi |
---|
485 | |
---|
486 | |
---|
487 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
488 | dnl Check for known subdirs |
---|
489 | dnl |
---|
490 | SUBDIRS="" |
---|
491 | if test -d smallgmp; then |
---|
492 | SUBDIRS="$SUBDIRS smallgmp" |
---|
493 | fi |
---|
494 | if test -d gmp; then |
---|
495 | SUBDIRS="$SUBDIRS gmp" |
---|
496 | fi |
---|
497 | if test -d MP; then |
---|
498 | SUBDIRS="$SUBDIRS MP" |
---|
499 | fi |
---|
500 | if test -d factory; then |
---|
501 | SUBDIRS="$SUBDIRS factory" |
---|
502 | fi |
---|
503 | if test -d libfac; then |
---|
504 | SUBDIRS="$SUBDIRS libfac" |
---|
505 | fi |
---|
506 | if test -d sgroup; then |
---|
507 | SUBDIRS="$SUBDIRS sgroup" |
---|
508 | fi |
---|
509 | if test -d Singular; then |
---|
510 | SUBDIRS="$SUBDIRS Singular" |
---|
511 | fi |
---|
512 | |
---|
513 | |
---|
514 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
515 | dnl Enough -- wrap it up |
---|
516 | dnl |
---|
517 | AC_PROG_MAKE_SET |
---|
518 | AC_SUBST(SUBDIRS) |
---|
519 | AC_SUBST(CONFIG_SUBDIRS) |
---|
520 | AC_CONFIG_SUBDIRS($CONFIG_SUBDIRS) |
---|
521 | |
---|
522 | AC_OUTPUT(${OUTPUT_MAKEFILES}) |
---|
523 | |
---|