source: git/configure.in @ a89a22c

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