1 | dnl Process this file with autoconf to produce a configure script |
---|
2 | AC_INIT(Singular/matpol.h) |
---|
3 | AC_PREFIX_DEFAULT(`pwd`) |
---|
4 | pwd=`pwd` |
---|
5 | |
---|
6 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
7 | dnl Version business -- set these here |
---|
8 | dnl |
---|
9 | # make them to env variables |
---|
10 | # pass them indirectly to subsequent configures |
---|
11 | SINGULAR_MAJOR_VERSION=1 |
---|
12 | SINGULAR_MINOR_VERSION=3 |
---|
13 | SINGULAR_SUB_VERSION=8 |
---|
14 | VERSION_SEP="-" |
---|
15 | SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}" |
---|
16 | SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" |
---|
17 | VERSION_DATE="May 2000" |
---|
18 | SINGULAR_ROOT_DIR=$pwd |
---|
19 | |
---|
20 | export SINGULAR_MINOR_VERSION |
---|
21 | export SINGULAR_MAJOR_VERSION |
---|
22 | export SINGULAR_SUB_VERSION |
---|
23 | export SINGULAR_VERSION |
---|
24 | export VERSION_DATE |
---|
25 | export SINGULAR_ROOT_DIR |
---|
26 | |
---|
27 | dnl substitue them into the Makefiles |
---|
28 | AC_SUBST(SINGULAR_VERSION) |
---|
29 | AC_SUBST(VERSION_DATE) |
---|
30 | AC_SUBST(SINGULAR_SHORT_VERSION) |
---|
31 | AC_SUBST(SINGULAR_ROOT_DIR) |
---|
32 | |
---|
33 | |
---|
34 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
35 | dnl Makefiles to output |
---|
36 | dnl |
---|
37 | # determine Makefiles to output |
---|
38 | OUTPUT_MAKEFILES="Makefile" |
---|
39 | if test -d "doc"; then |
---|
40 | OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES doc/Makefile doc/version.texi doc/uname.texi" |
---|
41 | fi |
---|
42 | if test -d "rpm"; then |
---|
43 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" rpm/Makefile" |
---|
44 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" rpm/rpmrc rpm/Singular.spec" |
---|
45 | fi |
---|
46 | if test -d "modules"; then |
---|
47 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" modules/Makefile" |
---|
48 | fi |
---|
49 | if test -d "modules/tools"; then |
---|
50 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" modules/tools/Makefile" |
---|
51 | fi |
---|
52 | if test -d "modules/modgen"; then |
---|
53 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" modules/modgen/Makefile" |
---|
54 | fi |
---|
55 | if test -d "emacs"; then |
---|
56 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" emacs/Makefile" |
---|
57 | fi |
---|
58 | if test -d "IntegerProgramming"; then |
---|
59 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" IntegerProgramming/Makefile" |
---|
60 | fi |
---|
61 | if test -d "Plural"; then |
---|
62 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" Plural/Makefile" |
---|
63 | fi |
---|
64 | if test -d "InstallShield"; then |
---|
65 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" InstallShield/Makefile InstallShield/Etc/Makefile InstallShield/Cygwin/Makefile InstallShield/Singular/Makefile InstallShield/Xemacs/Makefile" |
---|
66 | fi |
---|
67 | |
---|
68 | |
---|
69 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
70 | dnl determine singuname |
---|
71 | dnl |
---|
72 | AC_MSG_CHECKING(uname for singular) |
---|
73 | AC_CACHE_VAL(ac_cv_singuname, |
---|
74 | ac_cv_singuname="unknown" |
---|
75 | if test -r "singuname.sh"; then |
---|
76 | if (/bin/sh singuname.sh >/dev/null 2>&1) then |
---|
77 | ac_cv_singuname=`/bin/sh singuname.sh` |
---|
78 | fi |
---|
79 | fi |
---|
80 | ) |
---|
81 | AC_MSG_RESULT($ac_cv_singuname) |
---|
82 | if test "$ac_cv_singuname" = unknown; then |
---|
83 | AC_MSG_ERROR(Unknown architecture: Check singuname.sh) |
---|
84 | else |
---|
85 | SINGUNAME=$ac_cv_singuname |
---|
86 | AC_SUBST(SINGUNAME) |
---|
87 | fi |
---|
88 | |
---|
89 | SING_UNAME=`echo $SINGUNAME | tr '-' '_' ` |
---|
90 | AC_SUBST(SING_UNAME) |
---|
91 | |
---|
92 | |
---|
93 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
94 | dnl compiler stuff |
---|
95 | dnl is needed to check for libs and headers, later on |
---|
96 | dnl |
---|
97 | AC_PROG_CC |
---|
98 | AC_PROG_CPP |
---|
99 | AC_PROG_INSTALL |
---|
100 | AC_AIX |
---|
101 | AC_PROG_CXX |
---|
102 | |
---|
103 | # check whether the compiler accepts -pipe |
---|
104 | AC_MSG_CHECKING(whether compiler accepts -pipe) |
---|
105 | temp_cflags=${CFLAGS} |
---|
106 | CFLAGS="${CFLAGS} -pipe" |
---|
107 | AC_CACHE_VAL(ac_cv_cxx_have_pipe, |
---|
108 | AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no) |
---|
109 | ) |
---|
110 | AC_MSG_RESULT(${ac_cv_cxx_have_pipe}) |
---|
111 | CFLAGS=${temp_cflags} |
---|
112 | if test "${ac_cv_cxx_have_pipe}" != yes; then |
---|
113 | PIPE= |
---|
114 | else |
---|
115 | PIPE="-pipe" |
---|
116 | fi |
---|
117 | AC_SUBST(PIPE) |
---|
118 | |
---|
119 | AC_CHECK_PROGS(PERL, perl5 perl) |
---|
120 | AC_CHECK_PROGS(UUDECODE, uudecode "uudeview -i") |
---|
121 | AC_CHECK_PROGS(GUNZIP, gunzip, ${pwd}/warn_not_found.sh gunzip) |
---|
122 | # don't use GZIP this breaks configure |
---|
123 | AC_CHECK_PROGS(MYGZIP, gzip, ${pwd}/warn_not_found.sh gzip) |
---|
124 | AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html) |
---|
125 | AC_PROG_LN_S |
---|
126 | |
---|
127 | if test -r "${pwd}/mkinstalldirs"; then |
---|
128 | MKINSTALLDIRS=${pwd}/mkinstalldirs |
---|
129 | AC_SUBST(MKINSTALLDIRS) |
---|
130 | else |
---|
131 | AC_MSG_ERROR(mkinstalldirs not foind in ${pwd}) |
---|
132 | fi |
---|
133 | |
---|
134 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
135 | dnl Set exec_prefix, bindir, libdir, includedir to some sensible values |
---|
136 | dnl |
---|
137 | # expand prefix and pass it to subsequent configures |
---|
138 | if test "x$prefix" = xNONE; then |
---|
139 | prefix=${ac_default_prefix} |
---|
140 | ac_configure_args="$ac_configure_args --prefix=${prefix}" |
---|
141 | fi |
---|
142 | |
---|
143 | # expand exec_prefix |
---|
144 | if test "x$exec_prefix" = xNONE; then |
---|
145 | exec_prefix=${prefix}/${ac_cv_singuname} |
---|
146 | ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}" |
---|
147 | fi |
---|
148 | |
---|
149 | # expand bindir |
---|
150 | if test "x$bindir" = 'x${exec_prefix}/bin'; then |
---|
151 | bindir="${exec_prefix}" |
---|
152 | ac_configure_args="$ac_configure_args --bindir=${bindir}" |
---|
153 | fi |
---|
154 | |
---|
155 | # expand libdir |
---|
156 | if test "x$libdir" = 'x${exec_prefix}/lib'; then |
---|
157 | libdir="${exec_prefix}/lib" |
---|
158 | ac_configure_args="$ac_configure_args --libdir=${libdir}" |
---|
159 | fi |
---|
160 | |
---|
161 | # expand includedir |
---|
162 | if test "x$includedir" = 'x${prefix}/include'; then |
---|
163 | includedir="${exec_prefix}/include" |
---|
164 | ac_configure_args="$ac_configure_args --includedir=${includedir}" |
---|
165 | fi |
---|
166 | |
---|
167 | # construct name of installed Singular executable |
---|
168 | SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION} |
---|
169 | export SINGULAR |
---|
170 | AC_SUBST(SINGULAR) |
---|
171 | |
---|
172 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
173 | dnl Check for various libraries and headers |
---|
174 | dnl |
---|
175 | dnl After this part, the variables 'ac_<package>_ok' is 'yes' |
---|
176 | dnl if '<package>' is already existent on the system, otherwise |
---|
177 | dnl undefined. |
---|
178 | dnl |
---|
179 | |
---|
180 | # add -I to CPPFLAGS and -L to LDFLAGS, just to be sure |
---|
181 | LDFLAGS="-L${libdir} ${LDFLAGS}" |
---|
182 | CPPFLAGS="-I${includedir} ${CPPFLAGS}" |
---|
183 | |
---|
184 | # check for AIX |
---|
185 | AC_MSG_CHECKING(whether _AIX is defined) |
---|
186 | AC_CACHE_VAL(ac_cv_is_aix, |
---|
187 | AC_EGREP_CPP(yes, |
---|
188 | [#ifdef _AIX |
---|
189 | yes |
---|
190 | #endif |
---|
191 | ], ac_cv_is_aix=yes, ac_cv_is_aix=no, 1)) |
---|
192 | if test "$ac_cv_is_aix" = yes; then |
---|
193 | AC_MSG_RESULT(yes) |
---|
194 | else |
---|
195 | AC_MSG_RESULT(no) |
---|
196 | fi |
---|
197 | |
---|
198 | AC_CHECK_LIB(m, atof) |
---|
199 | AC_CHECK_LIB(bsd, socket) |
---|
200 | AC_CHECK_LIB(socket, listen) |
---|
201 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
202 | AC_CHECK_LIB(gmp, main) |
---|
203 | AC_CHECK_LIB(smallgmp, mpz_init) |
---|
204 | AC_CHECK_LIB(MP, IMP_PutGmpInt) |
---|
205 | AC_CHECK_LIB(MPT, MPT_GetTree) |
---|
206 | AC_CHECK_LIB(singcf, atof) |
---|
207 | AC_CHECK_LIB(singfac, atof) |
---|
208 | |
---|
209 | AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h MPT.h factory.h factor.h) |
---|
210 | |
---|
211 | if test "$ac_cv_lib_gmp_main" = yes && \ |
---|
212 | test "$ac_cv_header_gmp_h" = yes; then |
---|
213 | ac_gmp_ok=yes |
---|
214 | fi |
---|
215 | |
---|
216 | if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \ |
---|
217 | test "$ac_cv_header_smallgmp_h" = yes && \ |
---|
218 | test "$ac_cv_header_gmp_h" = yes; then |
---|
219 | ac_smallgmp_ok=yes |
---|
220 | fi |
---|
221 | |
---|
222 | if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ |
---|
223 | test "$ac_cv_lib_MPT_MPT_GetTree" && \ |
---|
224 | test "$ac_cv_header_MP_h" = yes && \ |
---|
225 | test "$ac_cv_header_MPT_h" = yes; then |
---|
226 | ac_MP_ok=yes |
---|
227 | fi |
---|
228 | |
---|
229 | if test "$ac_cv_lib_singcf_atof" = yes && \ |
---|
230 | test "$ac_cv_header_factory_h" = yes; then |
---|
231 | ac_factory_ok=yes |
---|
232 | fi |
---|
233 | |
---|
234 | if test "$ac_cv_lib_singfac_atof" = yes && \ |
---|
235 | test "$ac_cv_header_factor_h" = yes; then |
---|
236 | ac_libfac_ok=yes |
---|
237 | fi |
---|
238 | |
---|
239 | |
---|
240 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
241 | dnl Check command line arguments |
---|
242 | dnl |
---|
243 | AC_ARG_WITH(tmpdir, \ |
---|
244 | [ --with-tmpdir=DIR use DIR as temporary directory]) |
---|
245 | AC_ARG_ENABLE(smallgmp, \ |
---|
246 | [ --enable-PACKAGE configure and/or build PACKAGE |
---|
247 | --disable-PACKAGE do not configure and/or build PACKAGE |
---|
248 | where PACKAGE can be: |
---|
249 | smallgmp minimal version of gmp written in C only]) |
---|
250 | AC_ARG_ENABLE(gmp, \ |
---|
251 | [ gmp Gnu Multiple Precision package]) |
---|
252 | AC_ARG_ENABLE(MP, \ |
---|
253 | [ MP Multi Protocol library]) |
---|
254 | AC_ARG_ENABLE(factory, \ |
---|
255 | [ factory polynomial factorization library]) |
---|
256 | AC_ARG_ENABLE(libfac, \ |
---|
257 | [ libfac char set and modp poly factorization library]) |
---|
258 | AC_ARG_ENABLE(sgroup, \ |
---|
259 | [ sgroup numerical semigroup computations]) |
---|
260 | AC_ARG_ENABLE(mtrack, \ |
---|
261 | [ mtrack utility to track unused memory]) |
---|
262 | AC_ARG_ENABLE(Singular, \ |
---|
263 | [ Singular CAS for Polynomial Computations]) |
---|
264 | AC_ARG_ENABLE(IntegerProgramming, \ |
---|
265 | [ IntegerProgramming IntegerProgramming]) |
---|
266 | AC_ARG_ENABLE(Plural, \ |
---|
267 | [ Plural Plural]) |
---|
268 | AC_ARG_ENABLE(Texinfo, \ |
---|
269 | [ Texinfo Texinfo for info, texi2dvi, makeinfo]) |
---|
270 | AC_ARG_ENABLE(Texi2html, \ |
---|
271 | [ Texi2html Texinfo to HTML converter]) |
---|
272 | AC_ARG_ENABLE(doc, \ |
---|
273 | [ doc Singular documentation]) |
---|
274 | AC_ARG_ENABLE(emacs, \ |
---|
275 | [ emacs emacs completion files]) |
---|
276 | AC_ARG_WITH(MP,\ |
---|
277 | [ --with-PACKAGE use PACKAGE, provide dependent functionality |
---|
278 | --without-PACKAGE do not use PACKAGE, disable dependent functionality |
---|
279 | where PACKAGE can be: |
---|
280 | MP Multi Protocol library]) |
---|
281 | AC_ARG_WITH(factory, \ |
---|
282 | [ factory polynomial factorization library]) |
---|
283 | AC_ARG_WITH(libfac, \ |
---|
284 | [ libfac char set and modp poly factorization library]) |
---|
285 | AC_ARG_WITH(mtrack, \ |
---|
286 | [ mtrack utility to track unused memory]) |
---|
287 | AC_ARG_WITH(gmp, \ |
---|
288 | [ --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic |
---|
289 | where PACKAGE can be gmp or smallgmp |
---|
290 | All additional --enable and --with options are passed to subsequent calls |
---|
291 | to configure of the packages to be built. See also configure --help in |
---|
292 | these packages (resp. subdirs). ]) |
---|
293 | |
---|
294 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
295 | dnl Check what to use as tmp dir |
---|
296 | dnl |
---|
297 | AC_MSG_CHECKING(which tmp dir to use) |
---|
298 | if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then |
---|
299 | if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1) |
---|
300 | then |
---|
301 | TMP_DIR="${pwd}/tmp" |
---|
302 | else |
---|
303 | TMP_DIR=${with_tmpdir} |
---|
304 | fi |
---|
305 | else |
---|
306 | TMP_DIR="${pwd}/tmp" |
---|
307 | fi |
---|
308 | AC_MSG_RESULT($TMP_DIR) |
---|
309 | AC_SUBST(TMP_DIR) |
---|
310 | |
---|
311 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
312 | dnl Check whether or not to configure and build various packages |
---|
313 | dnl |
---|
314 | |
---|
315 | AC_MSG_CHECKING(whether to configure and build gmp lib) |
---|
316 | if test "$enable_gmp" != yes && test "$enable_gmp" != no; then |
---|
317 | if test "$ac_gmp_ok" != yes && test -d gmp; then |
---|
318 | AC_MSG_RESULT(yes) |
---|
319 | enable_gmp=yes |
---|
320 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
321 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
322 | # This we used to need for our patched version of gmp 2.x |
---|
323 | # OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in" |
---|
324 | else |
---|
325 | AC_MSG_RESULT(no) |
---|
326 | enable_gmp=no |
---|
327 | fi |
---|
328 | elif test "$enable_gmp" = yes; then |
---|
329 | if test ! -d gmp; then |
---|
330 | AC_MSG_RESULT(no) |
---|
331 | AC_MSG_ERROR(Can not find gmp subdir) |
---|
332 | else |
---|
333 | AC_MSG_RESULT(yes) |
---|
334 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp" |
---|
335 | # This we used to need for our patched version of gmp 2.x |
---|
336 | # OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in" |
---|
337 | fi |
---|
338 | else |
---|
339 | AC_MSG_RESULT(no) |
---|
340 | fi |
---|
341 | |
---|
342 | if test "$enable_gmp" = yes; then |
---|
343 | # for gmp-3.0 to work for all ix86 processors, set generic target |
---|
344 | if test "$target" = NONE; then |
---|
345 | case "$ac_cv_singuname" in |
---|
346 | ix86*) |
---|
347 | gmp_target=`./config.guess | sed 's/^\w*-/i386-/'` |
---|
348 | ac_configure_args="$ac_configure_args --target=$gmp_target" |
---|
349 | ;; |
---|
350 | esac |
---|
351 | fi |
---|
352 | # furthermore, disable building of dynamic libraries, for we want to |
---|
353 | # link against the static ones |
---|
354 | if test "$enable_shared" != no; then |
---|
355 | ac_configure_args="$ac_configure_args --disable-shared" |
---|
356 | fi |
---|
357 | fi |
---|
358 | |
---|
359 | |
---|
360 | AC_MSG_CHECKING(whether to configure and build smallgmp lib) |
---|
361 | if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then |
---|
362 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ |
---|
363 | test "$enable_gmp" != yes && test -d smallgmp; then |
---|
364 | AC_MSG_RESULT(yes) |
---|
365 | enable_smallgmp=yes |
---|
366 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp" |
---|
367 | ac_configure_args="$ac_configure_args --enable-smallgmp --enable-gmp" |
---|
368 | else |
---|
369 | AC_MSG_RESULT(no) |
---|
370 | enable_smallgmp=no |
---|
371 | fi |
---|
372 | elif test "$enable_smallgmp" = yes; then |
---|
373 | if test ! -d smallgmp; then |
---|
374 | AC_MSG_RESULT(no) |
---|
375 | AC_MSG_ERROR(Can not find smallgmp subdir) |
---|
376 | else |
---|
377 | AC_MSG_RESULT(yes) |
---|
378 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp" |
---|
379 | if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then |
---|
380 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
381 | fi |
---|
382 | fi |
---|
383 | else |
---|
384 | AC_MSG_RESULT(${enable_smallgmp}) |
---|
385 | fi |
---|
386 | |
---|
387 | # Check whether we have at least one of smallgmp or gmp |
---|
388 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \ |
---|
389 | test "$enable_smallgmp" != yes && test "$enable_gmp" != yes; then |
---|
390 | AC_MSG_ERROR(can neither find nor built gmp or smallgmp) |
---|
391 | fi |
---|
392 | |
---|
393 | # Check whether we need to cheat subsequent configures with --enable-gmp |
---|
394 | if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes; then |
---|
395 | ac_configure_args="$ac_configure_args --enable-gmp" |
---|
396 | fi |
---|
397 | |
---|
398 | AC_MSG_CHECKING(whether to configure and build MP lib) |
---|
399 | if test "$enable_MP" != yes && test "$enable_MP" != no; then |
---|
400 | if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \ |
---|
401 | (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then |
---|
402 | AC_MSG_RESULT(yes) |
---|
403 | enable_MP=yes |
---|
404 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
405 | ac_configure_args="$ac_configure_args --enable-MP" |
---|
406 | else |
---|
407 | AC_MSG_RESULT(no) |
---|
408 | enable_MP=no |
---|
409 | fi |
---|
410 | elif test "$enable_MP" = yes; then |
---|
411 | if test ! -d MP; then |
---|
412 | AC_MSG_RESULT(no) |
---|
413 | AC_MSG_ERROR(can not build MP without MP directory) |
---|
414 | fi |
---|
415 | if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then |
---|
416 | AC_MSG_RESULT(yes) |
---|
417 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP" |
---|
418 | else |
---|
419 | AC_MSG_RESULT(no) |
---|
420 | AC_MSG_ERROR(can not build MP without gmp) |
---|
421 | fi |
---|
422 | else |
---|
423 | AC_MSG_RESULT(no) |
---|
424 | fi |
---|
425 | |
---|
426 | AC_MSG_CHECKING(whether to configure and build factory lib) |
---|
427 | if test "$enable_factory" != yes && test "$enable_factory" != no; then |
---|
428 | if test "$with_factory" != no && test "$ac_factory_ok" != yes && \ |
---|
429 | test -d factory; then |
---|
430 | enable_factory=yes |
---|
431 | AC_MSG_RESULT(yes) |
---|
432 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
433 | ac_configure_args="$ac_configure_args --enable-factory" |
---|
434 | else |
---|
435 | enable_factory=no |
---|
436 | AC_MSG_RESULT(no) |
---|
437 | fi |
---|
438 | elif test "$enable_factory" = yes; then |
---|
439 | if test -d factory; then |
---|
440 | AC_MSG_RESULT(yes) |
---|
441 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory" |
---|
442 | else |
---|
443 | AC_MSG_RESULT(no) |
---|
444 | AC_MSG_ERROR(can not build factory without factory directory) |
---|
445 | fi |
---|
446 | else |
---|
447 | AC_MSG_RESULT(no) |
---|
448 | fi |
---|
449 | |
---|
450 | AC_MSG_CHECKING(whether to configure and build libfac lib) |
---|
451 | if test "$enable_libfac" != yes && test "$enable_libfac" != no; then |
---|
452 | if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \ |
---|
453 | test -d libfac && \ |
---|
454 | (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then |
---|
455 | enable_libfac=yes |
---|
456 | AC_MSG_RESULT(yes) |
---|
457 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
458 | ac_configure_args="$ac_configure_args --enable-libfac" |
---|
459 | else |
---|
460 | enable_libfac=no |
---|
461 | AC_MSG_RESULT(no) |
---|
462 | fi |
---|
463 | elif test "$enable_libfac" = yes; then |
---|
464 | if test ! -d libfac; then |
---|
465 | AC_MSG_RESULT(no) |
---|
466 | AC_MSG_ERROR(can not build libfac without libfac directory) |
---|
467 | fi |
---|
468 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
469 | AC_MSG_RESULT(yes) |
---|
470 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac" |
---|
471 | else |
---|
472 | AC_MSG_RESULT(no) |
---|
473 | AC_MSG_ERROR(Can not build libfac without factory) |
---|
474 | fi |
---|
475 | else |
---|
476 | AC_MSG_RESULT(no) |
---|
477 | fi |
---|
478 | |
---|
479 | AC_MSG_CHECKING(whether to configure and build sgroup lib) |
---|
480 | dnl |
---|
481 | dnl only sgroup if explicietely requested |
---|
482 | dnl if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then |
---|
483 | dnl if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \ |
---|
484 | dnl test -d sgroup && \ |
---|
485 | dnl (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
486 | dnl enable_sgroup=yes |
---|
487 | dnl AC_MSG_RESULT(yes) |
---|
488 | dnl CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
489 | dnl ac_configure_args="$ac_configure_args --enable-sgroup" |
---|
490 | dnl else |
---|
491 | dnl enable_sgroup=no |
---|
492 | dnl AC_MSG_RESULT(no) |
---|
493 | dnl fi |
---|
494 | dnl elif test "$enable_sgroup" = yes; then |
---|
495 | if test "$enable_sgroup" = yes; then |
---|
496 | if test ! -d sgroup; then |
---|
497 | AC_MSG_RESULT(no) |
---|
498 | AC_MSG_ERROR(can not build sgroup without sgroup directory) |
---|
499 | fi |
---|
500 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
501 | AC_MSG_RESULT(yes) |
---|
502 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup" |
---|
503 | else |
---|
504 | AC_MSG_RESULT(no) |
---|
505 | AC_MSG_ERROR(Can not build sgroup without MP) |
---|
506 | fi |
---|
507 | else |
---|
508 | AC_MSG_RESULT(no) |
---|
509 | fi |
---|
510 | |
---|
511 | BUILD_SUBDIRS="$CONFIG_SUBDIRS" |
---|
512 | |
---|
513 | AC_MSG_CHECKING(whether to build mpr and use mtrack) |
---|
514 | if test -d mpr && test "$ac_cv_singuname" = ix86-Linux && test "$enable_mtrack" != no; then |
---|
515 | AC_MSG_RESULT(yes) |
---|
516 | if test "$enable_mtrack" != yes; then |
---|
517 | ac_configure_args="$ac_configure_args --enable-mtrack" |
---|
518 | fi |
---|
519 | enable_mtrack=yes |
---|
520 | OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" mpr/Makefile" |
---|
521 | BUILD_SUBDIRS="$BUILD_SUBDIRS mpr" |
---|
522 | else |
---|
523 | AC_MSG_RESULT(no) |
---|
524 | enable_mtrack=no |
---|
525 | fi |
---|
526 | |
---|
527 | AC_MSG_CHECKING(whether to configure and build Singular) |
---|
528 | if test "$enable_Singular" != yes && test "$enable_Singular" != no; then |
---|
529 | if test "$with_Singular" != no && test -d Singular; then |
---|
530 | enable_Singular=yes |
---|
531 | AC_MSG_RESULT(yes) |
---|
532 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
533 | BUILD_SUBDIRS="$BUILD_SUBDIRS Singular" |
---|
534 | ac_configure_args="$ac_configure_args --enable-Singular" |
---|
535 | else |
---|
536 | enable_Singular=no |
---|
537 | AC_MSG_RESULT(no) |
---|
538 | fi |
---|
539 | elif test "$enable_Singular" = yes; then |
---|
540 | if test -d Singular; then |
---|
541 | AC_MSG_RESULT(yes) |
---|
542 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular" |
---|
543 | BUILD_SUBDIRS="$BUILD_SUBDIRS Singular" |
---|
544 | else |
---|
545 | AC_MSG_RESULT(no) |
---|
546 | AC_MSG_ERROR(can not build Singular without Singular directory) |
---|
547 | fi |
---|
548 | else |
---|
549 | AC_MSG_RESULT(no) |
---|
550 | fi |
---|
551 | |
---|
552 | |
---|
553 | # test if IntegerProgramming should be built: |
---|
554 | |
---|
555 | AC_MSG_CHECKING(whether to build IntegerProgramming) |
---|
556 | if test "$enable_IntegerProgramming" != no && test -d "IntegerProgramming"; then |
---|
557 | BUILD_SUBDIRS="$BUILD_SUBDIRS IntegerProgramming" |
---|
558 | AC_MSG_RESULT(yes) |
---|
559 | if test "$enable_IntegerProgramming" != yes; then |
---|
560 | ac_configure_args="$ac_configure_args --enable-IntegerProgramming" |
---|
561 | fi |
---|
562 | else |
---|
563 | AC_MSG_RESULT(no) |
---|
564 | fi |
---|
565 | |
---|
566 | AC_MSG_CHECKING(whether to build Plural) |
---|
567 | if test "$enable_Plural" != no && test -d "Plural"; then |
---|
568 | BUILD_SUBDIRS="$BUILD_SUBDIRS Plural" |
---|
569 | AC_MSG_RESULT(yes) |
---|
570 | if test "$enable_Plural" != yes; then |
---|
571 | ac_configure_args="$ac_configure_args --enable-Plural" |
---|
572 | fi |
---|
573 | else |
---|
574 | AC_MSG_RESULT(no) |
---|
575 | fi |
---|
576 | |
---|
577 | |
---|
578 | AC_MSG_CHECKING(whether to configure and build Texinfo) |
---|
579 | if test "$enable_Texinfo" != no && test -d Texinfo; then |
---|
580 | AC_MSG_RESULT(yes) |
---|
581 | enable_texinfo=yes |
---|
582 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo" |
---|
583 | BUILD_SUBDIRS="$BUILD_SUBDIRS Texinfo" |
---|
584 | TEXI2DVI=${bindir}/texi2dvi |
---|
585 | MAKEINFO="${bindir}/makeinfo" |
---|
586 | TEXINDEX=${bindir}/texindex |
---|
587 | AC_SUBST(TEXI2DVI) |
---|
588 | AC_SUBST(MAKEINFO) |
---|
589 | AC_SUBST(TEXINDEX) |
---|
590 | if test "$enable_Texinfo" != yes; then |
---|
591 | ac_configure_args="$ac_configure_args --enable-Texinfo" |
---|
592 | fi |
---|
593 | else |
---|
594 | AC_MSG_RESULT(no) |
---|
595 | AC_MSG_WARN(Building of doc might fail. Need Texinfo) |
---|
596 | enable_texinfo=no |
---|
597 | AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ${pwd}/warn_not_found.sh makeinfo) |
---|
598 | AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, ${pwd}/warn_not_found.sh texi2dvi) |
---|
599 | AC_CHECK_PROG(TEXINDEX, texindex, texindex, ${pwd}/warn_not_found.sh texindex) |
---|
600 | fi |
---|
601 | |
---|
602 | AC_MSG_CHECKING(whether to configure and build Texi2html) |
---|
603 | if test "$enable_Texi2html" != no && test -d Texi2html; then |
---|
604 | AC_MSG_RESULT(yes) |
---|
605 | CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texi2html" |
---|
606 | BUILD_SUBDIRS="$BUILD_SUBDIRS Texi2html" |
---|
607 | if test "$enable_Texi2html" != yes; then |
---|
608 | ac_configure_args="$ac_configure_args --enable-Texi2html" |
---|
609 | fi |
---|
610 | TEXI2HTML=${bindir}/texi2html |
---|
611 | AC_SUBST(TEXI2HTML) |
---|
612 | else |
---|
613 | AC_MSG_RESULT(no) |
---|
614 | AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html) |
---|
615 | fi |
---|
616 | |
---|
617 | if test "${TEXI2HTML+set}" != set; then |
---|
618 | AC_MSG_WARN(texi2html not found. HTML doc generation will fail) |
---|
619 | fi |
---|
620 | if test "$ac_cv_prog_LATEX2HTML" = latex2html; then |
---|
621 | TEXI2HTML_OPTS="-l2h" |
---|
622 | fi |
---|
623 | AC_SUBST(TEXI2HTML_OPTS) |
---|
624 | |
---|
625 | |
---|
626 | AC_MSG_CHECKING(whether to build doc) |
---|
627 | if test "$enable_doc" != no && test -d doc; then |
---|
628 | AC_MSG_RESULT(yes) |
---|
629 | BUILD_SUBDIRS="$BUILD_SUBDIRS doc" |
---|
630 | if test "$enable_doc" != yes; then |
---|
631 | enable_doc=yes |
---|
632 | ac_configure_args="$ac_configure_args --enable-doc" |
---|
633 | fi |
---|
634 | else |
---|
635 | enable_doc=no |
---|
636 | AC_MSG_RESULT(no) |
---|
637 | fi |
---|
638 | |
---|
639 | AC_MSG_CHECKING(whether to build emacs) |
---|
640 | if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then |
---|
641 | AC_MSG_RESULT(yes) |
---|
642 | BUILD_SUBDIRS="$BUILD_SUBDIRS emacs" |
---|
643 | if test "$enable_emacs" != yes; then |
---|
644 | ac_configure_args="$ac_configure_args --enable-emacs" |
---|
645 | fi |
---|
646 | else |
---|
647 | AC_MSG_RESULT(no) |
---|
648 | fi |
---|
649 | |
---|
650 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
651 | dnl Check whether or not to use various packages |
---|
652 | dnl |
---|
653 | AC_MSG_CHECKING(which apint package to use) |
---|
654 | if test "$with_apint" = gmp; then |
---|
655 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
656 | AC_MSG_RESULT(gmp) |
---|
657 | else |
---|
658 | AC_MSG_RESULT(none) |
---|
659 | AC_MSG_ERROR(can not use with gmp without finding or building it) |
---|
660 | fi |
---|
661 | elif test "$with_apint" = smallgmp; then |
---|
662 | if test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then |
---|
663 | AC_MSG_RESULT(smallgmp) |
---|
664 | else |
---|
665 | AC_MSG_RESULT(none) |
---|
666 | AC_MSG_ERROR(can not use with smallgmp without finding or building it) |
---|
667 | fi |
---|
668 | elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then |
---|
669 | AC_MSG_RESULT(gmp) |
---|
670 | ac_configure_args="$ac_configure_args --with-apint=gmp" |
---|
671 | else |
---|
672 | dnl now we are sure that we have the smallgmp --otherwise enable |
---|
673 | dnl checks had thrown an error |
---|
674 | AC_MSG_RESULT(smallgmp) |
---|
675 | ac_configure_args="$ac_configure_args --with-apint=smallgmp" |
---|
676 | fi |
---|
677 | |
---|
678 | AC_MSG_CHECKING(whether to use with MP) |
---|
679 | if test "$with_MP" = yes; then |
---|
680 | if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
681 | AC_MSG_RESULT(yes) |
---|
682 | else |
---|
683 | AC_MSG_RESULT(none) |
---|
684 | AC_MSG_ERROR(can not use with MP without finding or building it) |
---|
685 | fi |
---|
686 | elif test "$with_MP" = no; then |
---|
687 | AC_MSG_RESULT(no) |
---|
688 | elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then |
---|
689 | AC_MSG_RESULT(yes) |
---|
690 | ac_configure_args="$ac_configure_args --with-MP" |
---|
691 | else |
---|
692 | AC_MSG_RESULT(no) |
---|
693 | ac_configure_args="$ac_configure_args --without-MP" |
---|
694 | fi |
---|
695 | |
---|
696 | AC_MSG_CHECKING(whether to use with factory) |
---|
697 | if test "$with_factory" = yes; then |
---|
698 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
699 | AC_MSG_RESULT(yes) |
---|
700 | else |
---|
701 | AC_MSG_RESULT(none) |
---|
702 | AC_MSG_ERROR(can not use with factory without finding or building it) |
---|
703 | fi |
---|
704 | elif test "$with_factory" = no; then |
---|
705 | AC_MSG_RESULT(no) |
---|
706 | elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
707 | AC_MSG_RESULT(yes) |
---|
708 | ac_configure_args="$ac_configure_args --with-factory" |
---|
709 | else |
---|
710 | AC_MSG_RESULT(no) |
---|
711 | ac_configure_args="$ac_configure_args --without-factory" |
---|
712 | fi |
---|
713 | |
---|
714 | AC_MSG_CHECKING(whether to use with libfac) |
---|
715 | if test "$with_libfac" = yes; then |
---|
716 | if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
717 | AC_MSG_RESULT(yes) |
---|
718 | else |
---|
719 | AC_MSG_RESULT(none) |
---|
720 | AC_MSG_ERROR(can not use with libfac without finding or building it) |
---|
721 | fi |
---|
722 | elif test "$with_libfac" = no; then |
---|
723 | AC_MSG_RESULT(no) |
---|
724 | elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then |
---|
725 | AC_MSG_RESULT(yes) |
---|
726 | ac_configure_args="$ac_configure_args --with-libfac" |
---|
727 | else |
---|
728 | AC_MSG_RESULT(no) |
---|
729 | ac_configure_args="$ac_configure_args --without-libfac" |
---|
730 | fi |
---|
731 | |
---|
732 | |
---|
733 | AC_MSG_CHECKING(whether to use with mtrack) |
---|
734 | if test "$with_mtrack" != no && test "$with_mtrack" != yes; then |
---|
735 | if test "$enable_mtrack" = yes; then |
---|
736 | with_mtrack=yes |
---|
737 | else |
---|
738 | with_mtrack=no |
---|
739 | fi |
---|
740 | ac_configure_args="$ac_configure_args --with-mtrack=$with_mtrack" |
---|
741 | elif test "$with_mtrack" = yes && test "$enable_mtrack" != yes; then |
---|
742 | with_mtrack=no |
---|
743 | ac_configure_args="$ac_configure_args --with-mtrack=no" |
---|
744 | fi |
---|
745 | if test "$with_mtrack" != yes; then |
---|
746 | AC_MSG_RESULT(no) |
---|
747 | else |
---|
748 | AC_MSG_RESULT(yes) |
---|
749 | fi |
---|
750 | |
---|
751 | |
---|
752 | AC_MSG_CHECKING(whether to use with Singular) |
---|
753 | if test "$with_Singular" != no && test "$with_Singular" != yes; then |
---|
754 | if test "$enable_Singular" = yes; then |
---|
755 | with_Singular=yes |
---|
756 | else |
---|
757 | with_Singular=no |
---|
758 | fi |
---|
759 | ac_configure_args="$ac_configure_args --with-Singular=$with_Singular" |
---|
760 | fi |
---|
761 | |
---|
762 | if test "$with_Singular" != no; then |
---|
763 | AC_MSG_RESULT(yes) |
---|
764 | else |
---|
765 | AC_MSG_RESULT(no) |
---|
766 | fi |
---|
767 | |
---|
768 | |
---|
769 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
770 | dnl Check for known subdirs |
---|
771 | dnl |
---|
772 | SUBDIRS="" |
---|
773 | if test -d smallgmp; then |
---|
774 | SUBDIRS="$SUBDIRS smallgmp" |
---|
775 | fi |
---|
776 | if test -d gmp; then |
---|
777 | SUBDIRS="$SUBDIRS gmp" |
---|
778 | fi |
---|
779 | if test -d MP; then |
---|
780 | SUBDIRS="$SUBDIRS MP" |
---|
781 | fi |
---|
782 | if test -d factory; then |
---|
783 | SUBDIRS="$SUBDIRS factory" |
---|
784 | fi |
---|
785 | if test -d libfac; then |
---|
786 | SUBDIRS="$SUBDIRS libfac" |
---|
787 | fi |
---|
788 | if test -d mpr; then |
---|
789 | SUBDIRS="$SUBDIRS mpr" |
---|
790 | fi |
---|
791 | if test -d sgroup; then |
---|
792 | SUBDIRS="$SUBDIRS sgroup" |
---|
793 | fi |
---|
794 | if test -d Singular; then |
---|
795 | SUBDIRS="$SUBDIRS Singular" |
---|
796 | fi |
---|
797 | if test -d Texinfo; then |
---|
798 | SUBDIRS="$SUBDIRS Texinfo" |
---|
799 | fi |
---|
800 | if test -d Texi2html; then |
---|
801 | SUBDIRS="$SUBDIRS Texi2html" |
---|
802 | fi |
---|
803 | if test -d doc; then |
---|
804 | SUBDIRS="$SUBDIRS doc" |
---|
805 | fi |
---|
806 | if test -d emacs; then |
---|
807 | SUBDIRS="$SUBDIRS emacs" |
---|
808 | fi |
---|
809 | if test -d rpm; then |
---|
810 | SUBDIRS="$SUBDIRS rpm" |
---|
811 | fi |
---|
812 | |
---|
813 | |
---|
814 | |
---|
815 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
816 | dnl Enough -- wrap it up |
---|
817 | dnl |
---|
818 | AC_PROG_MAKE_SET |
---|
819 | AC_SUBST(SUBDIRS) |
---|
820 | AC_SUBST(BUILD_SUBDIRS) |
---|
821 | AC_SUBST(CONFIG_SUBDIRS) |
---|
822 | AC_CONFIG_SUBDIRS($CONFIG_SUBDIRS) |
---|
823 | |
---|
824 | AC_OUTPUT(${OUTPUT_MAKEFILES}) |
---|