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