source: git/Singular/configure @ 35aab3

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