source: git/Singular/configure @ 9b5a11

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