source: git/configure.in @ b8661e0

spielwiese
Last change on this file since b8661e0 was d16193, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* fixed texi2html integration git-svn-id: file:///usr/local/Singular/svn/trunk@4226 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 22.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
47SING_UNAME=`echo $SINGUNAME | tr '-' '_' `
48AC_SUBST(SING_UNAME)
49
50VERSION_SEP="-"
51
52dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
53dnl Version business --  set these here
54dnl
55# make them to env variables
56# pass them indirectly to subsequent configures
57SINGULAR_MAJOR_VERSION=1
58SINGULAR_MINOR_VERSION=3
59SINGULAR_SUB_VERSION=7
60SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}"
61SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}"
62VERSION_DATE="December 1999"
63
64export SINGULAR_MINOR_VERSION
65export SINGULAR_MAJOR_VERSION
66export SINGULAR_SUB_VERSION
67export SINGULAR_VERSION
68export VERSION_DATE
69
70dnl substitue them into the Makefiles
71AC_SUBST(SINGULAR_VERSION)
72AC_SUBST(VERSION_DATE)
73AC_SUBST(SINGULAR_SHORT_VERSION)
74
75dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
76dnl Those are needed to check for libs and headers, later on
77dnl
78AC_PROG_CC
79AC_PROG_CPP
80AC_PROG_INSTALL
81AC_AIX
82
83AC_CHECK_PROGS(PERL, perl5 perl)
84AC_CHECK_PROGS(GUNZIP, gunzip,  ${pwd}/warn_not_found.sh gunzip)
85# don't use GZIP this breaks configure
86AC_CHECK_PROGS(MYGZIP, gzip, ${pwd}/warn_not_found.sh gzip)
87AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html)
88AC_PROG_LN_S
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/or build PACKAGE
206  --disable-PACKAGE       do not configure and/or 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(mtrack, \
220 [    mtrack               utility to track unused memory])
221AC_ARG_ENABLE(Singular, \
222 [    Singular             CAS for Polynomial Computations])
223AC_ARG_ENABLE(Texinfo, \
224 [    Texinfo              Texinfo for info, texi2dvi, makeinfo])
225AC_ARG_ENABLE(Texi2html, \
226 [    Texi2html            Texinfo to HTML converter])
227AC_ARG_ENABLE(doc, \
228 [    doc                  Singular documentation])
229AC_ARG_ENABLE(emacs, \
230 [    emacs                emacs completion files])
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(mtrack, \
241 [    mtrack               utility to track unused memory])
242AC_ARG_WITH(gmp, \
243 [ --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
244                          where PACKAGE can be gmp or smallgmp
245All additional --enable and --with options are passed to subsequent calls
246to configure of the packages to be built. See also configure --help in
247these packages (resp. subdirs). ])
248
249dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
250dnl Check what to use as tmp dir
251dnl
252AC_MSG_CHECKING(which tmp dir to use)
253if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then
254  if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1)
255  then
256    TMP_DIR="${pwd}/tmp"
257  else
258    TMP_DIR=${with_tmpdir}
259  fi
260else
261  TMP_DIR="${pwd}/tmp"
262fi
263AC_MSG_RESULT($TMP_DIR)
264AC_SUBST(TMP_DIR)
265
266dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
267dnl Check for perl 5
268dnl
269# perl version 5
270if test "${with_perl5+set}" != set; then
271  AC_MSG_CHECKING(for perl5)
272  changequote(<<,>>)dnl
273  AC_CACHE_VAL(ac_cv_prog_perl5,
274  if (perl5 -v >/dev/null 2>&1)
275  then
276   if (perl5 -v | egrep "version 5\.[0-9]" >/dev/null 2>&1 )
277    then
278    ac_cv_prog_perl5=perl5
279   fi
280  elif (perl -v >/dev/null 2>&1)
281  then
282    if (perl -v | egrep "version 5\.[0-9]" >/dev/null 2>&1 )
283    then
284      ac_cv_prog_perl5=perl
285    fi
286  fi
287  )
288  changequote([,])dnl
289  if test "${ac_cv_prog_perl5+set}" = set; then
290    AC_MSG_RESULT(${ac_cv_prog_perl5})
291    PERL5=${ac_cv_prog_perl5}
292    AC_SUBST(PERL5)
293  else
294    AC_MSG_ERROR(can not find perl version 5)
295  fi
296elif test "${with_perl5}" = no; then
297  AC_MSG_WARN(building without perl5 --  make might fail)
298else
299  unset PERL5
300  unset ac_cv_prog_PERL5
301  AC_CHECK_PROGS(PERL5, ${with_perl5})
302  if test "x${PERL5}" = x; then
303    AC_MSG_WARN(building without perl5 -- make might fail)
304  fi
305fi
306
307
308dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
309dnl Check whether or not to configure and build various packages
310dnl
311
312AC_MSG_CHECKING(whether to configure and build gmp lib)
313if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
314  if test "$ac_gmp_ok" != yes && test -d gmp; then
315    AC_MSG_RESULT(yes)
316    enable_gmp=yes
317    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
318    ac_configure_args="$ac_configure_args --enable-gmp"
319    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
320  else
321    AC_MSG_RESULT(no)
322    enable_gmp=no
323  fi
324elif test "$enable_gmp" = yes; then
325  if test ! -d gmp; then
326    AC_MSG_RESULT(no)
327    AC_MSG_ERROR(Can not find gmp subdir)
328  else
329    AC_MSG_RESULT(yes)
330    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
331    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
332  fi
333else
334  AC_MSG_RESULT(no)
335fi
336
337AC_MSG_CHECKING(whether to configure and build smallgmp lib)
338if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then
339  if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \
340     test "$enable_gmp" != yes && test -d smallgmp; then
341    AC_MSG_RESULT(yes)
342    enable_smallgmp=yes
343    CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp"
344    ac_configure_args="$ac_configure_args --enable-smallgmp --enable-gmp"
345  else
346    AC_MSG_RESULT(no)
347    enable_smallgmp=no
348  fi
349elif test "$enable_smallgmp" = yes; then
350  if test ! -d smallgmp; then
351    AC_MSG_RESULT(no)
352    AC_MSG_ERROR(Can not find smallgmp subdir)
353  else
354    AC_MSG_RESULT(yes)
355    CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp"
356    if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then
357      ac_configure_args="$ac_configure_args --enable-gmp"
358    fi
359  fi
360else
361  AC_MSG_RESULT(${enable_smallgmp})
362fi
363
364# Check whether we have at least one of smallgmp or gmp
365if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \
366   test "$enable_smallgmp" != yes && test "$enable_gmp" != yes; then
367  AC_MSG_ERROR(can neither find nor built gmp or smallgmp)
368fi
369
370# Check whether we need to cheat subsequent configures with --enable-gmp
371if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes; then
372  ac_configure_args="$ac_configure_args --enable-gmp"
373fi
374
375AC_MSG_CHECKING(whether to configure and build MP lib)
376if test "$enable_MP" != yes && test "$enable_MP" != no; then
377  if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \
378     (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then
379    AC_MSG_RESULT(yes)
380    enable_MP=yes
381    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
382    ac_configure_args="$ac_configure_args --enable-MP"
383  else
384    AC_MSG_RESULT(no)
385    enable_MP=no
386  fi
387elif test "$enable_MP" = yes; then
388  if test ! -d MP; then
389    AC_MSG_RESULT(no)
390    AC_MSG_ERROR(can not build MP without MP directory)
391  fi
392  if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then
393    AC_MSG_RESULT(yes)
394    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
395  else
396    AC_MSG_RESULT(no)
397    AC_MSG_ERROR(can not build MP without gmp)
398  fi
399else
400  AC_MSG_RESULT(no)
401fi
402 
403AC_MSG_CHECKING(whether to configure and build factory lib)
404if test "$enable_factory" != yes && test "$enable_factory" != no; then
405  if test "$with_factory" != no && test "$ac_factory_ok" != yes && \
406     test -d factory; then
407    enable_factory=yes
408    AC_MSG_RESULT(yes)
409    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
410    ac_configure_args="$ac_configure_args --enable-factory"
411  else
412    enable_factory=no
413    AC_MSG_RESULT(no)
414  fi
415elif test "$enable_factory" = yes; then
416  if test -d factory; then
417    AC_MSG_RESULT(yes)
418    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
419  else
420    AC_MSG_RESULT(no)
421    AC_MSG_ERROR(can not build factory without factory directory)
422  fi
423else
424  AC_MSG_RESULT(no)
425fi
426
427AC_MSG_CHECKING(whether to configure and build libfac lib)
428if test "$enable_libfac" != yes && test "$enable_libfac" != no; then
429  if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \
430     test -d libfac && \
431     (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then
432    enable_libfac=yes
433    AC_MSG_RESULT(yes)
434    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
435    ac_configure_args="$ac_configure_args --enable-libfac"
436  else
437    enable_libfac=no
438    AC_MSG_RESULT(no)
439  fi
440elif  test "$enable_libfac" = yes; then
441  if test ! -d libfac; then
442    AC_MSG_RESULT(no)
443    AC_MSG_ERROR(can not build libfac without libfac directory)
444  fi
445  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
446    AC_MSG_RESULT(yes)
447    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
448  else
449    AC_MSG_RESULT(no)
450    AC_MSG_ERROR(Can not build libfac without factory)
451  fi
452else
453  AC_MSG_RESULT(no)
454fi
455
456AC_MSG_CHECKING(whether to configure and build sgroup lib)
457dnl
458dnl only sgroup if explicietely requested
459dnl if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then
460dnl  if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \
461dnl     test -d sgroup && \
462dnl     (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then
463dnl    enable_sgroup=yes
464dnl    AC_MSG_RESULT(yes)
465dnl    CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup"
466dnl    ac_configure_args="$ac_configure_args --enable-sgroup"
467dnl  else
468dnl    enable_sgroup=no
469dnl    AC_MSG_RESULT(no)
470dnl  fi
471dnl elif  test "$enable_sgroup" = yes; then
472if test "$enable_sgroup" = yes; then
473  if test ! -d sgroup; then
474    AC_MSG_RESULT(no)
475    AC_MSG_ERROR(can not build sgroup without sgroup directory)
476  fi
477  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
478    AC_MSG_RESULT(yes)
479    CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup"
480  else
481    AC_MSG_RESULT(no)
482    AC_MSG_ERROR(Can not build sgroup without MP)
483  fi
484else
485  AC_MSG_RESULT(no)
486fi
487
488BUILD_SUBDIRS="$CONFIG_SUBDIRS"
489
490AC_MSG_CHECKING(whether to build mpr and use mtrack)
491if test -d mpr && test "$ac_cv_singuname" = ix86-Linux && test "$enable_mtrack" != no; then
492  AC_MSG_RESULT(yes)
493  if test "$enable_mtrack" != yes; then
494     ac_configure_args="$ac_configure_args --enable-mtrack"
495  fi
496  enable_mtrack=yes
497  OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" mpr/Makefile"
498  BUILD_SUBDIRS="$BUILD_SUBDIRS mpr"
499else
500  AC_MSG_RESULT(no)
501  enable_mtrack=no
502fi
503
504AC_MSG_CHECKING(whether to configure and build Singular)
505if test "$enable_Singular" != yes && test "$enable_Singular" != no; then
506  if test "$with_Singular" != no && test -d Singular; then
507    enable_Singular=yes
508    AC_MSG_RESULT(yes)
509    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
510    BUILD_SUBDIRS="$BUILD_SUBDIRS Singular"     
511    ac_configure_args="$ac_configure_args --enable-Singular"
512  else
513    enable_Singular=no
514    AC_MSG_RESULT(no)
515  fi
516elif test "$enable_Singular" = yes; then
517  if test -d Singular; then
518    AC_MSG_RESULT(yes)
519    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
520    BUILD_SUBDIRS="$BUILD_SUBDIRS Singular"     
521  else
522    AC_MSG_RESULT(no)
523    AC_MSG_ERROR(can not build Singular without Singular directory)
524  fi
525else
526  AC_MSG_RESULT(no)
527fi
528
529AC_MSG_CHECKING(whether to configure and build Texinfo)
530if test "$enable_Texinfo" != no && test -d Texinfo; then
531  AC_MSG_RESULT(yes)
532  enable_texinfo=yes
533  CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo"
534  BUILD_SUBDIRS="$BUILD_SUBDIRS Texinfo"       
535  TEXI2DVI=${bindir}/texi2dvi
536  MAKEINFO="${bindir}/makeinfo --force"
537  TEXINDEX=${bindir}/texindex
538  AC_SUBST(TEXI2DVI)
539  AC_SUBST(MAKEINFO)
540  AC_SUBST(TEXINDEX)
541  if test "$enable_Texinfo" != yes; then
542    ac_configure_args="$ac_configure_args --enable-Texinfo"
543  fi
544else
545  AC_MSG_RESULT(no)
546  AC_MSG_WARN(Building of doc might fail. Need Texinfo)
547  enable_texinfo=no
548  AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ${pwd}/warn_not_found.sh makeinfo)
549  AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, ${pwd}/warn_not_found.sh texi2dvi)
550  AC_CHECK_PROG(TEXINDEX, texindex, texindex, ${pwd}/warn_not_found.sh texindex)
551fi 
552
553
554AC_MSG_CHECKING(whether to configure and build Texi2html)
555if test "$enable_Texi2html" != no && test -d Texi2html; then
556 AC_MSG_RESULT(yes)
557 CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texi2html"
558 BUILD_SUBDIRS="$BUILD_SUBDIRS Texi2html"
559 if test "$enable_Texi2html" != yes; then
560   ac_configure_args="$ac_configure_args --enable-Texi2html"
561 fi
562 TEXI2HTML=${bindir}/texi2html
563 AC_SUBST(TEXI2HTML)
564else
565 AC_MSG_RESULT(no)
566 AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html)
567fi
568
569if test "${TEXI2HTML+set}" != set; then
570AC_MSG_WARN(texi2html not found. HTML doc generation will fail)
571fi
572if test "$ac_cv_prog_LATEX2HTML" = latex2html; then
573  TEXI2HTML_OPTS="-l2h"
574fi
575AC_SUBST(TEXI2HTML_OPTS)
576
577
578AC_MSG_CHECKING(whether to build doc)
579if test "$enable_doc" != no && test -d doc; then
580 AC_MSG_RESULT(yes)
581 BUILD_SUBDIRS="$BUILD_SUBDIRS doc"
582 if test "$enable_doc" != yes; then
583   enable_doc=yes
584   ac_configure_args="$ac_configure_args --enable-doc"
585 fi
586else
587 enable_doc=no
588 AC_MSG_RESULT(no)
589fi
590
591AC_MSG_CHECKING(whether to build emacs)
592if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then
593 AC_MSG_RESULT(yes)
594 BUILD_SUBDIRS="$BUILD_SUBDIRS emacs"
595 if test "$enable_emacs" != yes; then
596   ac_configure_args="$ac_configure_args --enable-emacs"
597 fi
598else
599 AC_MSG_RESULT(no)
600fi
601
602dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
603dnl Check whether or not to use various packages
604dnl
605AC_MSG_CHECKING(which apint package to use)
606if test "$with_apint" = gmp; then
607  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
608    AC_MSG_RESULT(gmp)
609  else
610    AC_MSG_RESULT(none)
611    AC_MSG_ERROR(can not use with gmp without finding or building it)
612  fi
613elif test "$with_apint" = smallgmp; then
614  if test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then
615    AC_MSG_RESULT(smallgmp)
616  else
617    AC_MSG_RESULT(none)
618    AC_MSG_ERROR(can not use with smallgmp without finding or building it)
619  fi
620elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then
621    AC_MSG_RESULT(gmp)
622    ac_configure_args="$ac_configure_args --with-apint=gmp"
623else
624dnl now we are sure that we have the smallgmp --otherwise enable
625dnl checks had thrown an error
626   AC_MSG_RESULT(smallgmp)
627   ac_configure_args="$ac_configure_args --with-apint=smallgmp"
628fi
629
630AC_MSG_CHECKING(whether to use with MP)
631if test "$with_MP" = yes; then
632  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
633    AC_MSG_RESULT(yes)
634  else
635    AC_MSG_RESULT(none)
636    AC_MSG_ERROR(can not use with MP without finding or building it)
637  fi
638elif test "$with_MP" = no; then
639  AC_MSG_RESULT(no)
640elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
641  AC_MSG_RESULT(yes)
642  ac_configure_args="$ac_configure_args --with-MP"
643else
644  AC_MSG_RESULT(no)
645  ac_configure_args="$ac_configure_args --without-MP"
646fi
647
648AC_MSG_CHECKING(whether to use with factory)
649if test "$with_factory" = yes; then
650  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
651    AC_MSG_RESULT(yes)
652  else
653    AC_MSG_RESULT(none)
654    AC_MSG_ERROR(can not use with factory without finding or building it)
655  fi
656elif test "$with_factory" = no; then
657  AC_MSG_RESULT(no)
658elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
659  AC_MSG_RESULT(yes)
660  ac_configure_args="$ac_configure_args --with-factory"
661else
662  AC_MSG_RESULT(no)
663  ac_configure_args="$ac_configure_args --without-factory"
664fi
665 
666AC_MSG_CHECKING(whether to use with libfac)
667if test "$with_libfac" = yes; then
668  if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
669    AC_MSG_RESULT(yes)
670  else
671    AC_MSG_RESULT(none)
672    AC_MSG_ERROR(can not use with libfac without finding or building it)
673  fi
674elif test "$with_libfac" = no; then
675  AC_MSG_RESULT(no)
676elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
677  AC_MSG_RESULT(yes)
678  ac_configure_args="$ac_configure_args --with-libfac"
679else
680  AC_MSG_RESULT(no)
681  ac_configure_args="$ac_configure_args --without-libfac"
682fi
683
684
685AC_MSG_CHECKING(whether to use with mtrack)
686if test "$with_mtrack" != no && test "$with_mtrack" != yes; then
687  if test "$enable_mtrack" = yes; then
688    with_mtrack=yes
689  else
690    with_mtrack=no
691  fi
692  ac_configure_args="$ac_configure_args --with-mtrack=$with_mtrack"
693elif test "$with_mtrack" = yes && test "$enable_mtrack" != yes; then
694  with_mtrack=no
695  ac_configure_args="$ac_configure_args --with-mtrack=no"
696fi
697if test "$with_mtrack" != yes; then
698  AC_MSG_RESULT(no)
699else
700  AC_MSG_RESULT(yes)
701fi
702
703
704AC_MSG_CHECKING(whether to use with Singular)
705if test "$with_Singular" != no && test "$with_Singular" != yes; then
706  if test "$enable_Singular" = yes; then
707    with_Singular=yes
708  else
709    with_Singular=no
710  fi
711  ac_configure_args="$ac_configure_args --with-Singular=$with_Singular"
712fi
713
714if test "$with_Singular" != no; then
715  AC_MSG_RESULT(yes)
716else
717  AC_MSG_RESULT(no)
718fi
719
720
721dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
722dnl Check for known subdirs
723dnl
724SUBDIRS=""
725if test -d smallgmp; then
726  SUBDIRS="$SUBDIRS smallgmp"
727fi
728if test -d gmp; then
729  SUBDIRS="$SUBDIRS gmp"
730fi
731if test -d MP; then
732  SUBDIRS="$SUBDIRS MP"
733fi
734if test -d factory; then
735  SUBDIRS="$SUBDIRS factory"
736fi
737if test -d libfac; then
738  SUBDIRS="$SUBDIRS libfac"
739fi
740if test -d mpr; then
741  SUBDIRS="$SUBDIRS mpr"
742fi
743if test -d sgroup; then
744  SUBDIRS="$SUBDIRS sgroup"
745fi
746if test -d Singular; then
747  SUBDIRS="$SUBDIRS Singular"
748fi
749if test -d Texinfo; then
750  SUBDIRS="$SUBDIRS Texinfo"
751fi
752if test -d Texi2html; then
753  SUBDIRS="$SUBDIRS Texi2html"
754fi
755if test -d doc; then
756  SUBDIRS="$SUBDIRS doc"
757fi
758if test -d emacs; then
759  SUBDIRS="$SUBDIRS emacs"
760fi
761if test -d rpm; then
762  SUBDIRS="$SUBDIRS rpm"
763fi
764 
765
766dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
767dnl Enough -- wrap it up
768dnl
769AC_PROG_MAKE_SET
770AC_SUBST(SUBDIRS)
771AC_SUBST(BUILD_SUBDIRS)
772AC_SUBST(CONFIG_SUBDIRS)
773AC_CONFIG_SUBDIRS($CONFIG_SUBDIRS)
774
775AC_OUTPUT(${OUTPUT_MAKEFILES})
Note: See TracBrowser for help on using the repository browser.