source: git/Singular/configure @ 4e595a7

spielwiese
Last change on this file since 4e595a7 was 4e595a7, checked in by Olaf Bachmann <obachman@…>, 27 years ago
Thu Jun 5 15:16:19 1997 Olaf Bachmann <obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)> * added MPtcp fork link mode, which is now default MPtcp mode; documented it; included in mpcheck git-svn-id: file:///usr/local/Singular/svn/trunk@371 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 90.6 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.9
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  --without-readline   do not use readline for fancy display"
17ac_help="$ac_help
18  --without-gmp        do not use gmp library"
19ac_help="$ac_help
20  --without-MP         do not use MP (disables MP links)"
21ac_help="$ac_help
22  --without-dbm        do not use dbm (disables DBM links)"
23ac_help="$ac_help
24  --without-info       do not use info for help (use buildin help, instead)"
25ac_help="$ac_help
26  --without-dld        do not use dld (disables dynamic linking)"
27ac_help="$ac_help
28  --without-factory    do not use factory (disables poly factorization)"
29ac_help="$ac_help
30  --without-libfac     do not use libfac (disables primary decompositions)"
31
32# Initialize some variables set by options.
33# The variables have the same names as the options, with
34# dashes changed to underlines.
35build=NONE
36cache_file=./config.cache
37exec_prefix=NONE
38host=NONE
39no_create=
40nonopt=NONE
41no_recursion=
42prefix=NONE
43program_prefix=NONE
44program_suffix=NONE
45program_transform_name=s,x,x,
46silent=
47site=
48srcdir=
49target=NONE
50verbose=
51x_includes=NONE
52x_libraries=NONE
53bindir='${exec_prefix}/bin'
54sbindir='${exec_prefix}/sbin'
55libexecdir='${exec_prefix}/libexec'
56datadir='${prefix}/share'
57sysconfdir='${prefix}/etc'
58sharedstatedir='${prefix}/com'
59localstatedir='${prefix}/var'
60libdir='${exec_prefix}/lib'
61includedir='${prefix}/include'
62oldincludedir='/usr/include'
63infodir='${prefix}/info'
64mandir='${prefix}/man'
65
66# Initialize some other variables.
67subdirs=
68MFLAGS= MAKEFLAGS=
69
70ac_prev=
71for ac_option
72do
73
74  # If the previous option needs an argument, assign it.
75  if test -n "$ac_prev"; then
76    eval "$ac_prev=\$ac_option"
77    ac_prev=
78    continue
79  fi
80
81  case "$ac_option" in
82  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
83  *) ac_optarg= ;;
84  esac
85
86  # Accept the important Cygnus configure options, so we can diagnose typos.
87
88  case "$ac_option" in
89
90  -bindir | --bindir | --bindi | --bind | --bin | --bi)
91    ac_prev=bindir ;;
92  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
93    bindir="$ac_optarg" ;;
94
95  -build | --build | --buil | --bui | --bu)
96    ac_prev=build ;;
97  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
98    build="$ac_optarg" ;;
99
100  -cache-file | --cache-file | --cache-fil | --cache-fi \
101  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
102    ac_prev=cache_file ;;
103  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
104  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
105    cache_file="$ac_optarg" ;;
106
107  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
108    ac_prev=datadir ;;
109  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
110  | --da=*)
111    datadir="$ac_optarg" ;;
112
113  -disable-* | --disable-*)
114    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
115    # Reject names that are not valid shell variable names.
116    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
117      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118    fi
119    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120    eval "enable_${ac_feature}=no" ;;
121
122  -enable-* | --enable-*)
123    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
124    # Reject names that are not valid shell variable names.
125    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
126      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127    fi
128    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129    case "$ac_option" in
130      *=*) ;;
131      *) ac_optarg=yes ;;
132    esac
133    eval "enable_${ac_feature}='$ac_optarg'" ;;
134
135  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
136  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
137  | --exec | --exe | --ex)
138    ac_prev=exec_prefix ;;
139  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
140  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
141  | --exec=* | --exe=* | --ex=*)
142    exec_prefix="$ac_optarg" ;;
143
144  -gas | --gas | --ga | --g)
145    # Obsolete; use --with-gas.
146    with_gas=yes ;;
147
148  -help | --help | --hel | --he)
149    # Omit some internal or obsolete options to make the list less imposing.
150    # This message is too long to be a string in the A/UX 3.1 sh.
151    cat << EOF
152Usage: configure [options] [host]
153Options: [defaults in brackets after descriptions]
154Configuration:
155  --cache-file=FILE       cache test results in FILE
156  --help                  print this message
157  --no-create             do not create output files
158  --quiet, --silent       do not print \`checking...' messages
159  --version               print the version of autoconf that created configure
160Directory and file names:
161  --prefix=PREFIX         install architecture-independent files in PREFIX
162                          [$ac_default_prefix]
163  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
164                          [same as prefix]
165  --bindir=DIR            user executables in DIR [EPREFIX/bin]
166  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
167  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
168  --datadir=DIR           read-only architecture-independent data in DIR
169                          [PREFIX/share]
170  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
171  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
172                          [PREFIX/com]
173  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
174  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
175  --includedir=DIR        C header files in DIR [PREFIX/include]
176  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
177  --infodir=DIR           info documentation in DIR [PREFIX/info]
178  --mandir=DIR            man documentation in DIR [PREFIX/man]
179  --srcdir=DIR            find the sources in DIR [configure dir or ..]
180  --program-prefix=PREFIX prepend PREFIX to installed program names
181  --program-suffix=SUFFIX append SUFFIX to installed program names
182  --program-transform-name=PROGRAM
183                          run sed PROGRAM on installed program names
184EOF
185    cat << EOF
186Host type:
187  --build=BUILD           configure for building on BUILD [BUILD=HOST]
188  --host=HOST             configure for HOST [guessed]
189  --target=TARGET         configure for TARGET [TARGET=HOST]
190Features and packages:
191  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
192  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
193  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
194  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
195  --x-includes=DIR        X include files are in DIR
196  --x-libraries=DIR       X library files are in DIR
197EOF
198    if test -n "$ac_help"; then
199      echo "--enable and --with options recognized:$ac_help"
200    fi
201    exit 0 ;;
202
203  -host | --host | --hos | --ho)
204    ac_prev=host ;;
205  -host=* | --host=* | --hos=* | --ho=*)
206    host="$ac_optarg" ;;
207
208  -includedir | --includedir | --includedi | --included | --include \
209  | --includ | --inclu | --incl | --inc)
210    ac_prev=includedir ;;
211  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
212  | --includ=* | --inclu=* | --incl=* | --inc=*)
213    includedir="$ac_optarg" ;;
214
215  -infodir | --infodir | --infodi | --infod | --info | --inf)
216    ac_prev=infodir ;;
217  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
218    infodir="$ac_optarg" ;;
219
220  -libdir | --libdir | --libdi | --libd)
221    ac_prev=libdir ;;
222  -libdir=* | --libdir=* | --libdi=* | --libd=*)
223    libdir="$ac_optarg" ;;
224
225  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
226  | --libexe | --libex | --libe)
227    ac_prev=libexecdir ;;
228  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
229  | --libexe=* | --libex=* | --libe=*)
230    libexecdir="$ac_optarg" ;;
231
232  -localstatedir | --localstatedir | --localstatedi | --localstated \
233  | --localstate | --localstat | --localsta | --localst \
234  | --locals | --local | --loca | --loc | --lo)
235    ac_prev=localstatedir ;;
236  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
237  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
238  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
239    localstatedir="$ac_optarg" ;;
240
241  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
242    ac_prev=mandir ;;
243  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
244    mandir="$ac_optarg" ;;
245
246  -nfp | --nfp | --nf)
247    # Obsolete; use --without-fp.
248    with_fp=no ;;
249
250  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
251  | --no-cr | --no-c)
252    no_create=yes ;;
253
254  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
255  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256    no_recursion=yes ;;
257
258  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
259  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
260  | --oldin | --oldi | --old | --ol | --o)
261    ac_prev=oldincludedir ;;
262  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
263  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
264  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
265    oldincludedir="$ac_optarg" ;;
266
267  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
268    ac_prev=prefix ;;
269  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
270    prefix="$ac_optarg" ;;
271
272  -program-prefix | --program-prefix | --program-prefi | --program-pref \
273  | --program-pre | --program-pr | --program-p)
274    ac_prev=program_prefix ;;
275  -program-prefix=* | --program-prefix=* | --program-prefi=* \
276  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
277    program_prefix="$ac_optarg" ;;
278
279  -program-suffix | --program-suffix | --program-suffi | --program-suff \
280  | --program-suf | --program-su | --program-s)
281    ac_prev=program_suffix ;;
282  -program-suffix=* | --program-suffix=* | --program-suffi=* \
283  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
284    program_suffix="$ac_optarg" ;;
285
286  -program-transform-name | --program-transform-name \
287  | --program-transform-nam | --program-transform-na \
288  | --program-transform-n | --program-transform- \
289  | --program-transform | --program-transfor \
290  | --program-transfo | --program-transf \
291  | --program-trans | --program-tran \
292  | --progr-tra | --program-tr | --program-t)
293    ac_prev=program_transform_name ;;
294  -program-transform-name=* | --program-transform-name=* \
295  | --program-transform-nam=* | --program-transform-na=* \
296  | --program-transform-n=* | --program-transform-=* \
297  | --program-transform=* | --program-transfor=* \
298  | --program-transfo=* | --program-transf=* \
299  | --program-trans=* | --program-tran=* \
300  | --progr-tra=* | --program-tr=* | --program-t=*)
301    program_transform_name="$ac_optarg" ;;
302
303  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
304  | -silent | --silent | --silen | --sile | --sil)
305    silent=yes ;;
306
307  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
308    ac_prev=sbindir ;;
309  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
310  | --sbi=* | --sb=*)
311    sbindir="$ac_optarg" ;;
312
313  -sharedstatedir | --sharedstatedir | --sharedstatedi \
314  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
315  | --sharedst | --shareds | --shared | --share | --shar \
316  | --sha | --sh)
317    ac_prev=sharedstatedir ;;
318  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
319  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
320  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
321  | --sha=* | --sh=*)
322    sharedstatedir="$ac_optarg" ;;
323
324  -site | --site | --sit)
325    ac_prev=site ;;
326  -site=* | --site=* | --sit=*)
327    site="$ac_optarg" ;;
328
329  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
330    ac_prev=srcdir ;;
331  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
332    srcdir="$ac_optarg" ;;
333
334  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
335  | --syscon | --sysco | --sysc | --sys | --sy)
336    ac_prev=sysconfdir ;;
337  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
338  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
339    sysconfdir="$ac_optarg" ;;
340
341  -target | --target | --targe | --targ | --tar | --ta | --t)
342    ac_prev=target ;;
343  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
344    target="$ac_optarg" ;;
345
346  -v | -verbose | --verbose | --verbos | --verbo | --verb)
347    verbose=yes ;;
348
349  -version | --version | --versio | --versi | --vers)
350    echo "configure generated by autoconf version 2.9"
351    exit 0 ;;
352
353  -with-* | --with-*)
354    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
355    # Reject names that are not valid shell variable names.
356    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
357      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358    fi
359    ac_package=`echo $ac_package| sed 's/-/_/g'`
360    case "$ac_option" in
361      *=*) ;;
362      *) ac_optarg=yes ;;
363    esac
364    eval "with_${ac_package}='$ac_optarg'" ;;
365
366  -without-* | --without-*)
367    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
368    # Reject names that are not valid shell variable names.
369    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
370      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371    fi
372    ac_package=`echo $ac_package| sed 's/-/_/g'`
373    eval "with_${ac_package}=no" ;;
374
375  --x)
376    # Obsolete; use --with-x.
377    with_x=yes ;;
378
379  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
380  | --x-incl | --x-inc | --x-in | --x-i)
381    ac_prev=x_includes ;;
382  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
383  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
384    x_includes="$ac_optarg" ;;
385
386  -x-libraries | --x-libraries | --x-librarie | --x-librari \
387  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
388    ac_prev=x_libraries ;;
389  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
390  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
391    x_libraries="$ac_optarg" ;;
392
393  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
394    ;;
395
396  *)
397    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
398      echo "configure: warning: $ac_option: invalid host type" 1>&2
399    fi
400    if test "x$nonopt" != xNONE; then
401      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
402    fi
403    nonopt="$ac_option"
404    ;;
405
406  esac
407done
408
409if test -n "$ac_prev"; then
410  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411fi
412
413trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
414
415# File descriptor usage:
416# 0 standard input
417# 1 file creation
418# 2 errors and warnings
419# 3 some systems may open it to /dev/tty
420# 4 used on the Kubota Titan
421# 6 checking for... messages and results
422# 5 compiler messages saved in config.log
423if test "$silent" = yes; then
424  exec 6>/dev/null
425else
426  exec 6>&1
427fi
428exec 5>./config.log
429
430echo "\
431This file contains any messages produced by compilers while
432running configure, to aid debugging if configure makes a mistake.
433" 1>&5
434
435# Strip out --no-create and --no-recursion so they do not pile up.
436# Also quote any args containing shell metacharacters.
437ac_configure_args=
438for ac_arg
439do
440  case "$ac_arg" in
441  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
442  | --no-cr | --no-c) ;;
443  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
444  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
445  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
446  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
447  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448  esac
449done
450
451# NLS nuisances.
452# Only set LANG and LC_ALL to C if already set.
453# These must not be set unconditionally because not all systems understand
454# e.g. LANG=C (notably SCO).
455if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
457
458# confdefs.h avoids OS command line length limits that DEFS can exceed.
459rm -rf conftest* confdefs.h
460# AIX cpp loses on an empty file, so make sure it contains at least a newline.
461echo > confdefs.h
462
463# A filename unique to this package, relative to the directory that
464# configure is in, which we can look for to find out if srcdir is correct.
465ac_unique_file=matpol.h
466
467# Find the source files, if location was not specified.
468if test -z "$srcdir"; then
469  ac_srcdir_defaulted=yes
470  # Try the directory containing this script, then its parent.
471  ac_prog=$0
472  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
473  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
474  srcdir=$ac_confdir
475  if test ! -r $srcdir/$ac_unique_file; then
476    srcdir=..
477  fi
478else
479  ac_srcdir_defaulted=no
480fi
481if test ! -r $srcdir/$ac_unique_file; then
482  if test "$ac_srcdir_defaulted" = yes; then
483    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
484  else
485    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
486  fi
487fi
488srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489
490# Prefer explicitly selected file to automatically selected ones.
491if test -z "$CONFIG_SITE"; then
492  if test "x$prefix" != xNONE; then
493    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
494  else
495    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
496  fi
497fi
498for ac_site_file in $CONFIG_SITE; do
499  if test -r "$ac_site_file"; then
500    echo "loading site script $ac_site_file"
501    . "$ac_site_file"
502  fi
503done
504
505if test -r "$cache_file"; then
506  echo "loading cache $cache_file"
507  . $cache_file
508else
509  echo "creating cache $cache_file"
510  > $cache_file
511fi
512
513ac_ext=c
514# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
515ac_cpp='$CPP $CPPFLAGS'
516ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
517ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
518
519if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522    ac_n= ac_c='
523' ac_t='        '
524  else
525    ac_n=-n ac_c= ac_t=
526  fi
527else
528  ac_n= ac_c='\c' ac_t=
529fi
530
531
532
533
534SINGULAR_MAJOR_VERSION=1
535SINGULAR_MINOR_VERSION=1
536SINGULAR_SUB_VERSION=0
537VERSION_DATE="June 1997"
538
539
540
541cat >> confdefs.h <<EOF
542#define SINGULAR_MAJOR_VERSION ${SINGULAR_MAJOR_VERSION}
543EOF
544
545cat >> confdefs.h <<EOF
546#define SINGULAR_MINOR_VERSION ${SINGULAR_MINOR_VERSION}
547EOF
548
549cat >> confdefs.h <<EOF
550#define S_VERSION1 "version: ${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION}"
551EOF
552
553cat >> confdefs.h <<EOF
554#define S_VERSION2 "${VERSION_DATE}"
555EOF
556
557
558
559
560if test "x$datadir" = 'x${prefix}/share'; then
561  if test "x${prefix}" = xNONE; then
562    singulardatadir=${ac_default_prefix}/share/Singular;
563  else
564    singulardatadir=${prefix}/share/Singular;
565  fi
566else
567  singulardatadir=${datadir}/Singular;
568fi
569
570if test "x$infodir" = 'x${prefix}/info'; then
571  if test "x${prefix}" = xNONE; then
572    singularinfodir=${ac_default_prefix}/info;
573  else
574    singularinfodir=${prefix}/info;
575  fi
576else
577  singularinfodir=$infodir;
578fi
579cat >> confdefs.h <<EOF
580#define SINGULAR_DATADIR "${singulardatadir}"
581EOF
582
583cat >> confdefs.h <<EOF
584#define SINGULAR_INFODIR "${singularinfodir}"
585EOF
586
587
588
589
590
591if test "${CXXFLAGS+set}" != set; then
592  ac_cxxflags_set=no
593  CXXFLAGS="-O"
594fi
595if test "${CFLAGS+set}" != set; then
596  CFLAGS="-O"
597  ac_cflags_set=no
598fi
599
600# Extract the first word of "gcc", so it can be a program name with args.
601set dummy gcc; ac_word=$2
602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
603if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
604  echo $ac_n "(cached) $ac_c" 1>&6
605else
606  if test -n "$CC"; then
607  ac_cv_prog_CC="$CC" # Let the user override the test.
608else
609  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
610  for ac_dir in $PATH; do
611    test -z "$ac_dir" && ac_dir=.
612    if test -f $ac_dir/$ac_word; then
613      ac_cv_prog_CC="gcc"
614      break
615    fi
616  done
617  IFS="$ac_save_ifs"
618fi
619fi
620CC="$ac_cv_prog_CC"
621if test -n "$CC"; then
622  echo "$ac_t""$CC" 1>&6
623else
624  echo "$ac_t""no" 1>&6
625fi
626
627if test -z "$CC"; then
628  # Extract the first word of "cc", so it can be a program name with args.
629set dummy cc; ac_word=$2
630echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
631if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
632  echo $ac_n "(cached) $ac_c" 1>&6
633else
634  if test -n "$CC"; then
635  ac_cv_prog_CC="$CC" # Let the user override the test.
636else
637  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
638  ac_prog_rejected=no
639  for ac_dir in $PATH; do
640    test -z "$ac_dir" && ac_dir=.
641    if test -f $ac_dir/$ac_word; then
642      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
643        ac_prog_rejected=yes
644        continue
645      fi
646      ac_cv_prog_CC="cc"
647      break
648    fi
649  done
650  IFS="$ac_save_ifs"
651if test $ac_prog_rejected = yes; then
652  # We found a bogon in the path, so make sure we never use it.
653  set dummy $ac_cv_prog_CC
654  shift
655  if test $# -gt 0; then
656    # We chose a different compiler from the bogus one.
657    # However, it has the same basename, so the bogon will be chosen
658    # first if we set CC to just the basename; use the full file name.
659    shift
660    set dummy "$ac_dir/$ac_word" "$@"
661    shift
662    ac_cv_prog_CC="$@"
663  fi
664fi
665fi
666fi
667CC="$ac_cv_prog_CC"
668if test -n "$CC"; then
669  echo "$ac_t""$CC" 1>&6
670else
671  echo "$ac_t""no" 1>&6
672fi
673
674  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
675fi
676
677echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
678if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
679  echo $ac_n "(cached) $ac_c" 1>&6
680else
681  cat > conftest.c <<EOF
682#ifdef __GNUC__
683  yes;
684#endif
685EOF
686if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
687  ac_cv_prog_gcc=yes
688else
689  ac_cv_prog_gcc=no
690fi
691fi
692
693echo "$ac_t""$ac_cv_prog_gcc" 1>&6
694if test $ac_cv_prog_gcc = yes; then
695  GCC=yes
696  if test "${CFLAGS+set}" != set; then
697    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
698if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
699  echo $ac_n "(cached) $ac_c" 1>&6
700else
701  echo 'void f(){}' > conftest.c
702if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
703  ac_cv_prog_gcc_g=yes
704else
705  ac_cv_prog_gcc_g=no
706fi
707rm -f conftest*
708
709fi
710
711echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
712    if test $ac_cv_prog_gcc_g = yes; then
713      CFLAGS="-g -O"
714    else
715      CFLAGS="-O"
716    fi
717  fi
718else
719  GCC=
720  test "${CFLAGS+set}" = set || CFLAGS="-g"
721fi
722
723echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
724# On Suns, sometimes $CPP names a directory.
725if test -n "$CPP" && test -d "$CPP"; then
726  CPP=
727fi
728if test -z "$CPP"; then
729if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
730  echo $ac_n "(cached) $ac_c" 1>&6
731else
732    # This must be in double quotes, not single quotes, because CPP may get
733  # substituted into the Makefile and "${CC-cc}" will confuse make.
734  CPP="${CC-cc} -E"
735  # On the NeXT, cc -E runs the code through the compiler's parser,
736  # not just through cpp.
737  cat > conftest.$ac_ext <<EOF
738#line 739 "configure"
739#include "confdefs.h"
740#include <assert.h>
741Syntax Error
742EOF
743ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
744{ (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
745ac_err=`grep -v '^ *+' conftest.out`
746if test -z "$ac_err"; then
747  :
748else
749  echo "$ac_err" >&5
750  rm -rf conftest*
751  CPP="${CC-cc} -E -traditional-cpp"
752  cat > conftest.$ac_ext <<EOF
753#line 754 "configure"
754#include "confdefs.h"
755#include <assert.h>
756Syntax Error
757EOF
758ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
759{ (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
760ac_err=`grep -v '^ *+' conftest.out`
761if test -z "$ac_err"; then
762  :
763else
764  echo "$ac_err" >&5
765  rm -rf conftest*
766  CPP=/lib/cpp
767fi
768rm -f conftest*
769fi
770rm -f conftest*
771  ac_cv_prog_CPP="$CPP"
772fi
773  CPP="$ac_cv_prog_CPP"
774else
775  ac_cv_prog_CPP="$CPP"
776fi
777echo "$ac_t""$CPP" 1>&6
778
779for ac_prog in $CCC c++ g++ gcc CC cxx
780do
781# Extract the first word of "$ac_prog", so it can be a program name with args.
782set dummy $ac_prog; ac_word=$2
783echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
784if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
785  echo $ac_n "(cached) $ac_c" 1>&6
786else
787  if test -n "$CXX"; then
788  ac_cv_prog_CXX="$CXX" # Let the user override the test.
789else
790  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
791  for ac_dir in $PATH; do
792    test -z "$ac_dir" && ac_dir=.
793    if test -f $ac_dir/$ac_word; then
794      ac_cv_prog_CXX="$ac_prog"
795      break
796    fi
797  done
798  IFS="$ac_save_ifs"
799fi
800fi
801CXX="$ac_cv_prog_CXX"
802if test -n "$CXX"; then
803  echo "$ac_t""$CXX" 1>&6
804else
805  echo "$ac_t""no" 1>&6
806fi
807
808test -n "$CXX" && break
809done
810test -n "$CXX" || CXX="gcc"
811
812
813echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
814if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
815  echo $ac_n "(cached) $ac_c" 1>&6
816else
817  cat > conftest.C <<EOF
818#ifdef __GNUC__
819  yes;
820#endif
821EOF
822if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
823  ac_cv_prog_gxx=yes
824else
825  ac_cv_prog_gxx=no
826fi
827fi
828
829echo "$ac_t""$ac_cv_prog_gxx" 1>&6
830if test $ac_cv_prog_gxx = yes; then
831  GXX=yes
832  if test "${CXXFLAGS+set}" != set; then
833    echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
834if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
835  echo $ac_n "(cached) $ac_c" 1>&6
836else
837  echo 'void f(){}' > conftest.cc
838if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
839  ac_cv_prog_gxx_g=yes
840else
841  ac_cv_prog_gxx_g=no
842fi
843rm -f conftest*
844
845fi
846
847echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6
848    if test $ac_cv_prog_gxx_g = yes; then
849      CXXFLAGS="-g -O"
850    else
851      CXXFLAGS="-O"
852    fi
853  fi
854else
855  GXX=
856  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
857fi
858
859echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
860set dummy ${MAKE-make}; ac_make=$2
861if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
862  echo $ac_n "(cached) $ac_c" 1>&6
863else
864  cat > conftestmake <<\EOF
865all:
866        @echo 'ac_maketemp="${MAKE}"'
867EOF
868# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
869eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
870if test -n "$ac_maketemp"; then
871  eval ac_cv_prog_make_${ac_make}_set=yes
872else
873  eval ac_cv_prog_make_${ac_make}_set=no
874fi
875rm -f conftestmake
876fi
877if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
878  echo "$ac_t""yes" 1>&6
879  SET_MAKE=
880else
881  echo "$ac_t""no" 1>&6
882  SET_MAKE="MAKE=${MAKE-make}"
883fi
884
885
886if test ${GXX} = yes; then
887  CXX=gcc
888fi 
889
890if test "$libdir" = '${exec_prefix}/lib'; then
891  if test "x$exec_prefix" = xNONE; then
892    if test "x$prefix" = xNONE; then
893      LDFLAGS="-L${ac_default_prefix}/lib ${LDFLAGS}"
894    else
895      LDFLAGS="-L${prefix}/lib ${LDFLAGS}"
896    fi
897  else
898    LDFLAGS="-L${exec_prefix}/lib ${LDFLAGS}"
899  fi
900else
901  LDFLAGS="-L${libdir} ${LDFLAGS}"
902fi
903
904if test "$includedir" = '${prefix}/include'; then
905  if test "x$prefix" = xNONE; then
906    CPPFLAGS="-I${ac_default_prefix}/include ${CPPFLAGS}"
907  else
908    CPPFLAGS="-I${prefix}/include ${CPPFLAGS}"
909  fi
910else
911  CPPFLAGS="-I${includedir} ${CPPFLAGS}"
912fi
913
914if test "$with_info" != no; then
915  # Extract the first word of "info", so it can be a program name with args.
916set dummy info; ac_word=$2
917echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
918if eval "test \"`echo '$''{'ac_cv_prog_INFO'+set}'`\" = set"; then
919  echo $ac_n "(cached) $ac_c" 1>&6
920else
921  if test -n "$INFO"; then
922  ac_cv_prog_INFO="$INFO" # Let the user override the test.
923else
924  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
925  for ac_dir in $PATH; do
926    test -z "$ac_dir" && ac_dir=.
927    if test -f $ac_dir/$ac_word; then
928      ac_cv_prog_INFO="info"
929      break
930    fi
931  done
932  IFS="$ac_save_ifs"
933fi
934fi
935INFO="$ac_cv_prog_INFO"
936if test -n "$INFO"; then
937  echo "$ac_t""$INFO" 1>&6
938else
939  echo "$ac_t""no" 1>&6
940fi
941
942  if test -n "$INFO"; then
943    cat >> confdefs.h <<\EOF
944#define HAVE_INFO 1
945EOF
946
947  fi
948fi
949
950 
951# Check whether --with-readline or --without-readline was given.
952if test "${with_readline+set}" = set; then
953  withval="$with_readline"
954  :
955fi
956
957
958# Check whether --with-gmp or --without-gmp was given.
959if test "${with_gmp+set}" = set; then
960  withval="$with_gmp"
961  :
962fi
963
964   
965# Check whether --with-MP or --without-MP was given.
966if test "${with_MP+set}" = set; then
967  withval="$with_MP"
968  :
969fi
970
971
972# Check whether --with-dbm or --without-dbm was given.
973if test "${with_dbm+set}" = set; then
974  withval="$with_dbm"
975  :
976fi
977
978# Check whether --with-info or --without-info was given.
979if test "${with_info+set}" = set; then
980  withval="$with_info"
981  :
982fi
983
984# Check whether --with-dld or --without-dld was given.
985if test "${with_dld+set}" = set; then
986  withval="$with_dld"
987  :
988fi
989
990
991# Check whether --with-factory or --without-factory was given.
992if test "${with_factory+set}" = set; then
993  withval="$with_factory"
994  :
995fi
996
997
998# Check whether --with-libfac or --without-libfac was given.
999if test "${with_libfac+set}" = set; then
1000  withval="$with_libfac"
1001  :
1002fi
1003
1004
1005
1006 
1007echo $ac_n "checking for -lm""... $ac_c" 1>&6
1008ac_lib_var=`echo m_atof | tr '.-/+' '___p'`
1009if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1010  echo $ac_n "(cached) $ac_c" 1>&6
1011else
1012  ac_save_LIBS="$LIBS"
1013LIBS="-lm  $LIBS"
1014cat > conftest.$ac_ext <<EOF
1015#line 1016 "configure"
1016#include "confdefs.h"
1017/* Override any gcc2 internal prototype to avoid an error.  */
1018char atof();
1019
1020int main() { return 0; }
1021int t() {
1022atof()
1023; return 0; }
1024EOF
1025if { (eval echo configure:1026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1026  rm -rf conftest*
1027  eval "ac_cv_lib_$ac_lib_var=yes"
1028else
1029  rm -rf conftest*
1030  eval "ac_cv_lib_$ac_lib_var=no"
1031fi
1032rm -f conftest*
1033LIBS="$ac_save_LIBS"
1034
1035fi
1036if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1037  echo "$ac_t""yes" 1>&6
1038    ac_tr_lib=HAVE_LIB`echo m | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1039  cat >> confdefs.h <<EOF
1040#define $ac_tr_lib 1
1041EOF
1042
1043  LIBS="-lm $LIBS"
1044
1045else
1046  echo "$ac_t""no" 1>&6
1047fi
1048
1049echo $ac_n "checking for -lbsd""... $ac_c" 1>&6
1050ac_lib_var=`echo bsd_socket | tr '.-/+' '___p'`
1051if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1052  echo $ac_n "(cached) $ac_c" 1>&6
1053else
1054  ac_save_LIBS="$LIBS"
1055LIBS="-lbsd  $LIBS"
1056cat > conftest.$ac_ext <<EOF
1057#line 1058 "configure"
1058#include "confdefs.h"
1059/* Override any gcc2 internal prototype to avoid an error.  */
1060char socket();
1061
1062int main() { return 0; }
1063int t() {
1064socket()
1065; return 0; }
1066EOF
1067if { (eval echo configure:1068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1068  rm -rf conftest*
1069  eval "ac_cv_lib_$ac_lib_var=yes"
1070else
1071  rm -rf conftest*
1072  eval "ac_cv_lib_$ac_lib_var=no"
1073fi
1074rm -f conftest*
1075LIBS="$ac_save_LIBS"
1076
1077fi
1078if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1079  echo "$ac_t""yes" 1>&6
1080    ac_tr_lib=HAVE_LIB`echo bsd | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1081  cat >> confdefs.h <<EOF
1082#define $ac_tr_lib 1
1083EOF
1084
1085  LIBS="-lbsd $LIBS"
1086
1087else
1088  echo "$ac_t""no" 1>&6
1089fi
1090
1091echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1092ac_lib_var=`echo socket_listen | tr '.-/+' '___p'`
1093if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1094  echo $ac_n "(cached) $ac_c" 1>&6
1095else
1096  ac_save_LIBS="$LIBS"
1097LIBS="-lsocket  $LIBS"
1098cat > conftest.$ac_ext <<EOF
1099#line 1100 "configure"
1100#include "confdefs.h"
1101/* Override any gcc2 internal prototype to avoid an error.  */
1102char listen();
1103
1104int main() { return 0; }
1105int t() {
1106listen()
1107; return 0; }
1108EOF
1109if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1110  rm -rf conftest*
1111  eval "ac_cv_lib_$ac_lib_var=yes"
1112else
1113  rm -rf conftest*
1114  eval "ac_cv_lib_$ac_lib_var=no"
1115fi
1116rm -f conftest*
1117LIBS="$ac_save_LIBS"
1118
1119fi
1120if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1121  echo "$ac_t""yes" 1>&6
1122    ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1123  cat >> confdefs.h <<EOF
1124#define $ac_tr_lib 1
1125EOF
1126
1127  LIBS="-lsocket $LIBS"
1128
1129else
1130  echo "$ac_t""no" 1>&6
1131fi
1132
1133echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1134ac_lib_var=`echo nsl_gethostbyname | tr '.-/+' '___p'`
1135if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1136  echo $ac_n "(cached) $ac_c" 1>&6
1137else
1138  ac_save_LIBS="$LIBS"
1139LIBS="-lnsl  $LIBS"
1140cat > conftest.$ac_ext <<EOF
1141#line 1142 "configure"
1142#include "confdefs.h"
1143/* Override any gcc2 internal prototype to avoid an error.  */
1144char gethostbyname();
1145
1146int main() { return 0; }
1147int t() {
1148gethostbyname()
1149; return 0; }
1150EOF
1151if { (eval echo configure:1152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1152  rm -rf conftest*
1153  eval "ac_cv_lib_$ac_lib_var=yes"
1154else
1155  rm -rf conftest*
1156  eval "ac_cv_lib_$ac_lib_var=no"
1157fi
1158rm -f conftest*
1159LIBS="$ac_save_LIBS"
1160
1161fi
1162if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1163  echo "$ac_t""yes" 1>&6
1164    ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1165  cat >> confdefs.h <<EOF
1166#define $ac_tr_lib 1
1167EOF
1168
1169  LIBS="-lnsl $LIBS"
1170
1171else
1172  echo "$ac_t""no" 1>&6
1173fi
1174
1175
1176if test "$with_readline" != no; then
1177  echo $ac_n "checking for -lncurses""... $ac_c" 1>&6
1178ac_lib_var=`echo ncurses_tgetent | tr '.-/+' '___p'`
1179if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1180  echo $ac_n "(cached) $ac_c" 1>&6
1181else
1182  ac_save_LIBS="$LIBS"
1183LIBS="-lncurses  $LIBS"
1184cat > conftest.$ac_ext <<EOF
1185#line 1186 "configure"
1186#include "confdefs.h"
1187/* Override any gcc2 internal prototype to avoid an error.  */
1188char tgetent();
1189
1190int main() { return 0; }
1191int t() {
1192tgetent()
1193; return 0; }
1194EOF
1195if { (eval echo configure:1196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1196  rm -rf conftest*
1197  eval "ac_cv_lib_$ac_lib_var=yes"
1198else
1199  rm -rf conftest*
1200  eval "ac_cv_lib_$ac_lib_var=no"
1201fi
1202rm -f conftest*
1203LIBS="$ac_save_LIBS"
1204
1205fi
1206if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1207  echo "$ac_t""yes" 1>&6
1208    ac_tr_lib=HAVE_LIB`echo ncurses | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1209  cat >> confdefs.h <<EOF
1210#define $ac_tr_lib 1
1211EOF
1212
1213  LIBS="-lncurses $LIBS"
1214
1215else
1216  echo "$ac_t""no" 1>&6
1217\
1218   echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
1219ac_lib_var=`echo curses_tgetent | tr '.-/+' '___p'`
1220if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1221  echo $ac_n "(cached) $ac_c" 1>&6
1222else
1223  ac_save_LIBS="$LIBS"
1224LIBS="-lcurses  $LIBS"
1225cat > conftest.$ac_ext <<EOF
1226#line 1227 "configure"
1227#include "confdefs.h"
1228/* Override any gcc2 internal prototype to avoid an error.  */
1229char tgetent();
1230
1231int main() { return 0; }
1232int t() {
1233tgetent()
1234; return 0; }
1235EOF
1236if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1237  rm -rf conftest*
1238  eval "ac_cv_lib_$ac_lib_var=yes"
1239else
1240  rm -rf conftest*
1241  eval "ac_cv_lib_$ac_lib_var=no"
1242fi
1243rm -f conftest*
1244LIBS="$ac_save_LIBS"
1245
1246fi
1247if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1248  echo "$ac_t""yes" 1>&6
1249    ac_tr_lib=HAVE_LIB`echo curses | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1250  cat >> confdefs.h <<EOF
1251#define $ac_tr_lib 1
1252EOF
1253
1254  LIBS="-lcurses $LIBS"
1255
1256else
1257  echo "$ac_t""no" 1>&6
1258\
1259   echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
1260ac_lib_var=`echo termcap_tgetent | tr '.-/+' '___p'`
1261if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1262  echo $ac_n "(cached) $ac_c" 1>&6
1263else
1264  ac_save_LIBS="$LIBS"
1265LIBS="-ltermcap  $LIBS"
1266cat > conftest.$ac_ext <<EOF
1267#line 1268 "configure"
1268#include "confdefs.h"
1269/* Override any gcc2 internal prototype to avoid an error.  */
1270char tgetent();
1271
1272int main() { return 0; }
1273int t() {
1274tgetent()
1275; return 0; }
1276EOF
1277if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1278  rm -rf conftest*
1279  eval "ac_cv_lib_$ac_lib_var=yes"
1280else
1281  rm -rf conftest*
1282  eval "ac_cv_lib_$ac_lib_var=no"
1283fi
1284rm -f conftest*
1285LIBS="$ac_save_LIBS"
1286
1287fi
1288if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1289  echo "$ac_t""yes" 1>&6
1290    ac_tr_lib=HAVE_LIB`echo termcap | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1291  cat >> confdefs.h <<EOF
1292#define $ac_tr_lib 1
1293EOF
1294
1295  LIBS="-ltermcap $LIBS"
1296
1297else
1298  echo "$ac_t""no" 1>&6
1299fi
1300
1301fi
1302
1303fi
1304
1305  echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
1306ac_lib_var=`echo readline_rl_abort | tr '.-/+' '___p'`
1307if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1308  echo $ac_n "(cached) $ac_c" 1>&6
1309else
1310  ac_save_LIBS="$LIBS"
1311LIBS="-lreadline  $LIBS"
1312cat > conftest.$ac_ext <<EOF
1313#line 1314 "configure"
1314#include "confdefs.h"
1315/* Override any gcc2 internal prototype to avoid an error.  */
1316char rl_abort();
1317
1318int main() { return 0; }
1319int t() {
1320rl_abort()
1321; return 0; }
1322EOF
1323if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1324  rm -rf conftest*
1325  eval "ac_cv_lib_$ac_lib_var=yes"
1326else
1327  rm -rf conftest*
1328  eval "ac_cv_lib_$ac_lib_var=no"
1329fi
1330rm -f conftest*
1331LIBS="$ac_save_LIBS"
1332
1333fi
1334if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1335  echo "$ac_t""yes" 1>&6
1336    ac_tr_lib=HAVE_LIB`echo readline | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1337  cat >> confdefs.h <<EOF
1338#define $ac_tr_lib 1
1339EOF
1340
1341  LIBS="-lreadline $LIBS"
1342
1343else
1344  echo "$ac_t""no" 1>&6
1345fi
1346
1347  if test "$ac_cv_lib_readline_rl_abort" = yes; then
1348     for ac_hdr in readline/readline.h readline/history.h sys/file.h
1349do
1350ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1351echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1352if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1353  echo $ac_n "(cached) $ac_c" 1>&6
1354else
1355  cat > conftest.$ac_ext <<EOF
1356#line 1357 "configure"
1357#include "confdefs.h"
1358#include <$ac_hdr>
1359EOF
1360ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1361{ (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1362ac_err=`grep -v '^ *+' conftest.out`
1363if test -z "$ac_err"; then
1364  rm -rf conftest*
1365  eval "ac_cv_header_$ac_safe=yes"
1366else
1367  echo "$ac_err" >&5
1368  rm -rf conftest*
1369  eval "ac_cv_header_$ac_safe=no"
1370fi
1371rm -f conftest*
1372fi
1373if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1374  echo "$ac_t""yes" 1>&6
1375    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1376  cat >> confdefs.h <<EOF
1377#define $ac_tr_hdr 1
1378EOF
1379 ac_readline_ok=yes
1380else
1381  echo "$ac_t""no" 1>&6
1382ac_readline_ok=no; break
1383fi
1384done
1385
1386   fi
1387   if test "$ac_readline_ok" = yes; then
1388     cat >> confdefs.h <<\EOF
1389#define HAVE_READLINE 1
1390EOF
1391
1392   else
1393     echo "configure: warning: building without readline: disabling fancy display" 1>&2;
1394     cat >> confdefs.h <<\EOF
1395#define HAVE_FEREAD 1
1396EOF
1397
1398   fi
1399 else
1400   cat >> confdefs.h <<\EOF
1401#define HAVE_FEREAD 1
1402EOF
1403
1404fi
1405 
1406if test "$with_dbm" != no; then
1407  echo $ac_n "checking for -ldbm""... $ac_c" 1>&6
1408ac_lib_var=`echo dbm_dbminit | tr '.-/+' '___p'`
1409if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1410  echo $ac_n "(cached) $ac_c" 1>&6
1411else
1412  ac_save_LIBS="$LIBS"
1413LIBS="-ldbm  $LIBS"
1414cat > conftest.$ac_ext <<EOF
1415#line 1416 "configure"
1416#include "confdefs.h"
1417/* Override any gcc2 internal prototype to avoid an error.  */
1418char dbminit();
1419
1420int main() { return 0; }
1421int t() {
1422dbminit()
1423; return 0; }
1424EOF
1425if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1426  rm -rf conftest*
1427  eval "ac_cv_lib_$ac_lib_var=yes"
1428else
1429  rm -rf conftest*
1430  eval "ac_cv_lib_$ac_lib_var=no"
1431fi
1432rm -f conftest*
1433LIBS="$ac_save_LIBS"
1434
1435fi
1436if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1437  echo "$ac_t""yes" 1>&6
1438  cat >> confdefs.h <<\EOF
1439#define HAVE_DBM 1
1440EOF
1441 LIBS="-ldbm $LIBS"
1442else
1443  echo "$ac_t""no" 1>&6
1444echo $ac_n "checking for -lgdbm""... $ac_c" 1>&6
1445ac_lib_var=`echo gdbm_dbminit | tr '.-/+' '___p'`
1446if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1447  echo $ac_n "(cached) $ac_c" 1>&6
1448else
1449  ac_save_LIBS="$LIBS"
1450LIBS="-lgdbm  $LIBS"
1451cat > conftest.$ac_ext <<EOF
1452#line 1453 "configure"
1453#include "confdefs.h"
1454/* Override any gcc2 internal prototype to avoid an error.  */
1455char dbminit();
1456
1457int main() { return 0; }
1458int t() {
1459dbminit()
1460; return 0; }
1461EOF
1462if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1463  rm -rf conftest*
1464  eval "ac_cv_lib_$ac_lib_var=yes"
1465else
1466  rm -rf conftest*
1467  eval "ac_cv_lib_$ac_lib_var=no"
1468fi
1469rm -f conftest*
1470LIBS="$ac_save_LIBS"
1471
1472fi
1473if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1474  echo "$ac_t""yes" 1>&6
1475  cat >> confdefs.h <<\EOF
1476#define HAVE_DBM 1
1477EOF
1478 LIBS="-lgdbm $LIBS"
1479else
1480  echo "$ac_t""no" 1>&6
1481echo "configure: warning: building without dbm: disabling DBM links" 1>&2
1482fi
1483
1484fi
1485
1486fi
1487
1488if test "$with_dld" = yes; then
1489  echo $ac_n "checking for -ldld""... $ac_c" 1>&6
1490ac_lib_var=`echo dld_dld_init | tr '.-/+' '___p'`
1491if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1492  echo $ac_n "(cached) $ac_c" 1>&6
1493else
1494  ac_save_LIBS="$LIBS"
1495LIBS="-ldld  $LIBS"
1496cat > conftest.$ac_ext <<EOF
1497#line 1498 "configure"
1498#include "confdefs.h"
1499/* Override any gcc2 internal prototype to avoid an error.  */
1500char dld_init();
1501
1502int main() { return 0; }
1503int t() {
1504dld_init()
1505; return 0; }
1506EOF
1507if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1508  rm -rf conftest*
1509  eval "ac_cv_lib_$ac_lib_var=yes"
1510else
1511  rm -rf conftest*
1512  eval "ac_cv_lib_$ac_lib_var=no"
1513fi
1514rm -f conftest*
1515LIBS="$ac_save_LIBS"
1516
1517fi
1518if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1519  echo "$ac_t""yes" 1>&6
1520  \
1521   echo "configure: warning: building without dld: disabling dynamic linking" 1>&2
1522else
1523  echo "$ac_t""no" 1>&6
1524fi
1525
1526fi
1527
1528NEED_LIBS=$LIBS
1529
1530if test "$with_builtingmp" = yes; then
1531  cat >> confdefs.h <<\EOF
1532#define HAVE_BUILTIN_GMP 1
1533EOF
1534
1535  cat >> confdefs.h <<\EOF
1536#define HAVE_GMP 1
1537EOF
1538
1539  ac_gmp_ok=yes
1540elif test "$with_gmp" != no; then
1541  echo $ac_n "checking for -lgmp""... $ac_c" 1>&6
1542ac_lib_var=`echo gmp_mpz_init | tr '.-/+' '___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="-lgmp  $LIBS"
1548cat > conftest.$ac_ext <<EOF
1549#line 1550 "configure"
1550#include "confdefs.h"
1551/* Override any gcc2 internal prototype to avoid an error.  */
1552char mpz_init();
1553
1554int main() { return 0; }
1555int t() {
1556mpz_init()
1557; return 0; }
1558EOF
1559if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1560  rm -rf conftest*
1561  eval "ac_cv_lib_$ac_lib_var=yes"
1562else
1563  rm -rf conftest*
1564  eval "ac_cv_lib_$ac_lib_var=no"
1565fi
1566rm -f conftest*
1567LIBS="$ac_save_LIBS"
1568
1569fi
1570if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1571  echo "$ac_t""yes" 1>&6
1572    ac_tr_lib=HAVE_LIB`echo gmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1573  cat >> confdefs.h <<EOF
1574#define $ac_tr_lib 1
1575EOF
1576
1577  LIBS="-lgmp $LIBS"
1578
1579else
1580  echo "$ac_t""no" 1>&6
1581fi
1582
1583  ac_safe=`echo "gmp.h" | tr './\055' '___'`
1584echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
1585if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1586  echo $ac_n "(cached) $ac_c" 1>&6
1587else
1588  cat > conftest.$ac_ext <<EOF
1589#line 1590 "configure"
1590#include "confdefs.h"
1591#include <gmp.h>
1592EOF
1593ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1594{ (eval echo configure:1595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1595ac_err=`grep -v '^ *+' conftest.out`
1596if test -z "$ac_err"; then
1597  rm -rf conftest*
1598  eval "ac_cv_header_$ac_safe=yes"
1599else
1600  echo "$ac_err" >&5
1601  rm -rf conftest*
1602  eval "ac_cv_header_$ac_safe=no"
1603fi
1604rm -f conftest*
1605fi
1606if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1607  echo "$ac_t""yes" 1>&6
1608  :
1609else
1610  echo "$ac_t""no" 1>&6
1611fi
1612
1613  if test "$ac_cv_lib_gmp_mpz_init" = yes && \
1614   test "$ac_cv_header_gmp_h" = yes; then
1615    cat >> confdefs.h <<\EOF
1616#define HAVE_GMP 1
1617EOF
1618
1619    NEED_LIBS="-lgmp ${NEED_LIBS}"
1620    ac_gmp_ok=yes
1621  elif test "$enable_gmp" = yes; then
1622    cat >> confdefs.h <<\EOF
1623#define HAVE_GMP 1
1624EOF
1625
1626    NEED_LIBS="-lgmp ${NEED_LIBS}"
1627    ac_gmp_ok=yes
1628    echo "configure: warning: install gmp before making Singular or configure --without-gmp" 1>&2
1629  else
1630    echo "configure: warning: building without gmp: using build-in rational arithmetic" 1>&2
1631  fi
1632fi
1633
1634WITH_MP=no
1635if test "$with_MP" != no; then
1636  if test "$ac_gmp_ok" != yes; then
1637    echo "configure: warning: building without MP: can not use MP without gmp" 1>&2
1638  else
1639    if test "$ac_cv_lib_gmp_mpz_init"=yes; then
1640      echo $ac_n "checking for -lMP""... $ac_c" 1>&6
1641ac_lib_var=`echo MP_IMP_PutGmpInt | tr '.-/+' '___p'`
1642if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1643  echo $ac_n "(cached) $ac_c" 1>&6
1644else
1645  ac_save_LIBS="$LIBS"
1646LIBS="-lMP  $LIBS"
1647cat > conftest.$ac_ext <<EOF
1648#line 1649 "configure"
1649#include "confdefs.h"
1650/* Override any gcc2 internal prototype to avoid an error.  */
1651char IMP_PutGmpInt();
1652
1653int main() { return 0; }
1654int t() {
1655IMP_PutGmpInt()
1656; return 0; }
1657EOF
1658if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1659  rm -rf conftest*
1660  eval "ac_cv_lib_$ac_lib_var=yes"
1661else
1662  rm -rf conftest*
1663  eval "ac_cv_lib_$ac_lib_var=no"
1664fi
1665rm -f conftest*
1666LIBS="$ac_save_LIBS"
1667
1668fi
1669if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1670  echo "$ac_t""yes" 1>&6
1671    ac_tr_lib=HAVE_LIB`echo MP | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1672  cat >> confdefs.h <<EOF
1673#define $ac_tr_lib 1
1674EOF
1675
1676  LIBS="-lMP $LIBS"
1677
1678else
1679  echo "$ac_t""no" 1>&6
1680fi
1681
1682      echo $ac_n "checking for -lMPT""... $ac_c" 1>&6
1683ac_lib_var=`echo MPT_MPT_GetTree | tr '.-/+' '___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="-lMPT  $LIBS"
1689cat > conftest.$ac_ext <<EOF
1690#line 1691 "configure"
1691#include "confdefs.h"
1692/* Override any gcc2 internal prototype to avoid an error.  */
1693char MPT_GetTree();
1694
1695int main() { return 0; }
1696int t() {
1697MPT_GetTree()
1698; return 0; }
1699EOF
1700if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1701  rm -rf conftest*
1702  eval "ac_cv_lib_$ac_lib_var=yes"
1703else
1704  rm -rf conftest*
1705  eval "ac_cv_lib_$ac_lib_var=no"
1706fi
1707rm -f conftest*
1708LIBS="$ac_save_LIBS"
1709
1710fi
1711if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1712  echo "$ac_t""yes" 1>&6
1713    ac_tr_lib=HAVE_LIB`echo MPT | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1714  cat >> confdefs.h <<EOF
1715#define $ac_tr_lib 1
1716EOF
1717
1718  LIBS="-lMPT $LIBS"
1719
1720else
1721  echo "$ac_t""no" 1>&6
1722fi
1723
1724    fi
1725    for ac_hdr in MP.h MPT.h
1726do
1727ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1728echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1729if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1730  echo $ac_n "(cached) $ac_c" 1>&6
1731else
1732  cat > conftest.$ac_ext <<EOF
1733#line 1734 "configure"
1734#include "confdefs.h"
1735#include <$ac_hdr>
1736EOF
1737ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1738{ (eval echo configure:1739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1739ac_err=`grep -v '^ *+' conftest.out`
1740if test -z "$ac_err"; then
1741  rm -rf conftest*
1742  eval "ac_cv_header_$ac_safe=yes"
1743else
1744  echo "$ac_err" >&5
1745  rm -rf conftest*
1746  eval "ac_cv_header_$ac_safe=no"
1747fi
1748rm -f conftest*
1749fi
1750if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1751  echo "$ac_t""yes" 1>&6
1752    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1753  cat >> confdefs.h <<EOF
1754#define $ac_tr_hdr 1
1755EOF
1756 
1757else
1758  echo "$ac_t""no" 1>&6
1759fi
1760done
1761
1762    if test "$ac_cv_lib_MPT_MPT_GetTree" = yes && \
1763     test "$ac_cv_header_MP_h" = yes && \
1764     test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
1765     test "$ac_cv_header_MPT_h" = yes; then
1766      cat >> confdefs.h <<\EOF
1767#define HAVE_MPSR 1
1768EOF
1769
1770      NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
1771      WITH_MP=yes
1772    elif test "$enable_MP" = yes; then
1773      cat >> confdefs.h <<\EOF
1774#define HAVE_MPSR 1
1775EOF
1776
1777      NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
1778      WITH_MP=yes
1779      echo "configure: warning: install MP before making Singular or configure --without-MP" 1>&2
1780    else
1781      echo "configure: warning: building without MP: disabling MP links" 1>&2
1782    fi
1783  fi
1784fi
1785
1786
1787WITH_FACTORY=no
1788if test "$with_factory" != no; then
1789  if test "$ac_gmp_ok" != yes; then
1790    echo "configure: warning: building without factory: can not use factory without gmp" 1>&2
1791  else
1792    if test "$ac_cv_lib_gmp_mpz_init"=yes;then
1793      echo $ac_n "checking for -lsingcf""... $ac_c" 1>&6
1794ac_lib_var=`echo singcf_atof | tr '.-/+' '___p'`
1795if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1796  echo $ac_n "(cached) $ac_c" 1>&6
1797else
1798  ac_save_LIBS="$LIBS"
1799LIBS="-lsingcf  $LIBS"
1800cat > conftest.$ac_ext <<EOF
1801#line 1802 "configure"
1802#include "confdefs.h"
1803/* Override any gcc2 internal prototype to avoid an error.  */
1804char atof();
1805
1806int main() { return 0; }
1807int t() {
1808atof()
1809; return 0; }
1810EOF
1811if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1812  rm -rf conftest*
1813  eval "ac_cv_lib_$ac_lib_var=yes"
1814else
1815  rm -rf conftest*
1816  eval "ac_cv_lib_$ac_lib_var=no"
1817fi
1818rm -f conftest*
1819LIBS="$ac_save_LIBS"
1820
1821fi
1822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1823  echo "$ac_t""yes" 1>&6
1824    ac_tr_lib=HAVE_LIB`echo singcf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1825  cat >> confdefs.h <<EOF
1826#define $ac_tr_lib 1
1827EOF
1828
1829  LIBS="-lsingcf $LIBS"
1830
1831else
1832  echo "$ac_t""no" 1>&6
1833fi
1834
1835    fi
1836    for ac_hdr in factory.h
1837do
1838ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1839echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1840if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1841  echo $ac_n "(cached) $ac_c" 1>&6
1842else
1843  cat > conftest.$ac_ext <<EOF
1844#line 1845 "configure"
1845#include "confdefs.h"
1846#include <$ac_hdr>
1847EOF
1848ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1849{ (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1850ac_err=`grep -v '^ *+' conftest.out`
1851if test -z "$ac_err"; then
1852  rm -rf conftest*
1853  eval "ac_cv_header_$ac_safe=yes"
1854else
1855  echo "$ac_err" >&5
1856  rm -rf conftest*
1857  eval "ac_cv_header_$ac_safe=no"
1858fi
1859rm -f conftest*
1860fi
1861if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1862  echo "$ac_t""yes" 1>&6
1863    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1864  cat >> confdefs.h <<EOF
1865#define $ac_tr_hdr 1
1866EOF
1867 
1868else
1869  echo "$ac_t""no" 1>&6
1870fi
1871done
1872
1873    if test "$ac_cv_lib_singcf_atof" = yes && \
1874     test "$ac_cv_header_factory_h" = yes; then
1875      cat >> confdefs.h <<\EOF
1876#define HAVE_FACTORY 1
1877EOF
1878
1879      NEED_LIBS="-lsingcf ${NEED_LIBS}"
1880      WITH_FACTORY=yes
1881    elif test "$enable_factory" = yes; then
1882      NEED_LIBS="-lsingcf ${NEED_LIBS}"
1883      cat >> confdefs.h <<\EOF
1884#define HAVE_FACTORY 1
1885EOF
1886
1887      WITH_FACTORY=yes
1888      echo "configure: warning: install factory before making Singular or configure --without-factory" 1>&2
1889    else
1890      echo "configure: warning: building without factory: disabling poly factorization" 1>&2
1891    fi
1892  fi
1893fi
1894
1895
1896WITH_LIBFAC=no
1897if test "$with_libfac" != no; then
1898  if test "${WITH_FACTORY}" != yes; then
1899    echo "configure: warning: building without libfac: can not use libfac without factory" 1>&2
1900  else
1901    if test "$ac_cv_lib_singcf_atof" = yes; then
1902      echo $ac_n "checking for -lsingfac""... $ac_c" 1>&6
1903ac_lib_var=`echo singfac_atof | tr '.-/+' '___p'`
1904if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1905  echo $ac_n "(cached) $ac_c" 1>&6
1906else
1907  ac_save_LIBS="$LIBS"
1908LIBS="-lsingfac  $LIBS"
1909cat > conftest.$ac_ext <<EOF
1910#line 1911 "configure"
1911#include "confdefs.h"
1912/* Override any gcc2 internal prototype to avoid an error.  */
1913char atof();
1914
1915int main() { return 0; }
1916int t() {
1917atof()
1918; return 0; }
1919EOF
1920if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1921  rm -rf conftest*
1922  eval "ac_cv_lib_$ac_lib_var=yes"
1923else
1924  rm -rf conftest*
1925  eval "ac_cv_lib_$ac_lib_var=no"
1926fi
1927rm -f conftest*
1928LIBS="$ac_save_LIBS"
1929
1930fi
1931if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1932  echo "$ac_t""yes" 1>&6
1933    ac_tr_lib=HAVE_LIB`echo singfac | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1934  cat >> confdefs.h <<EOF
1935#define $ac_tr_lib 1
1936EOF
1937
1938  LIBS="-lsingfac $LIBS"
1939
1940else
1941  echo "$ac_t""no" 1>&6
1942fi
1943
1944    fi
1945    for ac_hdr in factor.h
1946do
1947ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1948echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1949if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1950  echo $ac_n "(cached) $ac_c" 1>&6
1951else
1952  cat > conftest.$ac_ext <<EOF
1953#line 1954 "configure"
1954#include "confdefs.h"
1955#include <$ac_hdr>
1956EOF
1957ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1958{ (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1959ac_err=`grep -v '^ *+' conftest.out`
1960if test -z "$ac_err"; then
1961  rm -rf conftest*
1962  eval "ac_cv_header_$ac_safe=yes"
1963else
1964  echo "$ac_err" >&5
1965  rm -rf conftest*
1966  eval "ac_cv_header_$ac_safe=no"
1967fi
1968rm -f conftest*
1969fi
1970if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1971  echo "$ac_t""yes" 1>&6
1972    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1973  cat >> confdefs.h <<EOF
1974#define $ac_tr_hdr 1
1975EOF
1976 
1977else
1978  echo "$ac_t""no" 1>&6
1979fi
1980done
1981
1982    if test "$ac_cv_lib_singfac_atof" = yes && \
1983     test "$ac_cv_header_factor_h" = yes; then
1984      NEED_LIBS="-lsingfac ${NEED_LIBS}"
1985      cat >> confdefs.h <<\EOF
1986#define HAVE_LIBFAC_P 1
1987EOF
1988
1989      WITH_LIBFAC=yes
1990    elif test "$enable_libfac" = yes; then
1991      NEED_LIBS="-lsingfac ${NEED_LIBS}"
1992      cat >> confdefs.h <<\EOF
1993#define HAVE_LIBFAC_P 1
1994EOF
1995
1996      WITH_LIBFAC=yes
1997      echo "configure: warning: install libfac before making Singular or configure --without-libfac" 1>&2
1998    else
1999      echo "configure: warning: building without libfac: disabling char series" 1>&2
2000    fi
2001  fi
2002fi
2003
2004
2005
2006
2007
2008# If we cannot run a trivial program, we must be cross compiling.
2009echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
2010if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
2011  echo $ac_n "(cached) $ac_c" 1>&6
2012else
2013  if test "$cross_compiling" = yes; then
2014  ac_cv_c_cross=yes
2015else
2016cat > conftest.$ac_ext <<EOF
2017#line 2018 "configure"
2018#include "confdefs.h"
2019main(){return(0);}
2020EOF
2021{ (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2022if test -s conftest && (./conftest; exit) 2>/dev/null; then
2023  ac_cv_c_cross=no
2024else
2025  ac_cv_c_cross=yes
2026fi
2027fi
2028rm -fr conftest*
2029fi
2030
2031echo "$ac_t""$ac_cv_c_cross" 1>&6
2032cross_compiling=$ac_cv_c_cross
2033
2034echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2035if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2036  echo $ac_n "(cached) $ac_c" 1>&6
2037else
2038  cat > conftest.$ac_ext <<EOF
2039#line 2040 "configure"
2040#include "confdefs.h"
2041#include <stdlib.h>
2042#include <stdarg.h>
2043#include <string.h>
2044#include <float.h>
2045EOF
2046ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2047{ (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2048ac_err=`grep -v '^ *+' conftest.out`
2049if test -z "$ac_err"; then
2050  rm -rf conftest*
2051  ac_cv_header_stdc=yes
2052else
2053  echo "$ac_err" >&5
2054  rm -rf conftest*
2055  ac_cv_header_stdc=no
2056fi
2057rm -f conftest*
2058
2059if test $ac_cv_header_stdc = yes; then
2060  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2061cat > conftest.$ac_ext <<EOF
2062#line 2063 "configure"
2063#include "confdefs.h"
2064#include <string.h>
2065EOF
2066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2067  egrep "memchr" >/dev/null 2>&1; then
2068  :
2069else
2070  rm -rf conftest*
2071  ac_cv_header_stdc=no
2072fi
2073rm -f conftest*
2074
2075fi
2076
2077if test $ac_cv_header_stdc = yes; then
2078  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2079cat > conftest.$ac_ext <<EOF
2080#line 2081 "configure"
2081#include "confdefs.h"
2082#include <stdlib.h>
2083EOF
2084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2085  egrep "free" >/dev/null 2>&1; then
2086  :
2087else
2088  rm -rf conftest*
2089  ac_cv_header_stdc=no
2090fi
2091rm -f conftest*
2092
2093fi
2094
2095if test $ac_cv_header_stdc = yes; then
2096  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2097if test "$cross_compiling" = yes; then
2098  :
2099else
2100cat > conftest.$ac_ext <<EOF
2101#line 2102 "configure"
2102#include "confdefs.h"
2103#include <ctype.h>
2104#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2105#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2106#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2107int main () { int i; for (i = 0; i < 256; i++)
2108if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2109exit (0); }
2110
2111EOF
2112{ (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2113if test -s conftest && (./conftest; exit) 2>/dev/null; then
2114  :
2115else
2116  ac_cv_header_stdc=no
2117fi
2118fi
2119rm -fr conftest*
2120fi
2121fi
2122
2123echo "$ac_t""$ac_cv_header_stdc" 1>&6
2124if test $ac_cv_header_stdc = yes; then
2125  cat >> confdefs.h <<\EOF
2126#define STDC_HEADERS 1
2127EOF
2128
2129fi
2130
2131
2132for ac_hdr in limits.h unistd.h
2133do
2134ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2135echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2136if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2137  echo $ac_n "(cached) $ac_c" 1>&6
2138else
2139  cat > conftest.$ac_ext <<EOF
2140#line 2141 "configure"
2141#include "confdefs.h"
2142#include <$ac_hdr>
2143EOF
2144ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2145{ (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2146ac_err=`grep -v '^ *+' conftest.out`
2147if test -z "$ac_err"; then
2148  rm -rf conftest*
2149  eval "ac_cv_header_$ac_safe=yes"
2150else
2151  echo "$ac_err" >&5
2152  rm -rf conftest*
2153  eval "ac_cv_header_$ac_safe=no"
2154fi
2155rm -f conftest*
2156fi
2157if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2158  echo "$ac_t""yes" 1>&6
2159    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2160  cat >> confdefs.h <<EOF
2161#define $ac_tr_hdr 1
2162EOF
2163 
2164else
2165  echo "$ac_t""no" 1>&6
2166{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2167fi
2168done
2169
2170
2171for ac_hdr in sys/file.h sys/ioctl.h sys/time.h sys/times.h
2172do
2173ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2174echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2175if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2176  echo $ac_n "(cached) $ac_c" 1>&6
2177else
2178  cat > conftest.$ac_ext <<EOF
2179#line 2180 "configure"
2180#include "confdefs.h"
2181#include <$ac_hdr>
2182EOF
2183ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2184{ (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2185ac_err=`grep -v '^ *+' conftest.out`
2186if test -z "$ac_err"; then
2187  rm -rf conftest*
2188  eval "ac_cv_header_$ac_safe=yes"
2189else
2190  echo "$ac_err" >&5
2191  rm -rf conftest*
2192  eval "ac_cv_header_$ac_safe=no"
2193fi
2194rm -f conftest*
2195fi
2196if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2197  echo "$ac_t""yes" 1>&6
2198    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2199  cat >> confdefs.h <<EOF
2200#define $ac_tr_hdr 1
2201EOF
2202 
2203else
2204  echo "$ac_t""no" 1>&6
2205fi
2206done
2207
2208
2209echo $ac_n "checking for working const""... $ac_c" 1>&6
2210if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2211  echo $ac_n "(cached) $ac_c" 1>&6
2212else
2213  cat > conftest.$ac_ext <<EOF
2214#line 2215 "configure"
2215#include "confdefs.h"
2216
2217int main() { return 0; }
2218int t() {
2219
2220/* Ultrix mips cc rejects this.  */
2221typedef int charset[2]; const charset x;
2222/* SunOS 4.1.1 cc rejects this.  */
2223char const *const *ccp;
2224char **p;
2225/* NEC SVR4.0.2 mips cc rejects this.  */
2226struct point {int x, y;};
2227static struct point const zero = {0,0};
2228/* AIX XL C 1.02.0.0 rejects this.
2229   It does not let you subtract one const X* pointer from another in an arm
2230   of an if-expression whose if-part is not a constant expression */
2231const char *g = "string";
2232ccp = &g + (g ? g-g : 0);
2233/* HPUX 7.0 cc rejects these. */
2234++ccp;
2235p = (char**) ccp;
2236ccp = (char const *const *) p;
2237{ /* SCO 3.2v4 cc rejects this.  */
2238  char *t;
2239  char const *s = 0 ? (char *) 0 : (char const *) 0;
2240
2241  *t++ = 0;
2242}
2243{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2244  int x[] = {25, 17};
2245  const int *foo = &x[0];
2246  ++foo;
2247}
2248{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2249  typedef const int *iptr;
2250  iptr p = 0;
2251  ++p;
2252}
2253{ /* AIX XL C 1.02.0.0 rejects this saying
2254     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2255  struct s { int j; const int *ap[3]; };
2256  struct s *b; b->j = 5;
2257}
2258{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2259  const int foo = 10;
2260}
2261
2262; return 0; }
2263EOF
2264if { (eval echo configure:2265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2265  rm -rf conftest*
2266  ac_cv_c_const=yes
2267else
2268  rm -rf conftest*
2269  ac_cv_c_const=no
2270fi
2271rm -f conftest*
2272
2273fi
2274
2275echo "$ac_t""$ac_cv_c_const" 1>&6
2276if test $ac_cv_c_const = no; then
2277  cat >> confdefs.h <<\EOF
2278#define const
2279EOF
2280
2281fi
2282
2283echo $ac_n "checking for inline""... $ac_c" 1>&6
2284if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2285  echo $ac_n "(cached) $ac_c" 1>&6
2286else
2287  ac_cv_c_inline=no
2288for ac_kw in inline __inline__ __inline; do
2289  cat > conftest.$ac_ext <<EOF
2290#line 2291 "configure"
2291#include "confdefs.h"
2292
2293int main() { return 0; }
2294int t() {
2295} $ac_kw foo() {
2296; return 0; }
2297EOF
2298if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2299  rm -rf conftest*
2300  ac_cv_c_inline=$ac_kw; break
2301fi
2302rm -f conftest*
2303
2304done
2305
2306fi
2307
2308echo "$ac_t""$ac_cv_c_inline" 1>&6
2309case "$ac_cv_c_inline" in
2310  inline | yes) ;;
2311  no) cat >> confdefs.h <<\EOF
2312#define inline
2313EOF
2314 ;;
2315  *)  cat >> confdefs.h <<EOF
2316#define inline $ac_cv_c_inline
2317EOF
2318 ;;
2319esac
2320
2321echo $ac_n "checking for size_t""... $ac_c" 1>&6
2322if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2323  echo $ac_n "(cached) $ac_c" 1>&6
2324else
2325  cat > conftest.$ac_ext <<EOF
2326#line 2327 "configure"
2327#include "confdefs.h"
2328#include <sys/types.h>
2329#if STDC_HEADERS
2330#include <stdlib.h>
2331#endif
2332EOF
2333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2334  egrep "size_t" >/dev/null 2>&1; then
2335  rm -rf conftest*
2336  ac_cv_type_size_t=yes
2337else
2338  rm -rf conftest*
2339  ac_cv_type_size_t=no
2340fi
2341rm -f conftest*
2342
2343fi
2344echo "$ac_t""$ac_cv_type_size_t" 1>&6
2345if test $ac_cv_type_size_t = no; then
2346  cat >> confdefs.h <<\EOF
2347#define size_t unsigned
2348EOF
2349
2350fi
2351
2352echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2353if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2354  echo $ac_n "(cached) $ac_c" 1>&6
2355else
2356  cat > conftest.$ac_ext <<EOF
2357#line 2358 "configure"
2358#include "confdefs.h"
2359#include <sys/types.h>
2360#include <sys/time.h>
2361#include <time.h>
2362int main() { return 0; }
2363int t() {
2364struct tm *tp;
2365; return 0; }
2366EOF
2367if { (eval echo configure:2368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2368  rm -rf conftest*
2369  ac_cv_header_time=yes
2370else
2371  rm -rf conftest*
2372  ac_cv_header_time=no
2373fi
2374rm -f conftest*
2375
2376fi
2377
2378echo "$ac_t""$ac_cv_header_time" 1>&6
2379if test $ac_cv_header_time = yes; then
2380  cat >> confdefs.h <<\EOF
2381#define TIME_WITH_SYS_TIME 1
2382EOF
2383
2384fi
2385
2386echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2387if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2388  echo $ac_n "(cached) $ac_c" 1>&6
2389else
2390  cat > conftest.$ac_ext <<EOF
2391#line 2392 "configure"
2392#include "confdefs.h"
2393#include <sys/types.h>
2394#include <time.h>
2395int main() { return 0; }
2396int t() {
2397struct tm *tp; tp->tm_sec;
2398; return 0; }
2399EOF
2400if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2401  rm -rf conftest*
2402  ac_cv_struct_tm=time.h
2403else
2404  rm -rf conftest*
2405  ac_cv_struct_tm=sys/time.h
2406fi
2407rm -f conftest*
2408
2409fi
2410
2411echo "$ac_t""$ac_cv_struct_tm" 1>&6
2412if test $ac_cv_struct_tm = sys/time.h; then
2413  cat >> confdefs.h <<\EOF
2414#define TM_IN_SYS_TIME 1
2415EOF
2416
2417fi
2418
2419
2420# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2421# for constant arguments.  Useless!
2422echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2423if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2424  echo $ac_n "(cached) $ac_c" 1>&6
2425else
2426  cat > conftest.$ac_ext <<EOF
2427#line 2428 "configure"
2428#include "confdefs.h"
2429#include <alloca.h>
2430int main() { return 0; }
2431int t() {
2432char *p = alloca(2 * sizeof(int));
2433; return 0; }
2434EOF
2435if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2436  rm -rf conftest*
2437  ac_cv_header_alloca_h=yes
2438else
2439  rm -rf conftest*
2440  ac_cv_header_alloca_h=no
2441fi
2442rm -f conftest*
2443
2444fi
2445
2446echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2447if test $ac_cv_header_alloca_h = yes; then
2448  cat >> confdefs.h <<\EOF
2449#define HAVE_ALLOCA_H 1
2450EOF
2451
2452fi
2453
2454echo $ac_n "checking for alloca""... $ac_c" 1>&6
2455if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
2456  echo $ac_n "(cached) $ac_c" 1>&6
2457else
2458  cat > conftest.$ac_ext <<EOF
2459#line 2460 "configure"
2460#include "confdefs.h"
2461
2462#ifdef __GNUC__
2463# define alloca __builtin_alloca
2464#else
2465# if HAVE_ALLOCA_H
2466#  include <alloca.h>
2467# else
2468#  ifdef _AIX
2469 #pragma alloca
2470#  else
2471#   ifndef alloca /* predefined by HP cc +Olibcalls */
2472char *alloca ();
2473#   endif
2474#  endif
2475# endif
2476#endif
2477
2478int main() { return 0; }
2479int t() {
2480char *p = (char *) alloca(1);
2481; return 0; }
2482EOF
2483if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2484  rm -rf conftest*
2485  ac_cv_func_alloca=yes
2486else
2487  rm -rf conftest*
2488  ac_cv_func_alloca=no
2489fi
2490rm -f conftest*
2491
2492fi
2493
2494echo "$ac_t""$ac_cv_func_alloca" 1>&6
2495if test $ac_cv_func_alloca = yes; then
2496  cat >> confdefs.h <<\EOF
2497#define HAVE_ALLOCA 1
2498EOF
2499
2500fi
2501
2502if test $ac_cv_func_alloca = no; then
2503  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2504  # that cause trouble.  Some versions do not even contain alloca or
2505  # contain a buggy version.  If you still want to use their alloca,
2506  # use ar to extract alloca.o from them instead of compiling alloca.c.
2507  ALLOCA=alloca.o
2508  cat >> confdefs.h <<\EOF
2509#define C_ALLOCA 1
2510EOF
2511
2512
2513echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2514if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2515  echo $ac_n "(cached) $ac_c" 1>&6
2516else
2517  cat > conftest.$ac_ext <<EOF
2518#line 2519 "configure"
2519#include "confdefs.h"
2520#if defined(CRAY) && ! defined(CRAY2)
2521webecray
2522#else
2523wenotbecray
2524#endif
2525
2526EOF
2527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2528  egrep "webecray" >/dev/null 2>&1; then
2529  rm -rf conftest*
2530  ac_cv_os_cray=yes
2531else
2532  rm -rf conftest*
2533  ac_cv_os_cray=no
2534fi
2535rm -f conftest*
2536
2537fi
2538
2539echo "$ac_t""$ac_cv_os_cray" 1>&6
2540if test $ac_cv_os_cray = yes; then
2541for ac_func in _getb67 GETB67 getb67; do
2542  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2543if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2544  echo $ac_n "(cached) $ac_c" 1>&6
2545else
2546  cat > conftest.$ac_ext <<EOF
2547#line 2548 "configure"
2548#include "confdefs.h"
2549/* System header to define __stub macros and hopefully few prototypes,
2550    which can conflict with char $ac_func(); below.  */
2551#include <assert.h>
2552/* Override any gcc2 internal prototype to avoid an error.  */
2553char $ac_func();
2554
2555int main() { return 0; }
2556int t() {
2557
2558/* The GNU C library defines this for functions which it implements
2559    to always fail with ENOSYS.  Some functions are actually named
2560    something starting with __ and the normal name is an alias.  */
2561#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2562choke me
2563#else
2564$ac_func();
2565#endif
2566
2567; return 0; }
2568EOF
2569if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2570  rm -rf conftest*
2571  eval "ac_cv_func_$ac_func=yes"
2572else
2573  rm -rf conftest*
2574  eval "ac_cv_func_$ac_func=no"
2575fi
2576rm -f conftest*
2577
2578fi
2579if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2580  echo "$ac_t""yes" 1>&6
2581  cat >> confdefs.h <<EOF
2582#define CRAY_STACKSEG_END $ac_func
2583EOF
2584
2585  break
2586else
2587  echo "$ac_t""no" 1>&6
2588fi
2589
2590done
2591fi
2592
2593echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2594if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2595  echo $ac_n "(cached) $ac_c" 1>&6
2596else
2597  if test "$cross_compiling" = yes; then
2598  ac_cv_c_stack_direction=0
2599else
2600cat > conftest.$ac_ext <<EOF
2601#line 2602 "configure"
2602#include "confdefs.h"
2603find_stack_direction ()
2604{
2605  static char *addr = 0;
2606  auto char dummy;
2607  if (addr == 0)
2608    {
2609      addr = &dummy;
2610      return find_stack_direction ();
2611    }
2612  else
2613    return (&dummy > addr) ? 1 : -1;
2614}
2615main ()
2616{
2617  exit (find_stack_direction() < 0);
2618}
2619EOF
2620{ (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2621if test -s conftest && (./conftest; exit) 2>/dev/null; then
2622  ac_cv_c_stack_direction=1
2623else
2624  ac_cv_c_stack_direction=-1
2625fi
2626fi
2627rm -fr conftest*
2628fi
2629
2630echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2631cat >> confdefs.h <<EOF
2632#define STACK_DIRECTION $ac_cv_c_stack_direction
2633EOF
2634
2635fi
2636
2637if test $ac_cv_prog_gcc = yes; then
2638    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2639if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2640  echo $ac_n "(cached) $ac_c" 1>&6
2641else
2642    ac_pattern="Autoconf.*'x'"
2643  cat > conftest.$ac_ext <<EOF
2644#line 2645 "configure"
2645#include "confdefs.h"
2646#include <sgtty.h>
2647Autoconf TIOCGETP
2648EOF
2649if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2650  egrep "$ac_pattern" >/dev/null 2>&1; then
2651  rm -rf conftest*
2652  ac_cv_prog_gcc_traditional=yes
2653else
2654  rm -rf conftest*
2655  ac_cv_prog_gcc_traditional=no
2656fi
2657rm -f conftest*
2658
2659
2660  if test $ac_cv_prog_gcc_traditional = no; then
2661    cat > conftest.$ac_ext <<EOF
2662#line 2663 "configure"
2663#include "confdefs.h"
2664#include <termio.h>
2665Autoconf TCGETA
2666EOF
2667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2668  egrep "$ac_pattern" >/dev/null 2>&1; then
2669  rm -rf conftest*
2670  ac_cv_prog_gcc_traditional=yes
2671fi
2672rm -f conftest*
2673
2674  fi
2675fi
2676
2677echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2678  if test $ac_cv_prog_gcc_traditional = yes; then
2679    CC="$CC -traditional"
2680  fi
2681fi
2682
2683for ac_func in valloc getpagesize
2684do
2685echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2686if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2687  echo $ac_n "(cached) $ac_c" 1>&6
2688else
2689  cat > conftest.$ac_ext <<EOF
2690#line 2691 "configure"
2691#include "confdefs.h"
2692/* System header to define __stub macros and hopefully few prototypes,
2693    which can conflict with char $ac_func(); below.  */
2694#include <assert.h>
2695/* Override any gcc2 internal prototype to avoid an error.  */
2696char $ac_func();
2697
2698int main() { return 0; }
2699int t() {
2700
2701/* The GNU C library defines this for functions which it implements
2702    to always fail with ENOSYS.  Some functions are actually named
2703    something starting with __ and the normal name is an alias.  */
2704#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2705choke me
2706#else
2707$ac_func();
2708#endif
2709
2710; return 0; }
2711EOF
2712if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2713  rm -rf conftest*
2714  eval "ac_cv_func_$ac_func=yes"
2715else
2716  rm -rf conftest*
2717  eval "ac_cv_func_$ac_func=no"
2718fi
2719rm -f conftest*
2720
2721fi
2722if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2723  echo "$ac_t""yes" 1>&6
2724    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2725  cat >> confdefs.h <<EOF
2726#define $ac_tr_func 1
2727EOF
2728 
2729else
2730  echo "$ac_t""no" 1>&6
2731fi
2732done
2733
2734echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2735if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
2736  echo $ac_n "(cached) $ac_c" 1>&6
2737else
2738  if test "$cross_compiling" = yes; then
2739  ac_cv_func_mmap=no
2740else
2741cat > conftest.$ac_ext <<EOF
2742#line 2743 "configure"
2743#include "confdefs.h"
2744
2745/* Thanks to Mike Haertel and Jim Avera for this test. */
2746#include <sys/types.h>
2747#include <fcntl.h>
2748#include <sys/mman.h>
2749
2750#ifndef HAVE_GETPAGESIZE
2751# include <sys/param.h>
2752# ifdef EXEC_PAGESIZE
2753#  define getpagesize() EXEC_PAGESIZE
2754# else
2755#  ifdef NBPG
2756#   define getpagesize() NBPG * CLSIZE
2757#   ifndef CLSIZE
2758#    define CLSIZE 1
2759#   endif
2760#  else
2761#   ifdef NBPC
2762#    define getpagesize() NBPC
2763#   else
2764#    define getpagesize() PAGESIZE /* SVR4 */
2765#   endif
2766#  endif
2767# endif
2768#endif
2769
2770#ifndef HAVE_VALLOC
2771# define valloc malloc
2772#endif
2773
2774#ifdef __cplusplus
2775extern "C" { void *valloc(unsigned), *malloc(unsigned); }
2776#else
2777char *valloc(), *malloc();
2778#endif
2779
2780int
2781main()
2782{
2783  char *buf1, *buf2, *buf3;
2784  int i = getpagesize(), j;
2785  int i2 = i * 2;
2786  int fd;
2787
2788  buf1 = (char *)valloc(i2);
2789  buf2 = (char *)valloc(i);
2790  buf3 = (char *)malloc(i2);
2791  for (j = 0; j < i2; ++j)
2792    *(buf1 + j) = rand();
2793  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
2794  write(fd, buf1, i2);
2795  mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
2796  for (j = 0; j < i; ++j)
2797    if (*(buf1 + j) != *(buf2 + j))
2798      exit(1);
2799  lseek(fd, (long)i, 0);
2800  read(fd, buf2, i); /* read into mapped memory -- file should not change */
2801  /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
2802  lseek(fd, (long)0, 0);
2803  read(fd, buf3, i2);
2804  for (j = 0; j < i2; ++j)
2805    if (*(buf1 + j) != *(buf3 + j))
2806      exit(1);
2807  exit(0);
2808}
2809
2810EOF
2811{ (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2812if test -s conftest && (./conftest; exit) 2>/dev/null; then
2813  ac_cv_func_mmap=yes
2814else
2815  ac_cv_func_mmap=no
2816fi
2817fi
2818rm -fr conftest*
2819fi
2820
2821echo "$ac_t""$ac_cv_func_mmap" 1>&6
2822if test $ac_cv_func_mmap = yes; then
2823  cat >> confdefs.h <<\EOF
2824#define HAVE_MMAP 1
2825EOF
2826
2827fi
2828
2829echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2830if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2831  echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833  cat > conftest.$ac_ext <<EOF
2834#line 2835 "configure"
2835#include "confdefs.h"
2836#include <sys/types.h>
2837#include <signal.h>
2838#ifdef signal
2839#undef signal
2840#endif
2841#ifdef __cplusplus
2842extern "C" void (*signal (int, void (*)(int)))(int);
2843#else
2844void (*signal ()) ();
2845#endif
2846
2847int main() { return 0; }
2848int t() {
2849int i;
2850; return 0; }
2851EOF
2852if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2853  rm -rf conftest*
2854  ac_cv_type_signal=void
2855else
2856  rm -rf conftest*
2857  ac_cv_type_signal=int
2858fi
2859rm -f conftest*
2860
2861fi
2862
2863echo "$ac_t""$ac_cv_type_signal" 1>&6
2864cat >> confdefs.h <<EOF
2865#define RETSIGTYPE $ac_cv_type_signal
2866EOF
2867
2868
2869echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2870if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2871  echo $ac_n "(cached) $ac_c" 1>&6
2872else
2873  cat > conftest.$ac_ext <<EOF
2874#line 2875 "configure"
2875#include "confdefs.h"
2876/* System header to define __stub macros and hopefully few prototypes,
2877    which can conflict with char vprintf(); below.  */
2878#include <assert.h>
2879/* Override any gcc2 internal prototype to avoid an error.  */
2880char vprintf();
2881
2882int main() { return 0; }
2883int t() {
2884
2885/* The GNU C library defines this for functions which it implements
2886    to always fail with ENOSYS.  Some functions are actually named
2887    something starting with __ and the normal name is an alias.  */
2888#if defined (__stub_vprintf) || defined (__stub___vprintf)
2889choke me
2890#else
2891vprintf();
2892#endif
2893
2894; return 0; }
2895EOF
2896if { (eval echo configure:2897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2897  rm -rf conftest*
2898  eval "ac_cv_func_vprintf=yes"
2899else
2900  rm -rf conftest*
2901  eval "ac_cv_func_vprintf=no"
2902fi
2903rm -f conftest*
2904
2905fi
2906if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2907  echo "$ac_t""yes" 1>&6
2908  cat >> confdefs.h <<\EOF
2909#define HAVE_VPRINTF 1
2910EOF
2911
2912else
2913  echo "$ac_t""no" 1>&6
2914fi
2915
2916if test "$ac_cv_func_vprintf" != yes; then
2917echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2918if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2919  echo $ac_n "(cached) $ac_c" 1>&6
2920else
2921  cat > conftest.$ac_ext <<EOF
2922#line 2923 "configure"
2923#include "confdefs.h"
2924/* System header to define __stub macros and hopefully few prototypes,
2925    which can conflict with char _doprnt(); below.  */
2926#include <assert.h>
2927/* Override any gcc2 internal prototype to avoid an error.  */
2928char _doprnt();
2929
2930int main() { return 0; }
2931int t() {
2932
2933/* The GNU C library defines this for functions which it implements
2934    to always fail with ENOSYS.  Some functions are actually named
2935    something starting with __ and the normal name is an alias.  */
2936#if defined (__stub__doprnt) || defined (__stub____doprnt)
2937choke me
2938#else
2939_doprnt();
2940#endif
2941
2942; return 0; }
2943EOF
2944if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2945  rm -rf conftest*
2946  eval "ac_cv_func__doprnt=yes"
2947else
2948  rm -rf conftest*
2949  eval "ac_cv_func__doprnt=no"
2950fi
2951rm -f conftest*
2952
2953fi
2954if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2955  echo "$ac_t""yes" 1>&6
2956  cat >> confdefs.h <<\EOF
2957#define HAVE_DOPRNT 1
2958EOF
2959
2960else
2961  echo "$ac_t""no" 1>&6
2962fi
2963
2964fi
2965
2966for ac_func in gettimeofday strstr strtod strtol atexit
2967do
2968echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2969if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2970  echo $ac_n "(cached) $ac_c" 1>&6
2971else
2972  cat > conftest.$ac_ext <<EOF
2973#line 2974 "configure"
2974#include "confdefs.h"
2975/* System header to define __stub macros and hopefully few prototypes,
2976    which can conflict with char $ac_func(); below.  */
2977#include <assert.h>
2978/* Override any gcc2 internal prototype to avoid an error.  */
2979char $ac_func();
2980
2981int main() { return 0; }
2982int t() {
2983
2984/* The GNU C library defines this for functions which it implements
2985    to always fail with ENOSYS.  Some functions are actually named
2986    something starting with __ and the normal name is an alias.  */
2987#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2988choke me
2989#else
2990$ac_func();
2991#endif
2992
2993; return 0; }
2994EOF
2995if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2996  rm -rf conftest*
2997  eval "ac_cv_func_$ac_func=yes"
2998else
2999  rm -rf conftest*
3000  eval "ac_cv_func_$ac_func=no"
3001fi
3002rm -f conftest*
3003
3004fi
3005if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3006  echo "$ac_t""yes" 1>&6
3007    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3008  cat >> confdefs.h <<EOF
3009#define $ac_tr_func 1
3010EOF
3011 
3012else
3013  echo "$ac_t""no" 1>&6
3014fi
3015done
3016
3017
3018
3019echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3020if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3021  echo $ac_n "(cached) $ac_c" 1>&6
3022else
3023  if test "$cross_compiling" = yes; then
3024  1
3025else
3026cat > conftest.$ac_ext <<EOF
3027#line 3028 "configure"
3028#include "confdefs.h"
3029 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
3030EOF
3031{ (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3032if test -s conftest && (./conftest; exit) 2>/dev/null; then
3033  ac_cv_shift=yes
3034else
3035  ac_cv_shift=no
3036fi
3037fi
3038rm -fr conftest*
3039fi
3040
3041if test "$ac_cv_shift" = yes; then   
3042  echo "$ac_t""yes" 1>&6
3043else
3044  echo "$ac_t""no" 1>&6
3045  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3046fi
3047
3048
3049echo $ac_n "checking whether sizeof int is four bytes""... $ac_c" 1>&6
3050if eval "test \"`echo '$''{'ac_cv_sizeof_int_equals_four'+set}'`\" = set"; then
3051  echo $ac_n "(cached) $ac_c" 1>&6
3052else
3053  if test "$cross_compiling" = yes; then
3054  1
3055else
3056cat > conftest.$ac_ext <<EOF
3057#line 3058 "configure"
3058#include "confdefs.h"
3059 int main() {if (sizeof(int) == 4)  exit(0); else exit(1); }
3060EOF
3061{ (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3062if test -s conftest && (./conftest; exit) 2>/dev/null; then
3063  ac_cv_sizeof_int_equals_four=yes
3064else
3065  ac_cv_sizeof_int_equals_four=no
3066fi
3067fi
3068rm -fr conftest*
3069fi
3070
3071
3072if test "$ac_cv_sizeof_int_equals_four" = yes; then
3073  echo "$ac_t""yes" 1>&6
3074else
3075  echo "$ac_t""no" 1>&6
3076  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3077fi
3078
3079echo $ac_n "checking whether sizeof long equals sizeof void*""... $ac_c" 1>&6
3080if eval "test \"`echo '$''{'ac_cv_sizeof_long_equals_voidp'+set}'`\" = set"; then
3081  echo $ac_n "(cached) $ac_c" 1>&6
3082else
3083  if test "$cross_compiling" = yes; then
3084  1
3085else
3086cat > conftest.$ac_ext <<EOF
3087#line 3088 "configure"
3088#include "confdefs.h"
3089 int main() {if (sizeof(long) == sizeof(void*))  exit(0); else exit(1); }
3090EOF
3091{ (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3092if test -s conftest && (./conftest; exit) 2>/dev/null; then
3093  ac_cv_sizeof_long_equals_voidp=yes
3094else
3095  ac_cv_sizeof_long_equals_voidp=no
3096fi
3097fi
3098rm -fr conftest*
3099fi
3100
3101if test "$ac_cv_sizeof_long_equals_voidp" = yes; then
3102  echo "$ac_t""yes" 1>&6
3103else
3104  echo "$ac_t""no" 1>&6
3105  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3106fi
3107
3108echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3109if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3110  echo $ac_n "(cached) $ac_c" 1>&6
3111else
3112  if test "$cross_compiling" = yes; then
3113  1
3114else
3115cat > conftest.$ac_ext <<EOF
3116#line 3117 "configure"
3117#include "confdefs.h"
3118#include <stdio.h>
3119 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3120EOF
3121{ (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3122if test -s conftest && (./conftest; exit) 2>/dev/null; then
3123  ac_cv_returns_n_of_chars=yes
3124else
3125  ac_cv_returns_n_of_chars=no
3126fi
3127fi
3128rm -fr conftest*
3129fi
3130
3131if test "$ac_cv_returns_n_of_chars" = yes; then
3132  echo "$ac_t""yes" 1>&6
3133else
3134  echo "$ac_t""no" 1>&6
3135  cat >> confdefs.h <<\EOF
3136#define BSD_SPRINTF 1
3137EOF
3138
3139fi
3140
3141echo $ac_n "checking size of void*""... $ac_c" 1>&6
3142if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3143  echo $ac_n "(cached) $ac_c" 1>&6
3144else
3145  if test "$cross_compiling" = yes; then
3146  ac_cv_sizeof_voidp=4
3147else
3148cat > conftest.$ac_ext <<EOF
3149#line 3150 "configure"
3150#include "confdefs.h"
3151#include <stdio.h>
3152main()
3153{
3154  FILE *f=fopen("conftestval", "w");
3155  if (!f) exit(1);
3156  fprintf(f, "%d\n", sizeof(void*));
3157  exit(0);
3158}
3159EOF
3160{ (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3161if test -s conftest && (./conftest; exit) 2>/dev/null; then
3162  ac_cv_sizeof_voidp=`cat conftestval`
3163else
3164  ac_cv_sizeof_voidp=0
3165fi
3166fi
3167rm -fr conftest*
3168fi
3169echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3170cat >> confdefs.h <<EOF
3171#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3172EOF
3173
3174
3175
3176
3177echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
3178if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
3179  echo $ac_n "(cached) $ac_c" 1>&6
3180else
3181  cat > conftest.$ac_ext <<EOF
3182#line 3183 "configure"
3183#include "confdefs.h"
3184#ifdef _AIX
3185    yes
3186#endif
3187
3188EOF
3189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3190  egrep "yes" >/dev/null 2>&1; then
3191  rm -rf conftest*
3192  ac_cv_is_aix=yes
3193else
3194  rm -rf conftest*
3195  ac_cv_is_aix=no
3196fi
3197rm -f conftest*
3198
3199fi
3200
3201if test "$ac_cv_is_aix" = yes; then
3202  echo "$ac_t""yes" 1>&6
3203else
3204  echo "$ac_t""no" 1>&6
3205fi
3206
3207
3208if test ${GXX} = yes; then
3209  if test "$ac_cxxflags_set" = no; then
3210    CXXFLAGS="-O3 -w -fomit-frame-pointer"
3211  fi
3212  CXXTEMPLFLAGS="-fno-implicit-templates"
3213  if test "$ac_cv_is_aix" = yes; then
3214    CXXNOOPTFLAGS="-w"
3215  else
3216    CXXNOOPTFLAGS=$CXXFLAGS
3217  fi
3218else
3219  CXXTEMPFLAGS=""
3220  CXXNOOPTFLAGS=$CXXFLAGS
3221fi
3222
3223
3224
3225if test ${GCC} = yes && test "$ac_cflags_set" = no ; then
3226  CFLAGS="-O3 -w -fomit-frame-pointer"
3227fi
3228
3229trap '' 1 2 15
3230cat > confcache <<\EOF
3231# This file is a shell script that caches the results of configure
3232# tests run on this system so they can be shared between configure
3233# scripts and configure runs.  It is not useful on other systems.
3234# If it contains results you don't want to keep, you may remove or edit it.
3235#
3236# By default, configure uses ./config.cache as the cache file,
3237# creating it if it does not exist already.  You can give configure
3238# the --cache-file=FILE option to use a different cache file; that is
3239# what configure does when it calls configure scripts in
3240# subdirectories, so they share the cache.
3241# Giving --cache-file=/dev/null disables caching, for debugging configure.
3242# config.status only pays attention to the cache file if you give it the
3243# --recheck option to rerun configure.
3244#
3245EOF
3246# Ultrix sh set writes to stderr and can't be redirected directly,
3247# and sets the high bit in the cache file unless we assign to the vars.
3248(set) 2>&1 |
3249  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3250  >> confcache
3251if cmp -s $cache_file confcache; then
3252  :
3253else
3254  if test -w $cache_file; then
3255    echo "updating cache $cache_file"
3256    cat confcache > $cache_file
3257  else
3258    echo "not updating unwritable cache $cache_file"
3259  fi
3260fi
3261rm -f confcache
3262
3263trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3264
3265test "x$prefix" = xNONE && prefix=$ac_default_prefix
3266# Let make expand exec_prefix.
3267test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3268
3269# Any assignment to VPATH causes Sun make to only execute
3270# the first set of double-colon rules, so remove it if not needed.
3271# If there is a colon in the path, we need to keep it.
3272if test "x$srcdir" = x.; then
3273  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3274fi
3275
3276trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3277
3278DEFS=-DHAVE_CONFIG_H
3279
3280# Without the "./", some shells look in PATH for config.status.
3281: ${CONFIG_STATUS=./config.status}
3282
3283echo creating $CONFIG_STATUS
3284rm -f $CONFIG_STATUS
3285cat > $CONFIG_STATUS <<EOF
3286#! /bin/sh
3287# Generated automatically by configure.
3288# Run this file to recreate the current configuration.
3289# This directory was configured as follows,
3290# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3291#
3292# $0 $ac_configure_args
3293#
3294# Compiler output produced by configure, useful for debugging
3295# configure, is in ./config.log if it exists.
3296
3297ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3298for ac_option
3299do
3300  case "\$ac_option" in
3301  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3302    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3303    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3304  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3305    echo "$CONFIG_STATUS generated by autoconf version 2.9"
3306    exit 0 ;;
3307  -help | --help | --hel | --he | --h)
3308    echo "\$ac_cs_usage"; exit 0 ;;
3309  *) echo "\$ac_cs_usage"; exit 1 ;;
3310  esac
3311done
3312
3313ac_given_srcdir=$srcdir
3314
3315trap 'rm -fr `echo "Makefile doc/Makefile mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3316EOF
3317cat >> $CONFIG_STATUS <<EOF
3318
3319# Protect against being on the right side of a sed subst in config.status.
3320sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3321 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3322$ac_vpsub
3323$extrasub
3324s%@CFLAGS@%$CFLAGS%g
3325s%@CPPFLAGS@%$CPPFLAGS%g
3326s%@CXXFLAGS@%$CXXFLAGS%g
3327s%@DEFS@%$DEFS%g
3328s%@LDFLAGS@%$LDFLAGS%g
3329s%@LIBS@%$LIBS%g
3330s%@exec_prefix@%$exec_prefix%g
3331s%@prefix@%$prefix%g
3332s%@program_transform_name@%$program_transform_name%g
3333s%@bindir@%$bindir%g
3334s%@sbindir@%$sbindir%g
3335s%@libexecdir@%$libexecdir%g
3336s%@datadir@%$datadir%g
3337s%@sysconfdir@%$sysconfdir%g
3338s%@sharedstatedir@%$sharedstatedir%g
3339s%@localstatedir@%$localstatedir%g
3340s%@libdir@%$libdir%g
3341s%@includedir@%$includedir%g
3342s%@oldincludedir@%$oldincludedir%g
3343s%@infodir@%$infodir%g
3344s%@mandir@%$mandir%g
3345s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
3346s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
3347s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
3348s%@singulardatadir@%$singulardatadir%g
3349s%@CC@%$CC%g
3350s%@CPP@%$CPP%g
3351s%@CXX@%$CXX%g
3352s%@SET_MAKE@%$SET_MAKE%g
3353s%@INFO@%$INFO%g
3354s%@WITH_MP@%$WITH_MP%g
3355s%@WITH_FACTORY@%$WITH_FACTORY%g
3356s%@WITH_LIBFAC@%$WITH_LIBFAC%g
3357s%@NEED_LIBS@%$NEED_LIBS%g
3358s%@ALLOCA@%$ALLOCA%g
3359s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
3360s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
3361
3362CEOF
3363EOF
3364cat >> $CONFIG_STATUS <<EOF
3365
3366CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
3367EOF
3368cat >> $CONFIG_STATUS <<\EOF
3369for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3370  # Support "outfile[:infile]", defaulting infile="outfile.in".
3371  case "$ac_file" in
3372  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3373       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3374  *) ac_file_in="${ac_file}.in" ;;
3375  esac
3376
3377  # Adjust relative srcdir, etc. for subdirectories.
3378
3379  # Remove last slash and all that follows it.  Not all systems have dirname.
3380  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3381  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3382    # The file is in a subdirectory.
3383    test ! -d "$ac_dir" && mkdir "$ac_dir"
3384    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3385    # A "../" for each directory in $ac_dir_suffix.
3386    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3387  else
3388    ac_dir_suffix= ac_dots=
3389  fi
3390
3391  case "$ac_given_srcdir" in
3392  .)  srcdir=.
3393      if test -z "$ac_dots"; then top_srcdir=.
3394      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3395  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3396  *) # Relative path.
3397    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3398    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3399  esac
3400
3401  echo creating "$ac_file"
3402  rm -f "$ac_file"
3403  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3404  case "$ac_file" in
3405  *Makefile*) ac_comsub="1i\\
3406# $configure_input" ;;
3407  *) ac_comsub= ;;
3408  esac
3409  sed -e "$ac_comsub
3410s%@configure_input@%$configure_input%g
3411s%@srcdir@%$srcdir%g
3412s%@top_srcdir@%$top_srcdir%g
3413" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3414fi; done
3415rm -f conftest.subs
3416
3417# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3418# NAME is the cpp macro being defined and VALUE is the value it is being given.
3419#
3420# ac_d sets the value in "#define NAME VALUE" lines.
3421ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3422ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3423ac_dC='\3'
3424ac_dD='%g'
3425# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3426ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3427ac_uB='\([      ]\)%\1#\2define\3'
3428ac_uC=' '
3429ac_uD='\4%g'
3430# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3431ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3432ac_eB='$%\1#\2define\3'
3433ac_eC=' '
3434ac_eD='%g'
3435
3436CONFIG_HEADERS=${CONFIG_HEADERS-"mod2.h"}
3437for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3438  # Support "outfile[:infile]", defaulting infile="outfile.in".
3439  case "$ac_file" in
3440  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3441       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3442  *) ac_file_in="${ac_file}.in" ;;
3443  esac
3444
3445  echo creating $ac_file
3446
3447  rm -f conftest.frag conftest.in conftest.out
3448  cp $ac_given_srcdir/$ac_file_in conftest.in
3449
3450EOF
3451
3452# Transform confdefs.h into a sed script conftest.vals that substitutes
3453# the proper values into config.h.in to produce config.h.  And first:
3454# Protect against being on the right side of a sed subst in config.status.
3455# Protect against being in an unquoted here document in config.status.
3456rm -f conftest.vals
3457cat > conftest.hdr <<\EOF
3458s/[\\&%]/\\&/g
3459s%[\\$`]%\\&%g
3460s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3461s%ac_d%ac_u%gp
3462s%ac_u%ac_e%gp
3463EOF
3464sed -n -f conftest.hdr confdefs.h > conftest.vals
3465rm -f conftest.hdr
3466
3467# This sed command replaces #undef with comments.  This is necessary, for
3468# example, in the case of _POSIX_SOURCE, which is predefined and required
3469# on some systems where configure will not decide to define it.
3470cat >> conftest.vals <<\EOF
3471s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3472EOF
3473
3474# Break up conftest.vals because some shells have a limit on
3475# the size of here documents, and old seds have small limits too.
3476# Maximum number of lines to put in a single here document.
3477ac_max_here_lines=12
3478
3479rm -f conftest.tail
3480while :
3481do
3482  ac_lines=`grep -c . conftest.vals`
3483  # grep -c gives empty output for an empty file on some AIX systems.
3484  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3485  # Write a limited-size here document to conftest.frag.
3486  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3487  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3488  echo 'CEOF
3489  sed -f conftest.frag conftest.in > conftest.out
3490  rm -f conftest.in
3491  mv conftest.out conftest.in
3492' >> $CONFIG_STATUS
3493  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3494  rm -f conftest.vals
3495  mv conftest.tail conftest.vals
3496done
3497rm -f conftest.vals
3498
3499cat >> $CONFIG_STATUS <<\EOF
3500  rm -f conftest.frag conftest.h
3501  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3502  cat conftest.in >> conftest.h
3503  rm -f conftest.in
3504  if cmp -s $ac_file conftest.h 2>/dev/null; then
3505    echo "$ac_file is unchanged"
3506    rm -f conftest.h
3507  else
3508    rm -f $ac_file
3509    mv conftest.h $ac_file
3510  fi
3511fi; done
3512
3513
3514\
3515 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
3516exit 0
3517EOF
3518chmod +x $CONFIG_STATUS
3519rm -fr confdefs* $ac_clean_files
3520test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3521
Note: See TracBrowser for help on using the repository browser.