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