source: git/configure.in @ a70441f

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