source: git/Singular/configure @ dc32d42

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