source: git/configure.in @ 2e0b620

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