source: git/Singular/configure @ 104fd23

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