source: git/Singular/configure @ adeaee

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