source: git/Singular/configure @ f92fa13

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