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