source: git/configure.in @ 7391b83

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