source: git/configure.in @ e03066

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