source: git/Singular/configure @ 98d771

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