source: git/configure.in @ 9282f3

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