source: git/Singular/configure @ 50cbdc

fieker-DuValspielwiese
Last change on this file since 50cbdc was 50cbdc, checked in by Hans Schönemann <hannes@…>, 23 years ago
*hannes: merge-2-0-2 git-svn-id: file:///usr/local/Singular/svn/trunk@5619 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 141.1 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:-2}
603SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
604VERSION_DATE=${VERSION_DATE:-"August 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 -fPIC -DPIC"
1743                SLDFLAGS=-shared
1744                LD=gcc
1745                ac_lib_dl=yes
1746          fi
1747        ;;
1748        *Linux*)
1749          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1750echo "configure:1751: checking for dlopen in -ldl" >&5
1751ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1752if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1753  echo $ac_n "(cached) $ac_c" 1>&6
1754else
1755  ac_save_LIBS="$LIBS"
1756LIBS="-ldl  $LIBS"
1757cat > conftest.$ac_ext <<EOF
1758#line 1759 "configure"
1759#include "confdefs.h"
1760/* Override any gcc2 internal prototype to avoid an error.  */
1761/* We use char because int might match the return type of a gcc2
1762    builtin and then its argument prototype would still apply.  */
1763char dlopen();
1764
1765int main() {
1766dlopen()
1767; return 0; }
1768EOF
1769if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1770  rm -rf conftest*
1771  eval "ac_cv_lib_$ac_lib_var=yes"
1772else
1773  echo "configure: failed program was:" >&5
1774  cat conftest.$ac_ext >&5
1775  rm -rf conftest*
1776  eval "ac_cv_lib_$ac_lib_var=no"
1777fi
1778rm -f conftest*
1779LIBS="$ac_save_LIBS"
1780
1781fi
1782if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1783  echo "$ac_t""yes" 1>&6
1784    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1785    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1786  cat >> confdefs.h <<EOF
1787#define $ac_tr_lib 1
1788EOF
1789
1790  LIBS="-ldl $LIBS"
1791
1792else
1793  echo "$ac_t""no" 1>&6
1794fi
1795
1796          if test "$ac_cv_lib_dl_dlopen" = yes; then
1797                LD_DYN_FLAGS="-ldl -rdynamic"
1798                SFLAGS="-fpic -DPIC"
1799                SLDFLAGS=-shared
1800                LD=ld
1801                ac_lib_dl=yes
1802          fi
1803        ;;
1804        IRIX-6)
1805          LD_DYN_FLAGS="-lc"
1806          SFLAGS="-fPIC -DPIC"
1807          SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared"
1808          LD=ld
1809          ac_lib_dl=yes
1810        ;;
1811        SunOS-5)
1812          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1813echo "configure:1814: checking for dlopen in -ldl" >&5
1814ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1815if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1816  echo $ac_n "(cached) $ac_c" 1>&6
1817else
1818  ac_save_LIBS="$LIBS"
1819LIBS="-ldl  $LIBS"
1820cat > conftest.$ac_ext <<EOF
1821#line 1822 "configure"
1822#include "confdefs.h"
1823/* Override any gcc2 internal prototype to avoid an error.  */
1824/* We use char because int might match the return type of a gcc2
1825    builtin and then its argument prototype would still apply.  */
1826char dlopen();
1827
1828int main() {
1829dlopen()
1830; return 0; }
1831EOF
1832if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1833  rm -rf conftest*
1834  eval "ac_cv_lib_$ac_lib_var=yes"
1835else
1836  echo "configure: failed program was:" >&5
1837  cat conftest.$ac_ext >&5
1838  rm -rf conftest*
1839  eval "ac_cv_lib_$ac_lib_var=no"
1840fi
1841rm -f conftest*
1842LIBS="$ac_save_LIBS"
1843
1844fi
1845if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1846  echo "$ac_t""yes" 1>&6
1847    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1848    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1849  cat >> confdefs.h <<EOF
1850#define $ac_tr_lib 1
1851EOF
1852
1853  LIBS="-ldl $LIBS"
1854
1855else
1856  echo "$ac_t""no" 1>&6
1857fi
1858
1859          if test "$ac_cv_lib_dl_dlopen" = yes; then
1860                LD_DYN_FLAGS="-ldl -Xlinker -E"
1861                SFLAGS="-fpic -DPIC"
1862                SLDFLAGS=-shared
1863                LD=ld
1864                ac_lib_dl=yes
1865          fi
1866        ;;
1867esac
1868
1869
1870
1871
1872LIBS=${SAVE_LIBS}
1873
1874
1875# heder file checks
1876echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1877echo "configure:1878: checking for ANSI C header files" >&5
1878if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1879  echo $ac_n "(cached) $ac_c" 1>&6
1880else
1881  cat > conftest.$ac_ext <<EOF
1882#line 1883 "configure"
1883#include "confdefs.h"
1884#include <stdlib.h>
1885#include <stdarg.h>
1886#include <string.h>
1887#include <float.h>
1888EOF
1889ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1890{ (eval echo configure:1891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1891ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1892if test -z "$ac_err"; then
1893  rm -rf conftest*
1894  ac_cv_header_stdc=yes
1895else
1896  echo "$ac_err" >&5
1897  echo "configure: failed program was:" >&5
1898  cat conftest.$ac_ext >&5
1899  rm -rf conftest*
1900  ac_cv_header_stdc=no
1901fi
1902rm -f conftest*
1903
1904if test $ac_cv_header_stdc = yes; then
1905  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1906cat > conftest.$ac_ext <<EOF
1907#line 1908 "configure"
1908#include "confdefs.h"
1909#include <string.h>
1910EOF
1911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1912  egrep "memchr" >/dev/null 2>&1; then
1913  :
1914else
1915  rm -rf conftest*
1916  ac_cv_header_stdc=no
1917fi
1918rm -f conftest*
1919
1920fi
1921
1922if test $ac_cv_header_stdc = yes; then
1923  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1924cat > conftest.$ac_ext <<EOF
1925#line 1926 "configure"
1926#include "confdefs.h"
1927#include <stdlib.h>
1928EOF
1929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1930  egrep "free" >/dev/null 2>&1; then
1931  :
1932else
1933  rm -rf conftest*
1934  ac_cv_header_stdc=no
1935fi
1936rm -f conftest*
1937
1938fi
1939
1940if test $ac_cv_header_stdc = yes; then
1941  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1942if test "$cross_compiling" = yes; then
1943  :
1944else
1945  cat > conftest.$ac_ext <<EOF
1946#line 1947 "configure"
1947#include "confdefs.h"
1948#include <ctype.h>
1949#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1950#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1951#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1952int main () { int i; for (i = 0; i < 256; i++)
1953if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1954exit (0); }
1955
1956EOF
1957if { (eval echo configure:1958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1958then
1959  :
1960else
1961  echo "configure: failed program was:" >&5
1962  cat conftest.$ac_ext >&5
1963  rm -fr conftest*
1964  ac_cv_header_stdc=no
1965fi
1966rm -fr conftest*
1967fi
1968
1969fi
1970fi
1971
1972echo "$ac_t""$ac_cv_header_stdc" 1>&6
1973if test $ac_cv_header_stdc = yes; then
1974  cat >> confdefs.h <<\EOF
1975#define STDC_HEADERS 1
1976EOF
1977
1978fi
1979
1980for ac_hdr in limits.h unistd.h
1981do
1982ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1983echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1984echo "configure:1985: checking for $ac_hdr" >&5
1985if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1986  echo $ac_n "(cached) $ac_c" 1>&6
1987else
1988  cat > conftest.$ac_ext <<EOF
1989#line 1990 "configure"
1990#include "confdefs.h"
1991#include <$ac_hdr>
1992EOF
1993ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1994{ (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1995ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1996if test -z "$ac_err"; then
1997  rm -rf conftest*
1998  eval "ac_cv_header_$ac_safe=yes"
1999else
2000  echo "$ac_err" >&5
2001  echo "configure: failed program was:" >&5
2002  cat conftest.$ac_ext >&5
2003  rm -rf conftest*
2004  eval "ac_cv_header_$ac_safe=no"
2005fi
2006rm -f conftest*
2007fi
2008if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2009  echo "$ac_t""yes" 1>&6
2010    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2011  cat >> confdefs.h <<EOF
2012#define $ac_tr_hdr 1
2013EOF
2014 
2015else
2016  echo "$ac_t""no" 1>&6
2017{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2018fi
2019done
2020
2021
2022for 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
2023do
2024ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2025echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2026echo "configure:2027: checking for $ac_hdr" >&5
2027if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2028  echo $ac_n "(cached) $ac_c" 1>&6
2029else
2030  cat > conftest.$ac_ext <<EOF
2031#line 2032 "configure"
2032#include "confdefs.h"
2033#include <$ac_hdr>
2034EOF
2035ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2036{ (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2037ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2038if test -z "$ac_err"; then
2039  rm -rf conftest*
2040  eval "ac_cv_header_$ac_safe=yes"
2041else
2042  echo "$ac_err" >&5
2043  echo "configure: failed program was:" >&5
2044  cat conftest.$ac_ext >&5
2045  rm -rf conftest*
2046  eval "ac_cv_header_$ac_safe=no"
2047fi
2048rm -f conftest*
2049fi
2050if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2051  echo "$ac_t""yes" 1>&6
2052    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2053  cat >> confdefs.h <<EOF
2054#define $ac_tr_hdr 1
2055EOF
2056 
2057else
2058  echo "$ac_t""no" 1>&6
2059fi
2060done
2061
2062
2063# typedefs, structures
2064echo $ac_n "checking for working const""... $ac_c" 1>&6
2065echo "configure:2066: checking for working const" >&5
2066if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2067  echo $ac_n "(cached) $ac_c" 1>&6
2068else
2069  cat > conftest.$ac_ext <<EOF
2070#line 2071 "configure"
2071#include "confdefs.h"
2072
2073int main() {
2074
2075/* Ultrix mips cc rejects this.  */
2076typedef int charset[2]; const charset x;
2077/* SunOS 4.1.1 cc rejects this.  */
2078char const *const *ccp;
2079char **p;
2080/* NEC SVR4.0.2 mips cc rejects this.  */
2081struct point {int x, y;};
2082static struct point const zero = {0,0};
2083/* AIX XL C 1.02.0.0 rejects this.
2084   It does not let you subtract one const X* pointer from another in an arm
2085   of an if-expression whose if-part is not a constant expression */
2086const char *g = "string";
2087ccp = &g + (g ? g-g : 0);
2088/* HPUX 7.0 cc rejects these. */
2089++ccp;
2090p = (char**) ccp;
2091ccp = (char const *const *) p;
2092{ /* SCO 3.2v4 cc rejects this.  */
2093  char *t;
2094  char const *s = 0 ? (char *) 0 : (char const *) 0;
2095
2096  *t++ = 0;
2097}
2098{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2099  int x[] = {25, 17};
2100  const int *foo = &x[0];
2101  ++foo;
2102}
2103{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2104  typedef const int *iptr;
2105  iptr p = 0;
2106  ++p;
2107}
2108{ /* AIX XL C 1.02.0.0 rejects this saying
2109     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2110  struct s { int j; const int *ap[3]; };
2111  struct s *b; b->j = 5;
2112}
2113{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2114  const int foo = 10;
2115}
2116
2117; return 0; }
2118EOF
2119if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2120  rm -rf conftest*
2121  ac_cv_c_const=yes
2122else
2123  echo "configure: failed program was:" >&5
2124  cat conftest.$ac_ext >&5
2125  rm -rf conftest*
2126  ac_cv_c_const=no
2127fi
2128rm -f conftest*
2129fi
2130
2131echo "$ac_t""$ac_cv_c_const" 1>&6
2132if test $ac_cv_c_const = no; then
2133  cat >> confdefs.h <<\EOF
2134#define const
2135EOF
2136
2137fi
2138
2139echo $ac_n "checking for inline""... $ac_c" 1>&6
2140echo "configure:2141: checking for inline" >&5
2141if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2142  echo $ac_n "(cached) $ac_c" 1>&6
2143else
2144  ac_cv_c_inline=no
2145for ac_kw in inline __inline__ __inline; do
2146  cat > conftest.$ac_ext <<EOF
2147#line 2148 "configure"
2148#include "confdefs.h"
2149
2150int main() {
2151} $ac_kw foo() {
2152; return 0; }
2153EOF
2154if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2155  rm -rf conftest*
2156  ac_cv_c_inline=$ac_kw; break
2157else
2158  echo "configure: failed program was:" >&5
2159  cat conftest.$ac_ext >&5
2160fi
2161rm -f conftest*
2162done
2163
2164fi
2165
2166echo "$ac_t""$ac_cv_c_inline" 1>&6
2167case "$ac_cv_c_inline" in
2168  inline | yes) ;;
2169  no) cat >> confdefs.h <<\EOF
2170#define inline
2171EOF
2172 ;;
2173  *)  cat >> confdefs.h <<EOF
2174#define inline $ac_cv_c_inline
2175EOF
2176 ;;
2177esac
2178
2179echo $ac_n "checking for size_t""... $ac_c" 1>&6
2180echo "configure:2181: checking for size_t" >&5
2181if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2182  echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184  cat > conftest.$ac_ext <<EOF
2185#line 2186 "configure"
2186#include "confdefs.h"
2187#include <sys/types.h>
2188#if STDC_HEADERS
2189#include <stdlib.h>
2190#include <stddef.h>
2191#endif
2192EOF
2193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2194  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2195  rm -rf conftest*
2196  ac_cv_type_size_t=yes
2197else
2198  rm -rf conftest*
2199  ac_cv_type_size_t=no
2200fi
2201rm -f conftest*
2202
2203fi
2204echo "$ac_t""$ac_cv_type_size_t" 1>&6
2205if test $ac_cv_type_size_t = no; then
2206  cat >> confdefs.h <<\EOF
2207#define size_t unsigned
2208EOF
2209
2210fi
2211
2212echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2213echo "configure:2214: checking whether time.h and sys/time.h may both be included" >&5
2214if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2215  echo $ac_n "(cached) $ac_c" 1>&6
2216else
2217  cat > conftest.$ac_ext <<EOF
2218#line 2219 "configure"
2219#include "confdefs.h"
2220#include <sys/types.h>
2221#include <sys/time.h>
2222#include <time.h>
2223int main() {
2224struct tm *tp;
2225; return 0; }
2226EOF
2227if { (eval echo configure:2228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2228  rm -rf conftest*
2229  ac_cv_header_time=yes
2230else
2231  echo "configure: failed program was:" >&5
2232  cat conftest.$ac_ext >&5
2233  rm -rf conftest*
2234  ac_cv_header_time=no
2235fi
2236rm -f conftest*
2237fi
2238
2239echo "$ac_t""$ac_cv_header_time" 1>&6
2240if test $ac_cv_header_time = yes; then
2241  cat >> confdefs.h <<\EOF
2242#define TIME_WITH_SYS_TIME 1
2243EOF
2244
2245fi
2246
2247echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2248echo "configure:2249: checking whether struct tm is in sys/time.h or time.h" >&5
2249if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2250  echo $ac_n "(cached) $ac_c" 1>&6
2251else
2252  cat > conftest.$ac_ext <<EOF
2253#line 2254 "configure"
2254#include "confdefs.h"
2255#include <sys/types.h>
2256#include <time.h>
2257int main() {
2258struct tm *tp; tp->tm_sec;
2259; return 0; }
2260EOF
2261if { (eval echo configure:2262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2262  rm -rf conftest*
2263  ac_cv_struct_tm=time.h
2264else
2265  echo "configure: failed program was:" >&5
2266  cat conftest.$ac_ext >&5
2267  rm -rf conftest*
2268  ac_cv_struct_tm=sys/time.h
2269fi
2270rm -f conftest*
2271fi
2272
2273echo "$ac_t""$ac_cv_struct_tm" 1>&6
2274if test $ac_cv_struct_tm = sys/time.h; then
2275  cat >> confdefs.h <<\EOF
2276#define TM_IN_SYS_TIME 1
2277EOF
2278
2279fi
2280
2281
2282# library functions.
2283# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2284# for constant arguments.  Useless!
2285echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2286echo "configure:2287: checking for working alloca.h" >&5
2287if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2288  echo $ac_n "(cached) $ac_c" 1>&6
2289else
2290  cat > conftest.$ac_ext <<EOF
2291#line 2292 "configure"
2292#include "confdefs.h"
2293#include <alloca.h>
2294int main() {
2295char *p = alloca(2 * sizeof(int));
2296; return 0; }
2297EOF
2298if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2299  rm -rf conftest*
2300  ac_cv_header_alloca_h=yes
2301else
2302  echo "configure: failed program was:" >&5
2303  cat conftest.$ac_ext >&5
2304  rm -rf conftest*
2305  ac_cv_header_alloca_h=no
2306fi
2307rm -f conftest*
2308fi
2309
2310echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2311if test $ac_cv_header_alloca_h = yes; then
2312  cat >> confdefs.h <<\EOF
2313#define HAVE_ALLOCA_H 1
2314EOF
2315
2316fi
2317
2318echo $ac_n "checking for alloca""... $ac_c" 1>&6
2319echo "configure:2320: checking for alloca" >&5
2320if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2321  echo $ac_n "(cached) $ac_c" 1>&6
2322else
2323  cat > conftest.$ac_ext <<EOF
2324#line 2325 "configure"
2325#include "confdefs.h"
2326
2327#ifdef __GNUC__
2328# define alloca __builtin_alloca
2329#else
2330# ifdef _MSC_VER
2331#  include <malloc.h>
2332#  define alloca _alloca
2333# else
2334#  if HAVE_ALLOCA_H
2335#   include <alloca.h>
2336#  else
2337#   ifdef _AIX
2338 #pragma alloca
2339#   else
2340#    ifndef alloca /* predefined by HP cc +Olibcalls */
2341char *alloca ();
2342#    endif
2343#   endif
2344#  endif
2345# endif
2346#endif
2347
2348int main() {
2349char *p = (char *) alloca(1);
2350; return 0; }
2351EOF
2352if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2353  rm -rf conftest*
2354  ac_cv_func_alloca_works=yes
2355else
2356  echo "configure: failed program was:" >&5
2357  cat conftest.$ac_ext >&5
2358  rm -rf conftest*
2359  ac_cv_func_alloca_works=no
2360fi
2361rm -f conftest*
2362fi
2363
2364echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2365if test $ac_cv_func_alloca_works = yes; then
2366  cat >> confdefs.h <<\EOF
2367#define HAVE_ALLOCA 1
2368EOF
2369
2370fi
2371
2372if test $ac_cv_func_alloca_works = no; then
2373  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2374  # that cause trouble.  Some versions do not even contain alloca or
2375  # contain a buggy version.  If you still want to use their alloca,
2376  # use ar to extract alloca.o from them instead of compiling alloca.c.
2377  ALLOCA=alloca.${ac_objext}
2378  cat >> confdefs.h <<\EOF
2379#define C_ALLOCA 1
2380EOF
2381
2382
2383echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2384echo "configure:2385: checking whether alloca needs Cray hooks" >&5
2385if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2386  echo $ac_n "(cached) $ac_c" 1>&6
2387else
2388  cat > conftest.$ac_ext <<EOF
2389#line 2390 "configure"
2390#include "confdefs.h"
2391#if defined(CRAY) && ! defined(CRAY2)
2392webecray
2393#else
2394wenotbecray
2395#endif
2396
2397EOF
2398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2399  egrep "webecray" >/dev/null 2>&1; then
2400  rm -rf conftest*
2401  ac_cv_os_cray=yes
2402else
2403  rm -rf conftest*
2404  ac_cv_os_cray=no
2405fi
2406rm -f conftest*
2407
2408fi
2409
2410echo "$ac_t""$ac_cv_os_cray" 1>&6
2411if test $ac_cv_os_cray = yes; then
2412for ac_func in _getb67 GETB67 getb67; do
2413  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2414echo "configure:2415: checking for $ac_func" >&5
2415if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2416  echo $ac_n "(cached) $ac_c" 1>&6
2417else
2418  cat > conftest.$ac_ext <<EOF
2419#line 2420 "configure"
2420#include "confdefs.h"
2421/* System header to define __stub macros and hopefully few prototypes,
2422    which can conflict with char $ac_func(); below.  */
2423#include <assert.h>
2424/* Override any gcc2 internal prototype to avoid an error.  */
2425/* We use char because int might match the return type of a gcc2
2426    builtin and then its argument prototype would still apply.  */
2427char $ac_func();
2428
2429int main() {
2430
2431/* The GNU C library defines this for functions which it implements
2432    to always fail with ENOSYS.  Some functions are actually named
2433    something starting with __ and the normal name is an alias.  */
2434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2435choke me
2436#else
2437$ac_func();
2438#endif
2439
2440; return 0; }
2441EOF
2442if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2443  rm -rf conftest*
2444  eval "ac_cv_func_$ac_func=yes"
2445else
2446  echo "configure: failed program was:" >&5
2447  cat conftest.$ac_ext >&5
2448  rm -rf conftest*
2449  eval "ac_cv_func_$ac_func=no"
2450fi
2451rm -f conftest*
2452fi
2453
2454if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2455  echo "$ac_t""yes" 1>&6
2456  cat >> confdefs.h <<EOF
2457#define CRAY_STACKSEG_END $ac_func
2458EOF
2459
2460  break
2461else
2462  echo "$ac_t""no" 1>&6
2463fi
2464
2465done
2466fi
2467
2468echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2469echo "configure:2470: checking stack direction for C alloca" >&5
2470if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2471  echo $ac_n "(cached) $ac_c" 1>&6
2472else
2473  if test "$cross_compiling" = yes; then
2474  ac_cv_c_stack_direction=0
2475else
2476  cat > conftest.$ac_ext <<EOF
2477#line 2478 "configure"
2478#include "confdefs.h"
2479find_stack_direction ()
2480{
2481  static char *addr = 0;
2482  auto char dummy;
2483  if (addr == 0)
2484    {
2485      addr = &dummy;
2486      return find_stack_direction ();
2487    }
2488  else
2489    return (&dummy > addr) ? 1 : -1;
2490}
2491main ()
2492{
2493  exit (find_stack_direction() < 0);
2494}
2495EOF
2496if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2497then
2498  ac_cv_c_stack_direction=1
2499else
2500  echo "configure: failed program was:" >&5
2501  cat conftest.$ac_ext >&5
2502  rm -fr conftest*
2503  ac_cv_c_stack_direction=-1
2504fi
2505rm -fr conftest*
2506fi
2507
2508fi
2509
2510echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2511cat >> confdefs.h <<EOF
2512#define STACK_DIRECTION $ac_cv_c_stack_direction
2513EOF
2514
2515fi
2516
2517if test $ac_cv_prog_gcc = yes; then
2518    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2519echo "configure:2520: checking whether ${CC-cc} needs -traditional" >&5
2520if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2521  echo $ac_n "(cached) $ac_c" 1>&6
2522else
2523    ac_pattern="Autoconf.*'x'"
2524  cat > conftest.$ac_ext <<EOF
2525#line 2526 "configure"
2526#include "confdefs.h"
2527#include <sgtty.h>
2528Autoconf TIOCGETP
2529EOF
2530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2531  egrep "$ac_pattern" >/dev/null 2>&1; then
2532  rm -rf conftest*
2533  ac_cv_prog_gcc_traditional=yes
2534else
2535  rm -rf conftest*
2536  ac_cv_prog_gcc_traditional=no
2537fi
2538rm -f conftest*
2539
2540
2541  if test $ac_cv_prog_gcc_traditional = no; then
2542    cat > conftest.$ac_ext <<EOF
2543#line 2544 "configure"
2544#include "confdefs.h"
2545#include <termio.h>
2546Autoconf TCGETA
2547EOF
2548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2549  egrep "$ac_pattern" >/dev/null 2>&1; then
2550  rm -rf conftest*
2551  ac_cv_prog_gcc_traditional=yes
2552fi
2553rm -f conftest*
2554
2555  fi
2556fi
2557
2558echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2559  if test $ac_cv_prog_gcc_traditional = yes; then
2560    CC="$CC -traditional"
2561  fi
2562fi
2563
2564for ac_hdr in unistd.h
2565do
2566ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2567echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2568echo "configure:2569: checking for $ac_hdr" >&5
2569if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2570  echo $ac_n "(cached) $ac_c" 1>&6
2571else
2572  cat > conftest.$ac_ext <<EOF
2573#line 2574 "configure"
2574#include "confdefs.h"
2575#include <$ac_hdr>
2576EOF
2577ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2578{ (eval echo configure:2579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2579ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2580if test -z "$ac_err"; then
2581  rm -rf conftest*
2582  eval "ac_cv_header_$ac_safe=yes"
2583else
2584  echo "$ac_err" >&5
2585  echo "configure: failed program was:" >&5
2586  cat conftest.$ac_ext >&5
2587  rm -rf conftest*
2588  eval "ac_cv_header_$ac_safe=no"
2589fi
2590rm -f conftest*
2591fi
2592if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2593  echo "$ac_t""yes" 1>&6
2594    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2595  cat >> confdefs.h <<EOF
2596#define $ac_tr_hdr 1
2597EOF
2598 
2599else
2600  echo "$ac_t""no" 1>&6
2601fi
2602done
2603
2604for ac_func in getpagesize
2605do
2606echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2607echo "configure:2608: checking for $ac_func" >&5
2608if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2609  echo $ac_n "(cached) $ac_c" 1>&6
2610else
2611  cat > conftest.$ac_ext <<EOF
2612#line 2613 "configure"
2613#include "confdefs.h"
2614/* System header to define __stub macros and hopefully few prototypes,
2615    which can conflict with char $ac_func(); below.  */
2616#include <assert.h>
2617/* Override any gcc2 internal prototype to avoid an error.  */
2618/* We use char because int might match the return type of a gcc2
2619    builtin and then its argument prototype would still apply.  */
2620char $ac_func();
2621
2622int main() {
2623
2624/* The GNU C library defines this for functions which it implements
2625    to always fail with ENOSYS.  Some functions are actually named
2626    something starting with __ and the normal name is an alias.  */
2627#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2628choke me
2629#else
2630$ac_func();
2631#endif
2632
2633; return 0; }
2634EOF
2635if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2636  rm -rf conftest*
2637  eval "ac_cv_func_$ac_func=yes"
2638else
2639  echo "configure: failed program was:" >&5
2640  cat conftest.$ac_ext >&5
2641  rm -rf conftest*
2642  eval "ac_cv_func_$ac_func=no"
2643fi
2644rm -f conftest*
2645fi
2646
2647if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2648  echo "$ac_t""yes" 1>&6
2649    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2650  cat >> confdefs.h <<EOF
2651#define $ac_tr_func 1
2652EOF
2653 
2654else
2655  echo "$ac_t""no" 1>&6
2656fi
2657done
2658
2659echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2660echo "configure:2661: checking for working mmap" >&5
2661if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2662  echo $ac_n "(cached) $ac_c" 1>&6
2663else
2664  if test "$cross_compiling" = yes; then
2665  ac_cv_func_mmap_fixed_mapped=no
2666else
2667  cat > conftest.$ac_ext <<EOF
2668#line 2669 "configure"
2669#include "confdefs.h"
2670
2671/* Thanks to Mike Haertel and Jim Avera for this test.
2672   Here is a matrix of mmap possibilities:
2673        mmap private not fixed
2674        mmap private fixed at somewhere currently unmapped
2675        mmap private fixed at somewhere already mapped
2676        mmap shared not fixed
2677        mmap shared fixed at somewhere currently unmapped
2678        mmap shared fixed at somewhere already mapped
2679   For private mappings, we should verify that changes cannot be read()
2680   back from the file, nor mmap's back from the file at a different
2681   address.  (There have been systems where private was not correctly
2682   implemented like the infamous i386 svr4.0, and systems where the
2683   VM page cache was not coherent with the filesystem buffer cache
2684   like early versions of FreeBSD and possibly contemporary NetBSD.)
2685   For shared mappings, we should conversely verify that changes get
2686   propogated back to all the places they're supposed to be.
2687
2688   Grep wants private fixed already mapped.
2689   The main things grep needs to know about mmap are:
2690   * does it exist and is it safe to write into the mmap'd area
2691   * how to use it (BSD variants)  */
2692#include <sys/types.h>
2693#include <fcntl.h>
2694#include <sys/mman.h>
2695
2696/* This mess was copied from the GNU getpagesize.h.  */
2697#ifndef HAVE_GETPAGESIZE
2698# ifdef HAVE_UNISTD_H
2699#  include <unistd.h>
2700# endif
2701
2702/* Assume that all systems that can run configure have sys/param.h.  */
2703# ifndef HAVE_SYS_PARAM_H
2704#  define HAVE_SYS_PARAM_H 1
2705# endif
2706
2707# ifdef _SC_PAGESIZE
2708#  define getpagesize() sysconf(_SC_PAGESIZE)
2709# else /* no _SC_PAGESIZE */
2710#  ifdef HAVE_SYS_PARAM_H
2711#   include <sys/param.h>
2712#   ifdef EXEC_PAGESIZE
2713#    define getpagesize() EXEC_PAGESIZE
2714#   else /* no EXEC_PAGESIZE */
2715#    ifdef NBPG
2716#     define getpagesize() NBPG * CLSIZE
2717#     ifndef CLSIZE
2718#      define CLSIZE 1
2719#     endif /* no CLSIZE */
2720#    else /* no NBPG */
2721#     ifdef NBPC
2722#      define getpagesize() NBPC
2723#     else /* no NBPC */
2724#      ifdef PAGESIZE
2725#       define getpagesize() PAGESIZE
2726#      endif /* PAGESIZE */
2727#     endif /* no NBPC */
2728#    endif /* no NBPG */
2729#   endif /* no EXEC_PAGESIZE */
2730#  else /* no HAVE_SYS_PARAM_H */
2731#   define getpagesize() 8192   /* punt totally */
2732#  endif /* no HAVE_SYS_PARAM_H */
2733# endif /* no _SC_PAGESIZE */
2734
2735#endif /* no HAVE_GETPAGESIZE */
2736
2737#ifdef __cplusplus
2738extern "C" { void *malloc(unsigned); }
2739#else
2740char *malloc();
2741#endif
2742
2743int
2744main()
2745{
2746        char *data, *data2, *data3;
2747        int i, pagesize;
2748        int fd;
2749
2750        pagesize = getpagesize();
2751
2752        /*
2753         * First, make a file with some known garbage in it.
2754         */
2755        data = malloc(pagesize);
2756        if (!data)
2757                exit(1);
2758        for (i = 0; i < pagesize; ++i)
2759                *(data + i) = rand();
2760        umask(0);
2761        fd = creat("conftestmmap", 0600);
2762        if (fd < 0)
2763                exit(1);
2764        if (write(fd, data, pagesize) != pagesize)
2765                exit(1);
2766        close(fd);
2767
2768        /*
2769         * Next, try to mmap the file at a fixed address which
2770         * already has something else allocated at it.  If we can,
2771         * also make sure that we see the same garbage.
2772         */
2773        fd = open("conftestmmap", O_RDWR);
2774        if (fd < 0)
2775                exit(1);
2776        data2 = malloc(2 * pagesize);
2777        if (!data2)
2778                exit(1);
2779        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2780        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2781            MAP_PRIVATE | MAP_FIXED, fd, 0L))
2782                exit(1);
2783        for (i = 0; i < pagesize; ++i)
2784                if (*(data + i) != *(data2 + i))
2785                        exit(1);
2786
2787        /*
2788         * Finally, make sure that changes to the mapped area
2789         * do not percolate back to the file as seen by read().
2790         * (This is a bug on some variants of i386 svr4.0.)
2791         */
2792        for (i = 0; i < pagesize; ++i)
2793                *(data2 + i) = *(data2 + i) + 1;
2794        data3 = malloc(pagesize);
2795        if (!data3)
2796                exit(1);
2797        if (read(fd, data3, pagesize) != pagesize)
2798                exit(1);
2799        for (i = 0; i < pagesize; ++i)
2800                if (*(data + i) != *(data3 + i))
2801                        exit(1);
2802        close(fd);
2803        unlink("conftestmmap");
2804        exit(0);
2805}
2806
2807EOF
2808if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2809then
2810  ac_cv_func_mmap_fixed_mapped=yes
2811else
2812  echo "configure: failed program was:" >&5
2813  cat conftest.$ac_ext >&5
2814  rm -fr conftest*
2815  ac_cv_func_mmap_fixed_mapped=no
2816fi
2817rm -fr conftest*
2818fi
2819
2820fi
2821
2822echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2823if test $ac_cv_func_mmap_fixed_mapped = yes; then
2824  cat >> confdefs.h <<\EOF
2825#define HAVE_MMAP 1
2826EOF
2827
2828fi
2829
2830echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2831echo "configure:2832: checking return type of signal handlers" >&5
2832if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2833  echo $ac_n "(cached) $ac_c" 1>&6
2834else
2835  cat > conftest.$ac_ext <<EOF
2836#line 2837 "configure"
2837#include "confdefs.h"
2838#include <sys/types.h>
2839#include <signal.h>
2840#ifdef signal
2841#undef signal
2842#endif
2843#ifdef __cplusplus
2844extern "C" void (*signal (int, void (*)(int)))(int);
2845#else
2846void (*signal ()) ();
2847#endif
2848
2849int main() {
2850int i;
2851; return 0; }
2852EOF
2853if { (eval echo configure:2854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2854  rm -rf conftest*
2855  ac_cv_type_signal=void
2856else
2857  echo "configure: failed program was:" >&5
2858  cat conftest.$ac_ext >&5
2859  rm -rf conftest*
2860  ac_cv_type_signal=int
2861fi
2862rm -f conftest*
2863fi
2864
2865echo "$ac_t""$ac_cv_type_signal" 1>&6
2866cat >> confdefs.h <<EOF
2867#define RETSIGTYPE $ac_cv_type_signal
2868EOF
2869
2870
2871echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2872echo "configure:2873: checking for vprintf" >&5
2873if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2874  echo $ac_n "(cached) $ac_c" 1>&6
2875else
2876  cat > conftest.$ac_ext <<EOF
2877#line 2878 "configure"
2878#include "confdefs.h"
2879/* System header to define __stub macros and hopefully few prototypes,
2880    which can conflict with char vprintf(); below.  */
2881#include <assert.h>
2882/* Override any gcc2 internal prototype to avoid an error.  */
2883/* We use char because int might match the return type of a gcc2
2884    builtin and then its argument prototype would still apply.  */
2885char vprintf();
2886
2887int main() {
2888
2889/* The GNU C library defines this for functions which it implements
2890    to always fail with ENOSYS.  Some functions are actually named
2891    something starting with __ and the normal name is an alias.  */
2892#if defined (__stub_vprintf) || defined (__stub___vprintf)
2893choke me
2894#else
2895vprintf();
2896#endif
2897
2898; return 0; }
2899EOF
2900if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2901  rm -rf conftest*
2902  eval "ac_cv_func_vprintf=yes"
2903else
2904  echo "configure: failed program was:" >&5
2905  cat conftest.$ac_ext >&5
2906  rm -rf conftest*
2907  eval "ac_cv_func_vprintf=no"
2908fi
2909rm -f conftest*
2910fi
2911
2912if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2913  echo "$ac_t""yes" 1>&6
2914  cat >> confdefs.h <<\EOF
2915#define HAVE_VPRINTF 1
2916EOF
2917
2918else
2919  echo "$ac_t""no" 1>&6
2920fi
2921
2922if test "$ac_cv_func_vprintf" != yes; then
2923echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2924echo "configure:2925: checking for _doprnt" >&5
2925if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2926  echo $ac_n "(cached) $ac_c" 1>&6
2927else
2928  cat > conftest.$ac_ext <<EOF
2929#line 2930 "configure"
2930#include "confdefs.h"
2931/* System header to define __stub macros and hopefully few prototypes,
2932    which can conflict with char _doprnt(); below.  */
2933#include <assert.h>
2934/* Override any gcc2 internal prototype to avoid an error.  */
2935/* We use char because int might match the return type of a gcc2
2936    builtin and then its argument prototype would still apply.  */
2937char _doprnt();
2938
2939int main() {
2940
2941/* The GNU C library defines this for functions which it implements
2942    to always fail with ENOSYS.  Some functions are actually named
2943    something starting with __ and the normal name is an alias.  */
2944#if defined (__stub__doprnt) || defined (__stub____doprnt)
2945choke me
2946#else
2947_doprnt();
2948#endif
2949
2950; return 0; }
2951EOF
2952if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2953  rm -rf conftest*
2954  eval "ac_cv_func__doprnt=yes"
2955else
2956  echo "configure: failed program was:" >&5
2957  cat conftest.$ac_ext >&5
2958  rm -rf conftest*
2959  eval "ac_cv_func__doprnt=no"
2960fi
2961rm -f conftest*
2962fi
2963
2964if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2965  echo "$ac_t""yes" 1>&6
2966  cat >> confdefs.h <<\EOF
2967#define HAVE_DOPRNT 1
2968EOF
2969
2970else
2971  echo "$ac_t""no" 1>&6
2972fi
2973
2974fi
2975
2976
2977echo $ac_n "checking for library containing setenv""... $ac_c" 1>&6
2978echo "configure:2979: checking for library containing setenv" >&5
2979if eval "test \"`echo '$''{'ac_cv_search_setenv'+set}'`\" = set"; then
2980  echo $ac_n "(cached) $ac_c" 1>&6
2981else
2982  ac_func_search_save_LIBS="$LIBS"
2983ac_cv_search_setenv="no"
2984cat > conftest.$ac_ext <<EOF
2985#line 2986 "configure"
2986#include "confdefs.h"
2987/* Override any gcc2 internal prototype to avoid an error.  */
2988/* We use char because int might match the return type of a gcc2
2989    builtin and then its argument prototype would still apply.  */
2990char setenv();
2991
2992int main() {
2993setenv()
2994; return 0; }
2995EOF
2996if { (eval echo configure:2997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2997  rm -rf conftest*
2998  ac_cv_search_setenv="none required"
2999else
3000  echo "configure: failed program was:" >&5
3001  cat conftest.$ac_ext >&5
3002fi
3003rm -f conftest*
3004test "$ac_cv_search_setenv" = "no" && for i in bsd; do
3005LIBS="-l$i  $ac_func_search_save_LIBS"
3006cat > conftest.$ac_ext <<EOF
3007#line 3008 "configure"
3008#include "confdefs.h"
3009/* Override any gcc2 internal prototype to avoid an error.  */
3010/* We use char because int might match the return type of a gcc2
3011    builtin and then its argument prototype would still apply.  */
3012char setenv();
3013
3014int main() {
3015setenv()
3016; return 0; }
3017EOF
3018if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3019  rm -rf conftest*
3020  ac_cv_search_setenv="-l$i"
3021break
3022else
3023  echo "configure: failed program was:" >&5
3024  cat conftest.$ac_ext >&5
3025fi
3026rm -f conftest*
3027done
3028LIBS="$ac_func_search_save_LIBS"
3029fi
3030
3031echo "$ac_t""$ac_cv_search_setenv" 1>&6
3032if test "$ac_cv_search_setenv" != "no"; then
3033  test "$ac_cv_search_setenv" = "none required" || LIBS="$ac_cv_search_setenv $LIBS"
3034 
3035else :
3036 
3037fi
3038for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink sleep usleep getpwnam popen setenv
3039do
3040echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3041echo "configure:3042: checking for $ac_func" >&5
3042if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3043  echo $ac_n "(cached) $ac_c" 1>&6
3044else
3045  cat > conftest.$ac_ext <<EOF
3046#line 3047 "configure"
3047#include "confdefs.h"
3048/* System header to define __stub macros and hopefully few prototypes,
3049    which can conflict with char $ac_func(); below.  */
3050#include <assert.h>
3051/* Override any gcc2 internal prototype to avoid an error.  */
3052/* We use char because int might match the return type of a gcc2
3053    builtin and then its argument prototype would still apply.  */
3054char $ac_func();
3055
3056int main() {
3057
3058/* The GNU C library defines this for functions which it implements
3059    to always fail with ENOSYS.  Some functions are actually named
3060    something starting with __ and the normal name is an alias.  */
3061#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3062choke me
3063#else
3064$ac_func();
3065#endif
3066
3067; return 0; }
3068EOF
3069if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3070  rm -rf conftest*
3071  eval "ac_cv_func_$ac_func=yes"
3072else
3073  echo "configure: failed program was:" >&5
3074  cat conftest.$ac_ext >&5
3075  rm -rf conftest*
3076  eval "ac_cv_func_$ac_func=no"
3077fi
3078rm -f conftest*
3079fi
3080
3081if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3082  echo "$ac_t""yes" 1>&6
3083    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3084  cat >> confdefs.h <<EOF
3085#define $ac_tr_func 1
3086EOF
3087 
3088else
3089  echo "$ac_t""no" 1>&6
3090fi
3091done
3092
3093
3094
3095
3096# arithmetic shifts
3097echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3098echo "configure:3099: checking whether your machine has correct arithmetic shifts" >&5
3099if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3100  echo $ac_n "(cached) $ac_c" 1>&6
3101else
3102  if test "$cross_compiling" = yes; then
3103  if test "$ac_c_cross_dos" = yes; then
3104     ac_cv_shift=yes;
3105   else
3106     echo "$ac_t""no" 1>&6
3107     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
3108   fi
3109else
3110  cat > conftest.$ac_ext <<EOF
3111#line 3112 "configure"
3112#include "confdefs.h"
3113 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
3114EOF
3115if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3116then
3117  ac_cv_shift=yes
3118else
3119  echo "configure: failed program was:" >&5
3120  cat conftest.$ac_ext >&5
3121  rm -fr conftest*
3122  ac_cv_shift=no
3123fi
3124rm -fr conftest*
3125fi
3126
3127fi
3128
3129
3130if test "$ac_cv_shift" = yes; then
3131  echo "$ac_t""yes" 1>&6
3132else
3133  echo "$ac_t""no" 1>&6
3134  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3135fi
3136
3137
3138# check for a peculiar constructor initialization
3139echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
3140echo "configure:3141: checking whether explicit C++ constructor calls are allowed" >&5
3141
3142ac_ext=C
3143# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3144ac_cpp='$CXXCPP $CPPFLAGS'
3145ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3146ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3147cross_compiling=$ac_cv_prog_cxx_cross
3148
3149if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then
3150  echo $ac_n "(cached) $ac_c" 1>&6
3151else
3152  cat > conftest.$ac_ext <<EOF
3153#line 3154 "configure"
3154#include "confdefs.h"
3155
3156int main() {
3157class testclass
3158  {
3159  public:
3160    int value;
3161    testclass() : value(0) {}
3162    testclass( int i ) : value(i) {}
3163    ~testclass() { value = 0; }
3164  };
3165
3166  testclass ptr;
3167  ptr.testclass(1);
3168
3169; return 0; }
3170EOF
3171if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3172  rm -rf conftest*
3173  ac_cv_explicit_const=yes
3174else
3175  echo "configure: failed program was:" >&5
3176  cat conftest.$ac_ext >&5
3177  rm -rf conftest*
3178  ac_cv_explicit_const=no
3179fi
3180rm -f conftest*
3181fi
3182
3183ac_ext=c
3184# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3185ac_cpp='$CPP $CPPFLAGS'
3186ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3187ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3188cross_compiling=$ac_cv_prog_cc_cross
3189
3190echo "$ac_t""$ac_cv_explicit_const" 1>&6
3191if test "$ac_cv_explicit_const" = yes; then
3192  cat >> confdefs.h <<\EOF
3193#define HAVE_EXPLICIT_CONSTR 1
3194EOF
3195
3196fi
3197
3198# sprintf returns number of printed chars
3199echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3200echo "configure:3201: checking whether vsprintf returns number of printed chars" >&5
3201if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3202  echo $ac_n "(cached) $ac_c" 1>&6
3203else
3204  if test "$cross_compiling" = yes; then
3205  ac_cv_returns_n_of_chars=no
3206else
3207  cat > conftest.$ac_ext <<EOF
3208#line 3209 "configure"
3209#include "confdefs.h"
3210#include <stdio.h>
3211 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3212EOF
3213if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3214then
3215  ac_cv_returns_n_of_chars=yes
3216else
3217  echo "configure: failed program was:" >&5
3218  cat conftest.$ac_ext >&5
3219  rm -fr conftest*
3220  ac_cv_returns_n_of_chars=no
3221fi
3222rm -fr conftest*
3223fi
3224
3225fi
3226
3227if test "$ac_cv_returns_n_of_chars" = yes; then
3228  echo "$ac_t""yes" 1>&6
3229else
3230  echo "$ac_t""no" 1>&6
3231  cat >> confdefs.h <<\EOF
3232#define BSD_SPRINTF 1
3233EOF
3234
3235fi
3236
3237# determine ALIGN_8
3238echo $ac_n "checking size of char""... $ac_c" 1>&6
3239echo "configure:3240: checking size of char" >&5
3240if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3241  echo $ac_n "(cached) $ac_c" 1>&6
3242else
3243  if test "$cross_compiling" = yes; then
3244  ac_cv_sizeof_char=1
3245else
3246  cat > conftest.$ac_ext <<EOF
3247#line 3248 "configure"
3248#include "confdefs.h"
3249#include <stdio.h>
3250main()
3251{
3252  FILE *f=fopen("conftestval", "w");
3253  if (!f) exit(1);
3254  fprintf(f, "%d\n", sizeof(char));
3255  exit(0);
3256}
3257EOF
3258if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3259then
3260  ac_cv_sizeof_char=`cat conftestval`
3261else
3262  echo "configure: failed program was:" >&5
3263  cat conftest.$ac_ext >&5
3264  rm -fr conftest*
3265  ac_cv_sizeof_char=0
3266fi
3267rm -fr conftest*
3268fi
3269
3270fi
3271echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3272cat >> confdefs.h <<EOF
3273#define SIZEOF_CHAR $ac_cv_sizeof_char
3274EOF
3275
3276
3277echo $ac_n "checking size of short""... $ac_c" 1>&6
3278echo "configure:3279: checking size of short" >&5
3279if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3280  echo $ac_n "(cached) $ac_c" 1>&6
3281else
3282  if test "$cross_compiling" = yes; then
3283  ac_cv_sizeof_short=2
3284else
3285  cat > conftest.$ac_ext <<EOF
3286#line 3287 "configure"
3287#include "confdefs.h"
3288#include <stdio.h>
3289main()
3290{
3291  FILE *f=fopen("conftestval", "w");
3292  if (!f) exit(1);
3293  fprintf(f, "%d\n", sizeof(short));
3294  exit(0);
3295}
3296EOF
3297if { (eval echo configure:3298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3298then
3299  ac_cv_sizeof_short=`cat conftestval`
3300else
3301  echo "configure: failed program was:" >&5
3302  cat conftest.$ac_ext >&5
3303  rm -fr conftest*
3304  ac_cv_sizeof_short=0
3305fi
3306rm -fr conftest*
3307fi
3308
3309fi
3310echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3311cat >> confdefs.h <<EOF
3312#define SIZEOF_SHORT $ac_cv_sizeof_short
3313EOF
3314
3315
3316echo $ac_n "checking size of int""... $ac_c" 1>&6
3317echo "configure:3318: checking size of int" >&5
3318if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3319  echo $ac_n "(cached) $ac_c" 1>&6
3320else
3321  if test "$cross_compiling" = yes; then
3322  ac_cv_sizeof_int=4
3323else
3324  cat > conftest.$ac_ext <<EOF
3325#line 3326 "configure"
3326#include "confdefs.h"
3327#include <stdio.h>
3328main()
3329{
3330  FILE *f=fopen("conftestval", "w");
3331  if (!f) exit(1);
3332  fprintf(f, "%d\n", sizeof(int));
3333  exit(0);
3334}
3335EOF
3336if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3337then
3338  ac_cv_sizeof_int=`cat conftestval`
3339else
3340  echo "configure: failed program was:" >&5
3341  cat conftest.$ac_ext >&5
3342  rm -fr conftest*
3343  ac_cv_sizeof_int=0
3344fi
3345rm -fr conftest*
3346fi
3347
3348fi
3349echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3350cat >> confdefs.h <<EOF
3351#define SIZEOF_INT $ac_cv_sizeof_int
3352EOF
3353
3354
3355echo $ac_n "checking size of long""... $ac_c" 1>&6
3356echo "configure:3357: checking size of long" >&5
3357if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3358  echo $ac_n "(cached) $ac_c" 1>&6
3359else
3360  if test "$cross_compiling" = yes; then
3361  ac_cv_sizeof_long=4
3362else
3363  cat > conftest.$ac_ext <<EOF
3364#line 3365 "configure"
3365#include "confdefs.h"
3366#include <stdio.h>
3367main()
3368{
3369  FILE *f=fopen("conftestval", "w");
3370  if (!f) exit(1);
3371  fprintf(f, "%d\n", sizeof(long));
3372  exit(0);
3373}
3374EOF
3375if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3376then
3377  ac_cv_sizeof_long=`cat conftestval`
3378else
3379  echo "configure: failed program was:" >&5
3380  cat conftest.$ac_ext >&5
3381  rm -fr conftest*
3382  ac_cv_sizeof_long=0
3383fi
3384rm -fr conftest*
3385fi
3386
3387fi
3388echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3389cat >> confdefs.h <<EOF
3390#define SIZEOF_LONG $ac_cv_sizeof_long
3391EOF
3392
3393
3394echo $ac_n "checking size of void*""... $ac_c" 1>&6
3395echo "configure:3396: checking size of void*" >&5
3396if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3397  echo $ac_n "(cached) $ac_c" 1>&6
3398else
3399  if test "$cross_compiling" = yes; then
3400  ac_cv_sizeof_voidp=4
3401else
3402  cat > conftest.$ac_ext <<EOF
3403#line 3404 "configure"
3404#include "confdefs.h"
3405#include <stdio.h>
3406main()
3407{
3408  FILE *f=fopen("conftestval", "w");
3409  if (!f) exit(1);
3410  fprintf(f, "%d\n", sizeof(void*));
3411  exit(0);
3412}
3413EOF
3414if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3415then
3416  ac_cv_sizeof_voidp=`cat conftestval`
3417else
3418  echo "configure: failed program was:" >&5
3419  cat conftest.$ac_ext >&5
3420  rm -fr conftest*
3421  ac_cv_sizeof_voidp=0
3422fi
3423rm -fr conftest*
3424fi
3425
3426fi
3427echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3428cat >> confdefs.h <<EOF
3429#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3430EOF
3431
3432
3433echo $ac_n "checking size of double""... $ac_c" 1>&6
3434echo "configure:3435: checking size of double" >&5
3435if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3436  echo $ac_n "(cached) $ac_c" 1>&6
3437else
3438  if test "$cross_compiling" = yes; then
3439  ac_cv_sizeof_double=8
3440else
3441  cat > conftest.$ac_ext <<EOF
3442#line 3443 "configure"
3443#include "confdefs.h"
3444#include <stdio.h>
3445main()
3446{
3447  FILE *f=fopen("conftestval", "w");
3448  if (!f) exit(1);
3449  fprintf(f, "%d\n", sizeof(double));
3450  exit(0);
3451}
3452EOF
3453if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3454then
3455  ac_cv_sizeof_double=`cat conftestval`
3456else
3457  echo "configure: failed program was:" >&5
3458  cat conftest.$ac_ext >&5
3459  rm -fr conftest*
3460  ac_cv_sizeof_double=0
3461fi
3462rm -fr conftest*
3463fi
3464
3465fi
3466echo "$ac_t""$ac_cv_sizeof_double" 1>&6
3467cat >> confdefs.h <<EOF
3468#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3469EOF
3470
3471
3472echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3473echo "configure:3474: checking whether byte ordering is bigendian" >&5
3474if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3475  echo $ac_n "(cached) $ac_c" 1>&6
3476else
3477  ac_cv_c_bigendian=unknown
3478# See if sys/param.h defines the BYTE_ORDER macro.
3479cat > conftest.$ac_ext <<EOF
3480#line 3481 "configure"
3481#include "confdefs.h"
3482#include <sys/types.h>
3483#include <sys/param.h>
3484int main() {
3485
3486#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3487 bogus endian macros
3488#endif
3489; return 0; }
3490EOF
3491if { (eval echo configure:3492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3492  rm -rf conftest*
3493  # It does; now see whether it defined to BIG_ENDIAN or not.
3494cat > conftest.$ac_ext <<EOF
3495#line 3496 "configure"
3496#include "confdefs.h"
3497#include <sys/types.h>
3498#include <sys/param.h>
3499int main() {
3500
3501#if BYTE_ORDER != BIG_ENDIAN
3502 not big endian
3503#endif
3504; return 0; }
3505EOF
3506if { (eval echo configure:3507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3507  rm -rf conftest*
3508  ac_cv_c_bigendian=yes
3509else
3510  echo "configure: failed program was:" >&5
3511  cat conftest.$ac_ext >&5
3512  rm -rf conftest*
3513  ac_cv_c_bigendian=no
3514fi
3515rm -f conftest*
3516else
3517  echo "configure: failed program was:" >&5
3518  cat conftest.$ac_ext >&5
3519fi
3520rm -f conftest*
3521if test $ac_cv_c_bigendian = unknown; then
3522if test "$cross_compiling" = yes; then
3523    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3524else
3525  cat > conftest.$ac_ext <<EOF
3526#line 3527 "configure"
3527#include "confdefs.h"
3528main () {
3529  /* Are we little or big endian?  From Harbison&Steele.  */
3530  union
3531  {
3532    long l;
3533    char c[sizeof (long)];
3534  } u;
3535  u.l = 1;
3536  exit (u.c[sizeof (long) - 1] == 1);
3537}
3538EOF
3539if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3540then
3541  ac_cv_c_bigendian=no
3542else
3543  echo "configure: failed program was:" >&5
3544  cat conftest.$ac_ext >&5
3545  rm -fr conftest*
3546  ac_cv_c_bigendian=yes
3547fi
3548rm -fr conftest*
3549fi
3550
3551fi
3552fi
3553
3554echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3555if test $ac_cv_c_bigendian = yes; then
3556  cat >> confdefs.h <<\EOF
3557#define WORDS_BIGENDIAN 1
3558EOF
3559
3560fi
3561
3562if test "$ac_cv_sizeof_int" != 4; then
3563  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3564fi
3565if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
3566  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3567fi
3568if test "$ac_cv_sizeof_double" != 8; then
3569  { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; }
3570fi
3571if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
3572  { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; }
3573fi
3574
3575# Check whether --with-rootdir or --without-rootdir was given.
3576if test "${with_rootdir+set}" = set; then
3577  withval="$with_rootdir"
3578  :
3579fi
3580
3581# Check whether --with-lex or --without-lex was given.
3582if test "${with_lex+set}" = set; then
3583  withval="$with_lex"
3584  :
3585fi
3586
3587# Check whether --with-readline or --without-readline was given.
3588if test "${with_readline+set}" = set; then
3589  withval="$with_readline"
3590  :
3591fi
3592
3593# Check whether --with-MP or --without-MP was given.
3594if test "${with_MP+set}" = set; then
3595  withval="$with_MP"
3596  :
3597fi
3598
3599# Check whether --with-dbm or --without-dbm was given.
3600if test "${with_dbm+set}" = set; then
3601  withval="$with_dbm"
3602  :
3603fi
3604
3605# Check whether --with-factory or --without-factory was given.
3606if test "${with_factory+set}" = set; then
3607  withval="$with_factory"
3608  :
3609fi
3610
3611# Check whether --with-libfac or --without-libfac was given.
3612if test "${with_libfac+set}" = set; then
3613  withval="$with_libfac"
3614  :
3615fi
3616
3617# Check whether --with-namespaces or --without-namespaces was given.
3618if test "${with_namespaces+set}" = set; then
3619  withval="$with_namespaces"
3620  :
3621fi
3622
3623# Check whether --with-dl or --without-dl was given.
3624if test "${with_dl+set}" = set; then
3625  withval="$with_dl"
3626  :
3627fi
3628
3629# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
3630if test "${with_dynamic_modules+set}" = set; then
3631  withval="$with_dynamic_modules"
3632  :
3633fi
3634 
3635# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
3636if test "${with_dynamic_kernel+set}" = set; then
3637  withval="$with_dynamic_kernel"
3638  :
3639fi
3640
3641# Check whether --with-apint or --without-apint was given.
3642if test "${with_apint+set}" = set; then
3643  withval="$with_apint"
3644  :
3645fi
3646
3647# Check whether --with-plural or --without-plural was given.
3648if test "${with_plural+set}" = set; then
3649  withval="$with_plural"
3650  :
3651fi
3652
3653
3654
3655
3656echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
3657echo "configure:3658: checking whether to use dynamic linking" >&5
3658if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
3659  cat >> confdefs.h <<\EOF
3660#define HAVE_DL 1
3661EOF
3662
3663  ac_have_dl=yes
3664  echo "$ac_t""yes" 1>&6
3665else
3666  echo "$ac_t""no" 1>&6
3667fi
3668
3669echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3670echo "configure:3671: checking for tgetent in -lncurses" >&5
3671ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3672if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3673  echo $ac_n "(cached) $ac_c" 1>&6
3674else
3675  ac_save_LIBS="$LIBS"
3676LIBS="-lncurses  $LIBS"
3677cat > conftest.$ac_ext <<EOF
3678#line 3679 "configure"
3679#include "confdefs.h"
3680/* Override any gcc2 internal prototype to avoid an error.  */
3681/* We use char because int might match the return type of a gcc2
3682    builtin and then its argument prototype would still apply.  */
3683char tgetent();
3684
3685int main() {
3686tgetent()
3687; return 0; }
3688EOF
3689if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3690  rm -rf conftest*
3691  eval "ac_cv_lib_$ac_lib_var=yes"
3692else
3693  echo "configure: failed program was:" >&5
3694  cat conftest.$ac_ext >&5
3695  rm -rf conftest*
3696  eval "ac_cv_lib_$ac_lib_var=no"
3697fi
3698rm -f conftest*
3699LIBS="$ac_save_LIBS"
3700
3701fi
3702if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3703  echo "$ac_t""yes" 1>&6
3704    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3705    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3706  cat >> confdefs.h <<EOF
3707#define $ac_tr_lib 1
3708EOF
3709
3710  LIBS="-lncurses $LIBS"
3711
3712else
3713  echo "$ac_t""no" 1>&6
3714\
3715 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
3716echo "configure:3717: checking for tgetent in -lcurses" >&5
3717ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
3718if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3719  echo $ac_n "(cached) $ac_c" 1>&6
3720else
3721  ac_save_LIBS="$LIBS"
3722LIBS="-lcurses  $LIBS"
3723cat > conftest.$ac_ext <<EOF
3724#line 3725 "configure"
3725#include "confdefs.h"
3726/* Override any gcc2 internal prototype to avoid an error.  */
3727/* We use char because int might match the return type of a gcc2
3728    builtin and then its argument prototype would still apply.  */
3729char tgetent();
3730
3731int main() {
3732tgetent()
3733; return 0; }
3734EOF
3735if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3736  rm -rf conftest*
3737  eval "ac_cv_lib_$ac_lib_var=yes"
3738else
3739  echo "configure: failed program was:" >&5
3740  cat conftest.$ac_ext >&5
3741  rm -rf conftest*
3742  eval "ac_cv_lib_$ac_lib_var=no"
3743fi
3744rm -f conftest*
3745LIBS="$ac_save_LIBS"
3746
3747fi
3748if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3749  echo "$ac_t""yes" 1>&6
3750    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
3751    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3752  cat >> confdefs.h <<EOF
3753#define $ac_tr_lib 1
3754EOF
3755
3756  LIBS="-lcurses $LIBS"
3757
3758else
3759  echo "$ac_t""no" 1>&6
3760\
3761  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3762echo "configure:3763: checking for tgetent in -ltermcap" >&5
3763ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3764if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3765  echo $ac_n "(cached) $ac_c" 1>&6
3766else
3767  ac_save_LIBS="$LIBS"
3768LIBS="-ltermcap  $LIBS"
3769cat > conftest.$ac_ext <<EOF
3770#line 3771 "configure"
3771#include "confdefs.h"
3772/* Override any gcc2 internal prototype to avoid an error.  */
3773/* We use char because int might match the return type of a gcc2
3774    builtin and then its argument prototype would still apply.  */
3775char tgetent();
3776
3777int main() {
3778tgetent()
3779; return 0; }
3780EOF
3781if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3782  rm -rf conftest*
3783  eval "ac_cv_lib_$ac_lib_var=yes"
3784else
3785  echo "configure: failed program was:" >&5
3786  cat conftest.$ac_ext >&5
3787  rm -rf conftest*
3788  eval "ac_cv_lib_$ac_lib_var=no"
3789fi
3790rm -f conftest*
3791LIBS="$ac_save_LIBS"
3792
3793fi
3794if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3795  echo "$ac_t""yes" 1>&6
3796    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
3797    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3798  cat >> confdefs.h <<EOF
3799#define $ac_tr_lib 1
3800EOF
3801
3802  LIBS="-ltermcap $LIBS"
3803
3804else
3805  echo "$ac_t""no" 1>&6
3806fi
3807
3808fi
3809
3810fi
3811
3812
3813# readline
3814if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
3815  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
3816  with_readline=static
3817fi
3818
3819
3820if test "$with_readline" != dynamic && test "$with_readline" != no; then
3821
3822ac_ext=C
3823# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3824ac_cpp='$CXXCPP $CPPFLAGS'
3825ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3826ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3827cross_compiling=$ac_cv_prog_cxx_cross
3828
3829   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
3830echo "configure:3831: checking for rl_abort in -lreadline" >&5
3831ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
3832if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3833  echo $ac_n "(cached) $ac_c" 1>&6
3834else
3835  ac_save_LIBS="$LIBS"
3836LIBS="-lreadline  $LIBS"
3837cat > conftest.$ac_ext <<EOF
3838#line 3839 "configure"
3839#include "confdefs.h"
3840/* Override any gcc2 internal prototype to avoid an error.  */
3841#ifdef __cplusplus
3842extern "C"
3843#endif
3844/* We use char because int might match the return type of a gcc2
3845    builtin and then its argument prototype would still apply.  */
3846char rl_abort();
3847
3848int main() {
3849rl_abort()
3850; return 0; }
3851EOF
3852if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3853  rm -rf conftest*
3854  eval "ac_cv_lib_$ac_lib_var=yes"
3855else
3856  echo "configure: failed program was:" >&5
3857  cat conftest.$ac_ext >&5
3858  rm -rf conftest*
3859  eval "ac_cv_lib_$ac_lib_var=no"
3860fi
3861rm -f conftest*
3862LIBS="$ac_save_LIBS"
3863
3864fi
3865if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3866  echo "$ac_t""yes" 1>&6
3867    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3868    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3869  cat >> confdefs.h <<EOF
3870#define $ac_tr_lib 1
3871EOF
3872
3873  LIBS="-lreadline $LIBS"
3874
3875else
3876  echo "$ac_t""no" 1>&6
3877fi
3878
3879   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
3880echo "configure:3881: checking how to run the C++ preprocessor" >&5
3881if test -z "$CXXCPP"; then
3882if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
3883  echo $ac_n "(cached) $ac_c" 1>&6
3884else
3885  ac_ext=C
3886# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3887ac_cpp='$CXXCPP $CPPFLAGS'
3888ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3889ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3890cross_compiling=$ac_cv_prog_cxx_cross
3891  CXXCPP="${CXX-g++} -E"
3892  cat > conftest.$ac_ext <<EOF
3893#line 3894 "configure"
3894#include "confdefs.h"
3895#include <stdlib.h>
3896EOF
3897ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3898{ (eval echo configure:3899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3899ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3900if test -z "$ac_err"; then
3901  :
3902else
3903  echo "$ac_err" >&5
3904  echo "configure: failed program was:" >&5
3905  cat conftest.$ac_ext >&5
3906  rm -rf conftest*
3907  CXXCPP=/lib/cpp
3908fi
3909rm -f conftest*
3910  ac_cv_prog_CXXCPP="$CXXCPP"
3911ac_ext=C
3912# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3913ac_cpp='$CXXCPP $CPPFLAGS'
3914ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3915ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3916cross_compiling=$ac_cv_prog_cxx_cross
3917fi
3918fi
3919CXXCPP="$ac_cv_prog_CXXCPP"
3920echo "$ac_t""$CXXCPP" 1>&6
3921
3922for ac_hdr in readline/readline.h readline/history.h
3923do
3924ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3925echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3926echo "configure:3927: checking for $ac_hdr" >&5
3927if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3928  echo $ac_n "(cached) $ac_c" 1>&6
3929else
3930  cat > conftest.$ac_ext <<EOF
3931#line 3932 "configure"
3932#include "confdefs.h"
3933#include <$ac_hdr>
3934EOF
3935ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3936{ (eval echo configure:3937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3937ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3938if test -z "$ac_err"; then
3939  rm -rf conftest*
3940  eval "ac_cv_header_$ac_safe=yes"
3941else
3942  echo "$ac_err" >&5
3943  echo "configure: failed program was:" >&5
3944  cat conftest.$ac_ext >&5
3945  rm -rf conftest*
3946  eval "ac_cv_header_$ac_safe=no"
3947fi
3948rm -f conftest*
3949fi
3950if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3951  echo "$ac_t""yes" 1>&6
3952    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3953  cat >> confdefs.h <<EOF
3954#define $ac_tr_hdr 1
3955EOF
3956 
3957else
3958  echo "$ac_t""no" 1>&6
3959fi
3960done
3961
3962   if test "$ac_cv_lib_readline_rl_abort" = yes && \
3963      test "$ac_cv_header_readline_readline_h" = yes; then
3964     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
3965echo "configure:3966: checking whether readline.h is ok" >&5
3966     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
3967  echo $ac_n "(cached) $ac_c" 1>&6
3968else
3969  cat > conftest.$ac_ext <<EOF
3970#line 3971 "configure"
3971#include "confdefs.h"
3972#include<unistd.h>
3973#include<stdio.h>
3974#include<readline/readline.h>
3975#ifdef HAVE_READLINE_HISTORY_H
3976#include<readline/history.h>
3977#endif
3978
3979int main() {
3980#ifndef NULL
3981#define NULL 0
3982#endif
3983rl_readline_name=NULL;
3984*rl_line_buffer=1;
3985completion_matches(NULL, filename_completion_function);
3986rl_attempted_completion_function = (CPPFunction *) NULL;
3987rl_outstream=NULL;
3988readline(NULL);
3989add_history(NULL);
3990read_history(NULL);
3991write_history(NULL);
3992
3993; return 0; }
3994EOF
3995if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3996  rm -rf conftest*
3997  ac_cv_header_readline_readline_h_ok="yes"
3998else
3999  echo "configure: failed program was:" >&5
4000  cat conftest.$ac_ext >&5
4001  rm -rf conftest*
4002  ac_cv_header_readline_readline_h_ok="no"
4003fi
4004rm -f conftest*
4005fi
4006
4007    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
4008    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
4009#not ok -- try once more with explicitly declaring everything
4010      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
4011echo "configure:4012: checking whether or not we nevertheless can use readline" >&5
4012      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
4013  echo $ac_n "(cached) $ac_c" 1>&6
4014else
4015  cat > conftest.$ac_ext <<EOF
4016#line 4017 "configure"
4017#include "confdefs.h"
4018#include <stdio.h>
4019extern "C"
4020{
4021extern char * rl_readline_name;
4022extern char *rl_line_buffer;
4023char *filename_completion_function();
4024typedef char **CPPFunction ();
4025extern char ** completion_matches ();
4026extern CPPFunction * rl_attempted_completion_function;
4027extern FILE * rl_outstream;
4028char * readline ();
4029void add_history ();
4030int write_history ();
4031int read_history();
4032}
4033#ifndef NULL
4034#define NULL 0
4035#endif
4036
4037int main() {
4038rl_readline_name=NULL;
4039*rl_line_buffer=1;
4040completion_matches(NULL, filename_completion_function);
4041rl_attempted_completion_function = (CPPFunction *) NULL;
4042rl_outstream=NULL;
4043readline(NULL);
4044add_history(NULL);
4045read_history(NULL);
4046write_history(NULL);
4047
4048; return 0; }
4049EOF
4050if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4051  rm -rf conftest*
4052  ac_cv_have_readline="yes"
4053
4054else
4055  echo "configure: failed program was:" >&5
4056  cat conftest.$ac_ext >&5
4057  rm -rf conftest*
4058  ac_cv_have_readline="no"
4059
4060fi
4061rm -f conftest*
4062fi
4063
4064      echo "$ac_t""$ac_cv_have_readline" 1>&6
4065    else
4066      cat >> confdefs.h <<\EOF
4067#define READLINE_READLINE_H_OK 1
4068EOF
4069
4070      ac_cv_have_readline="yes"
4071    fi
4072  fi
4073  if test "$ac_cv_have_readline" = yes; then
4074    cat >> confdefs.h <<\EOF
4075#define HAVE_READLINE 1
4076EOF
4077
4078  fi
4079ac_ext=c
4080# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4081ac_cpp='$CPP $CPPFLAGS'
4082ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4083ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4084cross_compiling=$ac_cv_prog_cc_cross
4085
4086fi
4087
4088echo $ac_n "checking which readline to use""... $ac_c" 1>&6
4089echo "configure:4090: checking which readline to use" >&5
4090if test "$ac_cv_with_readline" = dynamic; then
4091  echo "$ac_t""dynamic" 1>&6
4092  cat >> confdefs.h <<\EOF
4093#define HAVE_DYN_RL 1
4094EOF
4095
4096elif test "$ac_cv_have_readline" = yes; then
4097  echo "$ac_t""static" 1>&6
4098else
4099  echo "$ac_t""none" 1>&6
4100  echo "configure: warning: building without readline: disabling fancy display" 1>&2
4101fi
4102 
4103NEED_LIBS=$LIBS
4104
4105# gmp, smallgmp, MP, MPT, factory, libfac
4106echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
4107echo "configure:4108: checking for main in -lgmp" >&5
4108ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
4109if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4110  echo $ac_n "(cached) $ac_c" 1>&6
4111else
4112  ac_save_LIBS="$LIBS"
4113LIBS="-lgmp  $LIBS"
4114cat > conftest.$ac_ext <<EOF
4115#line 4116 "configure"
4116#include "confdefs.h"
4117
4118int main() {
4119main()
4120; return 0; }
4121EOF
4122if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4123  rm -rf conftest*
4124  eval "ac_cv_lib_$ac_lib_var=yes"
4125else
4126  echo "configure: failed program was:" >&5
4127  cat conftest.$ac_ext >&5
4128  rm -rf conftest*
4129  eval "ac_cv_lib_$ac_lib_var=no"
4130fi
4131rm -f conftest*
4132LIBS="$ac_save_LIBS"
4133
4134fi
4135if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4136  echo "$ac_t""yes" 1>&6
4137    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4138    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4139  cat >> confdefs.h <<EOF
4140#define $ac_tr_lib 1
4141EOF
4142
4143  LIBS="-lgmp $LIBS"
4144
4145else
4146  echo "$ac_t""no" 1>&6
4147fi
4148
4149if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then
4150  LIBS=${NEED_LIBS}
4151fi
4152echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6
4153echo "configure:4154: checking for main in -lsmallgmp" >&5
4154ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'`
4155if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4156  echo $ac_n "(cached) $ac_c" 1>&6
4157else
4158  ac_save_LIBS="$LIBS"
4159LIBS="-lsmallgmp  $LIBS"
4160cat > conftest.$ac_ext <<EOF
4161#line 4162 "configure"
4162#include "confdefs.h"
4163
4164int main() {
4165main()
4166; return 0; }
4167EOF
4168if { (eval echo configure:4169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4169  rm -rf conftest*
4170  eval "ac_cv_lib_$ac_lib_var=yes"
4171else
4172  echo "configure: failed program was:" >&5
4173  cat conftest.$ac_ext >&5
4174  rm -rf conftest*
4175  eval "ac_cv_lib_$ac_lib_var=no"
4176fi
4177rm -f conftest*
4178LIBS="$ac_save_LIBS"
4179
4180fi
4181if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4182  echo "$ac_t""yes" 1>&6
4183    ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4184    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4185  cat >> confdefs.h <<EOF
4186#define $ac_tr_lib 1
4187EOF
4188
4189  LIBS="-lsmallgmp $LIBS"
4190
4191else
4192  echo "$ac_t""no" 1>&6
4193fi
4194
4195SAVE_LIBS=$LIBS
4196echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4197echo "configure:4198: checking for IMP_PutGmpInt in -lMP" >&5
4198ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4199if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4200  echo $ac_n "(cached) $ac_c" 1>&6
4201else
4202  ac_save_LIBS="$LIBS"
4203LIBS="-lMP $MP_LIBS $LIBS"
4204cat > conftest.$ac_ext <<EOF
4205#line 4206 "configure"
4206#include "confdefs.h"
4207/* Override any gcc2 internal prototype to avoid an error.  */
4208/* We use char because int might match the return type of a gcc2
4209    builtin and then its argument prototype would still apply.  */
4210char IMP_PutGmpInt();
4211
4212int main() {
4213IMP_PutGmpInt()
4214; return 0; }
4215EOF
4216if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4217  rm -rf conftest*
4218  eval "ac_cv_lib_$ac_lib_var=yes"
4219else
4220  echo "configure: failed program was:" >&5
4221  cat conftest.$ac_ext >&5
4222  rm -rf conftest*
4223  eval "ac_cv_lib_$ac_lib_var=no"
4224fi
4225rm -f conftest*
4226LIBS="$ac_save_LIBS"
4227
4228fi
4229if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4230  echo "$ac_t""yes" 1>&6
4231    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4232    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4233  cat >> confdefs.h <<EOF
4234#define $ac_tr_lib 1
4235EOF
4236
4237  LIBS="-lMP $LIBS"
4238
4239else
4240  echo "$ac_t""no" 1>&6
4241fi
4242
4243echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4244echo "configure:4245: checking for MPT_GetTree in -lMPT" >&5
4245ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4246if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4247  echo $ac_n "(cached) $ac_c" 1>&6
4248else
4249  ac_save_LIBS="$LIBS"
4250LIBS="-lMPT $MP_LIBS $LIBS"
4251cat > conftest.$ac_ext <<EOF
4252#line 4253 "configure"
4253#include "confdefs.h"
4254/* Override any gcc2 internal prototype to avoid an error.  */
4255/* We use char because int might match the return type of a gcc2
4256    builtin and then its argument prototype would still apply.  */
4257char MPT_GetTree();
4258
4259int main() {
4260MPT_GetTree()
4261; return 0; }
4262EOF
4263if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4264  rm -rf conftest*
4265  eval "ac_cv_lib_$ac_lib_var=yes"
4266else
4267  echo "configure: failed program was:" >&5
4268  cat conftest.$ac_ext >&5
4269  rm -rf conftest*
4270  eval "ac_cv_lib_$ac_lib_var=no"
4271fi
4272rm -f conftest*
4273LIBS="$ac_save_LIBS"
4274
4275fi
4276if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4277  echo "$ac_t""yes" 1>&6
4278    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4279    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4280  cat >> confdefs.h <<EOF
4281#define $ac_tr_lib 1
4282EOF
4283
4284  LIBS="-lMPT $LIBS"
4285
4286else
4287  echo "$ac_t""no" 1>&6
4288fi
4289
4290LIBS=$SAVE_LIBS
4291echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4292echo "configure:4293: checking for atof in -lsingcf" >&5
4293ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4294if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4295  echo $ac_n "(cached) $ac_c" 1>&6
4296else
4297  ac_save_LIBS="$LIBS"
4298LIBS="-lsingcf  $LIBS"
4299cat > conftest.$ac_ext <<EOF
4300#line 4301 "configure"
4301#include "confdefs.h"
4302/* Override any gcc2 internal prototype to avoid an error.  */
4303/* We use char because int might match the return type of a gcc2
4304    builtin and then its argument prototype would still apply.  */
4305char atof();
4306
4307int main() {
4308atof()
4309; return 0; }
4310EOF
4311if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4312  rm -rf conftest*
4313  eval "ac_cv_lib_$ac_lib_var=yes"
4314else
4315  echo "configure: failed program was:" >&5
4316  cat conftest.$ac_ext >&5
4317  rm -rf conftest*
4318  eval "ac_cv_lib_$ac_lib_var=no"
4319fi
4320rm -f conftest*
4321LIBS="$ac_save_LIBS"
4322
4323fi
4324if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4325  echo "$ac_t""yes" 1>&6
4326    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4327    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4328  cat >> confdefs.h <<EOF
4329#define $ac_tr_lib 1
4330EOF
4331
4332  LIBS="-lsingcf $LIBS"
4333
4334else
4335  echo "$ac_t""no" 1>&6
4336fi
4337
4338echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4339echo "configure:4340: checking for atof in -lsingfac" >&5
4340ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4341if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4342  echo $ac_n "(cached) $ac_c" 1>&6
4343else
4344  ac_save_LIBS="$LIBS"
4345LIBS="-lsingfac  $LIBS"
4346cat > conftest.$ac_ext <<EOF
4347#line 4348 "configure"
4348#include "confdefs.h"
4349/* Override any gcc2 internal prototype to avoid an error.  */
4350/* We use char because int might match the return type of a gcc2
4351    builtin and then its argument prototype would still apply.  */
4352char atof();
4353
4354int main() {
4355atof()
4356; return 0; }
4357EOF
4358if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4359  rm -rf conftest*
4360  eval "ac_cv_lib_$ac_lib_var=yes"
4361else
4362  echo "configure: failed program was:" >&5
4363  cat conftest.$ac_ext >&5
4364  rm -rf conftest*
4365  eval "ac_cv_lib_$ac_lib_var=no"
4366fi
4367rm -f conftest*
4368LIBS="$ac_save_LIBS"
4369
4370fi
4371if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4372  echo "$ac_t""yes" 1>&6
4373    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4374    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4375  cat >> confdefs.h <<EOF
4376#define $ac_tr_lib 1
4377EOF
4378
4379  LIBS="-lsingfac $LIBS"
4380
4381else
4382  echo "$ac_t""no" 1>&6
4383fi
4384
4385echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
4386echo "configure:4387: checking for omTestAddr in -lomalloc" >&5
4387ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
4388if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4389  echo $ac_n "(cached) $ac_c" 1>&6
4390else
4391  ac_save_LIBS="$LIBS"
4392LIBS="-lomalloc  $LIBS"
4393cat > conftest.$ac_ext <<EOF
4394#line 4395 "configure"
4395#include "confdefs.h"
4396/* Override any gcc2 internal prototype to avoid an error.  */
4397/* We use char because int might match the return type of a gcc2
4398    builtin and then its argument prototype would still apply.  */
4399char omTestAddr();
4400
4401int main() {
4402omTestAddr()
4403; return 0; }
4404EOF
4405if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4406  rm -rf conftest*
4407  eval "ac_cv_lib_$ac_lib_var=yes"
4408else
4409  echo "configure: failed program was:" >&5
4410  cat conftest.$ac_ext >&5
4411  rm -rf conftest*
4412  eval "ac_cv_lib_$ac_lib_var=no"
4413fi
4414rm -f conftest*
4415LIBS="$ac_save_LIBS"
4416
4417fi
4418if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4419  echo "$ac_t""yes" 1>&6
4420    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4421    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4422  cat >> confdefs.h <<EOF
4423#define $ac_tr_lib 1
4424EOF
4425
4426  LIBS="-lomalloc $LIBS"
4427
4428else
4429  echo "$ac_t""no" 1>&6
4430fi
4431
4432echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
4433echo "configure:4434: checking for main in -lomalloc_ndebug" >&5
4434ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
4435if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4436  echo $ac_n "(cached) $ac_c" 1>&6
4437else
4438  ac_save_LIBS="$LIBS"
4439LIBS="-lomalloc_ndebug  $LIBS"
4440cat > conftest.$ac_ext <<EOF
4441#line 4442 "configure"
4442#include "confdefs.h"
4443
4444int main() {
4445main()
4446; return 0; }
4447EOF
4448if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4449  rm -rf conftest*
4450  eval "ac_cv_lib_$ac_lib_var=yes"
4451else
4452  echo "configure: failed program was:" >&5
4453  cat conftest.$ac_ext >&5
4454  rm -rf conftest*
4455  eval "ac_cv_lib_$ac_lib_var=no"
4456fi
4457rm -f conftest*
4458LIBS="$ac_save_LIBS"
4459
4460fi
4461if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4462  echo "$ac_t""yes" 1>&6
4463    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4464    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4465  cat >> confdefs.h <<EOF
4466#define $ac_tr_lib 1
4467EOF
4468
4469  LIBS="-lomalloc_ndebug $LIBS"
4470
4471else
4472  echo "$ac_t""no" 1>&6
4473fi
4474
4475
4476for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h omalloc.h omalloc.c
4477do
4478ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4479echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4480echo "configure:4481: checking for $ac_hdr" >&5
4481if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4482  echo $ac_n "(cached) $ac_c" 1>&6
4483else
4484  cat > conftest.$ac_ext <<EOF
4485#line 4486 "configure"
4486#include "confdefs.h"
4487#include <$ac_hdr>
4488EOF
4489ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4490{ (eval echo configure:4491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4491ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4492if test -z "$ac_err"; then
4493  rm -rf conftest*
4494  eval "ac_cv_header_$ac_safe=yes"
4495else
4496  echo "$ac_err" >&5
4497  echo "configure: failed program was:" >&5
4498  cat conftest.$ac_ext >&5
4499  rm -rf conftest*
4500  eval "ac_cv_header_$ac_safe=no"
4501fi
4502rm -f conftest*
4503fi
4504if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4505  echo "$ac_t""yes" 1>&6
4506    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4507  cat >> confdefs.h <<EOF
4508#define $ac_tr_hdr 1
4509EOF
4510 
4511else
4512  echo "$ac_t""no" 1>&6
4513fi
4514done
4515
4516
4517if test "$ac_cv_lib_gmp_main" = yes && \
4518 test "$ac_cv_header_gmp_h" = yes; then
4519    ac_gmp_ok=yes
4520fi
4521
4522if test "$ac_cv_lib_smallgmp_main" = yes && \
4523 test "$ac_cv_header_smallgmp_h" = yes && \
4524 test "$ac_cv_header_gmp_h" = yes; then
4525    ac_smallgmp_ok=yes
4526fi
4527
4528if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
4529 test "$ac_cv_lib_MPT_MPT_GetTree" && \
4530 test "$ac_cv_header_MP_h" = yes && \
4531 test "$ac_cv_header_MPT_h" = yes; then
4532  ac_MP_ok=yes
4533fi
4534
4535if test "$ac_cv_lib_singcf_atof" = yes && \
4536 test "$ac_cv_header_factory_h" = yes; then
4537  ac_factory_ok=yes
4538fi
4539
4540if test "$ac_cv_lib_singfac_atof" = yes && \
4541 test "$ac_cv_header_factor_h" = yes; then
4542  ac_libfac_ok=yes
4543fi
4544
4545if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
4546   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
4547   test "$ac_cv_header_omalloc_c" = yes && \
4548   test "$ac_cv_header_omalloc_h" = yes; then
4549  ac_cv_omalloc_ok=yes
4550fi
4551
4552
4553# evaluate results
4554if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
4555  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
4556fi
4557
4558echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
4559echo "configure:4560: checking which apint package to use" >&5
4560if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
4561  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4562    echo "$ac_t""gmp" 1>&6
4563    will_have_gmp=yes
4564    NEED_LIBS="-lgmp ${NEED_LIBS}"
4565  elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4566    echo "$ac_t""smallgmp" 1>&6
4567    cat >> confdefs.h <<\EOF
4568#define HAVE_SMALLGMP 1
4569EOF
4570
4571    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4572  else
4573    echo "$ac_t""none" 1>&6
4574    { echo "configure: error: can not build without gmp or smallgmp" 1>&2; exit 1; }
4575  fi
4576elif test "${with_apint}" = gmp; then
4577  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4578    echo "$ac_t""gmp" 1>&6
4579    will_have_gmp=yes
4580    NEED_LIBS="-lgmp ${NEED_LIBS}"
4581  else
4582    echo "$ac_t""none" 1>&6
4583    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
4584  fi
4585else
4586  if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4587    echo "$ac_t""smallgmp" 1>&6
4588    cat >> confdefs.h <<\EOF
4589#define HAVE_SMALLGMP 1
4590EOF
4591
4592    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4593  else
4594    echo "$ac_t""none" 1>&6
4595    { echo "configure: error: can not build with smallgmp" 1>&2; exit 1; }
4596  fi
4597fi
4598
4599#
4600echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
4601echo "configure:4602: checking whether to have MP" >&5
4602if test "${with_MP}" != yes && test "${with_MP}" != no; then
4603  if (test "${will_have_gmp}" = yes) && \
4604     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4605    echo "$ac_t""yes" 1>&6
4606    cat >> confdefs.h <<\EOF
4607#define HAVE_MPSR 1
4608EOF
4609
4610    HAVE_MPSR=1
4611    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4612  else
4613    echo "$ac_t""no" 1>&6
4614  fi
4615elif  test "${with_MP}" = yes; then
4616  if (test "${will_have_gmp}" = yes) && \
4617     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4618    echo "$ac_t""yes" 1>&6
4619    cat >> confdefs.h <<\EOF
4620#define HAVE_MPSR 1
4621EOF
4622
4623    HAVE_MPSR=1
4624    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4625  else
4626    echo "$ac_t""no" 1>&6
4627    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
4628  fi
4629else
4630  echo "$ac_t""no" 1>&6
4631fi
4632
4633
4634
4635echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
4636echo "configure:4637: checking whether to have factory" >&5
4637if test "${with_factory}" != yes && test "${with_factory}" != no; then
4638  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4639    echo "$ac_t""yes" 1>&6
4640    cat >> confdefs.h <<\EOF
4641#define HAVE_FACTORY 1
4642EOF
4643
4644    will_have_factory=yes
4645    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4646  else
4647    echo "$ac_t""no" 1>&6
4648  fi
4649elif  test "${with_factory}" = yes; then
4650  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4651    echo "$ac_t""yes" 1>&6
4652    cat >> confdefs.h <<\EOF
4653#define HAVE_FACTORY 1
4654EOF
4655
4656    will_have_factory=yes
4657    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4658  else
4659    echo "$ac_t""no" 1>&6
4660    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
4661  fi
4662else
4663  echo "$ac_t""no" 1>&6
4664fi
4665
4666echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
4667echo "configure:4668: checking whether to have libfac" >&5
4668if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
4669  if (test "${will_have_factory}" = yes) && \
4670     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4671    echo "$ac_t""yes" 1>&6
4672    cat >> confdefs.h <<\EOF
4673#define HAVE_LIBFAC_P 1
4674EOF
4675
4676    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4677  else
4678    echo "$ac_t""no" 1>&6
4679  fi
4680elif  test "${with_libfac}" = yes; then
4681  if (test "${will_have_factory}" = yes) && \
4682     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4683    echo "$ac_t""yes" 1>&6
4684    cat >> confdefs.h <<\EOF
4685#define HAVE_LIBFAC_P 1
4686EOF
4687
4688    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4689  else
4690    echo "$ac_t""no" 1>&6
4691    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
4692  fi
4693else
4694  echo "$ac_t""no" 1>&6
4695fi
4696
4697
4698
4699
4700echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
4701echo "configure:4702: checking whether to have dbm links" >&5
4702if test "$with_dbm" != no; then
4703  cat >> confdefs.h <<\EOF
4704#define HAVE_DBM 1
4705EOF
4706
4707  echo "$ac_t""yes" 1>&6
4708else
4709  echo "$ac_t""no" 1>&6
4710fi
4711
4712echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
4713echo "configure:4714: checking whether to have namespaces" >&5
4714if test "$with_namespaces" != no; then
4715  echo "$ac_t""yes" 1>&6
4716else
4717  cat >> confdefs.h <<\EOF
4718#define HAVE_NAMESPACES 1
4719EOF
4720
4721  echo "$ac_t""no" 1>&6
4722fi
4723
4724echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
4725echo "configure:4726: checking whether to have dynamic modules" >&5
4726if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then
4727  echo "$ac_t""no" 1>&6
4728else
4729  cat >> confdefs.h <<\EOF
4730#define HAVE_DYNAMIC_LOADING 1
4731EOF
4732
4733  echo "$ac_t""yes" 1>&6
4734fi
4735
4736echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
4737echo "configure:4738: checking whether to have dynamic kernel" >&5
4738if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
4739  DL_KERNEL=1
4740 
4741  echo "$ac_t""yes" 1>&6
4742else
4743  echo "$ac_t""no" 1>&6
4744fi
4745
4746echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
4747echo "configure:4748: checking whether to have Plural" >&5
4748if test "$with_plural" != yes; then
4749  echo "$ac_t""no" 1>&6
4750else
4751  cat >> confdefs.h <<\EOF
4752#define HAVE_PLURAL 1
4753EOF
4754
4755  echo "$ac_t""yes" 1>&6
4756fi
4757
4758
4759OUTPUT_MAKEFILES=Makefile
4760
4761if test "$ac_cv_singuname" = "ix86-Win"; then
4762  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
4763fi
4764
4765trap '' 1 2 15
4766cat > confcache <<\EOF
4767# This file is a shell script that caches the results of configure
4768# tests run on this system so they can be shared between configure
4769# scripts and configure runs.  It is not useful on other systems.
4770# If it contains results you don't want to keep, you may remove or edit it.
4771#
4772# By default, configure uses ./config.cache as the cache file,
4773# creating it if it does not exist already.  You can give configure
4774# the --cache-file=FILE option to use a different cache file; that is
4775# what configure does when it calls configure scripts in
4776# subdirectories, so they share the cache.
4777# Giving --cache-file=/dev/null disables caching, for debugging configure.
4778# config.status only pays attention to the cache file if you give it the
4779# --recheck option to rerun configure.
4780#
4781EOF
4782# The following way of writing the cache mishandles newlines in values,
4783# but we know of no workaround that is simple, portable, and efficient.
4784# So, don't put newlines in cache variables' values.
4785# Ultrix sh set writes to stderr and can't be redirected directly,
4786# and sets the high bit in the cache file unless we assign to the vars.
4787(set) 2>&1 |
4788  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4789  *ac_space=\ *)
4790    # `set' does not quote correctly, so add quotes (double-quote substitution
4791    # turns \\\\ into \\, and sed turns \\ into \).
4792    sed -n \
4793      -e "s/'/'\\\\''/g" \
4794      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4795    ;;
4796  *)
4797    # `set' quotes correctly as required by POSIX, so do not add quotes.
4798    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4799    ;;
4800  esac >> confcache
4801if cmp -s $cache_file confcache; then
4802  :
4803else
4804  if test -w $cache_file; then
4805    echo "updating cache $cache_file"
4806    cat confcache > $cache_file
4807  else
4808    echo "not updating unwritable cache $cache_file"
4809  fi
4810fi
4811rm -f confcache
4812
4813trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4814
4815test "x$prefix" = xNONE && prefix=$ac_default_prefix
4816# Let make expand exec_prefix.
4817test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4818
4819# Any assignment to VPATH causes Sun make to only execute
4820# the first set of double-colon rules, so remove it if not needed.
4821# If there is a colon in the path, we need to keep it.
4822if test "x$srcdir" = x.; then
4823  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4824fi
4825
4826trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4827
4828DEFS=-DHAVE_CONFIG_H
4829
4830# Without the "./", some shells look in PATH for config.status.
4831: ${CONFIG_STATUS=./config.status}
4832
4833echo creating $CONFIG_STATUS
4834rm -f $CONFIG_STATUS
4835cat > $CONFIG_STATUS <<EOF
4836#! /bin/sh
4837# Generated automatically by configure.
4838# Run this file to recreate the current configuration.
4839# This directory was configured as follows,
4840# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4841#
4842# $0 $ac_configure_args
4843#
4844# Compiler output produced by configure, useful for debugging
4845# configure, is in ./config.log if it exists.
4846
4847ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4848for ac_option
4849do
4850  case "\$ac_option" in
4851  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4852    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4853    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4854  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4855    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4856    exit 0 ;;
4857  -help | --help | --hel | --he | --h)
4858    echo "\$ac_cs_usage"; exit 0 ;;
4859  *) echo "\$ac_cs_usage"; exit 1 ;;
4860  esac
4861done
4862
4863ac_given_srcdir=$srcdir
4864ac_given_INSTALL="$INSTALL"
4865
4866trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4867EOF
4868cat >> $CONFIG_STATUS <<EOF
4869
4870# Protect against being on the right side of a sed subst in config.status.
4871sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4872 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4873$ac_vpsub
4874$extrasub
4875s%@SHELL@%$SHELL%g
4876s%@CFLAGS@%$CFLAGS%g
4877s%@CPPFLAGS@%$CPPFLAGS%g
4878s%@CXXFLAGS@%$CXXFLAGS%g
4879s%@FFLAGS@%$FFLAGS%g
4880s%@DEFS@%$DEFS%g
4881s%@LDFLAGS@%$LDFLAGS%g
4882s%@LIBS@%$LIBS%g
4883s%@exec_prefix@%$exec_prefix%g
4884s%@prefix@%$prefix%g
4885s%@program_transform_name@%$program_transform_name%g
4886s%@bindir@%$bindir%g
4887s%@sbindir@%$sbindir%g
4888s%@libexecdir@%$libexecdir%g
4889s%@datadir@%$datadir%g
4890s%@sysconfdir@%$sysconfdir%g
4891s%@sharedstatedir@%$sharedstatedir%g
4892s%@localstatedir@%$localstatedir%g
4893s%@libdir@%$libdir%g
4894s%@includedir@%$includedir%g
4895s%@oldincludedir@%$oldincludedir%g
4896s%@infodir@%$infodir%g
4897s%@mandir@%$mandir%g
4898s%@SINGUNAME@%$SINGUNAME%g
4899s%@EXEC_EXT@%$EXEC_EXT%g
4900s%@SING_UNAME@%$SING_UNAME%g
4901s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
4902s%@VERSION_DATE@%$VERSION_DATE%g
4903s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
4904s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
4905s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
4906s%@CC@%$CC%g
4907s%@CPP@%$CPP%g
4908s%@CXX@%$CXX%g
4909s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4910s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4911s%@INSTALL_DATA@%$INSTALL_DATA%g
4912s%@PIPE@%$PIPE%g
4913s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
4914s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
4915s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
4916s%@SET_MAKE@%$SET_MAKE%g
4917s%@SINGULAR@%$SINGULAR%g
4918s%@LEX@%$LEX%g
4919s%@BISON@%$BISON%g
4920s%@LN_S@%$LN_S%g
4921s%@PERL@%$PERL%g
4922s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
4923s%@SFLAGS@%$SFLAGS%g
4924s%@SLDFLAGS@%$SLDFLAGS%g
4925s%@LD@%$LD%g
4926s%@ALLOCA@%$ALLOCA%g
4927s%@CXXCPP@%$CXXCPP%g
4928s%@HAVE_MPSR@%$HAVE_MPSR%g
4929s%@MP_LIBS@%$MP_LIBS%g
4930s%@NEED_LIBS@%$NEED_LIBS%g
4931s%@DL_KERNEL@%$DL_KERNEL%g
4932
4933CEOF
4934EOF
4935
4936cat >> $CONFIG_STATUS <<\EOF
4937
4938# Split the substitutions into bite-sized pieces for seds with
4939# small command number limits, like on Digital OSF/1 and HP-UX.
4940ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4941ac_file=1 # Number of current file.
4942ac_beg=1 # First line for current file.
4943ac_end=$ac_max_sed_cmds # Line after last line for current file.
4944ac_more_lines=:
4945ac_sed_cmds=""
4946while $ac_more_lines; do
4947  if test $ac_beg -gt 1; then
4948    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4949  else
4950    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4951  fi
4952  if test ! -s conftest.s$ac_file; then
4953    ac_more_lines=false
4954    rm -f conftest.s$ac_file
4955  else
4956    if test -z "$ac_sed_cmds"; then
4957      ac_sed_cmds="sed -f conftest.s$ac_file"
4958    else
4959      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4960    fi
4961    ac_file=`expr $ac_file + 1`
4962    ac_beg=$ac_end
4963    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4964  fi
4965done
4966if test -z "$ac_sed_cmds"; then
4967  ac_sed_cmds=cat
4968fi
4969EOF
4970
4971cat >> $CONFIG_STATUS <<EOF
4972
4973CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
4974EOF
4975cat >> $CONFIG_STATUS <<\EOF
4976for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4977  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4978  case "$ac_file" in
4979  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4980       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4981  *) ac_file_in="${ac_file}.in" ;;
4982  esac
4983
4984  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4985
4986  # Remove last slash and all that follows it.  Not all systems have dirname.
4987  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4988  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4989    # The file is in a subdirectory.
4990    test ! -d "$ac_dir" && mkdir "$ac_dir"
4991    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4992    # A "../" for each directory in $ac_dir_suffix.
4993    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4994  else
4995    ac_dir_suffix= ac_dots=
4996  fi
4997
4998  case "$ac_given_srcdir" in
4999  .)  srcdir=.
5000      if test -z "$ac_dots"; then top_srcdir=.
5001      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5002  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5003  *) # Relative path.
5004    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5005    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5006  esac
5007
5008  case "$ac_given_INSTALL" in
5009  [/$]*) INSTALL="$ac_given_INSTALL" ;;
5010  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5011  esac
5012
5013  echo creating "$ac_file"
5014  rm -f "$ac_file"
5015  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5016  case "$ac_file" in
5017  *Makefile*) ac_comsub="1i\\
5018# $configure_input" ;;
5019  *) ac_comsub= ;;
5020  esac
5021
5022  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5023  sed -e "$ac_comsub
5024s%@configure_input@%$configure_input%g
5025s%@srcdir@%$srcdir%g
5026s%@top_srcdir@%$top_srcdir%g
5027s%@INSTALL@%$INSTALL%g
5028" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5029fi; done
5030rm -f conftest.s*
5031
5032# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5033# NAME is the cpp macro being defined and VALUE is the value it is being given.
5034#
5035# ac_d sets the value in "#define NAME VALUE" lines.
5036ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5037ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5038ac_dC='\3'
5039ac_dD='%g'
5040# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5041ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5042ac_uB='\([      ]\)%\1#\2define\3'
5043ac_uC=' '
5044ac_uD='\4%g'
5045# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5046ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5047ac_eB='$%\1#\2define\3'
5048ac_eC=' '
5049ac_eD='%g'
5050
5051if test "${CONFIG_HEADERS+set}" != set; then
5052EOF
5053cat >> $CONFIG_STATUS <<EOF
5054  CONFIG_HEADERS="mod2.h"
5055EOF
5056cat >> $CONFIG_STATUS <<\EOF
5057fi
5058for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5059  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5060  case "$ac_file" in
5061  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5062       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5063  *) ac_file_in="${ac_file}.in" ;;
5064  esac
5065
5066  echo creating $ac_file
5067
5068  rm -f conftest.frag conftest.in conftest.out
5069  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5070  cat $ac_file_inputs > conftest.in
5071
5072EOF
5073
5074# Transform confdefs.h into a sed script conftest.vals that substitutes
5075# the proper values into config.h.in to produce config.h.  And first:
5076# Protect against being on the right side of a sed subst in config.status.
5077# Protect against being in an unquoted here document in config.status.
5078rm -f conftest.vals
5079cat > conftest.hdr <<\EOF
5080s/[\\&%]/\\&/g
5081s%[\\$`]%\\&%g
5082s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5083s%ac_d%ac_u%gp
5084s%ac_u%ac_e%gp
5085EOF
5086sed -n -f conftest.hdr confdefs.h > conftest.vals
5087rm -f conftest.hdr
5088
5089# This sed command replaces #undef with comments.  This is necessary, for
5090# example, in the case of _POSIX_SOURCE, which is predefined and required
5091# on some systems where configure will not decide to define it.
5092cat >> conftest.vals <<\EOF
5093s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5094EOF
5095
5096# Break up conftest.vals because some shells have a limit on
5097# the size of here documents, and old seds have small limits too.
5098
5099rm -f conftest.tail
5100while :
5101do
5102  ac_lines=`grep -c . conftest.vals`
5103  # grep -c gives empty output for an empty file on some AIX systems.
5104  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5105  # Write a limited-size here document to conftest.frag.
5106  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5107  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5108  echo 'CEOF
5109  sed -f conftest.frag conftest.in > conftest.out
5110  rm -f conftest.in
5111  mv conftest.out conftest.in
5112' >> $CONFIG_STATUS
5113  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5114  rm -f conftest.vals
5115  mv conftest.tail conftest.vals
5116done
5117rm -f conftest.vals
5118
5119cat >> $CONFIG_STATUS <<\EOF
5120  rm -f conftest.frag conftest.h
5121  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5122  cat conftest.in >> conftest.h
5123  rm -f conftest.in
5124  if cmp -s $ac_file conftest.h 2>/dev/null; then
5125    echo "$ac_file is unchanged"
5126    rm -f conftest.h
5127  else
5128    # Remove last slash and all that follows it.  Not all systems have dirname.
5129      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5130      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5131      # The file is in a subdirectory.
5132      test ! -d "$ac_dir" && mkdir "$ac_dir"
5133    fi
5134    rm -f $ac_file
5135    mv conftest.h $ac_file
5136  fi
5137fi; done
5138
5139EOF
5140cat >> $CONFIG_STATUS <<EOF
5141
5142EOF
5143cat >> $CONFIG_STATUS <<\EOF
5144\
5145 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
5146exit 0
5147EOF
5148chmod +x $CONFIG_STATUS
5149rm -fr confdefs* $ac_clean_files
5150test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5151
Note: See TracBrowser for help on using the repository browser.