source: git/configure.in @ 9ead31

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