source: git/Singular/configure.SAVE @ 6993c83

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