source: git/Singular/configure @ 48c165a

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