source: git/Singular/configure @ 31af2e

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