source: git/Singular/configure @ 62fd53

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