source: git/configure @ 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 100755
File size: 95.2 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=`pwd`
15ac_help="$ac_help
16\
17  --with-tmpdir=DIR       use DIR as temporary directory"
18ac_help="$ac_help
19\
20  --enable-PACKAGE        configure and/or build PACKAGE
21  --disable-PACKAGE       do not configure and/or build PACKAGE
22   where PACKAGE can be:
23     smallgmp             minimal version of gmp written in C only"
24ac_help="$ac_help
25\
26     gmp                  Gnu Multiple Precision package"
27ac_help="$ac_help
28\
29     MP                   Multi Protocol library"
30ac_help="$ac_help
31\
32     factory              polynomial factorization library"
33ac_help="$ac_help
34\
35     libfac               char set and modp poly factorization library"
36ac_help="$ac_help
37\
38     sgroup               numerical semigroup computations"
39ac_help="$ac_help
40\
41     mtrack               utility to track unused memory"
42ac_help="$ac_help
43\
44     Singular             CAS for Polynomial Computations"
45ac_help="$ac_help
46\
47     IntegerProgramming   IntegerProgramming"
48ac_help="$ac_help
49\
50     Plural               Plural"
51ac_help="$ac_help
52\
53     Texinfo              Texinfo for info, texi2dvi, makeinfo"
54ac_help="$ac_help
55\
56     Texi2html            Texinfo to HTML converter"
57ac_help="$ac_help
58\
59     doc                  Singular documentation"
60ac_help="$ac_help
61\
62     emacs                emacs completion files"
63ac_help="$ac_help
64\
65  --with-PACKAGE          use PACKAGE, provide dependent functionality
66  --without-PACKAGE       do not use PACKAGE, disable dependent functionality
67   where PACKAGE can be:
68     MP                   Multi Protocol library"
69ac_help="$ac_help
70\
71     factory              polynomial factorization library"
72ac_help="$ac_help
73\
74     libfac               char set and modp poly factorization library"
75ac_help="$ac_help
76\
77     mtrack               utility to track unused memory"
78ac_help="$ac_help
79\
80  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
81                          where PACKAGE can be gmp or smallgmp
82All additional --enable and --with options are passed to subsequent calls
83to configure of the packages to be built. See also configure --help in
84these packages (resp. subdirs). "
85
86# Initialize some variables set by options.
87# The variables have the same names as the options, with
88# dashes changed to underlines.
89build=NONE
90cache_file=./config.cache
91exec_prefix=NONE
92host=NONE
93no_create=
94nonopt=NONE
95no_recursion=
96prefix=NONE
97program_prefix=NONE
98program_suffix=NONE
99program_transform_name=s,x,x,
100silent=
101site=
102srcdir=
103target=NONE
104verbose=
105x_includes=NONE
106x_libraries=NONE
107bindir='${exec_prefix}/bin'
108sbindir='${exec_prefix}/sbin'
109libexecdir='${exec_prefix}/libexec'
110datadir='${prefix}/share'
111sysconfdir='${prefix}/etc'
112sharedstatedir='${prefix}/com'
113localstatedir='${prefix}/var'
114libdir='${exec_prefix}/lib'
115includedir='${prefix}/include'
116oldincludedir='/usr/include'
117infodir='${prefix}/info'
118mandir='${prefix}/man'
119
120# Initialize some other variables.
121subdirs=
122MFLAGS= MAKEFLAGS=
123SHELL=${CONFIG_SHELL-/bin/sh}
124# Maximum number of lines to put in a shell here document.
125ac_max_here_lines=12
126
127ac_prev=
128for ac_option
129do
130
131  # If the previous option needs an argument, assign it.
132  if test -n "$ac_prev"; then
133    eval "$ac_prev=\$ac_option"
134    ac_prev=
135    continue
136  fi
137
138  case "$ac_option" in
139  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
140  *) ac_optarg= ;;
141  esac
142
143  # Accept the important Cygnus configure options, so we can diagnose typos.
144
145  case "$ac_option" in
146
147  -bindir | --bindir | --bindi | --bind | --bin | --bi)
148    ac_prev=bindir ;;
149  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
150    bindir="$ac_optarg" ;;
151
152  -build | --build | --buil | --bui | --bu)
153    ac_prev=build ;;
154  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
155    build="$ac_optarg" ;;
156
157  -cache-file | --cache-file | --cache-fil | --cache-fi \
158  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
159    ac_prev=cache_file ;;
160  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
161  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
162    cache_file="$ac_optarg" ;;
163
164  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
165    ac_prev=datadir ;;
166  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
167  | --da=*)
168    datadir="$ac_optarg" ;;
169
170  -disable-* | --disable-*)
171    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
172    # Reject names that are not valid shell variable names.
173    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
174      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
175    fi
176    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177    eval "enable_${ac_feature}=no" ;;
178
179  -enable-* | --enable-*)
180    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
181    # Reject names that are not valid shell variable names.
182    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
183      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184    fi
185    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
186    case "$ac_option" in
187      *=*) ;;
188      *) ac_optarg=yes ;;
189    esac
190    eval "enable_${ac_feature}='$ac_optarg'" ;;
191
192  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
193  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
194  | --exec | --exe | --ex)
195    ac_prev=exec_prefix ;;
196  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
197  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
198  | --exec=* | --exe=* | --ex=*)
199    exec_prefix="$ac_optarg" ;;
200
201  -gas | --gas | --ga | --g)
202    # Obsolete; use --with-gas.
203    with_gas=yes ;;
204
205  -help | --help | --hel | --he)
206    # Omit some internal or obsolete options to make the list less imposing.
207    # This message is too long to be a string in the A/UX 3.1 sh.
208    cat << EOF
209Usage: configure [options] [host]
210Options: [defaults in brackets after descriptions]
211Configuration:
212  --cache-file=FILE       cache test results in FILE
213  --help                  print this message
214  --no-create             do not create output files
215  --quiet, --silent       do not print \`checking...' messages
216  --version               print the version of autoconf that created configure
217Directory and file names:
218  --prefix=PREFIX         install architecture-independent files in PREFIX
219                          [$ac_default_prefix]
220  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
221                          [same as prefix]
222  --bindir=DIR            user executables in DIR [EPREFIX/bin]
223  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
224  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
225  --datadir=DIR           read-only architecture-independent data in DIR
226                          [PREFIX/share]
227  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
228  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
229                          [PREFIX/com]
230  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
231  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
232  --includedir=DIR        C header files in DIR [PREFIX/include]
233  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
234  --infodir=DIR           info documentation in DIR [PREFIX/info]
235  --mandir=DIR            man documentation in DIR [PREFIX/man]
236  --srcdir=DIR            find the sources in DIR [configure dir or ..]
237  --program-prefix=PREFIX prepend PREFIX to installed program names
238  --program-suffix=SUFFIX append SUFFIX to installed program names
239  --program-transform-name=PROGRAM
240                          run sed PROGRAM on installed program names
241EOF
242    cat << EOF
243Host type:
244  --build=BUILD           configure for building on BUILD [BUILD=HOST]
245  --host=HOST             configure for HOST [guessed]
246  --target=TARGET         configure for TARGET [TARGET=HOST]
247Features and packages:
248  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
249  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
250  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
251  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
252  --x-includes=DIR        X include files are in DIR
253  --x-libraries=DIR       X library files are in DIR
254EOF
255    if test -n "$ac_help"; then
256      echo "--enable and --with options recognized:$ac_help"
257    fi
258    exit 0 ;;
259
260  -host | --host | --hos | --ho)
261    ac_prev=host ;;
262  -host=* | --host=* | --hos=* | --ho=*)
263    host="$ac_optarg" ;;
264
265  -includedir | --includedir | --includedi | --included | --include \
266  | --includ | --inclu | --incl | --inc)
267    ac_prev=includedir ;;
268  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
269  | --includ=* | --inclu=* | --incl=* | --inc=*)
270    includedir="$ac_optarg" ;;
271
272  -infodir | --infodir | --infodi | --infod | --info | --inf)
273    ac_prev=infodir ;;
274  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
275    infodir="$ac_optarg" ;;
276
277  -libdir | --libdir | --libdi | --libd)
278    ac_prev=libdir ;;
279  -libdir=* | --libdir=* | --libdi=* | --libd=*)
280    libdir="$ac_optarg" ;;
281
282  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
283  | --libexe | --libex | --libe)
284    ac_prev=libexecdir ;;
285  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
286  | --libexe=* | --libex=* | --libe=*)
287    libexecdir="$ac_optarg" ;;
288
289  -localstatedir | --localstatedir | --localstatedi | --localstated \
290  | --localstate | --localstat | --localsta | --localst \
291  | --locals | --local | --loca | --loc | --lo)
292    ac_prev=localstatedir ;;
293  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
294  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
295  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
296    localstatedir="$ac_optarg" ;;
297
298  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
299    ac_prev=mandir ;;
300  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
301    mandir="$ac_optarg" ;;
302
303  -nfp | --nfp | --nf)
304    # Obsolete; use --without-fp.
305    with_fp=no ;;
306
307  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
308  | --no-cr | --no-c)
309    no_create=yes ;;
310
311  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
312  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313    no_recursion=yes ;;
314
315  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
316  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
317  | --oldin | --oldi | --old | --ol | --o)
318    ac_prev=oldincludedir ;;
319  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
320  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
321  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
322    oldincludedir="$ac_optarg" ;;
323
324  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
325    ac_prev=prefix ;;
326  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327    prefix="$ac_optarg" ;;
328
329  -program-prefix | --program-prefix | --program-prefi | --program-pref \
330  | --program-pre | --program-pr | --program-p)
331    ac_prev=program_prefix ;;
332  -program-prefix=* | --program-prefix=* | --program-prefi=* \
333  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
334    program_prefix="$ac_optarg" ;;
335
336  -program-suffix | --program-suffix | --program-suffi | --program-suff \
337  | --program-suf | --program-su | --program-s)
338    ac_prev=program_suffix ;;
339  -program-suffix=* | --program-suffix=* | --program-suffi=* \
340  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
341    program_suffix="$ac_optarg" ;;
342
343  -program-transform-name | --program-transform-name \
344  | --program-transform-nam | --program-transform-na \
345  | --program-transform-n | --program-transform- \
346  | --program-transform | --program-transfor \
347  | --program-transfo | --program-transf \
348  | --program-trans | --program-tran \
349  | --progr-tra | --program-tr | --program-t)
350    ac_prev=program_transform_name ;;
351  -program-transform-name=* | --program-transform-name=* \
352  | --program-transform-nam=* | --program-transform-na=* \
353  | --program-transform-n=* | --program-transform-=* \
354  | --program-transform=* | --program-transfor=* \
355  | --program-transfo=* | --program-transf=* \
356  | --program-trans=* | --program-tran=* \
357  | --progr-tra=* | --program-tr=* | --program-t=*)
358    program_transform_name="$ac_optarg" ;;
359
360  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
361  | -silent | --silent | --silen | --sile | --sil)
362    silent=yes ;;
363
364  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
365    ac_prev=sbindir ;;
366  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
367  | --sbi=* | --sb=*)
368    sbindir="$ac_optarg" ;;
369
370  -sharedstatedir | --sharedstatedir | --sharedstatedi \
371  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
372  | --sharedst | --shareds | --shared | --share | --shar \
373  | --sha | --sh)
374    ac_prev=sharedstatedir ;;
375  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
376  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
377  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
378  | --sha=* | --sh=*)
379    sharedstatedir="$ac_optarg" ;;
380
381  -site | --site | --sit)
382    ac_prev=site ;;
383  -site=* | --site=* | --sit=*)
384    site="$ac_optarg" ;;
385
386  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
387    ac_prev=srcdir ;;
388  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389    srcdir="$ac_optarg" ;;
390
391  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
392  | --syscon | --sysco | --sysc | --sys | --sy)
393    ac_prev=sysconfdir ;;
394  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
395  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
396    sysconfdir="$ac_optarg" ;;
397
398  -target | --target | --targe | --targ | --tar | --ta | --t)
399    ac_prev=target ;;
400  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
401    target="$ac_optarg" ;;
402
403  -v | -verbose | --verbose | --verbos | --verbo | --verb)
404    verbose=yes ;;
405
406  -version | --version | --versio | --versi | --vers)
407    echo "configure generated by autoconf version 2.13"
408    exit 0 ;;
409
410  -with-* | --with-*)
411    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
412    # Reject names that are not valid shell variable names.
413    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
414      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415    fi
416    ac_package=`echo $ac_package| sed 's/-/_/g'`
417    case "$ac_option" in
418      *=*) ;;
419      *) ac_optarg=yes ;;
420    esac
421    eval "with_${ac_package}='$ac_optarg'" ;;
422
423  -without-* | --without-*)
424    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
425    # Reject names that are not valid shell variable names.
426    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
427      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428    fi
429    ac_package=`echo $ac_package| sed 's/-/_/g'`
430    eval "with_${ac_package}=no" ;;
431
432  --x)
433    # Obsolete; use --with-x.
434    with_x=yes ;;
435
436  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
437  | --x-incl | --x-inc | --x-in | --x-i)
438    ac_prev=x_includes ;;
439  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
440  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
441    x_includes="$ac_optarg" ;;
442
443  -x-libraries | --x-libraries | --x-librarie | --x-librari \
444  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
445    ac_prev=x_libraries ;;
446  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
447  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
448    x_libraries="$ac_optarg" ;;
449
450  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
451    ;;
452
453  *)
454    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
455      echo "configure: warning: $ac_option: invalid host type" 1>&2
456    fi
457    if test "x$nonopt" != xNONE; then
458      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
459    fi
460    nonopt="$ac_option"
461    ;;
462
463  esac
464done
465
466if test -n "$ac_prev"; then
467  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
468fi
469
470trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
471
472# File descriptor usage:
473# 0 standard input
474# 1 file creation
475# 2 errors and warnings
476# 3 some systems may open it to /dev/tty
477# 4 used on the Kubota Titan
478# 6 checking for... messages and results
479# 5 compiler messages saved in config.log
480if test "$silent" = yes; then
481  exec 6>/dev/null
482else
483  exec 6>&1
484fi
485exec 5>./config.log
486
487echo "\
488This file contains any messages produced by compilers while
489running configure, to aid debugging if configure makes a mistake.
490" 1>&5
491
492# Strip out --no-create and --no-recursion so they do not pile up.
493# Also quote any args containing shell metacharacters.
494ac_configure_args=
495for ac_arg
496do
497  case "$ac_arg" in
498  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
499  | --no-cr | --no-c) ;;
500  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
501  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
502  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
503  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
504  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
505  esac
506done
507
508# NLS nuisances.
509# Only set these to C if already set.  These must not be set unconditionally
510# because not all systems understand e.g. LANG=C (notably SCO).
511# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
512# Non-C LC_CTYPE values break the ctype check.
513if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
514if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
515if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
516if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
517
518# confdefs.h avoids OS command line length limits that DEFS can exceed.
519rm -rf conftest* confdefs.h
520# AIX cpp loses on an empty file, so make sure it contains at least a newline.
521echo > confdefs.h
522
523# A filename unique to this package, relative to the directory that
524# configure is in, which we can look for to find out if srcdir is correct.
525ac_unique_file=Singular/matpol.h
526
527# Find the source files, if location was not specified.
528if test -z "$srcdir"; then
529  ac_srcdir_defaulted=yes
530  # Try the directory containing this script, then its parent.
531  ac_prog=$0
532  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
533  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
534  srcdir=$ac_confdir
535  if test ! -r $srcdir/$ac_unique_file; then
536    srcdir=..
537  fi
538else
539  ac_srcdir_defaulted=no
540fi
541if test ! -r $srcdir/$ac_unique_file; then
542  if test "$ac_srcdir_defaulted" = yes; then
543    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
544  else
545    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
546  fi
547fi
548srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
549
550# Prefer explicitly selected file to automatically selected ones.
551if test -z "$CONFIG_SITE"; then
552  if test "x$prefix" != xNONE; then
553    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
554  else
555    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
556  fi
557fi
558for ac_site_file in $CONFIG_SITE; do
559  if test -r "$ac_site_file"; then
560    echo "loading site script $ac_site_file"
561    . "$ac_site_file"
562  fi
563done
564
565if test -r "$cache_file"; then
566  echo "loading cache $cache_file"
567  . $cache_file
568else
569  echo "creating cache $cache_file"
570  > $cache_file
571fi
572
573ac_ext=c
574# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
575ac_cpp='$CPP $CPPFLAGS'
576ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
577ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
578cross_compiling=$ac_cv_prog_cc_cross
579
580ac_exeext=
581ac_objext=o
582if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
583  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
584  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
585    ac_n= ac_c='
586' ac_t='        '
587  else
588    ac_n=-n ac_c= ac_t=
589  fi
590else
591  ac_n= ac_c='\c' ac_t=
592fi
593
594
595
596pwd=`pwd`
597
598# make them to env variables
599# pass them indirectly to subsequent configures
600SINGULAR_MAJOR_VERSION=1
601SINGULAR_MINOR_VERSION=3
602SINGULAR_SUB_VERSION=8
603VERSION_SEP="-"
604SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}"
605SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}"
606VERSION_DATE="May 2000"
607SINGULAR_ROOT_DIR=$pwd
608
609export SINGULAR_MINOR_VERSION
610export SINGULAR_MAJOR_VERSION
611export SINGULAR_SUB_VERSION
612export SINGULAR_VERSION
613export VERSION_DATE
614export SINGULAR_ROOT_DIR
615
616
617
618
619
620
621
622# determine Makefiles to output
623OUTPUT_MAKEFILES="Makefile"
624if test -d "doc"; then
625   OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES doc/Makefile doc/version.texi doc/uname.texi"
626fi
627if test -d "rpm"; then
628   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" rpm/Makefile"
629   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" rpm/rpmrc rpm/Singular.spec"
630fi
631if test -d "modules"; then
632   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" modules/Makefile"
633fi
634if test -d "modules/tools"; then
635   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" modules/tools/Makefile"
636fi
637if test -d "modules/modgen"; then
638   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" modules/modgen/Makefile"
639fi
640if test -d "emacs"; then
641   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" emacs/Makefile"
642fi
643if test -d "IntegerProgramming"; then
644   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" IntegerProgramming/Makefile"
645fi
646if test -d "Plural"; then
647   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" Plural/Makefile"
648fi
649if test -d "InstallShield"; then
650   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" InstallShield/Makefile InstallShield/Etc/Makefile InstallShield/Cygwin/Makefile InstallShield/Singular/Makefile InstallShield/Xemacs/Makefile"
651fi
652
653
654echo $ac_n "checking uname for singular""... $ac_c" 1>&6
655echo "configure:656: checking uname for singular" >&5
656if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then
657  echo $ac_n "(cached) $ac_c" 1>&6
658else
659  ac_cv_singuname="unknown"
660if test -r "singuname.sh"; then
661  if (/bin/sh singuname.sh >/dev/null 2>&1) then
662    ac_cv_singuname=`/bin/sh singuname.sh`
663  fi
664fi
665
666fi
667
668echo "$ac_t""$ac_cv_singuname" 1>&6
669if test "$ac_cv_singuname" = unknown; then
670  { echo "configure: error: Unknown architecture: Check singuname.sh" 1>&2; exit 1; }
671else
672  SINGUNAME=$ac_cv_singuname
673 
674fi
675
676SING_UNAME=`echo $SINGUNAME | tr '-' '_' `
677
678
679
680# Extract the first word of "gcc", so it can be a program name with args.
681set dummy gcc; ac_word=$2
682echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
683echo "configure:684: checking for $ac_word" >&5
684if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
685  echo $ac_n "(cached) $ac_c" 1>&6
686else
687  if test -n "$CC"; then
688  ac_cv_prog_CC="$CC" # Let the user override the test.
689else
690  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
691  ac_dummy="$PATH"
692  for ac_dir in $ac_dummy; do
693    test -z "$ac_dir" && ac_dir=.
694    if test -f $ac_dir/$ac_word; then
695      ac_cv_prog_CC="gcc"
696      break
697    fi
698  done
699  IFS="$ac_save_ifs"
700fi
701fi
702CC="$ac_cv_prog_CC"
703if test -n "$CC"; then
704  echo "$ac_t""$CC" 1>&6
705else
706  echo "$ac_t""no" 1>&6
707fi
708
709if test -z "$CC"; then
710  # Extract the first word of "cc", so it can be a program name with args.
711set dummy cc; ac_word=$2
712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
713echo "configure:714: checking for $ac_word" >&5
714if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
715  echo $ac_n "(cached) $ac_c" 1>&6
716else
717  if test -n "$CC"; then
718  ac_cv_prog_CC="$CC" # Let the user override the test.
719else
720  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
721  ac_prog_rejected=no
722  ac_dummy="$PATH"
723  for ac_dir in $ac_dummy; do
724    test -z "$ac_dir" && ac_dir=.
725    if test -f $ac_dir/$ac_word; then
726      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
727        ac_prog_rejected=yes
728        continue
729      fi
730      ac_cv_prog_CC="cc"
731      break
732    fi
733  done
734  IFS="$ac_save_ifs"
735if test $ac_prog_rejected = yes; then
736  # We found a bogon in the path, so make sure we never use it.
737  set dummy $ac_cv_prog_CC
738  shift
739  if test $# -gt 0; then
740    # We chose a different compiler from the bogus one.
741    # However, it has the same basename, so the bogon will be chosen
742    # first if we set CC to just the basename; use the full file name.
743    shift
744    set dummy "$ac_dir/$ac_word" "$@"
745    shift
746    ac_cv_prog_CC="$@"
747  fi
748fi
749fi
750fi
751CC="$ac_cv_prog_CC"
752if test -n "$CC"; then
753  echo "$ac_t""$CC" 1>&6
754else
755  echo "$ac_t""no" 1>&6
756fi
757
758  if test -z "$CC"; then
759    case "`uname -s`" in
760    *win32* | *WIN32*)
761      # Extract the first word of "cl", so it can be a program name with args.
762set dummy cl; ac_word=$2
763echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
764echo "configure:765: checking for $ac_word" >&5
765if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
766  echo $ac_n "(cached) $ac_c" 1>&6
767else
768  if test -n "$CC"; then
769  ac_cv_prog_CC="$CC" # Let the user override the test.
770else
771  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
772  ac_dummy="$PATH"
773  for ac_dir in $ac_dummy; do
774    test -z "$ac_dir" && ac_dir=.
775    if test -f $ac_dir/$ac_word; then
776      ac_cv_prog_CC="cl"
777      break
778    fi
779  done
780  IFS="$ac_save_ifs"
781fi
782fi
783CC="$ac_cv_prog_CC"
784if test -n "$CC"; then
785  echo "$ac_t""$CC" 1>&6
786else
787  echo "$ac_t""no" 1>&6
788fi
789 ;;
790    esac
791  fi
792  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
793fi
794
795echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
796echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
797
798ac_ext=c
799# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
800ac_cpp='$CPP $CPPFLAGS'
801ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
802ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
803cross_compiling=$ac_cv_prog_cc_cross
804
805cat > conftest.$ac_ext << EOF
806
807#line 808 "configure"
808#include "confdefs.h"
809
810main(){return(0);}
811EOF
812if { (eval echo configure:813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
813  ac_cv_prog_cc_works=yes
814  # If we can't run a trivial program, we are probably using a cross compiler.
815  if (./conftest; exit) 2>/dev/null; then
816    ac_cv_prog_cc_cross=no
817  else
818    ac_cv_prog_cc_cross=yes
819  fi
820else
821  echo "configure: failed program was:" >&5
822  cat conftest.$ac_ext >&5
823  ac_cv_prog_cc_works=no
824fi
825rm -fr conftest*
826ac_ext=c
827# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
828ac_cpp='$CPP $CPPFLAGS'
829ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
830ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
831cross_compiling=$ac_cv_prog_cc_cross
832
833echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
834if test $ac_cv_prog_cc_works = no; then
835  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
836fi
837echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
838echo "configure:839: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
839echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
840cross_compiling=$ac_cv_prog_cc_cross
841
842echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
843echo "configure:844: checking whether we are using GNU C" >&5
844if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
845  echo $ac_n "(cached) $ac_c" 1>&6
846else
847  cat > conftest.c <<EOF
848#ifdef __GNUC__
849  yes;
850#endif
851EOF
852if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
853  ac_cv_prog_gcc=yes
854else
855  ac_cv_prog_gcc=no
856fi
857fi
858
859echo "$ac_t""$ac_cv_prog_gcc" 1>&6
860
861if test $ac_cv_prog_gcc = yes; then
862  GCC=yes
863else
864  GCC=
865fi
866
867ac_test_CFLAGS="${CFLAGS+set}"
868ac_save_CFLAGS="$CFLAGS"
869CFLAGS=
870echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
871echo "configure:872: checking whether ${CC-cc} accepts -g" >&5
872if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
873  echo $ac_n "(cached) $ac_c" 1>&6
874else
875  echo 'void f(){}' > conftest.c
876if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
877  ac_cv_prog_cc_g=yes
878else
879  ac_cv_prog_cc_g=no
880fi
881rm -f conftest*
882
883fi
884
885echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
886if test "$ac_test_CFLAGS" = set; then
887  CFLAGS="$ac_save_CFLAGS"
888elif test $ac_cv_prog_cc_g = yes; then
889  if test "$GCC" = yes; then
890    CFLAGS="-g -O2"
891  else
892    CFLAGS="-g"
893  fi
894else
895  if test "$GCC" = yes; then
896    CFLAGS="-O2"
897  else
898    CFLAGS=
899  fi
900fi
901
902echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
903echo "configure:904: checking how to run the C preprocessor" >&5
904# On Suns, sometimes $CPP names a directory.
905if test -n "$CPP" && test -d "$CPP"; then
906  CPP=
907fi
908if test -z "$CPP"; then
909if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
910  echo $ac_n "(cached) $ac_c" 1>&6
911else
912    # This must be in double quotes, not single quotes, because CPP may get
913  # substituted into the Makefile and "${CC-cc}" will confuse make.
914  CPP="${CC-cc} -E"
915  # On the NeXT, cc -E runs the code through the compiler's parser,
916  # not just through cpp.
917  cat > conftest.$ac_ext <<EOF
918#line 919 "configure"
919#include "confdefs.h"
920#include <assert.h>
921Syntax Error
922EOF
923ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
924{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
925ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
926if test -z "$ac_err"; then
927  :
928else
929  echo "$ac_err" >&5
930  echo "configure: failed program was:" >&5
931  cat conftest.$ac_ext >&5
932  rm -rf conftest*
933  CPP="${CC-cc} -E -traditional-cpp"
934  cat > conftest.$ac_ext <<EOF
935#line 936 "configure"
936#include "confdefs.h"
937#include <assert.h>
938Syntax Error
939EOF
940ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
941{ (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
942ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
943if test -z "$ac_err"; then
944  :
945else
946  echo "$ac_err" >&5
947  echo "configure: failed program was:" >&5
948  cat conftest.$ac_ext >&5
949  rm -rf conftest*
950  CPP="${CC-cc} -nologo -E"
951  cat > conftest.$ac_ext <<EOF
952#line 953 "configure"
953#include "confdefs.h"
954#include <assert.h>
955Syntax Error
956EOF
957ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
958{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
959ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
960if test -z "$ac_err"; then
961  :
962else
963  echo "$ac_err" >&5
964  echo "configure: failed program was:" >&5
965  cat conftest.$ac_ext >&5
966  rm -rf conftest*
967  CPP=/lib/cpp
968fi
969rm -f conftest*
970fi
971rm -f conftest*
972fi
973rm -f conftest*
974  ac_cv_prog_CPP="$CPP"
975fi
976  CPP="$ac_cv_prog_CPP"
977else
978  ac_cv_prog_CPP="$CPP"
979fi
980echo "$ac_t""$CPP" 1>&6
981
982ac_aux_dir=
983for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
984  if test -f $ac_dir/install-sh; then
985    ac_aux_dir=$ac_dir
986    ac_install_sh="$ac_aux_dir/install-sh -c"
987    break
988  elif test -f $ac_dir/install.sh; then
989    ac_aux_dir=$ac_dir
990    ac_install_sh="$ac_aux_dir/install.sh -c"
991    break
992  fi
993done
994if test -z "$ac_aux_dir"; then
995  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
996fi
997ac_config_guess=$ac_aux_dir/config.guess
998ac_config_sub=$ac_aux_dir/config.sub
999ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1000
1001# Find a good install program.  We prefer a C program (faster),
1002# so one script is as good as another.  But avoid the broken or
1003# incompatible versions:
1004# SysV /etc/install, /usr/sbin/install
1005# SunOS /usr/etc/install
1006# IRIX /sbin/install
1007# AIX /bin/install
1008# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1009# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1010# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1011# ./install, which can be erroneously created by make from ./install.sh.
1012echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1013echo "configure:1014: checking for a BSD compatible install" >&5
1014if test -z "$INSTALL"; then
1015if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1016  echo $ac_n "(cached) $ac_c" 1>&6
1017else
1018    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1019  for ac_dir in $PATH; do
1020    # Account for people who put trailing slashes in PATH elements.
1021    case "$ac_dir/" in
1022    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1023    *)
1024      # OSF1 and SCO ODT 3.0 have their own names for install.
1025      # Don't use installbsd from OSF since it installs stuff as root
1026      # by default.
1027      for ac_prog in ginstall scoinst install; do
1028        if test -f $ac_dir/$ac_prog; then
1029          if test $ac_prog = install &&
1030            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1031            # AIX install.  It has an incompatible calling convention.
1032            :
1033          else
1034            ac_cv_path_install="$ac_dir/$ac_prog -c"
1035            break 2
1036          fi
1037        fi
1038      done
1039      ;;
1040    esac
1041  done
1042  IFS="$ac_save_IFS"
1043
1044fi
1045  if test "${ac_cv_path_install+set}" = set; then
1046    INSTALL="$ac_cv_path_install"
1047  else
1048    # As a last resort, use the slow shell script.  We don't cache a
1049    # path for INSTALL within a source directory, because that will
1050    # break other packages using the cache if that directory is
1051    # removed, or if the path is relative.
1052    INSTALL="$ac_install_sh"
1053  fi
1054fi
1055echo "$ac_t""$INSTALL" 1>&6
1056
1057# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1058# It thinks the first close brace ends the variable substitution.
1059test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1060
1061test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1062
1063test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1064
1065echo $ac_n "checking for AIX""... $ac_c" 1>&6
1066echo "configure:1067: checking for AIX" >&5
1067cat > conftest.$ac_ext <<EOF
1068#line 1069 "configure"
1069#include "confdefs.h"
1070#ifdef _AIX
1071  yes
1072#endif
1073
1074EOF
1075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1076  egrep "yes" >/dev/null 2>&1; then
1077  rm -rf conftest*
1078  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1079#define _ALL_SOURCE 1
1080EOF
1081
1082else
1083  rm -rf conftest*
1084  echo "$ac_t""no" 1>&6
1085fi
1086rm -f conftest*
1087
1088
1089for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1090do
1091# Extract the first word of "$ac_prog", so it can be a program name with args.
1092set dummy $ac_prog; ac_word=$2
1093echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1094echo "configure:1095: checking for $ac_word" >&5
1095if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1096  echo $ac_n "(cached) $ac_c" 1>&6
1097else
1098  if test -n "$CXX"; then
1099  ac_cv_prog_CXX="$CXX" # Let the user override the test.
1100else
1101  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1102  ac_dummy="$PATH"
1103  for ac_dir in $ac_dummy; do
1104    test -z "$ac_dir" && ac_dir=.
1105    if test -f $ac_dir/$ac_word; then
1106      ac_cv_prog_CXX="$ac_prog"
1107      break
1108    fi
1109  done
1110  IFS="$ac_save_ifs"
1111fi
1112fi
1113CXX="$ac_cv_prog_CXX"
1114if test -n "$CXX"; then
1115  echo "$ac_t""$CXX" 1>&6
1116else
1117  echo "$ac_t""no" 1>&6
1118fi
1119
1120test -n "$CXX" && break
1121done
1122test -n "$CXX" || CXX="gcc"
1123
1124
1125echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1126echo "configure:1127: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1127
1128ac_ext=C
1129# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1130ac_cpp='$CXXCPP $CPPFLAGS'
1131ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1132ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1133cross_compiling=$ac_cv_prog_cxx_cross
1134
1135cat > conftest.$ac_ext << EOF
1136
1137#line 1138 "configure"
1138#include "confdefs.h"
1139
1140int main(){return(0);}
1141EOF
1142if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1143  ac_cv_prog_cxx_works=yes
1144  # If we can't run a trivial program, we are probably using a cross compiler.
1145  if (./conftest; exit) 2>/dev/null; then
1146    ac_cv_prog_cxx_cross=no
1147  else
1148    ac_cv_prog_cxx_cross=yes
1149  fi
1150else
1151  echo "configure: failed program was:" >&5
1152  cat conftest.$ac_ext >&5
1153  ac_cv_prog_cxx_works=no
1154fi
1155rm -fr conftest*
1156ac_ext=c
1157# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1158ac_cpp='$CPP $CPPFLAGS'
1159ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1160ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1161cross_compiling=$ac_cv_prog_cc_cross
1162
1163echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1164if test $ac_cv_prog_cxx_works = no; then
1165  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1166fi
1167echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1168echo "configure:1169: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1169echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1170cross_compiling=$ac_cv_prog_cxx_cross
1171
1172echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1173echo "configure:1174: checking whether we are using GNU C++" >&5
1174if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1175  echo $ac_n "(cached) $ac_c" 1>&6
1176else
1177  cat > conftest.C <<EOF
1178#ifdef __GNUC__
1179  yes;
1180#endif
1181EOF
1182if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1183  ac_cv_prog_gxx=yes
1184else
1185  ac_cv_prog_gxx=no
1186fi
1187fi
1188
1189echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1190
1191if test $ac_cv_prog_gxx = yes; then
1192  GXX=yes
1193else
1194  GXX=
1195fi
1196
1197ac_test_CXXFLAGS="${CXXFLAGS+set}"
1198ac_save_CXXFLAGS="$CXXFLAGS"
1199CXXFLAGS=
1200echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1201echo "configure:1202: checking whether ${CXX-g++} accepts -g" >&5
1202if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1203  echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205  echo 'void f(){}' > conftest.cc
1206if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1207  ac_cv_prog_cxx_g=yes
1208else
1209  ac_cv_prog_cxx_g=no
1210fi
1211rm -f conftest*
1212
1213fi
1214
1215echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1216if test "$ac_test_CXXFLAGS" = set; then
1217  CXXFLAGS="$ac_save_CXXFLAGS"
1218elif test $ac_cv_prog_cxx_g = yes; then
1219  if test "$GXX" = yes; then
1220    CXXFLAGS="-g -O2"
1221  else
1222    CXXFLAGS="-g"
1223  fi
1224else
1225  if test "$GXX" = yes; then
1226    CXXFLAGS="-O2"
1227  else
1228    CXXFLAGS=
1229  fi
1230fi
1231
1232
1233# check whether the compiler accepts -pipe
1234echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
1235echo "configure:1236: checking whether compiler accepts -pipe" >&5
1236temp_cflags=${CFLAGS}
1237CFLAGS="${CFLAGS} -pipe"
1238if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then
1239  echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241  cat > conftest.$ac_ext <<EOF
1242#line 1243 "configure"
1243#include "confdefs.h"
1244
1245int main() {
1246
1247; return 0; }
1248EOF
1249if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1250  rm -rf conftest*
1251  ac_cv_cxx_have_pipe=yes
1252else
1253  echo "configure: failed program was:" >&5
1254  cat conftest.$ac_ext >&5
1255  rm -rf conftest*
1256  ac_cv_cxx_have_pipe=no
1257fi
1258rm -f conftest*
1259
1260fi
1261
1262echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6
1263CFLAGS=${temp_cflags}
1264if test "${ac_cv_cxx_have_pipe}" != yes; then
1265  PIPE=
1266else
1267  PIPE="-pipe"
1268fi
1269
1270
1271for ac_prog in perl5 perl
1272do
1273# Extract the first word of "$ac_prog", so it can be a program name with args.
1274set dummy $ac_prog; ac_word=$2
1275echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1276echo "configure:1277: checking for $ac_word" >&5
1277if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
1278  echo $ac_n "(cached) $ac_c" 1>&6
1279else
1280  if test -n "$PERL"; then
1281  ac_cv_prog_PERL="$PERL" # Let the user override the test.
1282else
1283  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1284  ac_dummy="$PATH"
1285  for ac_dir in $ac_dummy; do
1286    test -z "$ac_dir" && ac_dir=.
1287    if test -f $ac_dir/$ac_word; then
1288      ac_cv_prog_PERL="$ac_prog"
1289      break
1290    fi
1291  done
1292  IFS="$ac_save_ifs"
1293fi
1294fi
1295PERL="$ac_cv_prog_PERL"
1296if test -n "$PERL"; then
1297  echo "$ac_t""$PERL" 1>&6
1298else
1299  echo "$ac_t""no" 1>&6
1300fi
1301
1302test -n "$PERL" && break
1303done
1304
1305for ac_prog in uudecode "uudeview -i"
1306do
1307# Extract the first word of "$ac_prog", so it can be a program name with args.
1308set dummy $ac_prog; ac_word=$2
1309echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1310echo "configure:1311: checking for $ac_word" >&5
1311if eval "test \"`echo '$''{'ac_cv_prog_UUDECODE'+set}'`\" = set"; then
1312  echo $ac_n "(cached) $ac_c" 1>&6
1313else
1314  if test -n "$UUDECODE"; then
1315  ac_cv_prog_UUDECODE="$UUDECODE" # Let the user override the test.
1316else
1317  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1318  ac_dummy="$PATH"
1319  for ac_dir in $ac_dummy; do
1320    test -z "$ac_dir" && ac_dir=.
1321    if test -f $ac_dir/$ac_word; then
1322      ac_cv_prog_UUDECODE="$ac_prog"
1323      break
1324    fi
1325  done
1326  IFS="$ac_save_ifs"
1327fi
1328fi
1329UUDECODE="$ac_cv_prog_UUDECODE"
1330if test -n "$UUDECODE"; then
1331  echo "$ac_t""$UUDECODE" 1>&6
1332else
1333  echo "$ac_t""no" 1>&6
1334fi
1335
1336test -n "$UUDECODE" && break
1337done
1338
1339for ac_prog in gunzip
1340do
1341# Extract the first word of "$ac_prog", so it can be a program name with args.
1342set dummy $ac_prog; ac_word=$2
1343echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1344echo "configure:1345: checking for $ac_word" >&5
1345if eval "test \"`echo '$''{'ac_cv_prog_GUNZIP'+set}'`\" = set"; then
1346  echo $ac_n "(cached) $ac_c" 1>&6
1347else
1348  if test -n "$GUNZIP"; then
1349  ac_cv_prog_GUNZIP="$GUNZIP" # Let the user override the test.
1350else
1351  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1352  ac_dummy="$PATH"
1353  for ac_dir in $ac_dummy; do
1354    test -z "$ac_dir" && ac_dir=.
1355    if test -f $ac_dir/$ac_word; then
1356      ac_cv_prog_GUNZIP="$ac_prog"
1357      break
1358    fi
1359  done
1360  IFS="$ac_save_ifs"
1361fi
1362fi
1363GUNZIP="$ac_cv_prog_GUNZIP"
1364if test -n "$GUNZIP"; then
1365  echo "$ac_t""$GUNZIP" 1>&6
1366else
1367  echo "$ac_t""no" 1>&6
1368fi
1369
1370test -n "$GUNZIP" && break
1371done
1372test -n "$GUNZIP" || GUNZIP="${pwd}/warn_not_found.sh gunzip"
1373
1374# don't use GZIP this breaks configure
1375for ac_prog in gzip
1376do
1377# Extract the first word of "$ac_prog", so it can be a program name with args.
1378set dummy $ac_prog; ac_word=$2
1379echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1380echo "configure:1381: checking for $ac_word" >&5
1381if eval "test \"`echo '$''{'ac_cv_prog_MYGZIP'+set}'`\" = set"; then
1382  echo $ac_n "(cached) $ac_c" 1>&6
1383else
1384  if test -n "$MYGZIP"; then
1385  ac_cv_prog_MYGZIP="$MYGZIP" # Let the user override the test.
1386else
1387  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1388  ac_dummy="$PATH"
1389  for ac_dir in $ac_dummy; do
1390    test -z "$ac_dir" && ac_dir=.
1391    if test -f $ac_dir/$ac_word; then
1392      ac_cv_prog_MYGZIP="$ac_prog"
1393      break
1394    fi
1395  done
1396  IFS="$ac_save_ifs"
1397fi
1398fi
1399MYGZIP="$ac_cv_prog_MYGZIP"
1400if test -n "$MYGZIP"; then
1401  echo "$ac_t""$MYGZIP" 1>&6
1402else
1403  echo "$ac_t""no" 1>&6
1404fi
1405
1406test -n "$MYGZIP" && break
1407done
1408test -n "$MYGZIP" || MYGZIP="${pwd}/warn_not_found.sh gzip"
1409
1410# Extract the first word of "latex2html", so it can be a program name with args.
1411set dummy latex2html; ac_word=$2
1412echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1413echo "configure:1414: checking for $ac_word" >&5
1414if eval "test \"`echo '$''{'ac_cv_prog_LATEX2HTML'+set}'`\" = set"; then
1415  echo $ac_n "(cached) $ac_c" 1>&6
1416else
1417  if test -n "$LATEX2HTML"; then
1418  ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
1419else
1420  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1421  ac_dummy="$PATH"
1422  for ac_dir in $ac_dummy; do
1423    test -z "$ac_dir" && ac_dir=.
1424    if test -f $ac_dir/$ac_word; then
1425      ac_cv_prog_LATEX2HTML="latex2html"
1426      break
1427    fi
1428  done
1429  IFS="$ac_save_ifs"
1430fi
1431fi
1432LATEX2HTML="$ac_cv_prog_LATEX2HTML"
1433if test -n "$LATEX2HTML"; then
1434  echo "$ac_t""$LATEX2HTML" 1>&6
1435else
1436  echo "$ac_t""no" 1>&6
1437fi
1438
1439echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1440echo "configure:1441: checking whether ln -s works" >&5
1441if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1442  echo $ac_n "(cached) $ac_c" 1>&6
1443else
1444  rm -f conftestdata
1445if ln -s X conftestdata 2>/dev/null
1446then
1447  rm -f conftestdata
1448  ac_cv_prog_LN_S="ln -s"
1449else
1450  ac_cv_prog_LN_S=ln
1451fi
1452fi
1453LN_S="$ac_cv_prog_LN_S"
1454if test "$ac_cv_prog_LN_S" = "ln -s"; then
1455  echo "$ac_t""yes" 1>&6
1456else
1457  echo "$ac_t""no" 1>&6
1458fi
1459
1460
1461if test -r "${pwd}/mkinstalldirs"; then
1462  MKINSTALLDIRS=${pwd}/mkinstalldirs
1463 
1464else
1465  { echo "configure: error: mkinstalldirs not foind in ${pwd}" 1>&2; exit 1; }
1466fi
1467
1468# expand prefix and pass it to subsequent configures
1469if test "x$prefix" = xNONE; then
1470  prefix=${ac_default_prefix}
1471  ac_configure_args="$ac_configure_args --prefix=${prefix}"
1472fi
1473
1474# expand exec_prefix
1475if test "x$exec_prefix" = xNONE; then
1476 exec_prefix=${prefix}/${ac_cv_singuname}
1477 ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}"
1478fi
1479
1480# expand bindir
1481if test "x$bindir" = 'x${exec_prefix}/bin'; then
1482  bindir="${exec_prefix}"
1483  ac_configure_args="$ac_configure_args --bindir=${bindir}"
1484fi
1485
1486# expand libdir
1487if test "x$libdir" = 'x${exec_prefix}/lib'; then
1488  libdir="${exec_prefix}/lib"
1489  ac_configure_args="$ac_configure_args --libdir=${libdir}"
1490fi
1491
1492# expand includedir
1493if test "x$includedir" = 'x${prefix}/include'; then
1494  includedir="${exec_prefix}/include"
1495  ac_configure_args="$ac_configure_args --includedir=${includedir}"
1496fi
1497
1498# construct name of installed Singular executable
1499SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}
1500export SINGULAR
1501
1502
1503
1504# add -I to CPPFLAGS and -L to LDFLAGS, just to be sure
1505LDFLAGS="-L${libdir} ${LDFLAGS}"
1506CPPFLAGS="-I${includedir} ${CPPFLAGS}"
1507
1508# check for AIX
1509echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
1510echo "configure:1511: checking whether _AIX is defined" >&5
1511if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
1512  echo $ac_n "(cached) $ac_c" 1>&6
1513else
1514  cat > conftest.$ac_ext <<EOF
1515#line 1516 "configure"
1516#include "confdefs.h"
1517#ifdef _AIX
1518    yes
1519#endif
1520
1521EOF
1522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1523  egrep "yes" >/dev/null 2>&1; then
1524  rm -rf conftest*
1525  ac_cv_is_aix=yes
1526else
1527  rm -rf conftest*
1528  ac_cv_is_aix=no
1529fi
1530rm -f conftest*
1531
1532fi
1533
1534if test "$ac_cv_is_aix" = yes; then
1535  echo "$ac_t""yes" 1>&6
1536else
1537  echo "$ac_t""no" 1>&6
1538fi
1539
1540echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
1541echo "configure:1542: checking for atof in -lm" >&5
1542ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
1543if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1544  echo $ac_n "(cached) $ac_c" 1>&6
1545else
1546  ac_save_LIBS="$LIBS"
1547LIBS="-lm  $LIBS"
1548cat > conftest.$ac_ext <<EOF
1549#line 1550 "configure"
1550#include "confdefs.h"
1551/* Override any gcc2 internal prototype to avoid an error.  */
1552/* We use char because int might match the return type of a gcc2
1553    builtin and then its argument prototype would still apply.  */
1554char atof();
1555
1556int main() {
1557atof()
1558; return 0; }
1559EOF
1560if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1561  rm -rf conftest*
1562  eval "ac_cv_lib_$ac_lib_var=yes"
1563else
1564  echo "configure: failed program was:" >&5
1565  cat conftest.$ac_ext >&5
1566  rm -rf conftest*
1567  eval "ac_cv_lib_$ac_lib_var=no"
1568fi
1569rm -f conftest*
1570LIBS="$ac_save_LIBS"
1571
1572fi
1573if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1574  echo "$ac_t""yes" 1>&6
1575    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1576    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1577  cat >> confdefs.h <<EOF
1578#define $ac_tr_lib 1
1579EOF
1580
1581  LIBS="-lm $LIBS"
1582
1583else
1584  echo "$ac_t""no" 1>&6
1585fi
1586
1587echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
1588echo "configure:1589: checking for socket in -lbsd" >&5
1589ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
1590if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1591  echo $ac_n "(cached) $ac_c" 1>&6
1592else
1593  ac_save_LIBS="$LIBS"
1594LIBS="-lbsd  $LIBS"
1595cat > conftest.$ac_ext <<EOF
1596#line 1597 "configure"
1597#include "confdefs.h"
1598/* Override any gcc2 internal prototype to avoid an error.  */
1599/* We use char because int might match the return type of a gcc2
1600    builtin and then its argument prototype would still apply.  */
1601char socket();
1602
1603int main() {
1604socket()
1605; return 0; }
1606EOF
1607if { (eval echo configure:1608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1608  rm -rf conftest*
1609  eval "ac_cv_lib_$ac_lib_var=yes"
1610else
1611  echo "configure: failed program was:" >&5
1612  cat conftest.$ac_ext >&5
1613  rm -rf conftest*
1614  eval "ac_cv_lib_$ac_lib_var=no"
1615fi
1616rm -f conftest*
1617LIBS="$ac_save_LIBS"
1618
1619fi
1620if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1621  echo "$ac_t""yes" 1>&6
1622    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1623    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1624  cat >> confdefs.h <<EOF
1625#define $ac_tr_lib 1
1626EOF
1627
1628  LIBS="-lbsd $LIBS"
1629
1630else
1631  echo "$ac_t""no" 1>&6
1632fi
1633
1634echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
1635echo "configure:1636: checking for listen in -lsocket" >&5
1636ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
1637if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1638  echo $ac_n "(cached) $ac_c" 1>&6
1639else
1640  ac_save_LIBS="$LIBS"
1641LIBS="-lsocket  $LIBS"
1642cat > conftest.$ac_ext <<EOF
1643#line 1644 "configure"
1644#include "confdefs.h"
1645/* Override any gcc2 internal prototype to avoid an error.  */
1646/* We use char because int might match the return type of a gcc2
1647    builtin and then its argument prototype would still apply.  */
1648char listen();
1649
1650int main() {
1651listen()
1652; return 0; }
1653EOF
1654if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1655  rm -rf conftest*
1656  eval "ac_cv_lib_$ac_lib_var=yes"
1657else
1658  echo "configure: failed program was:" >&5
1659  cat conftest.$ac_ext >&5
1660  rm -rf conftest*
1661  eval "ac_cv_lib_$ac_lib_var=no"
1662fi
1663rm -f conftest*
1664LIBS="$ac_save_LIBS"
1665
1666fi
1667if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1668  echo "$ac_t""yes" 1>&6
1669    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1670    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1671  cat >> confdefs.h <<EOF
1672#define $ac_tr_lib 1
1673EOF
1674
1675  LIBS="-lsocket $LIBS"
1676
1677else
1678  echo "$ac_t""no" 1>&6
1679fi
1680
1681echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1682echo "configure:1683: checking for gethostbyname in -lnsl" >&5
1683ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1684if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1685  echo $ac_n "(cached) $ac_c" 1>&6
1686else
1687  ac_save_LIBS="$LIBS"
1688LIBS="-lnsl  $LIBS"
1689cat > conftest.$ac_ext <<EOF
1690#line 1691 "configure"
1691#include "confdefs.h"
1692/* Override any gcc2 internal prototype to avoid an error.  */
1693/* We use char because int might match the return type of a gcc2
1694    builtin and then its argument prototype would still apply.  */
1695char gethostbyname();
1696
1697int main() {
1698gethostbyname()
1699; return 0; }
1700EOF
1701if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702  rm -rf conftest*
1703  eval "ac_cv_lib_$ac_lib_var=yes"
1704else
1705  echo "configure: failed program was:" >&5
1706  cat conftest.$ac_ext >&5
1707  rm -rf conftest*
1708  eval "ac_cv_lib_$ac_lib_var=no"
1709fi
1710rm -f conftest*
1711LIBS="$ac_save_LIBS"
1712
1713fi
1714if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1715  echo "$ac_t""yes" 1>&6
1716    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1717    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1718  cat >> confdefs.h <<EOF
1719#define $ac_tr_lib 1
1720EOF
1721
1722  LIBS="-lnsl $LIBS"
1723
1724else
1725  echo "$ac_t""no" 1>&6
1726fi
1727
1728echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
1729echo "configure:1730: checking for main in -lgmp" >&5
1730ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
1731if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1732  echo $ac_n "(cached) $ac_c" 1>&6
1733else
1734  ac_save_LIBS="$LIBS"
1735LIBS="-lgmp  $LIBS"
1736cat > conftest.$ac_ext <<EOF
1737#line 1738 "configure"
1738#include "confdefs.h"
1739
1740int main() {
1741main()
1742; return 0; }
1743EOF
1744if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1745  rm -rf conftest*
1746  eval "ac_cv_lib_$ac_lib_var=yes"
1747else
1748  echo "configure: failed program was:" >&5
1749  cat conftest.$ac_ext >&5
1750  rm -rf conftest*
1751  eval "ac_cv_lib_$ac_lib_var=no"
1752fi
1753rm -f conftest*
1754LIBS="$ac_save_LIBS"
1755
1756fi
1757if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1758  echo "$ac_t""yes" 1>&6
1759    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1760    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1761  cat >> confdefs.h <<EOF
1762#define $ac_tr_lib 1
1763EOF
1764
1765  LIBS="-lgmp $LIBS"
1766
1767else
1768  echo "$ac_t""no" 1>&6
1769fi
1770
1771echo $ac_n "checking for mpz_init in -lsmallgmp""... $ac_c" 1>&6
1772echo "configure:1773: checking for mpz_init in -lsmallgmp" >&5
1773ac_lib_var=`echo smallgmp'_'mpz_init | sed 'y%./+-%__p_%'`
1774if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1775  echo $ac_n "(cached) $ac_c" 1>&6
1776else
1777  ac_save_LIBS="$LIBS"
1778LIBS="-lsmallgmp  $LIBS"
1779cat > conftest.$ac_ext <<EOF
1780#line 1781 "configure"
1781#include "confdefs.h"
1782/* Override any gcc2 internal prototype to avoid an error.  */
1783/* We use char because int might match the return type of a gcc2
1784    builtin and then its argument prototype would still apply.  */
1785char mpz_init();
1786
1787int main() {
1788mpz_init()
1789; return 0; }
1790EOF
1791if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1792  rm -rf conftest*
1793  eval "ac_cv_lib_$ac_lib_var=yes"
1794else
1795  echo "configure: failed program was:" >&5
1796  cat conftest.$ac_ext >&5
1797  rm -rf conftest*
1798  eval "ac_cv_lib_$ac_lib_var=no"
1799fi
1800rm -f conftest*
1801LIBS="$ac_save_LIBS"
1802
1803fi
1804if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1805  echo "$ac_t""yes" 1>&6
1806    ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1807    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1808  cat >> confdefs.h <<EOF
1809#define $ac_tr_lib 1
1810EOF
1811
1812  LIBS="-lsmallgmp $LIBS"
1813
1814else
1815  echo "$ac_t""no" 1>&6
1816fi
1817
1818echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
1819echo "configure:1820: checking for IMP_PutGmpInt in -lMP" >&5
1820ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
1821if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1822  echo $ac_n "(cached) $ac_c" 1>&6
1823else
1824  ac_save_LIBS="$LIBS"
1825LIBS="-lMP  $LIBS"
1826cat > conftest.$ac_ext <<EOF
1827#line 1828 "configure"
1828#include "confdefs.h"
1829/* Override any gcc2 internal prototype to avoid an error.  */
1830/* We use char because int might match the return type of a gcc2
1831    builtin and then its argument prototype would still apply.  */
1832char IMP_PutGmpInt();
1833
1834int main() {
1835IMP_PutGmpInt()
1836; return 0; }
1837EOF
1838if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1839  rm -rf conftest*
1840  eval "ac_cv_lib_$ac_lib_var=yes"
1841else
1842  echo "configure: failed program was:" >&5
1843  cat conftest.$ac_ext >&5
1844  rm -rf conftest*
1845  eval "ac_cv_lib_$ac_lib_var=no"
1846fi
1847rm -f conftest*
1848LIBS="$ac_save_LIBS"
1849
1850fi
1851if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1852  echo "$ac_t""yes" 1>&6
1853    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1854    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1855  cat >> confdefs.h <<EOF
1856#define $ac_tr_lib 1
1857EOF
1858
1859  LIBS="-lMP $LIBS"
1860
1861else
1862  echo "$ac_t""no" 1>&6
1863fi
1864
1865echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
1866echo "configure:1867: checking for MPT_GetTree in -lMPT" >&5
1867ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
1868if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1869  echo $ac_n "(cached) $ac_c" 1>&6
1870else
1871  ac_save_LIBS="$LIBS"
1872LIBS="-lMPT  $LIBS"
1873cat > conftest.$ac_ext <<EOF
1874#line 1875 "configure"
1875#include "confdefs.h"
1876/* Override any gcc2 internal prototype to avoid an error.  */
1877/* We use char because int might match the return type of a gcc2
1878    builtin and then its argument prototype would still apply.  */
1879char MPT_GetTree();
1880
1881int main() {
1882MPT_GetTree()
1883; return 0; }
1884EOF
1885if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1886  rm -rf conftest*
1887  eval "ac_cv_lib_$ac_lib_var=yes"
1888else
1889  echo "configure: failed program was:" >&5
1890  cat conftest.$ac_ext >&5
1891  rm -rf conftest*
1892  eval "ac_cv_lib_$ac_lib_var=no"
1893fi
1894rm -f conftest*
1895LIBS="$ac_save_LIBS"
1896
1897fi
1898if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1899  echo "$ac_t""yes" 1>&6
1900    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1901    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1902  cat >> confdefs.h <<EOF
1903#define $ac_tr_lib 1
1904EOF
1905
1906  LIBS="-lMPT $LIBS"
1907
1908else
1909  echo "$ac_t""no" 1>&6
1910fi
1911
1912echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
1913echo "configure:1914: checking for atof in -lsingcf" >&5
1914ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
1915if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1916  echo $ac_n "(cached) $ac_c" 1>&6
1917else
1918  ac_save_LIBS="$LIBS"
1919LIBS="-lsingcf  $LIBS"
1920cat > conftest.$ac_ext <<EOF
1921#line 1922 "configure"
1922#include "confdefs.h"
1923/* Override any gcc2 internal prototype to avoid an error.  */
1924/* We use char because int might match the return type of a gcc2
1925    builtin and then its argument prototype would still apply.  */
1926char atof();
1927
1928int main() {
1929atof()
1930; return 0; }
1931EOF
1932if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1933  rm -rf conftest*
1934  eval "ac_cv_lib_$ac_lib_var=yes"
1935else
1936  echo "configure: failed program was:" >&5
1937  cat conftest.$ac_ext >&5
1938  rm -rf conftest*
1939  eval "ac_cv_lib_$ac_lib_var=no"
1940fi
1941rm -f conftest*
1942LIBS="$ac_save_LIBS"
1943
1944fi
1945if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1946  echo "$ac_t""yes" 1>&6
1947    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1948    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1949  cat >> confdefs.h <<EOF
1950#define $ac_tr_lib 1
1951EOF
1952
1953  LIBS="-lsingcf $LIBS"
1954
1955else
1956  echo "$ac_t""no" 1>&6
1957fi
1958
1959echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
1960echo "configure:1961: checking for atof in -lsingfac" >&5
1961ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
1962if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1963  echo $ac_n "(cached) $ac_c" 1>&6
1964else
1965  ac_save_LIBS="$LIBS"
1966LIBS="-lsingfac  $LIBS"
1967cat > conftest.$ac_ext <<EOF
1968#line 1969 "configure"
1969#include "confdefs.h"
1970/* Override any gcc2 internal prototype to avoid an error.  */
1971/* We use char because int might match the return type of a gcc2
1972    builtin and then its argument prototype would still apply.  */
1973char atof();
1974
1975int main() {
1976atof()
1977; return 0; }
1978EOF
1979if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1980  rm -rf conftest*
1981  eval "ac_cv_lib_$ac_lib_var=yes"
1982else
1983  echo "configure: failed program was:" >&5
1984  cat conftest.$ac_ext >&5
1985  rm -rf conftest*
1986  eval "ac_cv_lib_$ac_lib_var=no"
1987fi
1988rm -f conftest*
1989LIBS="$ac_save_LIBS"
1990
1991fi
1992if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1993  echo "$ac_t""yes" 1>&6
1994    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1995    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1996  cat >> confdefs.h <<EOF
1997#define $ac_tr_lib 1
1998EOF
1999
2000  LIBS="-lsingfac $LIBS"
2001
2002else
2003  echo "$ac_t""no" 1>&6
2004fi
2005
2006
2007for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h
2008do
2009ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2010echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2011echo "configure:2012: checking for $ac_hdr" >&5
2012if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2013  echo $ac_n "(cached) $ac_c" 1>&6
2014else
2015  cat > conftest.$ac_ext <<EOF
2016#line 2017 "configure"
2017#include "confdefs.h"
2018#include <$ac_hdr>
2019EOF
2020ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2021{ (eval echo configure:2022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2022ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2023if test -z "$ac_err"; then
2024  rm -rf conftest*
2025  eval "ac_cv_header_$ac_safe=yes"
2026else
2027  echo "$ac_err" >&5
2028  echo "configure: failed program was:" >&5
2029  cat conftest.$ac_ext >&5
2030  rm -rf conftest*
2031  eval "ac_cv_header_$ac_safe=no"
2032fi
2033rm -f conftest*
2034fi
2035if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2036  echo "$ac_t""yes" 1>&6
2037    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2038  cat >> confdefs.h <<EOF
2039#define $ac_tr_hdr 1
2040EOF
2041 
2042else
2043  echo "$ac_t""no" 1>&6
2044fi
2045done
2046
2047
2048if test "$ac_cv_lib_gmp_main" = yes && \
2049 test "$ac_cv_header_gmp_h" = yes; then
2050  ac_gmp_ok=yes
2051fi
2052
2053if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
2054 test "$ac_cv_header_smallgmp_h" = yes && \
2055 test "$ac_cv_header_gmp_h" = yes; then
2056  ac_smallgmp_ok=yes
2057fi
2058
2059if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
2060 test "$ac_cv_lib_MPT_MPT_GetTree" && \
2061 test "$ac_cv_header_MP_h" = yes && \
2062 test "$ac_cv_header_MPT_h" = yes; then
2063  ac_MP_ok=yes
2064fi
2065
2066if test "$ac_cv_lib_singcf_atof" = yes && \
2067 test "$ac_cv_header_factory_h" = yes; then
2068  ac_factory_ok=yes
2069fi
2070
2071if test "$ac_cv_lib_singfac_atof" = yes && \
2072 test "$ac_cv_header_factor_h" = yes; then
2073  ac_libfac_ok=yes
2074fi
2075
2076 
2077# Check whether --with-tmpdir or --without-tmpdir was given.
2078if test "${with_tmpdir+set}" = set; then
2079  withval="$with_tmpdir"
2080  :
2081fi
2082
2083# Check whether --enable-smallgmp or --disable-smallgmp was given.
2084if test "${enable_smallgmp+set}" = set; then
2085  enableval="$enable_smallgmp"
2086  :
2087fi
2088
2089# Check whether --enable-gmp or --disable-gmp was given.
2090if test "${enable_gmp+set}" = set; then
2091  enableval="$enable_gmp"
2092  :
2093fi
2094
2095# Check whether --enable-MP or --disable-MP was given.
2096if test "${enable_MP+set}" = set; then
2097  enableval="$enable_MP"
2098  :
2099fi
2100
2101# Check whether --enable-factory or --disable-factory was given.
2102if test "${enable_factory+set}" = set; then
2103  enableval="$enable_factory"
2104  :
2105fi
2106
2107# Check whether --enable-libfac or --disable-libfac was given.
2108if test "${enable_libfac+set}" = set; then
2109  enableval="$enable_libfac"
2110  :
2111fi
2112
2113# Check whether --enable-sgroup or --disable-sgroup was given.
2114if test "${enable_sgroup+set}" = set; then
2115  enableval="$enable_sgroup"
2116  :
2117fi
2118
2119# Check whether --enable-mtrack or --disable-mtrack was given.
2120if test "${enable_mtrack+set}" = set; then
2121  enableval="$enable_mtrack"
2122  :
2123fi
2124
2125# Check whether --enable-Singular or --disable-Singular was given.
2126if test "${enable_Singular+set}" = set; then
2127  enableval="$enable_Singular"
2128  :
2129fi
2130
2131# Check whether --enable-IntegerProgramming or --disable-IntegerProgramming was given.
2132if test "${enable_IntegerProgramming+set}" = set; then
2133  enableval="$enable_IntegerProgramming"
2134  :
2135fi
2136
2137# Check whether --enable-Plural or --disable-Plural was given.
2138if test "${enable_Plural+set}" = set; then
2139  enableval="$enable_Plural"
2140  :
2141fi
2142
2143# Check whether --enable-Texinfo or --disable-Texinfo was given.
2144if test "${enable_Texinfo+set}" = set; then
2145  enableval="$enable_Texinfo"
2146  :
2147fi
2148
2149# Check whether --enable-Texi2html or --disable-Texi2html was given.
2150if test "${enable_Texi2html+set}" = set; then
2151  enableval="$enable_Texi2html"
2152  :
2153fi
2154
2155# Check whether --enable-doc or --disable-doc was given.
2156if test "${enable_doc+set}" = set; then
2157  enableval="$enable_doc"
2158  :
2159fi
2160
2161# Check whether --enable-emacs or --disable-emacs was given.
2162if test "${enable_emacs+set}" = set; then
2163  enableval="$enable_emacs"
2164  :
2165fi
2166
2167# Check whether --with-MP or --without-MP was given.
2168if test "${with_MP+set}" = set; then
2169  withval="$with_MP"
2170  :
2171fi
2172
2173# Check whether --with-factory or --without-factory was given.
2174if test "${with_factory+set}" = set; then
2175  withval="$with_factory"
2176  :
2177fi
2178
2179# Check whether --with-libfac or --without-libfac was given.
2180if test "${with_libfac+set}" = set; then
2181  withval="$with_libfac"
2182  :
2183fi
2184
2185# Check whether --with-mtrack or --without-mtrack was given.
2186if test "${with_mtrack+set}" = set; then
2187  withval="$with_mtrack"
2188  :
2189fi
2190
2191# Check whether --with-gmp or --without-gmp was given.
2192if test "${with_gmp+set}" = set; then
2193  withval="$with_gmp"
2194  :
2195fi
2196
2197
2198echo $ac_n "checking which tmp dir to use""... $ac_c" 1>&6
2199echo "configure:2200: checking which tmp dir to use" >&5
2200if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then
2201  if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1)
2202  then
2203    TMP_DIR="${pwd}/tmp"
2204  else
2205    TMP_DIR=${with_tmpdir}
2206  fi
2207else
2208  TMP_DIR="${pwd}/tmp"
2209fi
2210echo "$ac_t""$TMP_DIR" 1>&6
2211
2212
2213
2214echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6
2215echo "configure:2216: checking whether to configure and build gmp lib" >&5
2216if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
2217  if test "$ac_gmp_ok" != yes && test -d gmp; then
2218    echo "$ac_t""yes" 1>&6
2219    enable_gmp=yes
2220    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
2221    ac_configure_args="$ac_configure_args --enable-gmp"
2222#    This we used to need for our patched version of gmp 2.x
2223#    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
2224  else
2225    echo "$ac_t""no" 1>&6
2226    enable_gmp=no
2227  fi
2228elif test "$enable_gmp" = yes; then
2229  if test ! -d gmp; then
2230    echo "$ac_t""no" 1>&6
2231    { echo "configure: error: Can not find gmp subdir" 1>&2; exit 1; }
2232  else
2233    echo "$ac_t""yes" 1>&6
2234    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
2235#    This we used to need for our patched version of gmp 2.x
2236#    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
2237  fi
2238else
2239  echo "$ac_t""no" 1>&6
2240fi
2241
2242if test "$enable_gmp" = yes; then
2243# for gmp-3.0 to work for all ix86 processors, set generic target
2244if test "$target" = NONE; then
2245case "$ac_cv_singuname" in
2246        ix86*)
2247        gmp_target=`./config.guess | sed 's/^\w*-/i386-/'`
2248        ac_configure_args="$ac_configure_args --target=$gmp_target"
2249        ;;
2250esac
2251fi
2252# furthermore, disable building of dynamic libraries, for we want to
2253# link against the static ones
2254if test "$enable_shared" != no; then
2255  ac_configure_args="$ac_configure_args --disable-shared"
2256fi
2257fi
2258
2259
2260echo $ac_n "checking whether to configure and build smallgmp lib""... $ac_c" 1>&6
2261echo "configure:2262: checking whether to configure and build smallgmp lib" >&5
2262if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then
2263  if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \
2264     test "$enable_gmp" != yes && test -d smallgmp; then
2265    echo "$ac_t""yes" 1>&6
2266    enable_smallgmp=yes
2267    CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp"
2268    ac_configure_args="$ac_configure_args --enable-smallgmp --enable-gmp"
2269  else
2270    echo "$ac_t""no" 1>&6
2271    enable_smallgmp=no
2272  fi
2273elif test "$enable_smallgmp" = yes; then
2274  if test ! -d smallgmp; then
2275    echo "$ac_t""no" 1>&6
2276    { echo "configure: error: Can not find smallgmp subdir" 1>&2; exit 1; }
2277  else
2278    echo "$ac_t""yes" 1>&6
2279    CONFIG_SUBDIRS="$CONFIG_SUBDIRS smallgmp"
2280    if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then
2281      ac_configure_args="$ac_configure_args --enable-gmp"
2282    fi
2283  fi
2284else
2285  echo "$ac_t""${enable_smallgmp}" 1>&6
2286fi
2287
2288# Check whether we have at least one of smallgmp or gmp
2289if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \
2290   test "$enable_smallgmp" != yes && test "$enable_gmp" != yes; then
2291  { echo "configure: error: can neither find nor built gmp or smallgmp" 1>&2; exit 1; }
2292fi
2293
2294# Check whether we need to cheat subsequent configures with --enable-gmp
2295if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes; then
2296  ac_configure_args="$ac_configure_args --enable-gmp"
2297fi
2298
2299echo $ac_n "checking whether to configure and build MP lib""... $ac_c" 1>&6
2300echo "configure:2301: checking whether to configure and build MP lib" >&5
2301if test "$enable_MP" != yes && test "$enable_MP" != no; then
2302  if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \
2303     (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then
2304    echo "$ac_t""yes" 1>&6
2305    enable_MP=yes
2306    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
2307    ac_configure_args="$ac_configure_args --enable-MP"
2308  else
2309    echo "$ac_t""no" 1>&6
2310    enable_MP=no
2311  fi
2312elif test "$enable_MP" = yes; then
2313  if test ! -d MP; then
2314    echo "$ac_t""no" 1>&6
2315    { echo "configure: error: can not build MP without MP directory" 1>&2; exit 1; }
2316  fi
2317  if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then
2318    echo "$ac_t""yes" 1>&6
2319    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
2320  else
2321    echo "$ac_t""no" 1>&6
2322    { echo "configure: error: can not build MP without gmp" 1>&2; exit 1; }
2323  fi
2324else
2325  echo "$ac_t""no" 1>&6
2326fi
2327 
2328echo $ac_n "checking whether to configure and build factory lib""... $ac_c" 1>&6
2329echo "configure:2330: checking whether to configure and build factory lib" >&5
2330if test "$enable_factory" != yes && test "$enable_factory" != no; then
2331  if test "$with_factory" != no && test "$ac_factory_ok" != yes && \
2332     test -d factory; then
2333    enable_factory=yes
2334    echo "$ac_t""yes" 1>&6
2335    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
2336    ac_configure_args="$ac_configure_args --enable-factory"
2337  else
2338    enable_factory=no
2339    echo "$ac_t""no" 1>&6
2340  fi
2341elif test "$enable_factory" = yes; then
2342  if test -d factory; then
2343    echo "$ac_t""yes" 1>&6
2344    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
2345  else
2346    echo "$ac_t""no" 1>&6
2347    { echo "configure: error: can not build factory without factory directory" 1>&2; exit 1; }
2348  fi
2349else
2350  echo "$ac_t""no" 1>&6
2351fi
2352
2353echo $ac_n "checking whether to configure and build libfac lib""... $ac_c" 1>&6
2354echo "configure:2355: checking whether to configure and build libfac lib" >&5
2355if test "$enable_libfac" != yes && test "$enable_libfac" != no; then
2356  if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \
2357     test -d libfac && \
2358     (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then
2359    enable_libfac=yes
2360    echo "$ac_t""yes" 1>&6
2361    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
2362    ac_configure_args="$ac_configure_args --enable-libfac"
2363  else
2364    enable_libfac=no
2365    echo "$ac_t""no" 1>&6
2366  fi
2367elif  test "$enable_libfac" = yes; then
2368  if test ! -d libfac; then
2369    echo "$ac_t""no" 1>&6
2370    { echo "configure: error: can not build libfac without libfac directory" 1>&2; exit 1; }
2371  fi
2372  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2373    echo "$ac_t""yes" 1>&6
2374    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
2375  else
2376    echo "$ac_t""no" 1>&6
2377    { echo "configure: error: Can not build libfac without factory" 1>&2; exit 1; }
2378  fi
2379else
2380  echo "$ac_t""no" 1>&6
2381fi
2382
2383echo $ac_n "checking whether to configure and build sgroup lib""... $ac_c" 1>&6
2384echo "configure:2385: checking whether to configure and build sgroup lib" >&5
2385if test "$enable_sgroup" = yes; then
2386  if test ! -d sgroup; then
2387    echo "$ac_t""no" 1>&6
2388    { echo "configure: error: can not build sgroup without sgroup directory" 1>&2; exit 1; }
2389  fi
2390  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2391    echo "$ac_t""yes" 1>&6
2392    CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup"
2393  else
2394    echo "$ac_t""no" 1>&6
2395    { echo "configure: error: Can not build sgroup without MP" 1>&2; exit 1; }
2396  fi
2397else
2398  echo "$ac_t""no" 1>&6
2399fi
2400
2401BUILD_SUBDIRS="$CONFIG_SUBDIRS"
2402
2403echo $ac_n "checking whether to build mpr and use mtrack""... $ac_c" 1>&6
2404echo "configure:2405: checking whether to build mpr and use mtrack" >&5
2405if test -d mpr && test "$ac_cv_singuname" = ix86-Linux && test "$enable_mtrack" != no; then
2406  echo "$ac_t""yes" 1>&6
2407  if test "$enable_mtrack" != yes; then
2408     ac_configure_args="$ac_configure_args --enable-mtrack"
2409  fi
2410  enable_mtrack=yes
2411  OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" mpr/Makefile"
2412  BUILD_SUBDIRS="$BUILD_SUBDIRS mpr"
2413else
2414  echo "$ac_t""no" 1>&6
2415  enable_mtrack=no
2416fi
2417
2418echo $ac_n "checking whether to configure and build Singular""... $ac_c" 1>&6
2419echo "configure:2420: checking whether to configure and build Singular" >&5
2420if test "$enable_Singular" != yes && test "$enable_Singular" != no; then
2421  if test "$with_Singular" != no && test -d Singular; then
2422    enable_Singular=yes
2423    echo "$ac_t""yes" 1>&6
2424    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
2425    BUILD_SUBDIRS="$BUILD_SUBDIRS Singular"     
2426    ac_configure_args="$ac_configure_args --enable-Singular"
2427  else
2428    enable_Singular=no
2429    echo "$ac_t""no" 1>&6
2430  fi
2431elif test "$enable_Singular" = yes; then
2432  if test -d Singular; then
2433    echo "$ac_t""yes" 1>&6
2434    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
2435    BUILD_SUBDIRS="$BUILD_SUBDIRS Singular"     
2436  else
2437    echo "$ac_t""no" 1>&6
2438    { echo "configure: error: can not build Singular without Singular directory" 1>&2; exit 1; }
2439  fi
2440else
2441  echo "$ac_t""no" 1>&6
2442fi
2443
2444
2445# test if IntegerProgramming should be built:
2446
2447echo $ac_n "checking whether to build IntegerProgramming""... $ac_c" 1>&6
2448echo "configure:2449: checking whether to build IntegerProgramming" >&5
2449if test "$enable_IntegerProgramming" != no && test -d "IntegerProgramming"; then
2450   BUILD_SUBDIRS="$BUILD_SUBDIRS IntegerProgramming"
2451   echo "$ac_t""yes" 1>&6
2452   if test "$enable_IntegerProgramming" != yes; then
2453     ac_configure_args="$ac_configure_args --enable-IntegerProgramming"
2454   fi
2455else
2456   echo "$ac_t""no" 1>&6
2457fi
2458
2459echo $ac_n "checking whether to build Plural""... $ac_c" 1>&6
2460echo "configure:2461: checking whether to build Plural" >&5
2461if test "$enable_Plural" != no && test -d "Plural"; then
2462   BUILD_SUBDIRS="$BUILD_SUBDIRS Plural"
2463   echo "$ac_t""yes" 1>&6
2464   if test "$enable_Plural" != yes; then
2465     ac_configure_args="$ac_configure_args --enable-Plural"
2466   fi
2467else
2468   echo "$ac_t""no" 1>&6
2469fi
2470
2471
2472echo $ac_n "checking whether to configure and build Texinfo""... $ac_c" 1>&6
2473echo "configure:2474: checking whether to configure and build Texinfo" >&5
2474if test "$enable_Texinfo" != no && test -d Texinfo; then
2475  echo "$ac_t""yes" 1>&6
2476  enable_texinfo=yes
2477  CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo"
2478  BUILD_SUBDIRS="$BUILD_SUBDIRS Texinfo"       
2479  TEXI2DVI=${bindir}/texi2dvi
2480  MAKEINFO="${bindir}/makeinfo"
2481  TEXINDEX=${bindir}/texindex
2482 
2483 
2484 
2485  if test "$enable_Texinfo" != yes; then
2486    ac_configure_args="$ac_configure_args --enable-Texinfo"
2487  fi
2488else
2489  echo "$ac_t""no" 1>&6
2490  echo "configure: warning: Building of doc might fail. Need Texinfo" 1>&2
2491  enable_texinfo=no
2492  # Extract the first word of "makeinfo", so it can be a program name with args.
2493set dummy makeinfo; ac_word=$2
2494echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2495echo "configure:2496: checking for $ac_word" >&5
2496if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2497  echo $ac_n "(cached) $ac_c" 1>&6
2498else
2499  if test -n "$MAKEINFO"; then
2500  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2501else
2502  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2503  ac_dummy="$PATH"
2504  for ac_dir in $ac_dummy; do
2505    test -z "$ac_dir" && ac_dir=.
2506    if test -f $ac_dir/$ac_word; then
2507      ac_cv_prog_MAKEINFO="makeinfo"
2508      break
2509    fi
2510  done
2511  IFS="$ac_save_ifs"
2512  test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="${pwd}/warn_not_found.sh makeinfo"
2513fi
2514fi
2515MAKEINFO="$ac_cv_prog_MAKEINFO"
2516if test -n "$MAKEINFO"; then
2517  echo "$ac_t""$MAKEINFO" 1>&6
2518else
2519  echo "$ac_t""no" 1>&6
2520fi
2521
2522  # Extract the first word of "texi2dvi", so it can be a program name with args.
2523set dummy texi2dvi; ac_word=$2
2524echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2525echo "configure:2526: checking for $ac_word" >&5
2526if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then
2527  echo $ac_n "(cached) $ac_c" 1>&6
2528else
2529  if test -n "$TEXI2DVI"; then
2530  ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test.
2531else
2532  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2533  ac_dummy="$PATH"
2534  for ac_dir in $ac_dummy; do
2535    test -z "$ac_dir" && ac_dir=.
2536    if test -f $ac_dir/$ac_word; then
2537      ac_cv_prog_TEXI2DVI="texi2dvi"
2538      break
2539    fi
2540  done
2541  IFS="$ac_save_ifs"
2542  test -z "$ac_cv_prog_TEXI2DVI" && ac_cv_prog_TEXI2DVI="${pwd}/warn_not_found.sh texi2dvi"
2543fi
2544fi
2545TEXI2DVI="$ac_cv_prog_TEXI2DVI"
2546if test -n "$TEXI2DVI"; then
2547  echo "$ac_t""$TEXI2DVI" 1>&6
2548else
2549  echo "$ac_t""no" 1>&6
2550fi
2551
2552  # Extract the first word of "texindex", so it can be a program name with args.
2553set dummy texindex; ac_word=$2
2554echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2555echo "configure:2556: checking for $ac_word" >&5
2556if eval "test \"`echo '$''{'ac_cv_prog_TEXINDEX'+set}'`\" = set"; then
2557  echo $ac_n "(cached) $ac_c" 1>&6
2558else
2559  if test -n "$TEXINDEX"; then
2560  ac_cv_prog_TEXINDEX="$TEXINDEX" # Let the user override the test.
2561else
2562  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2563  ac_dummy="$PATH"
2564  for ac_dir in $ac_dummy; do
2565    test -z "$ac_dir" && ac_dir=.
2566    if test -f $ac_dir/$ac_word; then
2567      ac_cv_prog_TEXINDEX="texindex"
2568      break
2569    fi
2570  done
2571  IFS="$ac_save_ifs"
2572  test -z "$ac_cv_prog_TEXINDEX" && ac_cv_prog_TEXINDEX="${pwd}/warn_not_found.sh texindex"
2573fi
2574fi
2575TEXINDEX="$ac_cv_prog_TEXINDEX"
2576if test -n "$TEXINDEX"; then
2577  echo "$ac_t""$TEXINDEX" 1>&6
2578else
2579  echo "$ac_t""no" 1>&6
2580fi
2581
2582fi 
2583
2584echo $ac_n "checking whether to configure and build Texi2html""... $ac_c" 1>&6
2585echo "configure:2586: checking whether to configure and build Texi2html" >&5
2586if test "$enable_Texi2html" != no && test -d Texi2html; then
2587 echo "$ac_t""yes" 1>&6
2588 CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texi2html"
2589 BUILD_SUBDIRS="$BUILD_SUBDIRS Texi2html"
2590 if test "$enable_Texi2html" != yes; then
2591   ac_configure_args="$ac_configure_args --enable-Texi2html"
2592 fi
2593 TEXI2HTML=${bindir}/texi2html
2594 
2595else
2596 echo "$ac_t""no" 1>&6
2597 # Extract the first word of "texi2html", so it can be a program name with args.
2598set dummy texi2html; ac_word=$2
2599echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2600echo "configure:2601: checking for $ac_word" >&5
2601if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then
2602  echo $ac_n "(cached) $ac_c" 1>&6
2603else
2604  if test -n "$TEXI2HTML"; then
2605  ac_cv_prog_TEXI2HTML="$TEXI2HTML" # Let the user override the test.
2606else
2607  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2608  ac_dummy="$PATH"
2609  for ac_dir in $ac_dummy; do
2610    test -z "$ac_dir" && ac_dir=.
2611    if test -f $ac_dir/$ac_word; then
2612      ac_cv_prog_TEXI2HTML="texi2html"
2613      break
2614    fi
2615  done
2616  IFS="$ac_save_ifs"
2617fi
2618fi
2619TEXI2HTML="$ac_cv_prog_TEXI2HTML"
2620if test -n "$TEXI2HTML"; then
2621  echo "$ac_t""$TEXI2HTML" 1>&6
2622else
2623  echo "$ac_t""no" 1>&6
2624fi
2625
2626fi
2627
2628if test "${TEXI2HTML+set}" != set; then
2629echo "configure: warning: texi2html not found. HTML doc generation will fail" 1>&2
2630fi
2631if test "$ac_cv_prog_LATEX2HTML" = latex2html; then
2632  TEXI2HTML_OPTS="-l2h"
2633fi
2634
2635
2636
2637echo $ac_n "checking whether to build doc""... $ac_c" 1>&6
2638echo "configure:2639: checking whether to build doc" >&5
2639if test "$enable_doc" != no && test -d doc; then
2640 echo "$ac_t""yes" 1>&6
2641 BUILD_SUBDIRS="$BUILD_SUBDIRS doc"
2642 if test "$enable_doc" != yes; then
2643   enable_doc=yes
2644   ac_configure_args="$ac_configure_args --enable-doc"
2645 fi
2646else
2647 enable_doc=no
2648 echo "$ac_t""no" 1>&6
2649fi
2650
2651echo $ac_n "checking whether to build emacs""... $ac_c" 1>&6
2652echo "configure:2653: checking whether to build emacs" >&5
2653if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then
2654 echo "$ac_t""yes" 1>&6
2655 BUILD_SUBDIRS="$BUILD_SUBDIRS emacs"
2656 if test "$enable_emacs" != yes; then
2657   ac_configure_args="$ac_configure_args --enable-emacs"
2658 fi
2659else
2660 echo "$ac_t""no" 1>&6
2661fi
2662
2663echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
2664echo "configure:2665: checking which apint package to use" >&5
2665if test "$with_apint" = gmp; then
2666  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
2667    echo "$ac_t""gmp" 1>&6
2668  else
2669    echo "$ac_t""none" 1>&6
2670    { echo "configure: error: can not use with gmp without finding or building it" 1>&2; exit 1; }
2671  fi
2672elif test "$with_apint" = smallgmp; then
2673  if test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then
2674    echo "$ac_t""smallgmp" 1>&6
2675  else
2676    echo "$ac_t""none" 1>&6
2677    { echo "configure: error: can not use with smallgmp without finding or building it" 1>&2; exit 1; }
2678  fi
2679elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then
2680    echo "$ac_t""gmp" 1>&6
2681    ac_configure_args="$ac_configure_args --with-apint=gmp"
2682else
2683   echo "$ac_t""smallgmp" 1>&6
2684   ac_configure_args="$ac_configure_args --with-apint=smallgmp"
2685fi
2686
2687echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
2688echo "configure:2689: checking whether to use with MP" >&5
2689if test "$with_MP" = yes; then
2690  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2691    echo "$ac_t""yes" 1>&6
2692  else
2693    echo "$ac_t""none" 1>&6
2694    { echo "configure: error: can not use with MP without finding or building it" 1>&2; exit 1; }
2695  fi
2696elif test "$with_MP" = no; then
2697  echo "$ac_t""no" 1>&6
2698elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2699  echo "$ac_t""yes" 1>&6
2700  ac_configure_args="$ac_configure_args --with-MP"
2701else
2702  echo "$ac_t""no" 1>&6
2703  ac_configure_args="$ac_configure_args --without-MP"
2704fi
2705
2706echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
2707echo "configure:2708: checking whether to use with factory" >&5
2708if test "$with_factory" = yes; then
2709  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2710    echo "$ac_t""yes" 1>&6
2711  else
2712    echo "$ac_t""none" 1>&6
2713    { echo "configure: error: can not use with factory without finding or building it" 1>&2; exit 1; }
2714  fi
2715elif test "$with_factory" = no; then
2716  echo "$ac_t""no" 1>&6
2717elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2718  echo "$ac_t""yes" 1>&6
2719  ac_configure_args="$ac_configure_args --with-factory"
2720else
2721  echo "$ac_t""no" 1>&6
2722  ac_configure_args="$ac_configure_args --without-factory"
2723fi
2724 
2725echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
2726echo "configure:2727: checking whether to use with libfac" >&5
2727if test "$with_libfac" = yes; then
2728  if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
2729    echo "$ac_t""yes" 1>&6
2730  else
2731    echo "$ac_t""none" 1>&6
2732    { echo "configure: error: can not use with libfac without finding or building it" 1>&2; exit 1; }
2733  fi
2734elif test "$with_libfac" = no; then
2735  echo "$ac_t""no" 1>&6
2736elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
2737  echo "$ac_t""yes" 1>&6
2738  ac_configure_args="$ac_configure_args --with-libfac"
2739else
2740  echo "$ac_t""no" 1>&6
2741  ac_configure_args="$ac_configure_args --without-libfac"
2742fi
2743
2744
2745echo $ac_n "checking whether to use with mtrack""... $ac_c" 1>&6
2746echo "configure:2747: checking whether to use with mtrack" >&5
2747if test "$with_mtrack" != no && test "$with_mtrack" != yes; then
2748  if test "$enable_mtrack" = yes; then
2749    with_mtrack=yes
2750  else
2751    with_mtrack=no
2752  fi
2753  ac_configure_args="$ac_configure_args --with-mtrack=$with_mtrack"
2754elif test "$with_mtrack" = yes && test "$enable_mtrack" != yes; then
2755  with_mtrack=no
2756  ac_configure_args="$ac_configure_args --with-mtrack=no"
2757fi
2758if test "$with_mtrack" != yes; then
2759  echo "$ac_t""no" 1>&6
2760else
2761  echo "$ac_t""yes" 1>&6
2762fi
2763
2764
2765echo $ac_n "checking whether to use with Singular""... $ac_c" 1>&6
2766echo "configure:2767: checking whether to use with Singular" >&5
2767if test "$with_Singular" != no && test "$with_Singular" != yes; then
2768  if test "$enable_Singular" = yes; then
2769    with_Singular=yes
2770  else
2771    with_Singular=no
2772  fi
2773  ac_configure_args="$ac_configure_args --with-Singular=$with_Singular"
2774fi
2775
2776if test "$with_Singular" != no; then
2777  echo "$ac_t""yes" 1>&6
2778else
2779  echo "$ac_t""no" 1>&6
2780fi
2781
2782
2783SUBDIRS=""
2784if test -d smallgmp; then
2785  SUBDIRS="$SUBDIRS smallgmp"
2786fi
2787if test -d gmp; then
2788  SUBDIRS="$SUBDIRS gmp"
2789fi
2790if test -d MP; then
2791  SUBDIRS="$SUBDIRS MP"
2792fi
2793if test -d factory; then
2794  SUBDIRS="$SUBDIRS factory"
2795fi
2796if test -d libfac; then
2797  SUBDIRS="$SUBDIRS libfac"
2798fi
2799if test -d mpr; then
2800  SUBDIRS="$SUBDIRS mpr"
2801fi
2802if test -d sgroup; then
2803  SUBDIRS="$SUBDIRS sgroup"
2804fi
2805if test -d Singular; then
2806  SUBDIRS="$SUBDIRS Singular"
2807fi
2808if test -d Texinfo; then
2809  SUBDIRS="$SUBDIRS Texinfo"
2810fi
2811if test -d Texi2html; then
2812  SUBDIRS="$SUBDIRS Texi2html"
2813fi
2814if test -d doc; then
2815  SUBDIRS="$SUBDIRS doc"
2816fi
2817if test -d emacs; then
2818  SUBDIRS="$SUBDIRS emacs"
2819fi
2820if test -d rpm; then
2821  SUBDIRS="$SUBDIRS rpm"
2822fi
2823 
2824
2825
2826echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2827echo "configure:2828: checking whether ${MAKE-make} sets \${MAKE}" >&5
2828set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2829if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2830  echo $ac_n "(cached) $ac_c" 1>&6
2831else
2832  cat > conftestmake <<\EOF
2833all:
2834        @echo 'ac_maketemp="${MAKE}"'
2835EOF
2836# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2837eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2838if test -n "$ac_maketemp"; then
2839  eval ac_cv_prog_make_${ac_make}_set=yes
2840else
2841  eval ac_cv_prog_make_${ac_make}_set=no
2842fi
2843rm -f conftestmake
2844fi
2845if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2846  echo "$ac_t""yes" 1>&6
2847  SET_MAKE=
2848else
2849  echo "$ac_t""no" 1>&6
2850  SET_MAKE="MAKE=${MAKE-make}"
2851fi
2852
2853
2854
2855
2856subdirs="$CONFIG_SUBDIRS"
2857 
2858
2859trap '' 1 2 15
2860cat > confcache <<\EOF
2861# This file is a shell script that caches the results of configure
2862# tests run on this system so they can be shared between configure
2863# scripts and configure runs.  It is not useful on other systems.
2864# If it contains results you don't want to keep, you may remove or edit it.
2865#
2866# By default, configure uses ./config.cache as the cache file,
2867# creating it if it does not exist already.  You can give configure
2868# the --cache-file=FILE option to use a different cache file; that is
2869# what configure does when it calls configure scripts in
2870# subdirectories, so they share the cache.
2871# Giving --cache-file=/dev/null disables caching, for debugging configure.
2872# config.status only pays attention to the cache file if you give it the
2873# --recheck option to rerun configure.
2874#
2875EOF
2876# The following way of writing the cache mishandles newlines in values,
2877# but we know of no workaround that is simple, portable, and efficient.
2878# So, don't put newlines in cache variables' values.
2879# Ultrix sh set writes to stderr and can't be redirected directly,
2880# and sets the high bit in the cache file unless we assign to the vars.
2881(set) 2>&1 |
2882  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2883  *ac_space=\ *)
2884    # `set' does not quote correctly, so add quotes (double-quote substitution
2885    # turns \\\\ into \\, and sed turns \\ into \).
2886    sed -n \
2887      -e "s/'/'\\\\''/g" \
2888      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2889    ;;
2890  *)
2891    # `set' quotes correctly as required by POSIX, so do not add quotes.
2892    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2893    ;;
2894  esac >> confcache
2895if cmp -s $cache_file confcache; then
2896  :
2897else
2898  if test -w $cache_file; then
2899    echo "updating cache $cache_file"
2900    cat confcache > $cache_file
2901  else
2902    echo "not updating unwritable cache $cache_file"
2903  fi
2904fi
2905rm -f confcache
2906
2907trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2908
2909test "x$prefix" = xNONE && prefix=$ac_default_prefix
2910# Let make expand exec_prefix.
2911test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2912
2913# Any assignment to VPATH causes Sun make to only execute
2914# the first set of double-colon rules, so remove it if not needed.
2915# If there is a colon in the path, we need to keep it.
2916if test "x$srcdir" = x.; then
2917  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2918fi
2919
2920trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2921
2922# Transform confdefs.h into DEFS.
2923# Protect against shell expansion while executing Makefile rules.
2924# Protect against Makefile macro expansion.
2925cat > conftest.defs <<\EOF
2926s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2927s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2928s%\[%\\&%g
2929s%\]%\\&%g
2930s%\$%$$%g
2931EOF
2932DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2933rm -f conftest.defs
2934
2935
2936# Without the "./", some shells look in PATH for config.status.
2937: ${CONFIG_STATUS=./config.status}
2938
2939echo creating $CONFIG_STATUS
2940rm -f $CONFIG_STATUS
2941cat > $CONFIG_STATUS <<EOF
2942#! /bin/sh
2943# Generated automatically by configure.
2944# Run this file to recreate the current configuration.
2945# This directory was configured as follows,
2946# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2947#
2948# $0 $ac_configure_args
2949#
2950# Compiler output produced by configure, useful for debugging
2951# configure, is in ./config.log if it exists.
2952
2953ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2954for ac_option
2955do
2956  case "\$ac_option" in
2957  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2958    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2959    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2960  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2961    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2962    exit 0 ;;
2963  -help | --help | --hel | --he | --h)
2964    echo "\$ac_cs_usage"; exit 0 ;;
2965  *) echo "\$ac_cs_usage"; exit 1 ;;
2966  esac
2967done
2968
2969ac_given_srcdir=$srcdir
2970ac_given_INSTALL="$INSTALL"
2971
2972trap 'rm -fr `echo "${OUTPUT_MAKEFILES}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2973EOF
2974cat >> $CONFIG_STATUS <<EOF
2975
2976# Protect against being on the right side of a sed subst in config.status.
2977sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2978 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2979$ac_vpsub
2980$extrasub
2981s%@SHELL@%$SHELL%g
2982s%@CFLAGS@%$CFLAGS%g
2983s%@CPPFLAGS@%$CPPFLAGS%g
2984s%@CXXFLAGS@%$CXXFLAGS%g
2985s%@FFLAGS@%$FFLAGS%g
2986s%@DEFS@%$DEFS%g
2987s%@LDFLAGS@%$LDFLAGS%g
2988s%@LIBS@%$LIBS%g
2989s%@exec_prefix@%$exec_prefix%g
2990s%@prefix@%$prefix%g
2991s%@program_transform_name@%$program_transform_name%g
2992s%@bindir@%$bindir%g
2993s%@sbindir@%$sbindir%g
2994s%@libexecdir@%$libexecdir%g
2995s%@datadir@%$datadir%g
2996s%@sysconfdir@%$sysconfdir%g
2997s%@sharedstatedir@%$sharedstatedir%g
2998s%@localstatedir@%$localstatedir%g
2999s%@libdir@%$libdir%g
3000s%@includedir@%$includedir%g
3001s%@oldincludedir@%$oldincludedir%g
3002s%@infodir@%$infodir%g
3003s%@mandir@%$mandir%g
3004s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
3005s%@VERSION_DATE@%$VERSION_DATE%g
3006s%@SINGULAR_SHORT_VERSION@%$SINGULAR_SHORT_VERSION%g
3007s%@SINGULAR_ROOT_DIR@%$SINGULAR_ROOT_DIR%g
3008s%@SINGUNAME@%$SINGUNAME%g
3009s%@SING_UNAME@%$SING_UNAME%g
3010s%@CC@%$CC%g
3011s%@CPP@%$CPP%g
3012s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3013s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3014s%@INSTALL_DATA@%$INSTALL_DATA%g
3015s%@CXX@%$CXX%g
3016s%@PIPE@%$PIPE%g
3017s%@PERL@%$PERL%g
3018s%@UUDECODE@%$UUDECODE%g
3019s%@GUNZIP@%$GUNZIP%g
3020s%@MYGZIP@%$MYGZIP%g
3021s%@LATEX2HTML@%$LATEX2HTML%g
3022s%@LN_S@%$LN_S%g
3023s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3024s%@SINGULAR@%$SINGULAR%g
3025s%@TMP_DIR@%$TMP_DIR%g
3026s%@TEXI2DVI@%$TEXI2DVI%g
3027s%@MAKEINFO@%$MAKEINFO%g
3028s%@TEXINDEX@%$TEXINDEX%g
3029s%@TEXI2HTML@%$TEXI2HTML%g
3030s%@TEXI2HTML_OPTS@%$TEXI2HTML_OPTS%g
3031s%@SET_MAKE@%$SET_MAKE%g
3032s%@SUBDIRS@%$SUBDIRS%g
3033s%@BUILD_SUBDIRS@%$BUILD_SUBDIRS%g
3034s%@CONFIG_SUBDIRS@%$CONFIG_SUBDIRS%g
3035s%@subdirs@%$subdirs%g
3036
3037CEOF
3038EOF
3039
3040cat >> $CONFIG_STATUS <<\EOF
3041
3042# Split the substitutions into bite-sized pieces for seds with
3043# small command number limits, like on Digital OSF/1 and HP-UX.
3044ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3045ac_file=1 # Number of current file.
3046ac_beg=1 # First line for current file.
3047ac_end=$ac_max_sed_cmds # Line after last line for current file.
3048ac_more_lines=:
3049ac_sed_cmds=""
3050while $ac_more_lines; do
3051  if test $ac_beg -gt 1; then
3052    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3053  else
3054    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3055  fi
3056  if test ! -s conftest.s$ac_file; then
3057    ac_more_lines=false
3058    rm -f conftest.s$ac_file
3059  else
3060    if test -z "$ac_sed_cmds"; then
3061      ac_sed_cmds="sed -f conftest.s$ac_file"
3062    else
3063      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3064    fi
3065    ac_file=`expr $ac_file + 1`
3066    ac_beg=$ac_end
3067    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3068  fi
3069done
3070if test -z "$ac_sed_cmds"; then
3071  ac_sed_cmds=cat
3072fi
3073EOF
3074
3075cat >> $CONFIG_STATUS <<EOF
3076
3077CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
3078EOF
3079cat >> $CONFIG_STATUS <<\EOF
3080for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3081  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3082  case "$ac_file" in
3083  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3084       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3085  *) ac_file_in="${ac_file}.in" ;;
3086  esac
3087
3088  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3089
3090  # Remove last slash and all that follows it.  Not all systems have dirname.
3091  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3092  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3093    # The file is in a subdirectory.
3094    test ! -d "$ac_dir" && mkdir "$ac_dir"
3095    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3096    # A "../" for each directory in $ac_dir_suffix.
3097    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3098  else
3099    ac_dir_suffix= ac_dots=
3100  fi
3101
3102  case "$ac_given_srcdir" in
3103  .)  srcdir=.
3104      if test -z "$ac_dots"; then top_srcdir=.
3105      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3106  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3107  *) # Relative path.
3108    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3109    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3110  esac
3111
3112  case "$ac_given_INSTALL" in
3113  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3114  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3115  esac
3116
3117  echo creating "$ac_file"
3118  rm -f "$ac_file"
3119  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3120  case "$ac_file" in
3121  *Makefile*) ac_comsub="1i\\
3122# $configure_input" ;;
3123  *) ac_comsub= ;;
3124  esac
3125
3126  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3127  sed -e "$ac_comsub
3128s%@configure_input@%$configure_input%g
3129s%@srcdir@%$srcdir%g
3130s%@top_srcdir@%$top_srcdir%g
3131s%@INSTALL@%$INSTALL%g
3132" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3133fi; done
3134rm -f conftest.s*
3135
3136EOF
3137cat >> $CONFIG_STATUS <<EOF
3138
3139EOF
3140cat >> $CONFIG_STATUS <<\EOF
3141
3142exit 0
3143EOF
3144chmod +x $CONFIG_STATUS
3145rm -fr confdefs* $ac_clean_files
3146test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3147
3148if test "$no_recursion" != yes; then
3149
3150  # Remove --cache-file and --srcdir arguments so they do not pile up.
3151  ac_sub_configure_args=
3152  ac_prev=
3153  for ac_arg in $ac_configure_args; do
3154    if test -n "$ac_prev"; then
3155      ac_prev=
3156      continue
3157    fi
3158    case "$ac_arg" in
3159    -cache-file | --cache-file | --cache-fil | --cache-fi \
3160    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3161      ac_prev=cache_file ;;
3162    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3163    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3164      ;;
3165    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3166      ac_prev=srcdir ;;
3167    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3168      ;;
3169    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3170    esac
3171  done
3172
3173  for ac_config_dir in $CONFIG_SUBDIRS; do
3174
3175    # Do not complain, so a configure script can configure whichever
3176    # parts of a large source tree are present.
3177    if test ! -d $srcdir/$ac_config_dir; then
3178      continue
3179    fi
3180
3181    echo configuring in $ac_config_dir
3182
3183    case "$srcdir" in
3184    .) ;;
3185    *)
3186      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3187      else
3188        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3189      fi
3190      ;;
3191    esac
3192
3193    ac_popdir=`pwd`
3194    cd $ac_config_dir
3195
3196      # A "../" for each directory in /$ac_config_dir.
3197      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3198
3199    case "$srcdir" in
3200    .) # No --srcdir option.  We are building in place.
3201      ac_sub_srcdir=$srcdir ;;
3202    /*) # Absolute path.
3203      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3204    *) # Relative path.
3205      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3206    esac
3207
3208    # Check for guested configure; otherwise get Cygnus style configure.
3209    if test -f $ac_sub_srcdir/configure; then
3210      ac_sub_configure=$ac_sub_srcdir/configure
3211    elif test -f $ac_sub_srcdir/configure.in; then
3212      ac_sub_configure=$ac_configure
3213    else
3214      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3215      ac_sub_configure=
3216    fi
3217
3218    # The recursion is here.
3219    if test -n "$ac_sub_configure"; then
3220
3221      # Make the cache file name correct relative to the subdirectory.
3222      case "$cache_file" in
3223      /*) ac_sub_cache_file=$cache_file ;;
3224      *) # Relative path.
3225        ac_sub_cache_file="$ac_dots$cache_file" ;;
3226      esac
3227  case "$ac_given_INSTALL" in
3228        [/$]*) INSTALL="$ac_given_INSTALL" ;;
3229        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3230        esac
3231
3232      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3233      # The eval makes quoting arguments work.
3234      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3235      then :
3236      else
3237        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3238      fi
3239    fi
3240
3241    cd $ac_popdir
3242  done
3243fi
3244
Note: See TracBrowser for help on using the repository browser.