source: git/Singular/configure @ c880c17

spielwiese
Last change on this file since c880c17 was c880c17, checked in by Hans Schoenemann <hannes@…>, 13 years ago
python check 32bit on a 64bit machine git-svn-id: file:///usr/local/Singular/svn/trunk@13842 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 171.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:-2}
722SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
723VERSION_DATE=${VERSION_DATE:-"Oct 2010"}
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_FLAGS="-ldld -Xlinker -E"
2542                SFLAGS="-fpic -fPIC -DPIC"
2543                SLDFLAGS="-fPIC -DPIC -shared"
2544                if test "${LD+set}" != set; then
2545                  LD=gcc
2546                fi
2547                ac_lib_dl=yes
2548          fi
2549        ;;
2550        *Linux*)
2551          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2552echo "configure:2552: checking for dlopen in -ldl" >&5
2553ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2554if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2555  echo $ac_n "(cached) $ac_c" 1>&6
2556else
2557  ac_save_LIBS="$LIBS"
2558LIBS="-ldl  $LIBS"
2559cat > conftest.$ac_ext <<EOF
2560#line 2560 "configure"
2561#include "confdefs.h"
2562/* Override any gcc2 internal prototype to avoid an error.  */
2563/* We use char because int might match the return type of a gcc2
2564    builtin and then its argument prototype would still apply.  */
2565char dlopen();
2566
2567int main() {
2568dlopen()
2569; return 0; }
2570EOF
2571if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2572  rm -rf conftest*
2573  eval "ac_cv_lib_$ac_lib_var=yes"
2574else
2575  echo "configure: failed program was:" >&5
2576  cat conftest.$ac_ext >&5
2577  rm -rf conftest*
2578  eval "ac_cv_lib_$ac_lib_var=no"
2579fi
2580rm -f conftest*
2581LIBS="$ac_save_LIBS"
2582
2583fi
2584if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2585  echo "$ac_t""yes" 1>&6
2586    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2587    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2588  cat >> confdefs.h <<EOF
2589#define $ac_tr_lib 1
2590EOF
2591
2592  LIBS="-ldl $LIBS"
2593
2594else
2595  echo "$ac_t""no" 1>&6
2596fi
2597
2598          if test "$ac_cv_lib_dl_dlopen" = yes; then
2599                LD_DYN_FLAGS="-ldl -rdynamic"
2600                SFLAGS="-fpic -DPIC"
2601                SLDFLAGS=-shared
2602                if test "${LD+set}" != set; then
2603                  LD=ld
2604                fi
2605                ac_lib_dl=yes
2606          fi
2607        ;;
2608        IRIX-6)
2609          LD_DYN_FLAGS="-lc"
2610          SFLAGS="-fPIC -DPIC"
2611          SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared"
2612          if test "${LD+set}" != set; then
2613            LD=ld
2614          fi
2615          ac_lib_dl=yes
2616        ;;
2617        SunOS-5)
2618          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2619echo "configure:2619: checking for dlopen in -ldl" >&5
2620ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2621if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2622  echo $ac_n "(cached) $ac_c" 1>&6
2623else
2624  ac_save_LIBS="$LIBS"
2625LIBS="-ldl  $LIBS"
2626cat > conftest.$ac_ext <<EOF
2627#line 2627 "configure"
2628#include "confdefs.h"
2629/* Override any gcc2 internal prototype to avoid an error.  */
2630/* We use char because int might match the return type of a gcc2
2631    builtin and then its argument prototype would still apply.  */
2632char dlopen();
2633
2634int main() {
2635dlopen()
2636; return 0; }
2637EOF
2638if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2639  rm -rf conftest*
2640  eval "ac_cv_lib_$ac_lib_var=yes"
2641else
2642  echo "configure: failed program was:" >&5
2643  cat conftest.$ac_ext >&5
2644  rm -rf conftest*
2645  eval "ac_cv_lib_$ac_lib_var=no"
2646fi
2647rm -f conftest*
2648LIBS="$ac_save_LIBS"
2649
2650fi
2651if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2652  echo "$ac_t""yes" 1>&6
2653    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2654    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2655  cat >> confdefs.h <<EOF
2656#define $ac_tr_lib 1
2657EOF
2658
2659  LIBS="-ldl $LIBS"
2660
2661else
2662  echo "$ac_t""no" 1>&6
2663fi
2664
2665          if test "$ac_cv_lib_dl_dlopen" = yes; then
2666                LD_DYN_FLAGS="-ldl"
2667                SFLAGS="-fpic -DPIC"
2668                SLDFLAGS=-shared
2669                if test "${LD+set}" != set; then
2670                  LD=$CC
2671                fi
2672                ac_lib_dl=yes
2673          fi
2674        ;;
2675        #use export MACOSX_DEPLOYMENT_TARGET=10.3
2676        ppcMac-darwin)
2677          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2678echo "configure:2678: checking for dlopen in -ldl" >&5
2679ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2680if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2681  echo $ac_n "(cached) $ac_c" 1>&6
2682else
2683  ac_save_LIBS="$LIBS"
2684LIBS="-ldl  $LIBS"
2685cat > conftest.$ac_ext <<EOF
2686#line 2686 "configure"
2687#include "confdefs.h"
2688/* Override any gcc2 internal prototype to avoid an error.  */
2689/* We use char because int might match the return type of a gcc2
2690    builtin and then its argument prototype would still apply.  */
2691char dlopen();
2692
2693int main() {
2694dlopen()
2695; return 0; }
2696EOF
2697if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2698  rm -rf conftest*
2699  eval "ac_cv_lib_$ac_lib_var=yes"
2700else
2701  echo "configure: failed program was:" >&5
2702  cat conftest.$ac_ext >&5
2703  rm -rf conftest*
2704  eval "ac_cv_lib_$ac_lib_var=no"
2705fi
2706rm -f conftest*
2707LIBS="$ac_save_LIBS"
2708
2709fi
2710if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2711  echo "$ac_t""yes" 1>&6
2712    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2713    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2714  cat >> confdefs.h <<EOF
2715#define $ac_tr_lib 1
2716EOF
2717
2718  LIBS="-ldl $LIBS"
2719
2720else
2721  echo "$ac_t""no" 1>&6
2722fi
2723
2724          if test "$ac_cv_lib_dl_dlopen" = yes; then
2725                LD_DYN_FLAGS="-ldl -dynamic"
2726                SFLAGS="-fpic -DPIC"
2727                SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
2728                if test "${LD+set}" != set; then
2729                  LD=libtool
2730                fi
2731                ac_lib_dl=yes
2732          fi
2733        ;;
2734        ix86Mac-darwin)
2735          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2736echo "configure:2736: checking for dlopen in -ldl" >&5
2737ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2739  echo $ac_n "(cached) $ac_c" 1>&6
2740else
2741  ac_save_LIBS="$LIBS"
2742LIBS="-ldl  $LIBS"
2743cat > conftest.$ac_ext <<EOF
2744#line 2744 "configure"
2745#include "confdefs.h"
2746/* Override any gcc2 internal prototype to avoid an error.  */
2747/* We use char because int might match the return type of a gcc2
2748    builtin and then its argument prototype would still apply.  */
2749char dlopen();
2750
2751int main() {
2752dlopen()
2753; return 0; }
2754EOF
2755if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2756  rm -rf conftest*
2757  eval "ac_cv_lib_$ac_lib_var=yes"
2758else
2759  echo "configure: failed program was:" >&5
2760  cat conftest.$ac_ext >&5
2761  rm -rf conftest*
2762  eval "ac_cv_lib_$ac_lib_var=no"
2763fi
2764rm -f conftest*
2765LIBS="$ac_save_LIBS"
2766
2767fi
2768if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2769  echo "$ac_t""yes" 1>&6
2770    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2771    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2772  cat >> confdefs.h <<EOF
2773#define $ac_tr_lib 1
2774EOF
2775
2776  LIBS="-ldl $LIBS"
2777
2778else
2779  echo "$ac_t""no" 1>&6
2780fi
2781
2782          if test "$ac_cv_lib_dl_dlopen" = yes; then
2783                LD_DYN_FLAGS="-ldl -dynamic"
2784                SFLAGS="-fpic -DPIC"
2785                SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
2786                if test "${LD+set}" != set; then
2787                  LD=libtool
2788                fi
2789                ac_lib_dl=yes
2790          fi
2791        ;;
2792        ix86-freebsd)
2793          echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
2794echo "configure:2794: checking for dlopen in -lc" >&5
2795ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
2796if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2797  echo $ac_n "(cached) $ac_c" 1>&6
2798else
2799  ac_save_LIBS="$LIBS"
2800LIBS="-lc  $LIBS"
2801cat > conftest.$ac_ext <<EOF
2802#line 2802 "configure"
2803#include "confdefs.h"
2804/* Override any gcc2 internal prototype to avoid an error.  */
2805/* We use char because int might match the return type of a gcc2
2806    builtin and then its argument prototype would still apply.  */
2807char dlopen();
2808
2809int main() {
2810dlopen()
2811; return 0; }
2812EOF
2813if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2814  rm -rf conftest*
2815  eval "ac_cv_lib_$ac_lib_var=yes"
2816else
2817  echo "configure: failed program was:" >&5
2818  cat conftest.$ac_ext >&5
2819  rm -rf conftest*
2820  eval "ac_cv_lib_$ac_lib_var=no"
2821fi
2822rm -f conftest*
2823LIBS="$ac_save_LIBS"
2824
2825fi
2826if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2827  echo "$ac_t""yes" 1>&6
2828    ac_tr_lib=HAVE_LIB`echo c | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2829    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2830  cat >> confdefs.h <<EOF
2831#define $ac_tr_lib 1
2832EOF
2833
2834  LIBS="-lc $LIBS"
2835
2836else
2837  echo "$ac_t""no" 1>&6
2838fi
2839
2840          if test "$ac_cv_lib_c_dlopen" = yes; then
2841                LD_DYN_FLAGS="-Xlinker -E"
2842                SFLAGS="-fpic -DPIC"
2843                SLDFLAGS=-shared
2844                if test "${LD+set}" != set; then
2845                  LD=ld
2846                fi
2847                ac_lib_dl=yes
2848          fi
2849        ;;
2850esac
2851
2852
2853
2854
2855LIBS="${SAVE_LIBS} ${MP_LIBS}"
2856
2857
2858# heder file checks
2859echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2860echo "configure:2860: checking for ANSI C header files" >&5
2861if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2862  echo $ac_n "(cached) $ac_c" 1>&6
2863else
2864  cat > conftest.$ac_ext <<EOF
2865#line 2865 "configure"
2866#include "confdefs.h"
2867#include <stdlib.h>
2868#include <stdarg.h>
2869#include <string.h>
2870#include <float.h>
2871EOF
2872ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2873{ (eval echo configure:2873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2874ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2875if test -z "$ac_err"; then
2876  rm -rf conftest*
2877  ac_cv_header_stdc=yes
2878else
2879  echo "$ac_err" >&5
2880  echo "configure: failed program was:" >&5
2881  cat conftest.$ac_ext >&5
2882  rm -rf conftest*
2883  ac_cv_header_stdc=no
2884fi
2885rm -f conftest*
2886
2887if test $ac_cv_header_stdc = yes; then
2888  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2889cat > conftest.$ac_ext <<EOF
2890#line 2890 "configure"
2891#include "confdefs.h"
2892#include <string.h>
2893EOF
2894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2895  egrep "memchr" >/dev/null 2>&1; then
2896  :
2897else
2898  rm -rf conftest*
2899  ac_cv_header_stdc=no
2900fi
2901rm -f conftest*
2902
2903fi
2904
2905if test $ac_cv_header_stdc = yes; then
2906  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2907cat > conftest.$ac_ext <<EOF
2908#line 2908 "configure"
2909#include "confdefs.h"
2910#include <stdlib.h>
2911EOF
2912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2913  egrep "free" >/dev/null 2>&1; then
2914  :
2915else
2916  rm -rf conftest*
2917  ac_cv_header_stdc=no
2918fi
2919rm -f conftest*
2920
2921fi
2922
2923if test $ac_cv_header_stdc = yes; then
2924  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2925if test "$cross_compiling" = yes; then
2926  :
2927else
2928  cat > conftest.$ac_ext <<EOF
2929#line 2929 "configure"
2930#include "confdefs.h"
2931#include <ctype.h>
2932#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2933#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2934#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2935int main () { int i; for (i = 0; i < 256; i++)
2936if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2937exit (0); }
2938
2939EOF
2940if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2941then
2942  :
2943else
2944  echo "configure: failed program was:" >&5
2945  cat conftest.$ac_ext >&5
2946  rm -fr conftest*
2947  ac_cv_header_stdc=no
2948fi
2949rm -fr conftest*
2950fi
2951
2952fi
2953fi
2954
2955echo "$ac_t""$ac_cv_header_stdc" 1>&6
2956if test $ac_cv_header_stdc = yes; then
2957  cat >> confdefs.h <<\EOF
2958#define STDC_HEADERS 1
2959EOF
2960
2961fi
2962
2963for ac_hdr in limits.h unistd.h
2964do
2965ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2966echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2967echo "configure:2967: checking for $ac_hdr" >&5
2968if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2969  echo $ac_n "(cached) $ac_c" 1>&6
2970else
2971  cat > conftest.$ac_ext <<EOF
2972#line 2972 "configure"
2973#include "confdefs.h"
2974#include <$ac_hdr>
2975EOF
2976ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2977{ (eval echo configure:2977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2978ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2979if test -z "$ac_err"; then
2980  rm -rf conftest*
2981  eval "ac_cv_header_$ac_safe=yes"
2982else
2983  echo "$ac_err" >&5
2984  echo "configure: failed program was:" >&5
2985  cat conftest.$ac_ext >&5
2986  rm -rf conftest*
2987  eval "ac_cv_header_$ac_safe=no"
2988fi
2989rm -f conftest*
2990fi
2991if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2992  echo "$ac_t""yes" 1>&6
2993    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2994  cat >> confdefs.h <<EOF
2995#define $ac_tr_hdr 1
2996EOF
2997 
2998else
2999  echo "$ac_t""no" 1>&6
3000{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
3001fi
3002done
3003
3004
3005for ac_hdr in sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h \
3006 sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h \
3007 termios.h term.h readline/readline.h
3008do
3009ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3010echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3011echo "configure:3011: checking for $ac_hdr" >&5
3012if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3013  echo $ac_n "(cached) $ac_c" 1>&6
3014else
3015  cat > conftest.$ac_ext <<EOF
3016#line 3016 "configure"
3017#include "confdefs.h"
3018#include <$ac_hdr>
3019EOF
3020ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3021{ (eval echo configure:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3022ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3023if test -z "$ac_err"; then
3024  rm -rf conftest*
3025  eval "ac_cv_header_$ac_safe=yes"
3026else
3027  echo "$ac_err" >&5
3028  echo "configure: failed program was:" >&5
3029  cat conftest.$ac_ext >&5
3030  rm -rf conftest*
3031  eval "ac_cv_header_$ac_safe=no"
3032fi
3033rm -f conftest*
3034fi
3035if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3036  echo "$ac_t""yes" 1>&6
3037    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3038  cat >> confdefs.h <<EOF
3039#define $ac_tr_hdr 1
3040EOF
3041 
3042else
3043  echo "$ac_t""no" 1>&6
3044fi
3045done
3046
3047
3048# typedefs, structures
3049echo $ac_n "checking for working const""... $ac_c" 1>&6
3050echo "configure:3050: checking for working const" >&5
3051if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3052  echo $ac_n "(cached) $ac_c" 1>&6
3053else
3054  cat > conftest.$ac_ext <<EOF
3055#line 3055 "configure"
3056#include "confdefs.h"
3057
3058int main() {
3059
3060/* Ultrix mips cc rejects this.  */
3061typedef int charset[2]; const charset x;
3062/* SunOS 4.1.1 cc rejects this.  */
3063char const *const *ccp;
3064char **p;
3065/* NEC SVR4.0.2 mips cc rejects this.  */
3066struct point {int x, y;};
3067static struct point const zero = {0,0};
3068/* AIX XL C 1.02.0.0 rejects this.
3069   It does not let you subtract one const X* pointer from another in an arm
3070   of an if-expression whose if-part is not a constant expression */
3071const char *g = "string";
3072ccp = &g + (g ? g-g : 0);
3073/* HPUX 7.0 cc rejects these. */
3074++ccp;
3075p = (char**) ccp;
3076ccp = (char const *const *) p;
3077{ /* SCO 3.2v4 cc rejects this.  */
3078  char *t;
3079  char const *s = 0 ? (char *) 0 : (char const *) 0;
3080
3081  *t++ = 0;
3082}
3083{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3084  int x[] = {25, 17};
3085  const int *foo = &x[0];
3086  ++foo;
3087}
3088{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3089  typedef const int *iptr;
3090  iptr p = 0;
3091  ++p;
3092}
3093{ /* AIX XL C 1.02.0.0 rejects this saying
3094     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3095  struct s { int j; const int *ap[3]; };
3096  struct s *b; b->j = 5;
3097}
3098{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3099  const int foo = 10;
3100}
3101
3102; return 0; }
3103EOF
3104if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3105  rm -rf conftest*
3106  ac_cv_c_const=yes
3107else
3108  echo "configure: failed program was:" >&5
3109  cat conftest.$ac_ext >&5
3110  rm -rf conftest*
3111  ac_cv_c_const=no
3112fi
3113rm -f conftest*
3114fi
3115
3116echo "$ac_t""$ac_cv_c_const" 1>&6
3117if test $ac_cv_c_const = no; then
3118  cat >> confdefs.h <<\EOF
3119#define const
3120EOF
3121
3122fi
3123
3124echo $ac_n "checking for inline""... $ac_c" 1>&6
3125echo "configure:3125: checking for inline" >&5
3126if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3127  echo $ac_n "(cached) $ac_c" 1>&6
3128else
3129  ac_cv_c_inline=no
3130for ac_kw in inline __inline__ __inline; do
3131  cat > conftest.$ac_ext <<EOF
3132#line 3132 "configure"
3133#include "confdefs.h"
3134
3135int main() {
3136} $ac_kw foo() {
3137; return 0; }
3138EOF
3139if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3140  rm -rf conftest*
3141  ac_cv_c_inline=$ac_kw; break
3142else
3143  echo "configure: failed program was:" >&5
3144  cat conftest.$ac_ext >&5
3145fi
3146rm -f conftest*
3147done
3148
3149fi
3150
3151echo "$ac_t""$ac_cv_c_inline" 1>&6
3152case "$ac_cv_c_inline" in
3153  inline | yes) ;;
3154  no) cat >> confdefs.h <<\EOF
3155#define inline
3156EOF
3157 ;;
3158  *)  cat >> confdefs.h <<EOF
3159#define inline $ac_cv_c_inline
3160EOF
3161 ;;
3162esac
3163
3164echo $ac_n "checking for size_t""... $ac_c" 1>&6
3165echo "configure:3165: checking for size_t" >&5
3166if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3167  echo $ac_n "(cached) $ac_c" 1>&6
3168else
3169  cat > conftest.$ac_ext <<EOF
3170#line 3170 "configure"
3171#include "confdefs.h"
3172#include <sys/types.h>
3173#if STDC_HEADERS
3174#include <stdlib.h>
3175#include <stddef.h>
3176#endif
3177EOF
3178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3179  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3180  rm -rf conftest*
3181  ac_cv_type_size_t=yes
3182else
3183  rm -rf conftest*
3184  ac_cv_type_size_t=no
3185fi
3186rm -f conftest*
3187
3188fi
3189echo "$ac_t""$ac_cv_type_size_t" 1>&6
3190if test $ac_cv_type_size_t = no; then
3191  cat >> confdefs.h <<\EOF
3192#define size_t unsigned
3193EOF
3194
3195fi
3196
3197echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3198echo "configure:3198: checking whether struct tm is in sys/time.h or time.h" >&5
3199if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3200  echo $ac_n "(cached) $ac_c" 1>&6
3201else
3202  cat > conftest.$ac_ext <<EOF
3203#line 3203 "configure"
3204#include "confdefs.h"
3205#include <sys/types.h>
3206#include <time.h>
3207int main() {
3208struct tm *tp; tp->tm_sec;
3209; return 0; }
3210EOF
3211if { (eval echo configure:3211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3212  rm -rf conftest*
3213  ac_cv_struct_tm=time.h
3214else
3215  echo "configure: failed program was:" >&5
3216  cat conftest.$ac_ext >&5
3217  rm -rf conftest*
3218  ac_cv_struct_tm=sys/time.h
3219fi
3220rm -f conftest*
3221fi
3222
3223echo "$ac_t""$ac_cv_struct_tm" 1>&6
3224if test $ac_cv_struct_tm = sys/time.h; then
3225  cat >> confdefs.h <<\EOF
3226#define TM_IN_SYS_TIME 1
3227EOF
3228
3229fi
3230
3231echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3232echo "configure:3232: checking whether time.h and sys/time.h may both be included" >&5
3233if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3234  echo $ac_n "(cached) $ac_c" 1>&6
3235else
3236  cat > conftest.$ac_ext <<EOF
3237#line 3237 "configure"
3238#include "confdefs.h"
3239#include <sys/types.h>
3240#include <sys/time.h>
3241#include <time.h>
3242int main() {
3243struct tm *tp;
3244; return 0; }
3245EOF
3246if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3247  rm -rf conftest*
3248  ac_cv_header_time=yes
3249else
3250  echo "configure: failed program was:" >&5
3251  cat conftest.$ac_ext >&5
3252  rm -rf conftest*
3253  ac_cv_header_time=no
3254fi
3255rm -f conftest*
3256fi
3257
3258echo "$ac_t""$ac_cv_header_time" 1>&6
3259if test $ac_cv_header_time = yes; then
3260  cat >> confdefs.h <<\EOF
3261#define TIME_WITH_SYS_TIME 1
3262EOF
3263
3264fi
3265
3266
3267# library functions.
3268# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3269# for constant arguments.  Useless!
3270echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3271echo "configure:3271: checking for working alloca.h" >&5
3272if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3273  echo $ac_n "(cached) $ac_c" 1>&6
3274else
3275  cat > conftest.$ac_ext <<EOF
3276#line 3276 "configure"
3277#include "confdefs.h"
3278#include <alloca.h>
3279int main() {
3280char *p = alloca(2 * sizeof(int));
3281; return 0; }
3282EOF
3283if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3284  rm -rf conftest*
3285  ac_cv_header_alloca_h=yes
3286else
3287  echo "configure: failed program was:" >&5
3288  cat conftest.$ac_ext >&5
3289  rm -rf conftest*
3290  ac_cv_header_alloca_h=no
3291fi
3292rm -f conftest*
3293fi
3294
3295echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3296if test $ac_cv_header_alloca_h = yes; then
3297  cat >> confdefs.h <<\EOF
3298#define HAVE_ALLOCA_H 1
3299EOF
3300
3301fi
3302
3303echo $ac_n "checking for alloca""... $ac_c" 1>&6
3304echo "configure:3304: checking for alloca" >&5
3305if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3306  echo $ac_n "(cached) $ac_c" 1>&6
3307else
3308  cat > conftest.$ac_ext <<EOF
3309#line 3309 "configure"
3310#include "confdefs.h"
3311
3312#ifdef __GNUC__
3313# define alloca __builtin_alloca
3314#else
3315# ifdef _MSC_VER
3316#  include <malloc.h>
3317#  define alloca _alloca
3318# else
3319#  if HAVE_ALLOCA_H
3320#   include <alloca.h>
3321#  else
3322#   ifdef _AIX
3323 #pragma alloca
3324#   else
3325#    ifndef alloca /* predefined by HP cc +Olibcalls */
3326char *alloca ();
3327#    endif
3328#   endif
3329#  endif
3330# endif
3331#endif
3332
3333int main() {
3334char *p = (char *) alloca(1);
3335; return 0; }
3336EOF
3337if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3338  rm -rf conftest*
3339  ac_cv_func_alloca_works=yes
3340else
3341  echo "configure: failed program was:" >&5
3342  cat conftest.$ac_ext >&5
3343  rm -rf conftest*
3344  ac_cv_func_alloca_works=no
3345fi
3346rm -f conftest*
3347fi
3348
3349echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3350if test $ac_cv_func_alloca_works = yes; then
3351  cat >> confdefs.h <<\EOF
3352#define HAVE_ALLOCA 1
3353EOF
3354
3355fi
3356
3357if test $ac_cv_func_alloca_works = no; then
3358  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3359  # that cause trouble.  Some versions do not even contain alloca or
3360  # contain a buggy version.  If you still want to use their alloca,
3361  # use ar to extract alloca.o from them instead of compiling alloca.c.
3362  ALLOCA=alloca.${ac_objext}
3363  cat >> confdefs.h <<\EOF
3364#define C_ALLOCA 1
3365EOF
3366
3367
3368echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3369echo "configure:3369: checking whether alloca needs Cray hooks" >&5
3370if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3371  echo $ac_n "(cached) $ac_c" 1>&6
3372else
3373  cat > conftest.$ac_ext <<EOF
3374#line 3374 "configure"
3375#include "confdefs.h"
3376#if defined(CRAY) && ! defined(CRAY2)
3377webecray
3378#else
3379wenotbecray
3380#endif
3381
3382EOF
3383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3384  egrep "webecray" >/dev/null 2>&1; then
3385  rm -rf conftest*
3386  ac_cv_os_cray=yes
3387else
3388  rm -rf conftest*
3389  ac_cv_os_cray=no
3390fi
3391rm -f conftest*
3392
3393fi
3394
3395echo "$ac_t""$ac_cv_os_cray" 1>&6
3396if test $ac_cv_os_cray = yes; then
3397for ac_func in _getb67 GETB67 getb67; do
3398  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3399echo "configure:3399: checking for $ac_func" >&5
3400if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3401  echo $ac_n "(cached) $ac_c" 1>&6
3402else
3403  cat > conftest.$ac_ext <<EOF
3404#line 3404 "configure"
3405#include "confdefs.h"
3406/* System header to define __stub macros and hopefully few prototypes,
3407    which can conflict with char $ac_func(); below.  */
3408#include <assert.h>
3409/* Override any gcc2 internal prototype to avoid an error.  */
3410/* We use char because int might match the return type of a gcc2
3411    builtin and then its argument prototype would still apply.  */
3412char $ac_func();
3413
3414int main() {
3415
3416/* The GNU C library defines this for functions which it implements
3417    to always fail with ENOSYS.  Some functions are actually named
3418    something starting with __ and the normal name is an alias.  */
3419#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3420choke me
3421#else
3422$ac_func();
3423#endif
3424
3425; return 0; }
3426EOF
3427if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3428  rm -rf conftest*
3429  eval "ac_cv_func_$ac_func=yes"
3430else
3431  echo "configure: failed program was:" >&5
3432  cat conftest.$ac_ext >&5
3433  rm -rf conftest*
3434  eval "ac_cv_func_$ac_func=no"
3435fi
3436rm -f conftest*
3437fi
3438
3439if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3440  echo "$ac_t""yes" 1>&6
3441  cat >> confdefs.h <<EOF
3442#define CRAY_STACKSEG_END $ac_func
3443EOF
3444
3445  break
3446else
3447  echo "$ac_t""no" 1>&6
3448fi
3449
3450done
3451fi
3452
3453echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3454echo "configure:3454: checking stack direction for C alloca" >&5
3455if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3456  echo $ac_n "(cached) $ac_c" 1>&6
3457else
3458  if test "$cross_compiling" = yes; then
3459  ac_cv_c_stack_direction=0
3460else
3461  cat > conftest.$ac_ext <<EOF
3462#line 3462 "configure"
3463#include "confdefs.h"
3464find_stack_direction ()
3465{
3466  static char *addr = 0;
3467  auto char dummy;
3468  if (addr == 0)
3469    {
3470      addr = &dummy;
3471      return find_stack_direction ();
3472    }
3473  else
3474    return (&dummy > addr) ? 1 : -1;
3475}
3476main ()
3477{
3478  exit (find_stack_direction() < 0);
3479}
3480EOF
3481if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3482then
3483  ac_cv_c_stack_direction=1
3484else
3485  echo "configure: failed program was:" >&5
3486  cat conftest.$ac_ext >&5
3487  rm -fr conftest*
3488  ac_cv_c_stack_direction=-1
3489fi
3490rm -fr conftest*
3491fi
3492
3493fi
3494
3495echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3496cat >> confdefs.h <<EOF
3497#define STACK_DIRECTION $ac_cv_c_stack_direction
3498EOF
3499
3500fi
3501
3502if test $ac_cv_prog_gcc = yes; then
3503    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3504echo "configure:3504: checking whether ${CC-cc} needs -traditional" >&5
3505if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3506  echo $ac_n "(cached) $ac_c" 1>&6
3507else
3508    ac_pattern="Autoconf.*'x'"
3509  cat > conftest.$ac_ext <<EOF
3510#line 3510 "configure"
3511#include "confdefs.h"
3512#include <sgtty.h>
3513Autoconf TIOCGETP
3514EOF
3515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3516  egrep "$ac_pattern" >/dev/null 2>&1; then
3517  rm -rf conftest*
3518  ac_cv_prog_gcc_traditional=yes
3519else
3520  rm -rf conftest*
3521  ac_cv_prog_gcc_traditional=no
3522fi
3523rm -f conftest*
3524
3525
3526  if test $ac_cv_prog_gcc_traditional = no; then
3527    cat > conftest.$ac_ext <<EOF
3528#line 3528 "configure"
3529#include "confdefs.h"
3530#include <termio.h>
3531Autoconf TCGETA
3532EOF
3533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3534  egrep "$ac_pattern" >/dev/null 2>&1; then
3535  rm -rf conftest*
3536  ac_cv_prog_gcc_traditional=yes
3537fi
3538rm -f conftest*
3539
3540  fi
3541fi
3542
3543echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3544  if test $ac_cv_prog_gcc_traditional = yes; then
3545    CC="$CC -traditional"
3546  fi
3547fi
3548
3549for ac_hdr in unistd.h
3550do
3551ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3552echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3553echo "configure:3553: checking for $ac_hdr" >&5
3554if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3555  echo $ac_n "(cached) $ac_c" 1>&6
3556else
3557  cat > conftest.$ac_ext <<EOF
3558#line 3558 "configure"
3559#include "confdefs.h"
3560#include <$ac_hdr>
3561EOF
3562ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3563{ (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3564ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3565if test -z "$ac_err"; then
3566  rm -rf conftest*
3567  eval "ac_cv_header_$ac_safe=yes"
3568else
3569  echo "$ac_err" >&5
3570  echo "configure: failed program was:" >&5
3571  cat conftest.$ac_ext >&5
3572  rm -rf conftest*
3573  eval "ac_cv_header_$ac_safe=no"
3574fi
3575rm -f conftest*
3576fi
3577if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3578  echo "$ac_t""yes" 1>&6
3579    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3580  cat >> confdefs.h <<EOF
3581#define $ac_tr_hdr 1
3582EOF
3583 
3584else
3585  echo "$ac_t""no" 1>&6
3586fi
3587done
3588
3589for ac_func in getpagesize
3590do
3591echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3592echo "configure:3592: checking for $ac_func" >&5
3593if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3594  echo $ac_n "(cached) $ac_c" 1>&6
3595else
3596  cat > conftest.$ac_ext <<EOF
3597#line 3597 "configure"
3598#include "confdefs.h"
3599/* System header to define __stub macros and hopefully few prototypes,
3600    which can conflict with char $ac_func(); below.  */
3601#include <assert.h>
3602/* Override any gcc2 internal prototype to avoid an error.  */
3603/* We use char because int might match the return type of a gcc2
3604    builtin and then its argument prototype would still apply.  */
3605char $ac_func();
3606
3607int main() {
3608
3609/* The GNU C library defines this for functions which it implements
3610    to always fail with ENOSYS.  Some functions are actually named
3611    something starting with __ and the normal name is an alias.  */
3612#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3613choke me
3614#else
3615$ac_func();
3616#endif
3617
3618; return 0; }
3619EOF
3620if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3621  rm -rf conftest*
3622  eval "ac_cv_func_$ac_func=yes"
3623else
3624  echo "configure: failed program was:" >&5
3625  cat conftest.$ac_ext >&5
3626  rm -rf conftest*
3627  eval "ac_cv_func_$ac_func=no"
3628fi
3629rm -f conftest*
3630fi
3631
3632if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3633  echo "$ac_t""yes" 1>&6
3634    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3635  cat >> confdefs.h <<EOF
3636#define $ac_tr_func 1
3637EOF
3638 
3639else
3640  echo "$ac_t""no" 1>&6
3641fi
3642done
3643
3644echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3645echo "configure:3645: checking for working mmap" >&5
3646if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3647  echo $ac_n "(cached) $ac_c" 1>&6
3648else
3649  if test "$cross_compiling" = yes; then
3650  ac_cv_func_mmap_fixed_mapped=no
3651else
3652  cat > conftest.$ac_ext <<EOF
3653#line 3653 "configure"
3654#include "confdefs.h"
3655
3656/* Thanks to Mike Haertel and Jim Avera for this test.
3657   Here is a matrix of mmap possibilities:
3658        mmap private not fixed
3659        mmap private fixed at somewhere currently unmapped
3660        mmap private fixed at somewhere already mapped
3661        mmap shared not fixed
3662        mmap shared fixed at somewhere currently unmapped
3663        mmap shared fixed at somewhere already mapped
3664   For private mappings, we should verify that changes cannot be read()
3665   back from the file, nor mmap's back from the file at a different
3666   address.  (There have been systems where private was not correctly
3667   implemented like the infamous i386 svr4.0, and systems where the
3668   VM page cache was not coherent with the filesystem buffer cache
3669   like early versions of FreeBSD and possibly contemporary NetBSD.)
3670   For shared mappings, we should conversely verify that changes get
3671   propogated back to all the places they're supposed to be.
3672
3673   Grep wants private fixed already mapped.
3674   The main things grep needs to know about mmap are:
3675   * does it exist and is it safe to write into the mmap'd area
3676   * how to use it (BSD variants)  */
3677#include <sys/types.h>
3678#include <fcntl.h>
3679#include <sys/mman.h>
3680
3681/* This mess was copied from the GNU getpagesize.h.  */
3682#ifndef HAVE_GETPAGESIZE
3683# ifdef HAVE_UNISTD_H
3684#  include <unistd.h>
3685# endif
3686
3687/* Assume that all systems that can run configure have sys/param.h.  */
3688# ifndef HAVE_SYS_PARAM_H
3689#  define HAVE_SYS_PARAM_H 1
3690# endif
3691
3692# ifdef _SC_PAGESIZE
3693#  define getpagesize() sysconf(_SC_PAGESIZE)
3694# else /* no _SC_PAGESIZE */
3695#  ifdef HAVE_SYS_PARAM_H
3696#   include <sys/param.h>
3697#   ifdef EXEC_PAGESIZE
3698#    define getpagesize() EXEC_PAGESIZE
3699#   else /* no EXEC_PAGESIZE */
3700#    ifdef NBPG
3701#     define getpagesize() NBPG * CLSIZE
3702#     ifndef CLSIZE
3703#      define CLSIZE 1
3704#     endif /* no CLSIZE */
3705#    else /* no NBPG */
3706#     ifdef NBPC
3707#      define getpagesize() NBPC
3708#     else /* no NBPC */
3709#      ifdef PAGESIZE
3710#       define getpagesize() PAGESIZE
3711#      endif /* PAGESIZE */
3712#     endif /* no NBPC */
3713#    endif /* no NBPG */
3714#   endif /* no EXEC_PAGESIZE */
3715#  else /* no HAVE_SYS_PARAM_H */
3716#   define getpagesize() 8192   /* punt totally */
3717#  endif /* no HAVE_SYS_PARAM_H */
3718# endif /* no _SC_PAGESIZE */
3719
3720#endif /* no HAVE_GETPAGESIZE */
3721
3722#ifdef __cplusplus
3723extern "C" { void *malloc(unsigned); }
3724#else
3725char *malloc();
3726#endif
3727
3728int
3729main()
3730{
3731        char *data, *data2, *data3;
3732        int i, pagesize;
3733        int fd;
3734
3735        pagesize = getpagesize();
3736
3737        /*
3738         * First, make a file with some known garbage in it.
3739         */
3740        data = malloc(pagesize);
3741        if (!data)
3742                exit(1);
3743        for (i = 0; i < pagesize; ++i)
3744                *(data + i) = rand();
3745        umask(0);
3746        fd = creat("conftestmmap", 0600);
3747        if (fd < 0)
3748                exit(1);
3749        if (write(fd, data, pagesize) != pagesize)
3750                exit(1);
3751        close(fd);
3752
3753        /*
3754         * Next, try to mmap the file at a fixed address which
3755         * already has something else allocated at it.  If we can,
3756         * also make sure that we see the same garbage.
3757         */
3758        fd = open("conftestmmap", O_RDWR);
3759        if (fd < 0)
3760                exit(1);
3761        data2 = malloc(2 * pagesize);
3762        if (!data2)
3763                exit(1);
3764        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3765        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3766            MAP_PRIVATE | MAP_FIXED, fd, 0L))
3767                exit(1);
3768        for (i = 0; i < pagesize; ++i)
3769                if (*(data + i) != *(data2 + i))
3770                        exit(1);
3771
3772        /*
3773         * Finally, make sure that changes to the mapped area
3774         * do not percolate back to the file as seen by read().
3775         * (This is a bug on some variants of i386 svr4.0.)
3776         */
3777        for (i = 0; i < pagesize; ++i)
3778                *(data2 + i) = *(data2 + i) + 1;
3779        data3 = malloc(pagesize);
3780        if (!data3)
3781                exit(1);
3782        if (read(fd, data3, pagesize) != pagesize)
3783                exit(1);
3784        for (i = 0; i < pagesize; ++i)
3785                if (*(data + i) != *(data3 + i))
3786                        exit(1);
3787        close(fd);
3788        unlink("conftestmmap");
3789        exit(0);
3790}
3791
3792EOF
3793if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3794then
3795  ac_cv_func_mmap_fixed_mapped=yes
3796else
3797  echo "configure: failed program was:" >&5
3798  cat conftest.$ac_ext >&5
3799  rm -fr conftest*
3800  ac_cv_func_mmap_fixed_mapped=no
3801fi
3802rm -fr conftest*
3803fi
3804
3805fi
3806
3807echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3808if test $ac_cv_func_mmap_fixed_mapped = yes; then
3809  cat >> confdefs.h <<\EOF
3810#define HAVE_MMAP 1
3811EOF
3812
3813fi
3814
3815echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3816echo "configure:3816: checking return type of signal handlers" >&5
3817if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3818  echo $ac_n "(cached) $ac_c" 1>&6
3819else
3820  cat > conftest.$ac_ext <<EOF
3821#line 3821 "configure"
3822#include "confdefs.h"
3823#include <sys/types.h>
3824#include <signal.h>
3825#ifdef signal
3826#undef signal
3827#endif
3828#ifdef __cplusplus
3829extern "C" void (*signal (int, void (*)(int)))(int);
3830#else
3831void (*signal ()) ();
3832#endif
3833
3834int main() {
3835int i;
3836; return 0; }
3837EOF
3838if { (eval echo configure:3838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3839  rm -rf conftest*
3840  ac_cv_type_signal=void
3841else
3842  echo "configure: failed program was:" >&5
3843  cat conftest.$ac_ext >&5
3844  rm -rf conftest*
3845  ac_cv_type_signal=int
3846fi
3847rm -f conftest*
3848fi
3849
3850echo "$ac_t""$ac_cv_type_signal" 1>&6
3851cat >> confdefs.h <<EOF
3852#define RETSIGTYPE $ac_cv_type_signal
3853EOF
3854
3855
3856echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3857echo "configure:3857: checking for vprintf" >&5
3858if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3859  echo $ac_n "(cached) $ac_c" 1>&6
3860else
3861  cat > conftest.$ac_ext <<EOF
3862#line 3862 "configure"
3863#include "confdefs.h"
3864/* System header to define __stub macros and hopefully few prototypes,
3865    which can conflict with char vprintf(); below.  */
3866#include <assert.h>
3867/* Override any gcc2 internal prototype to avoid an error.  */
3868/* We use char because int might match the return type of a gcc2
3869    builtin and then its argument prototype would still apply.  */
3870char vprintf();
3871
3872int main() {
3873
3874/* The GNU C library defines this for functions which it implements
3875    to always fail with ENOSYS.  Some functions are actually named
3876    something starting with __ and the normal name is an alias.  */
3877#if defined (__stub_vprintf) || defined (__stub___vprintf)
3878choke me
3879#else
3880vprintf();
3881#endif
3882
3883; return 0; }
3884EOF
3885if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3886  rm -rf conftest*
3887  eval "ac_cv_func_vprintf=yes"
3888else
3889  echo "configure: failed program was:" >&5
3890  cat conftest.$ac_ext >&5
3891  rm -rf conftest*
3892  eval "ac_cv_func_vprintf=no"
3893fi
3894rm -f conftest*
3895fi
3896
3897if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3898  echo "$ac_t""yes" 1>&6
3899  cat >> confdefs.h <<\EOF
3900#define HAVE_VPRINTF 1
3901EOF
3902
3903else
3904  echo "$ac_t""no" 1>&6
3905fi
3906
3907if test "$ac_cv_func_vprintf" != yes; then
3908echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3909echo "configure:3909: checking for _doprnt" >&5
3910if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3911  echo $ac_n "(cached) $ac_c" 1>&6
3912else
3913  cat > conftest.$ac_ext <<EOF
3914#line 3914 "configure"
3915#include "confdefs.h"
3916/* System header to define __stub macros and hopefully few prototypes,
3917    which can conflict with char _doprnt(); below.  */
3918#include <assert.h>
3919/* Override any gcc2 internal prototype to avoid an error.  */
3920/* We use char because int might match the return type of a gcc2
3921    builtin and then its argument prototype would still apply.  */
3922char _doprnt();
3923
3924int main() {
3925
3926/* The GNU C library defines this for functions which it implements
3927    to always fail with ENOSYS.  Some functions are actually named
3928    something starting with __ and the normal name is an alias.  */
3929#if defined (__stub__doprnt) || defined (__stub____doprnt)
3930choke me
3931#else
3932_doprnt();
3933#endif
3934
3935; return 0; }
3936EOF
3937if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3938  rm -rf conftest*
3939  eval "ac_cv_func__doprnt=yes"
3940else
3941  echo "configure: failed program was:" >&5
3942  cat conftest.$ac_ext >&5
3943  rm -rf conftest*
3944  eval "ac_cv_func__doprnt=no"
3945fi
3946rm -f conftest*
3947fi
3948
3949if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3950  echo "$ac_t""yes" 1>&6
3951  cat >> confdefs.h <<\EOF
3952#define HAVE_DOPRNT 1
3953EOF
3954
3955else
3956  echo "$ac_t""no" 1>&6
3957fi
3958
3959fi
3960
3961
3962echo $ac_n "checking for library containing setenv""... $ac_c" 1>&6
3963echo "configure:3963: checking for library containing setenv" >&5
3964if eval "test \"`echo '$''{'ac_cv_search_setenv'+set}'`\" = set"; then
3965  echo $ac_n "(cached) $ac_c" 1>&6
3966else
3967  ac_func_search_save_LIBS="$LIBS"
3968ac_cv_search_setenv="no"
3969cat > conftest.$ac_ext <<EOF
3970#line 3970 "configure"
3971#include "confdefs.h"
3972/* Override any gcc2 internal prototype to avoid an error.  */
3973/* We use char because int might match the return type of a gcc2
3974    builtin and then its argument prototype would still apply.  */
3975char setenv();
3976
3977int main() {
3978setenv()
3979; return 0; }
3980EOF
3981if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982  rm -rf conftest*
3983  ac_cv_search_setenv="none required"
3984else
3985  echo "configure: failed program was:" >&5
3986  cat conftest.$ac_ext >&5
3987fi
3988rm -f conftest*
3989test "$ac_cv_search_setenv" = "no" && for i in bsd; do
3990LIBS="-l$i  $ac_func_search_save_LIBS"
3991cat > conftest.$ac_ext <<EOF
3992#line 3992 "configure"
3993#include "confdefs.h"
3994/* Override any gcc2 internal prototype to avoid an error.  */
3995/* We use char because int might match the return type of a gcc2
3996    builtin and then its argument prototype would still apply.  */
3997char setenv();
3998
3999int main() {
4000setenv()
4001; return 0; }
4002EOF
4003if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4004  rm -rf conftest*
4005  ac_cv_search_setenv="-l$i"
4006break
4007else
4008  echo "configure: failed program was:" >&5
4009  cat conftest.$ac_ext >&5
4010fi
4011rm -f conftest*
4012done
4013LIBS="$ac_func_search_save_LIBS"
4014fi
4015
4016echo "$ac_t""$ac_cv_search_setenv" 1>&6
4017if test "$ac_cv_search_setenv" != "no"; then
4018  test "$ac_cv_search_setenv" = "none required" || LIBS="$ac_cv_search_setenv $LIBS"
4019 
4020else :
4021 
4022fi
4023for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink \
4024 sleep usleep getpwnam popen setenv siginterrupt sysconf
4025do
4026echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4027echo "configure:4027: checking for $ac_func" >&5
4028if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4029  echo $ac_n "(cached) $ac_c" 1>&6
4030else
4031  cat > conftest.$ac_ext <<EOF
4032#line 4032 "configure"
4033#include "confdefs.h"
4034/* System header to define __stub macros and hopefully few prototypes,
4035    which can conflict with char $ac_func(); below.  */
4036#include <assert.h>
4037/* Override any gcc2 internal prototype to avoid an error.  */
4038/* We use char because int might match the return type of a gcc2
4039    builtin and then its argument prototype would still apply.  */
4040char $ac_func();
4041
4042int main() {
4043
4044/* The GNU C library defines this for functions which it implements
4045    to always fail with ENOSYS.  Some functions are actually named
4046    something starting with __ and the normal name is an alias.  */
4047#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4048choke me
4049#else
4050$ac_func();
4051#endif
4052
4053; return 0; }
4054EOF
4055if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4056  rm -rf conftest*
4057  eval "ac_cv_func_$ac_func=yes"
4058else
4059  echo "configure: failed program was:" >&5
4060  cat conftest.$ac_ext >&5
4061  rm -rf conftest*
4062  eval "ac_cv_func_$ac_func=no"
4063fi
4064rm -f conftest*
4065fi
4066
4067if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4068  echo "$ac_t""yes" 1>&6
4069    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4070  cat >> confdefs.h <<EOF
4071#define $ac_tr_func 1
4072EOF
4073 
4074else
4075  echo "$ac_t""no" 1>&6
4076fi
4077done
4078
4079
4080
4081
4082# arithmetic shifts
4083#AC_MSG_CHECKING(whether your machine has correct arithmetic shifts)
4084#AC_CACHE_VAL(ac_cv_shift, AC_TRY_RUN(
4085#  [ int main() { if (-2 >> 1 == -1) return(0); else return(1); } ],
4086#   ac_cv_shift=yes,
4087#   ac_cv_shift=no,
4088#   if test "$ac_c_cross_dos" = yes; then
4089#     ac_cv_shift=yes;
4090#   else
4091#     AC_MSG_RESULT(no)
4092#     AC_MSG_ERROR(cross compilation without default value)
4093#   fi))
4094#
4095#if test "$ac_cv_shift" = yes; then
4096#  AC_MSG_RESULT(yes)
4097#else
4098#  AC_MSG_RESULT(no)
4099#  AC_MSG_ERROR(need  -2 >> 1 == -1)
4100#fi
4101
4102
4103# check for a peculiar constructor initialization
4104echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
4105echo "configure:4105: checking whether explicit C++ constructor calls are allowed" >&5
4106
4107ac_ext=C
4108# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4109ac_cpp='$CXXCPP $CPPFLAGS'
4110ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4111ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4112cross_compiling=$ac_cv_prog_cxx_cross
4113
4114if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then
4115  echo $ac_n "(cached) $ac_c" 1>&6
4116else
4117  cat > conftest.$ac_ext <<EOF
4118#line 4118 "configure"
4119#include "confdefs.h"
4120
4121int main() {
4122class testclass
4123  {
4124  public:
4125    int value;
4126    testclass() : value(0) {}
4127    testclass( int i ) : value(i) {}
4128    ~testclass() { value = 0; }
4129  };
4130
4131  testclass ptr;
4132  ptr.testclass(1);
4133
4134; return 0; }
4135EOF
4136if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4137  rm -rf conftest*
4138  ac_cv_explicit_const=yes
4139else
4140  echo "configure: failed program was:" >&5
4141  cat conftest.$ac_ext >&5
4142  rm -rf conftest*
4143  ac_cv_explicit_const=no
4144fi
4145rm -f conftest*
4146fi
4147
4148ac_ext=c
4149# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4150ac_cpp='$CPP $CPPFLAGS'
4151ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4152ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4153cross_compiling=$ac_cv_prog_cc_cross
4154
4155echo "$ac_t""$ac_cv_explicit_const" 1>&6
4156if test "$ac_cv_explicit_const" = yes; then
4157  cat >> confdefs.h <<\EOF
4158#define HAVE_EXPLICIT_CONSTR 1
4159EOF
4160
4161fi
4162
4163# sprintf returns number of printed chars
4164echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
4165echo "configure:4165: checking whether vsprintf returns number of printed chars" >&5
4166if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
4167  echo $ac_n "(cached) $ac_c" 1>&6
4168else
4169  if test "$cross_compiling" = yes; then
4170  ac_cv_returns_n_of_chars=no
4171else
4172  cat > conftest.$ac_ext <<EOF
4173#line 4173 "configure"
4174#include "confdefs.h"
4175#include <stdio.h>
4176 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
4177EOF
4178if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4179then
4180  ac_cv_returns_n_of_chars=yes
4181else
4182  echo "configure: failed program was:" >&5
4183  cat conftest.$ac_ext >&5
4184  rm -fr conftest*
4185  ac_cv_returns_n_of_chars=no
4186fi
4187rm -fr conftest*
4188fi
4189
4190fi
4191
4192if test "$ac_cv_returns_n_of_chars" = yes; then
4193  echo "$ac_t""yes" 1>&6
4194else
4195  echo "$ac_t""no" 1>&6
4196  cat >> confdefs.h <<\EOF
4197#define BSD_SPRINTF 1
4198EOF
4199
4200fi
4201
4202# determine ALIGN_8
4203echo $ac_n "checking size of char""... $ac_c" 1>&6
4204echo "configure:4204: checking size of char" >&5
4205if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
4206  echo $ac_n "(cached) $ac_c" 1>&6
4207else
4208  if test "$cross_compiling" = yes; then
4209  ac_cv_sizeof_char=1
4210else
4211  cat > conftest.$ac_ext <<EOF
4212#line 4212 "configure"
4213#include "confdefs.h"
4214#include <stdio.h>
4215main()
4216{
4217  FILE *f=fopen("conftestval", "w");
4218  if (!f) exit(1);
4219  fprintf(f, "%d\n", sizeof(char));
4220  exit(0);
4221}
4222EOF
4223if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4224then
4225  ac_cv_sizeof_char=`cat conftestval`
4226else
4227  echo "configure: failed program was:" >&5
4228  cat conftest.$ac_ext >&5
4229  rm -fr conftest*
4230  ac_cv_sizeof_char=0
4231fi
4232rm -fr conftest*
4233fi
4234
4235fi
4236echo "$ac_t""$ac_cv_sizeof_char" 1>&6
4237cat >> confdefs.h <<EOF
4238#define SIZEOF_CHAR $ac_cv_sizeof_char
4239EOF
4240
4241
4242echo $ac_n "checking size of short""... $ac_c" 1>&6
4243echo "configure:4243: checking size of short" >&5
4244if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
4245  echo $ac_n "(cached) $ac_c" 1>&6
4246else
4247  if test "$cross_compiling" = yes; then
4248  ac_cv_sizeof_short=2
4249else
4250  cat > conftest.$ac_ext <<EOF
4251#line 4251 "configure"
4252#include "confdefs.h"
4253#include <stdio.h>
4254main()
4255{
4256  FILE *f=fopen("conftestval", "w");
4257  if (!f) exit(1);
4258  fprintf(f, "%d\n", sizeof(short));
4259  exit(0);
4260}
4261EOF
4262if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4263then
4264  ac_cv_sizeof_short=`cat conftestval`
4265else
4266  echo "configure: failed program was:" >&5
4267  cat conftest.$ac_ext >&5
4268  rm -fr conftest*
4269  ac_cv_sizeof_short=0
4270fi
4271rm -fr conftest*
4272fi
4273
4274fi
4275echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4276cat >> confdefs.h <<EOF
4277#define SIZEOF_SHORT $ac_cv_sizeof_short
4278EOF
4279
4280
4281echo $ac_n "checking size of int""... $ac_c" 1>&6
4282echo "configure:4282: checking size of int" >&5
4283if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
4284  echo $ac_n "(cached) $ac_c" 1>&6
4285else
4286  if test "$cross_compiling" = yes; then
4287  ac_cv_sizeof_int=4
4288else
4289  cat > conftest.$ac_ext <<EOF
4290#line 4290 "configure"
4291#include "confdefs.h"
4292#include <stdio.h>
4293main()
4294{
4295  FILE *f=fopen("conftestval", "w");
4296  if (!f) exit(1);
4297  fprintf(f, "%d\n", sizeof(int));
4298  exit(0);
4299}
4300EOF
4301if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4302then
4303  ac_cv_sizeof_int=`cat conftestval`
4304else
4305  echo "configure: failed program was:" >&5
4306  cat conftest.$ac_ext >&5
4307  rm -fr conftest*
4308  ac_cv_sizeof_int=0
4309fi
4310rm -fr conftest*
4311fi
4312
4313fi
4314echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4315cat >> confdefs.h <<EOF
4316#define SIZEOF_INT $ac_cv_sizeof_int
4317EOF
4318
4319
4320echo $ac_n "checking size of long""... $ac_c" 1>&6
4321echo "configure:4321: checking size of long" >&5
4322if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
4323  echo $ac_n "(cached) $ac_c" 1>&6
4324else
4325  if test "$cross_compiling" = yes; then
4326  ac_cv_sizeof_long=4
4327else
4328  cat > conftest.$ac_ext <<EOF
4329#line 4329 "configure"
4330#include "confdefs.h"
4331#include <stdio.h>
4332main()
4333{
4334  FILE *f=fopen("conftestval", "w");
4335  if (!f) exit(1);
4336  fprintf(f, "%d\n", sizeof(long));
4337  exit(0);
4338}
4339EOF
4340if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4341then
4342  ac_cv_sizeof_long=`cat conftestval`
4343else
4344  echo "configure: failed program was:" >&5
4345  cat conftest.$ac_ext >&5
4346  rm -fr conftest*
4347  ac_cv_sizeof_long=0
4348fi
4349rm -fr conftest*
4350fi
4351
4352fi
4353echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4354cat >> confdefs.h <<EOF
4355#define SIZEOF_LONG $ac_cv_sizeof_long
4356EOF
4357
4358
4359echo $ac_n "checking size of void*""... $ac_c" 1>&6
4360echo "configure:4360: checking size of void*" >&5
4361if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
4362  echo $ac_n "(cached) $ac_c" 1>&6
4363else
4364  if test "$cross_compiling" = yes; then
4365  ac_cv_sizeof_voidp=4
4366else
4367  cat > conftest.$ac_ext <<EOF
4368#line 4368 "configure"
4369#include "confdefs.h"
4370#include <stdio.h>
4371main()
4372{
4373  FILE *f=fopen("conftestval", "w");
4374  if (!f) exit(1);
4375  fprintf(f, "%d\n", sizeof(void*));
4376  exit(0);
4377}
4378EOF
4379if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4380then
4381  ac_cv_sizeof_voidp=`cat conftestval`
4382else
4383  echo "configure: failed program was:" >&5
4384  cat conftest.$ac_ext >&5
4385  rm -fr conftest*
4386  ac_cv_sizeof_voidp=0
4387fi
4388rm -fr conftest*
4389fi
4390
4391fi
4392echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
4393cat >> confdefs.h <<EOF
4394#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
4395EOF
4396
4397
4398echo $ac_n "checking size of double""... $ac_c" 1>&6
4399echo "configure:4399: checking size of double" >&5
4400if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
4401  echo $ac_n "(cached) $ac_c" 1>&6
4402else
4403  if test "$cross_compiling" = yes; then
4404  ac_cv_sizeof_double=8
4405else
4406  cat > conftest.$ac_ext <<EOF
4407#line 4407 "configure"
4408#include "confdefs.h"
4409#include <stdio.h>
4410main()
4411{
4412  FILE *f=fopen("conftestval", "w");
4413  if (!f) exit(1);
4414  fprintf(f, "%d\n", sizeof(double));
4415  exit(0);
4416}
4417EOF
4418if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4419then
4420  ac_cv_sizeof_double=`cat conftestval`
4421else
4422  echo "configure: failed program was:" >&5
4423  cat conftest.$ac_ext >&5
4424  rm -fr conftest*
4425  ac_cv_sizeof_double=0
4426fi
4427rm -fr conftest*
4428fi
4429
4430fi
4431echo "$ac_t""$ac_cv_sizeof_double" 1>&6
4432cat >> confdefs.h <<EOF
4433#define SIZEOF_DOUBLE $ac_cv_sizeof_double
4434EOF
4435
4436
4437echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4438echo "configure:4438: checking whether byte ordering is bigendian" >&5
4439if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4440  echo $ac_n "(cached) $ac_c" 1>&6
4441else
4442  ac_cv_c_bigendian=unknown
4443# See if sys/param.h defines the BYTE_ORDER macro.
4444cat > conftest.$ac_ext <<EOF
4445#line 4445 "configure"
4446#include "confdefs.h"
4447#include <sys/types.h>
4448#include <sys/param.h>
4449int main() {
4450
4451#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4452 bogus endian macros
4453#endif
4454; return 0; }
4455EOF
4456if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4457  rm -rf conftest*
4458  # It does; now see whether it defined to BIG_ENDIAN or not.
4459cat > conftest.$ac_ext <<EOF
4460#line 4460 "configure"
4461#include "confdefs.h"
4462#include <sys/types.h>
4463#include <sys/param.h>
4464int main() {
4465
4466#if BYTE_ORDER != BIG_ENDIAN
4467 not big endian
4468#endif
4469; return 0; }
4470EOF
4471if { (eval echo configure:4471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4472  rm -rf conftest*
4473  ac_cv_c_bigendian=yes
4474else
4475  echo "configure: failed program was:" >&5
4476  cat conftest.$ac_ext >&5
4477  rm -rf conftest*
4478  ac_cv_c_bigendian=no
4479fi
4480rm -f conftest*
4481else
4482  echo "configure: failed program was:" >&5
4483  cat conftest.$ac_ext >&5
4484fi
4485rm -f conftest*
4486if test $ac_cv_c_bigendian = unknown; then
4487if test "$cross_compiling" = yes; then
4488    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4489else
4490  cat > conftest.$ac_ext <<EOF
4491#line 4491 "configure"
4492#include "confdefs.h"
4493main () {
4494  /* Are we little or big endian?  From Harbison&Steele.  */
4495  union
4496  {
4497    long l;
4498    char c[sizeof (long)];
4499  } u;
4500  u.l = 1;
4501  exit (u.c[sizeof (long) - 1] == 1);
4502}
4503EOF
4504if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4505then
4506  ac_cv_c_bigendian=no
4507else
4508  echo "configure: failed program was:" >&5
4509  cat conftest.$ac_ext >&5
4510  rm -fr conftest*
4511  ac_cv_c_bigendian=yes
4512fi
4513rm -fr conftest*
4514fi
4515
4516fi
4517fi
4518
4519echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4520if test $ac_cv_c_bigendian = yes; then
4521  cat >> confdefs.h <<\EOF
4522#define WORDS_BIGENDIAN 1
4523EOF
4524
4525fi
4526
4527if test "$ac_cv_sizeof_int" != 4; then
4528  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
4529fi
4530if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
4531  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
4532fi
4533if test "$ac_cv_sizeof_double" != 8; then
4534  { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; }
4535fi
4536if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
4537  { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; }
4538fi
4539if test "$ac_cv_sizeof_voidp" != 4; then
4540  DEFS="-UOM_NDEBUG"
4541 
4542fi
4543
4544# Check whether --with-rootdir or --without-rootdir was given.
4545if test "${with_rootdir+set}" = set; then
4546  withval="$with_rootdir"
4547  :
4548fi
4549
4550# Check whether --with-lex or --without-lex was given.
4551if test "${with_lex+set}" = set; then
4552  withval="$with_lex"
4553  :
4554fi
4555
4556# Check whether --with-readline or --without-readline was given.
4557if test "${with_readline+set}" = set; then
4558  withval="$with_readline"
4559  :
4560fi
4561
4562# Check whether --with-python or --without-python was given.
4563if test "${with_python+set}" = set; then
4564  withval="$with_python"
4565  :
4566fi
4567
4568# Check whether --with-Boost or --without-Boost was given.
4569if test "${with_Boost+set}" = set; then
4570  withval="$with_Boost"
4571  :
4572fi
4573
4574# Check whether --with-stdvec or --without-stdvec was given.
4575if test "${with_stdvec+set}" = set; then
4576  withval="$with_stdvec"
4577  :
4578fi
4579
4580# Check whether --with-MP or --without-MP was given.
4581if test "${with_MP+set}" = set; then
4582  withval="$with_MP"
4583  :
4584fi
4585
4586# Check whether --with-dbm or --without-dbm was given.
4587if test "${with_dbm+set}" = set; then
4588  withval="$with_dbm"
4589  :
4590fi
4591
4592# Check whether --with-factory or --without-factory was given.
4593if test "${with_factory+set}" = set; then
4594  withval="$with_factory"
4595  :
4596fi
4597
4598# Check whether --with-libfac or --without-libfac was given.
4599if test "${with_libfac+set}" = set; then
4600  withval="$with_libfac"
4601  :
4602fi
4603
4604# Check whether --with-dl or --without-dl was given.
4605if test "${with_dl+set}" = set; then
4606  withval="$with_dl"
4607  :
4608fi
4609
4610# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
4611if test "${with_dynamic_modules+set}" = set; then
4612  withval="$with_dynamic_modules"
4613  :
4614fi
4615
4616# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
4617if test "${with_dynamic_kernel+set}" = set; then
4618  withval="$with_dynamic_kernel"
4619  :
4620fi
4621
4622# Check whether --with-apint or --without-apint was given.
4623if test "${with_apint+set}" = set; then
4624  withval="$with_apint"
4625  :
4626fi
4627
4628# Check whether --with-svd or --without-svd was given.
4629if test "${with_svd+set}" = set; then
4630  withval="$with_svd"
4631  :
4632fi
4633
4634# Check whether --with-Plural or --without-Plural was given.
4635if test "${with_Plural+set}" = set; then
4636  withval="$with_Plural"
4637  :
4638fi
4639
4640# Check whether --with-NTL or --without-NTL was given.
4641if test "${with_NTL+set}" = set; then
4642  withval="$with_NTL"
4643  :
4644else
4645  with_NTL=yes
4646fi
4647
4648# Check whether --with-RatGB or --without-RatGB was given.
4649if test "${with_RatGB+set}" = set; then
4650  withval="$with_RatGB"
4651  :
4652fi
4653
4654
4655
4656
4657echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
4658echo "configure:4658: checking whether to use dynamic linking" >&5
4659if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
4660  cat >> confdefs.h <<\EOF
4661#define HAVE_DL 1
4662EOF
4663
4664  ac_have_dl=yes
4665  echo "$ac_t""yes" 1>&6
4666else
4667  echo "$ac_t""no" 1>&6
4668fi
4669
4670echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
4671echo "configure:4671: checking for tgetent in -lncurses" >&5
4672ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
4673if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4674  echo $ac_n "(cached) $ac_c" 1>&6
4675else
4676  ac_save_LIBS="$LIBS"
4677LIBS="-lncurses  $LIBS"
4678cat > conftest.$ac_ext <<EOF
4679#line 4679 "configure"
4680#include "confdefs.h"
4681/* Override any gcc2 internal prototype to avoid an error.  */
4682/* We use char because int might match the return type of a gcc2
4683    builtin and then its argument prototype would still apply.  */
4684char tgetent();
4685
4686int main() {
4687tgetent()
4688; return 0; }
4689EOF
4690if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691  rm -rf conftest*
4692  eval "ac_cv_lib_$ac_lib_var=yes"
4693else
4694  echo "configure: failed program was:" >&5
4695  cat conftest.$ac_ext >&5
4696  rm -rf conftest*
4697  eval "ac_cv_lib_$ac_lib_var=no"
4698fi
4699rm -f conftest*
4700LIBS="$ac_save_LIBS"
4701
4702fi
4703if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4704  echo "$ac_t""yes" 1>&6
4705    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4706    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4707  cat >> confdefs.h <<EOF
4708#define $ac_tr_lib 1
4709EOF
4710
4711  LIBS="-lncurses $LIBS"
4712
4713else
4714  echo "$ac_t""no" 1>&6
4715\
4716 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
4717echo "configure:4717: checking for tgetent in -lcurses" >&5
4718ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
4719if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4720  echo $ac_n "(cached) $ac_c" 1>&6
4721else
4722  ac_save_LIBS="$LIBS"
4723LIBS="-lcurses  $LIBS"
4724cat > conftest.$ac_ext <<EOF
4725#line 4725 "configure"
4726#include "confdefs.h"
4727/* Override any gcc2 internal prototype to avoid an error.  */
4728/* We use char because int might match the return type of a gcc2
4729    builtin and then its argument prototype would still apply.  */
4730char tgetent();
4731
4732int main() {
4733tgetent()
4734; return 0; }
4735EOF
4736if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737  rm -rf conftest*
4738  eval "ac_cv_lib_$ac_lib_var=yes"
4739else
4740  echo "configure: failed program was:" >&5
4741  cat conftest.$ac_ext >&5
4742  rm -rf conftest*
4743  eval "ac_cv_lib_$ac_lib_var=no"
4744fi
4745rm -f conftest*
4746LIBS="$ac_save_LIBS"
4747
4748fi
4749if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4750  echo "$ac_t""yes" 1>&6
4751    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
4752    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4753  cat >> confdefs.h <<EOF
4754#define $ac_tr_lib 1
4755EOF
4756
4757  LIBS="-lcurses $LIBS"
4758
4759else
4760  echo "$ac_t""no" 1>&6
4761\
4762  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
4763echo "configure:4763: checking for tgetent in -ltermcap" >&5
4764ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
4765if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4766  echo $ac_n "(cached) $ac_c" 1>&6
4767else
4768  ac_save_LIBS="$LIBS"
4769LIBS="-ltermcap  $LIBS"
4770cat > conftest.$ac_ext <<EOF
4771#line 4771 "configure"
4772#include "confdefs.h"
4773/* Override any gcc2 internal prototype to avoid an error.  */
4774/* We use char because int might match the return type of a gcc2
4775    builtin and then its argument prototype would still apply.  */
4776char tgetent();
4777
4778int main() {
4779tgetent()
4780; return 0; }
4781EOF
4782if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4783  rm -rf conftest*
4784  eval "ac_cv_lib_$ac_lib_var=yes"
4785else
4786  echo "configure: failed program was:" >&5
4787  cat conftest.$ac_ext >&5
4788  rm -rf conftest*
4789  eval "ac_cv_lib_$ac_lib_var=no"
4790fi
4791rm -f conftest*
4792LIBS="$ac_save_LIBS"
4793
4794fi
4795if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4796  echo "$ac_t""yes" 1>&6
4797    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
4798    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4799  cat >> confdefs.h <<EOF
4800#define $ac_tr_lib 1
4801EOF
4802
4803  LIBS="-ltermcap $LIBS"
4804
4805else
4806  echo "$ac_t""no" 1>&6
4807fi
4808
4809fi
4810
4811fi
4812
4813
4814# readline
4815if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
4816  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
4817  with_readline=static
4818fi
4819
4820
4821if test "$with_readline" != dynamic && test "$with_readline" != no; then
4822
4823ac_ext=C
4824# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4825ac_cpp='$CXXCPP $CPPFLAGS'
4826ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4827ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4828cross_compiling=$ac_cv_prog_cxx_cross
4829
4830   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
4831echo "configure:4831: checking for rl_abort in -lreadline" >&5
4832ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
4833if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4834  echo $ac_n "(cached) $ac_c" 1>&6
4835else
4836  ac_save_LIBS="$LIBS"
4837LIBS="-lreadline  $LIBS"
4838cat > conftest.$ac_ext <<EOF
4839#line 4839 "configure"
4840#include "confdefs.h"
4841/* Override any gcc2 internal prototype to avoid an error.  */
4842#ifdef __cplusplus
4843extern "C"
4844#endif
4845/* We use char because int might match the return type of a gcc2
4846    builtin and then its argument prototype would still apply.  */
4847char rl_abort();
4848
4849int main() {
4850rl_abort()
4851; return 0; }
4852EOF
4853if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4854  rm -rf conftest*
4855  eval "ac_cv_lib_$ac_lib_var=yes"
4856else
4857  echo "configure: failed program was:" >&5
4858  cat conftest.$ac_ext >&5
4859  rm -rf conftest*
4860  eval "ac_cv_lib_$ac_lib_var=no"
4861fi
4862rm -f conftest*
4863LIBS="$ac_save_LIBS"
4864
4865fi
4866if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4867  echo "$ac_t""yes" 1>&6
4868    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4869    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4870  cat >> confdefs.h <<EOF
4871#define $ac_tr_lib 1
4872EOF
4873
4874  LIBS="-lreadline $LIBS"
4875
4876else
4877  echo "$ac_t""no" 1>&6
4878fi
4879
4880   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
4881echo "configure:4881: checking how to run the C++ preprocessor" >&5
4882if test -z "$CXXCPP"; then
4883if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
4884  echo $ac_n "(cached) $ac_c" 1>&6
4885else
4886  ac_ext=C
4887# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4888ac_cpp='$CXXCPP $CPPFLAGS'
4889ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4890ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4891cross_compiling=$ac_cv_prog_cxx_cross
4892  CXXCPP="${CXX-g++} -E"
4893  cat > conftest.$ac_ext <<EOF
4894#line 4894 "configure"
4895#include "confdefs.h"
4896#include <stdlib.h>
4897EOF
4898ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4899{ (eval echo configure:4899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4900ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4901if test -z "$ac_err"; then
4902  :
4903else
4904  echo "$ac_err" >&5
4905  echo "configure: failed program was:" >&5
4906  cat conftest.$ac_ext >&5
4907  rm -rf conftest*
4908  CXXCPP=/lib/cpp
4909fi
4910rm -f conftest*
4911  ac_cv_prog_CXXCPP="$CXXCPP"
4912ac_ext=C
4913# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4914ac_cpp='$CXXCPP $CPPFLAGS'
4915ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4916ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4917cross_compiling=$ac_cv_prog_cxx_cross
4918fi
4919fi
4920CXXCPP="$ac_cv_prog_CXXCPP"
4921echo "$ac_t""$CXXCPP" 1>&6
4922
4923for ac_hdr in readline/readline.h readline/history.h
4924do
4925ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4926echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4927echo "configure:4927: checking for $ac_hdr" >&5
4928if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4929  echo $ac_n "(cached) $ac_c" 1>&6
4930else
4931  cat > conftest.$ac_ext <<EOF
4932#line 4932 "configure"
4933#include "confdefs.h"
4934#include <$ac_hdr>
4935EOF
4936ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4937{ (eval echo configure:4937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4938ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4939if test -z "$ac_err"; then
4940  rm -rf conftest*
4941  eval "ac_cv_header_$ac_safe=yes"
4942else
4943  echo "$ac_err" >&5
4944  echo "configure: failed program was:" >&5
4945  cat conftest.$ac_ext >&5
4946  rm -rf conftest*
4947  eval "ac_cv_header_$ac_safe=no"
4948fi
4949rm -f conftest*
4950fi
4951if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4952  echo "$ac_t""yes" 1>&6
4953    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4954  cat >> confdefs.h <<EOF
4955#define $ac_tr_hdr 1
4956EOF
4957 
4958else
4959  echo "$ac_t""no" 1>&6
4960fi
4961done
4962
4963   if test "$ac_cv_lib_readline_rl_abort" = yes && \
4964      test "$ac_cv_header_readline_readline_h" = yes; then
4965     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
4966echo "configure:4966: checking whether readline.h is ok" >&5
4967     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
4968  echo $ac_n "(cached) $ac_c" 1>&6
4969else
4970  cat > conftest.$ac_ext <<EOF
4971#line 4971 "configure"
4972#include "confdefs.h"
4973#include<unistd.h>
4974#include<stdio.h>
4975#include<readline/readline.h>
4976#ifdef HAVE_READLINE_HISTORY_H
4977#include<readline/history.h>
4978#endif
4979
4980int main() {
4981
4982; return 0; }
4983EOF
4984if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985  rm -rf conftest*
4986  ac_cv_header_readline_readline_h_ok="yes"
4987else
4988  echo "configure: failed program was:" >&5
4989  cat conftest.$ac_ext >&5
4990  rm -rf conftest*
4991  ac_cv_header_readline_readline_h_ok="no"
4992fi
4993rm -f conftest*
4994fi
4995
4996    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
4997    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
4998#not ok -- try once more with explicitly declaring everything
4999      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
5000echo "configure:5000: checking whether or not we nevertheless can use readline" >&5
5001      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
5002  echo $ac_n "(cached) $ac_c" 1>&6
5003else
5004  cat > conftest.$ac_ext <<EOF
5005#line 5005 "configure"
5006#include "confdefs.h"
5007#include <stdio.h>
5008extern "C"
5009{
5010extern char * rl_readline_name;
5011extern char *rl_line_buffer;
5012char *filename_completion_function();
5013typedef char **CPPFunction ();
5014extern char ** completion_matches ();
5015extern CPPFunction * rl_attempted_completion_function;
5016extern FILE * rl_outstream;
5017char * readline ();
5018void add_history ();
5019int write_history ();
5020int read_history();
5021}
5022#ifndef NULL
5023#define NULL 0
5024#endif
5025
5026int main() {
5027rl_readline_name=NULL;
5028*rl_line_buffer=1;
5029completion_matches(NULL, filename_completion_function);
5030rl_attempted_completion_function = (CPPFunction *) NULL;
5031rl_outstream=NULL;
5032readline(NULL);
5033add_history(NULL);
5034read_history(NULL);
5035write_history(NULL);
5036
5037; return 0; }
5038EOF
5039if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5040  rm -rf conftest*
5041  ac_cv_have_readline="yes"
5042
5043else
5044  echo "configure: failed program was:" >&5
5045  cat conftest.$ac_ext >&5
5046  rm -rf conftest*
5047  ac_cv_have_readline="no"
5048
5049fi
5050rm -f conftest*
5051fi
5052
5053      echo "$ac_t""$ac_cv_have_readline" 1>&6
5054    else
5055      cat >> confdefs.h <<\EOF
5056#define READLINE_READLINE_H_OK 1
5057EOF
5058
5059      ac_cv_have_readline="yes"
5060    fi
5061  fi
5062  if test "$ac_cv_have_readline" = yes; then
5063    cat >> confdefs.h <<\EOF
5064#define HAVE_READLINE 1
5065EOF
5066
5067  fi
5068ac_ext=c
5069# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5070ac_cpp='$CPP $CPPFLAGS'
5071ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5072ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5073cross_compiling=$ac_cv_prog_cc_cross
5074
5075fi
5076
5077echo $ac_n "checking which readline to use""... $ac_c" 1>&6
5078echo "configure:5078: checking which readline to use" >&5
5079if test "$ac_cv_with_readline" = dynamic; then
5080  echo "$ac_t""dynamic" 1>&6
5081  cat >> confdefs.h <<\EOF
5082#define HAVE_DYN_RL 1
5083EOF
5084
5085elif test "$ac_cv_have_readline" = yes; then
5086  echo "$ac_t""static" 1>&6
5087elif test "$ac_cv_singuname" = PowerMacintosh-darwin; then
5088  { echo "configure: error: building without readline impossible on PowerMacintosh-darwin" 1>&2; exit 1; }
5089else
5090  echo "$ac_t""none" 1>&6
5091  echo "configure: warning: building without readline: disabling fancy display" 1>&2
5092fi
5093
5094NEED_LIBS=$LIBS
5095
5096# gmp, MP, MPT, factory, libfac
5097echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
5098echo "configure:5098: checking for main in -lgmp" >&5
5099ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
5100if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5101  echo $ac_n "(cached) $ac_c" 1>&6
5102else
5103  ac_save_LIBS="$LIBS"
5104LIBS="-lgmp  $LIBS"
5105cat > conftest.$ac_ext <<EOF
5106#line 5106 "configure"
5107#include "confdefs.h"
5108
5109int main() {
5110main()
5111; return 0; }
5112EOF
5113if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114  rm -rf conftest*
5115  eval "ac_cv_lib_$ac_lib_var=yes"
5116else
5117  echo "configure: failed program was:" >&5
5118  cat conftest.$ac_ext >&5
5119  rm -rf conftest*
5120  eval "ac_cv_lib_$ac_lib_var=no"
5121fi
5122rm -f conftest*
5123LIBS="$ac_save_LIBS"
5124
5125fi
5126if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5127  echo "$ac_t""yes" 1>&6
5128    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5129    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5130  cat >> confdefs.h <<EOF
5131#define $ac_tr_lib 1
5132EOF
5133
5134  LIBS="-lgmp $LIBS"
5135
5136else
5137  echo "$ac_t""no" 1>&6
5138fi
5139
5140SAVE_LIBS=$LIBS
5141echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
5142echo "configure:5142: checking for IMP_PutGmpInt in -lMP" >&5
5143ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
5144if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5145  echo $ac_n "(cached) $ac_c" 1>&6
5146else
5147  ac_save_LIBS="$LIBS"
5148LIBS="-lMP $MP_LIBS $LIBS"
5149cat > conftest.$ac_ext <<EOF
5150#line 5150 "configure"
5151#include "confdefs.h"
5152/* Override any gcc2 internal prototype to avoid an error.  */
5153/* We use char because int might match the return type of a gcc2
5154    builtin and then its argument prototype would still apply.  */
5155char IMP_PutGmpInt();
5156
5157int main() {
5158IMP_PutGmpInt()
5159; return 0; }
5160EOF
5161if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5162  rm -rf conftest*
5163  eval "ac_cv_lib_$ac_lib_var=yes"
5164else
5165  echo "configure: failed program was:" >&5
5166  cat conftest.$ac_ext >&5
5167  rm -rf conftest*
5168  eval "ac_cv_lib_$ac_lib_var=no"
5169fi
5170rm -f conftest*
5171LIBS="$ac_save_LIBS"
5172
5173fi
5174if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5175  echo "$ac_t""yes" 1>&6
5176    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5177    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5178  cat >> confdefs.h <<EOF
5179#define $ac_tr_lib 1
5180EOF
5181
5182  LIBS="-lMP $LIBS"
5183
5184else
5185  echo "$ac_t""no" 1>&6
5186fi
5187
5188echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
5189echo "configure:5189: checking for MPT_GetTree in -lMPT" >&5
5190ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
5191if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5192  echo $ac_n "(cached) $ac_c" 1>&6
5193else
5194  ac_save_LIBS="$LIBS"
5195LIBS="-lMPT $MP_LIBS $LIBS"
5196cat > conftest.$ac_ext <<EOF
5197#line 5197 "configure"
5198#include "confdefs.h"
5199/* Override any gcc2 internal prototype to avoid an error.  */
5200/* We use char because int might match the return type of a gcc2
5201    builtin and then its argument prototype would still apply.  */
5202char MPT_GetTree();
5203
5204int main() {
5205MPT_GetTree()
5206; return 0; }
5207EOF
5208if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5209  rm -rf conftest*
5210  eval "ac_cv_lib_$ac_lib_var=yes"
5211else
5212  echo "configure: failed program was:" >&5
5213  cat conftest.$ac_ext >&5
5214  rm -rf conftest*
5215  eval "ac_cv_lib_$ac_lib_var=no"
5216fi
5217rm -f conftest*
5218LIBS="$ac_save_LIBS"
5219
5220fi
5221if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5222  echo "$ac_t""yes" 1>&6
5223    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5224    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5225  cat >> confdefs.h <<EOF
5226#define $ac_tr_lib 1
5227EOF
5228
5229  LIBS="-lMPT $LIBS"
5230
5231else
5232  echo "$ac_t""no" 1>&6
5233fi
5234
5235LIBS=$SAVE_LIBS
5236echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
5237echo "configure:5237: checking for atof in -lsingcf" >&5
5238ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
5239if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5240  echo $ac_n "(cached) $ac_c" 1>&6
5241else
5242  ac_save_LIBS="$LIBS"
5243LIBS="-lsingcf  $LIBS"
5244cat > conftest.$ac_ext <<EOF
5245#line 5245 "configure"
5246#include "confdefs.h"
5247/* Override any gcc2 internal prototype to avoid an error.  */
5248/* We use char because int might match the return type of a gcc2
5249    builtin and then its argument prototype would still apply.  */
5250char atof();
5251
5252int main() {
5253atof()
5254; return 0; }
5255EOF
5256if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5257  rm -rf conftest*
5258  eval "ac_cv_lib_$ac_lib_var=yes"
5259else
5260  echo "configure: failed program was:" >&5
5261  cat conftest.$ac_ext >&5
5262  rm -rf conftest*
5263  eval "ac_cv_lib_$ac_lib_var=no"
5264fi
5265rm -f conftest*
5266LIBS="$ac_save_LIBS"
5267
5268fi
5269if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5270  echo "$ac_t""yes" 1>&6
5271    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5272    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5273  cat >> confdefs.h <<EOF
5274#define $ac_tr_lib 1
5275EOF
5276
5277  LIBS="-lsingcf $LIBS"
5278
5279else
5280  echo "$ac_t""no" 1>&6
5281fi
5282
5283echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
5284echo "configure:5284: checking for atof in -lsingfac" >&5
5285ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
5286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5287  echo $ac_n "(cached) $ac_c" 1>&6
5288else
5289  ac_save_LIBS="$LIBS"
5290LIBS="-lsingfac  $LIBS"
5291cat > conftest.$ac_ext <<EOF
5292#line 5292 "configure"
5293#include "confdefs.h"
5294/* Override any gcc2 internal prototype to avoid an error.  */
5295/* We use char because int might match the return type of a gcc2
5296    builtin and then its argument prototype would still apply.  */
5297char atof();
5298
5299int main() {
5300atof()
5301; return 0; }
5302EOF
5303if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5304  rm -rf conftest*
5305  eval "ac_cv_lib_$ac_lib_var=yes"
5306else
5307  echo "configure: failed program was:" >&5
5308  cat conftest.$ac_ext >&5
5309  rm -rf conftest*
5310  eval "ac_cv_lib_$ac_lib_var=no"
5311fi
5312rm -f conftest*
5313LIBS="$ac_save_LIBS"
5314
5315fi
5316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5317  echo "$ac_t""yes" 1>&6
5318    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5319    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5320  cat >> confdefs.h <<EOF
5321#define $ac_tr_lib 1
5322EOF
5323
5324  LIBS="-lsingfac $LIBS"
5325
5326else
5327  echo "$ac_t""no" 1>&6
5328fi
5329
5330echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
5331echo "configure:5331: checking for omTestAddr in -lomalloc" >&5
5332ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
5333if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5334  echo $ac_n "(cached) $ac_c" 1>&6
5335else
5336  ac_save_LIBS="$LIBS"
5337LIBS="-lomalloc  $LIBS"
5338cat > conftest.$ac_ext <<EOF
5339#line 5339 "configure"
5340#include "confdefs.h"
5341/* Override any gcc2 internal prototype to avoid an error.  */
5342/* We use char because int might match the return type of a gcc2
5343    builtin and then its argument prototype would still apply.  */
5344char omTestAddr();
5345
5346int main() {
5347omTestAddr()
5348; return 0; }
5349EOF
5350if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5351  rm -rf conftest*
5352  eval "ac_cv_lib_$ac_lib_var=yes"
5353else
5354  echo "configure: failed program was:" >&5
5355  cat conftest.$ac_ext >&5
5356  rm -rf conftest*
5357  eval "ac_cv_lib_$ac_lib_var=no"
5358fi
5359rm -f conftest*
5360LIBS="$ac_save_LIBS"
5361
5362fi
5363if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5364  echo "$ac_t""yes" 1>&6
5365    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5366    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5367  cat >> confdefs.h <<EOF
5368#define $ac_tr_lib 1
5369EOF
5370
5371  LIBS="-lomalloc $LIBS"
5372
5373else
5374  echo "$ac_t""no" 1>&6
5375fi
5376
5377echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
5378echo "configure:5378: checking for main in -lomalloc_ndebug" >&5
5379ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
5380if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5381  echo $ac_n "(cached) $ac_c" 1>&6
5382else
5383  ac_save_LIBS="$LIBS"
5384LIBS="-lomalloc_ndebug  $LIBS"
5385cat > conftest.$ac_ext <<EOF
5386#line 5386 "configure"
5387#include "confdefs.h"
5388
5389int main() {
5390main()
5391; return 0; }
5392EOF
5393if { (eval echo configure:5393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394  rm -rf conftest*
5395  eval "ac_cv_lib_$ac_lib_var=yes"
5396else
5397  echo "configure: failed program was:" >&5
5398  cat conftest.$ac_ext >&5
5399  rm -rf conftest*
5400  eval "ac_cv_lib_$ac_lib_var=no"
5401fi
5402rm -f conftest*
5403LIBS="$ac_save_LIBS"
5404
5405fi
5406if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5407  echo "$ac_t""yes" 1>&6
5408    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5409    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5410  cat >> confdefs.h <<EOF
5411#define $ac_tr_lib 1
5412EOF
5413
5414  LIBS="-lomalloc_ndebug $LIBS"
5415
5416else
5417  echo "$ac_t""no" 1>&6
5418fi
5419
5420echo $ac_n "checking for main in -lntl""... $ac_c" 1>&6
5421echo "configure:5421: checking for main in -lntl" >&5
5422ac_lib_var=`echo ntl'_'main | sed 'y%./+-%__p_%'`
5423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5424  echo $ac_n "(cached) $ac_c" 1>&6
5425else
5426  ac_save_LIBS="$LIBS"
5427LIBS="-lntl  $LIBS"
5428cat > conftest.$ac_ext <<EOF
5429#line 5429 "configure"
5430#include "confdefs.h"
5431
5432int main() {
5433main()
5434; return 0; }
5435EOF
5436if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5437  rm -rf conftest*
5438  eval "ac_cv_lib_$ac_lib_var=yes"
5439else
5440  echo "configure: failed program was:" >&5
5441  cat conftest.$ac_ext >&5
5442  rm -rf conftest*
5443  eval "ac_cv_lib_$ac_lib_var=no"
5444fi
5445rm -f conftest*
5446LIBS="$ac_save_LIBS"
5447
5448fi
5449if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5450  echo "$ac_t""yes" 1>&6
5451    ac_tr_lib=HAVE_LIB`echo ntl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5452    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5453  cat >> confdefs.h <<EOF
5454#define $ac_tr_lib 1
5455EOF
5456
5457  LIBS="-lntl $LIBS"
5458
5459else
5460  echo "$ac_t""no" 1>&6
5461fi
5462
5463
5464for ac_hdr in gmp.h MP.h  MPT.h factory.h factor.h omalloc.h \
5465 omalloc.c
5466do
5467ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5468echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5469echo "configure:5469: checking for $ac_hdr" >&5
5470if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5471  echo $ac_n "(cached) $ac_c" 1>&6
5472else
5473  cat > conftest.$ac_ext <<EOF
5474#line 5474 "configure"
5475#include "confdefs.h"
5476#include <$ac_hdr>
5477EOF
5478ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5479{ (eval echo configure:5479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5480ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5481if test -z "$ac_err"; then
5482  rm -rf conftest*
5483  eval "ac_cv_header_$ac_safe=yes"
5484else
5485  echo "$ac_err" >&5
5486  echo "configure: failed program was:" >&5
5487  cat conftest.$ac_ext >&5
5488  rm -rf conftest*
5489  eval "ac_cv_header_$ac_safe=no"
5490fi
5491rm -f conftest*
5492fi
5493if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5494  echo "$ac_t""yes" 1>&6
5495    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5496  cat >> confdefs.h <<EOF
5497#define $ac_tr_hdr 1
5498EOF
5499 
5500else
5501  echo "$ac_t""no" 1>&6
5502fi
5503done
5504
5505
5506echo $ac_n "checking whether to use Boost""... $ac_c" 1>&6
5507echo "configure:5507: checking whether to use Boost" >&5
5508if test "$with_Boost" != no; then
5509  echo "$ac_t""yes" 1>&6
5510 
5511  ac_ext=C
5512# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5513ac_cpp='$CXXCPP $CPPFLAGS'
5514ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5515ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5516cross_compiling=$ac_cv_prog_cxx_cross
5517
5518  for ac_hdr in boost/dynamic_bitset.hpp
5519do
5520ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5521echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5522echo "configure:5522: checking for $ac_hdr" >&5
5523if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5524  echo $ac_n "(cached) $ac_c" 1>&6
5525else
5526  cat > conftest.$ac_ext <<EOF
5527#line 5527 "configure"
5528#include "confdefs.h"
5529#include <$ac_hdr>
5530EOF
5531ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5532{ (eval echo configure:5532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5533ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5534if test -z "$ac_err"; then
5535  rm -rf conftest*
5536  eval "ac_cv_header_$ac_safe=yes"
5537else
5538  echo "$ac_err" >&5
5539  echo "configure: failed program was:" >&5
5540  cat conftest.$ac_ext >&5
5541  rm -rf conftest*
5542  eval "ac_cv_header_$ac_safe=no"
5543fi
5544rm -f conftest*
5545fi
5546if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5547  echo "$ac_t""yes" 1>&6
5548    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5549  cat >> confdefs.h <<EOF
5550#define $ac_tr_hdr 1
5551EOF
5552 
5553else
5554  echo "$ac_t""no" 1>&6
5555fi
5556done
5557
5558  ac_ext=c
5559# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5560ac_cpp='$CPP $CPPFLAGS'
5561ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5562ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5563cross_compiling=$ac_cv_prog_cc_cross
5564
5565else
5566  echo "$ac_t""no" 1>&6
5567  echo $ac_n "checking whether to use std::vector""... $ac_c" 1>&6
5568echo "configure:5568: checking whether to use std::vector" >&5
5569  if test "$with_stdvec" != yes; then
5570    echo "$ac_t""no" 1>&6
5571  else
5572    echo "$ac_t""yes" 1>&6
5573    cat >> confdefs.h <<\EOF
5574#define USE_STDVECBOOL 1
5575EOF
5576
5577    USE_STDVECBOOL=1
5578  fi
5579fi
5580
5581
5582if test "$ac_cv_lib_gmp_main" = yes && \
5583 test "$ac_cv_header_gmp_h" = yes; then
5584    ac_gmp_ok=yes
5585fi
5586
5587if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
5588 test "$ac_cv_lib_MPT_MPT_GetTree" && \
5589 test "$ac_cv_header_MP_h" = yes && \
5590 test "$ac_cv_header_MPT_h" = yes; then
5591  ac_MP_ok=yes
5592fi
5593
5594if test "$ac_cv_lib_singcf_atof" = yes && \
5595 test "$ac_cv_header_factory_h" = yes; then
5596  ac_factory_ok=yes
5597fi
5598
5599if test "$ac_cv_lib_singfac_atof" = yes && \
5600 test "$ac_cv_header_factor_h" = yes; then
5601  ac_libfac_ok=yes
5602fi
5603
5604if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
5605   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
5606   test "$ac_cv_header_omalloc_c" = yes && \
5607   test "$ac_cv_header_omalloc_h" = yes; then
5608  ac_cv_omalloc_ok=yes
5609fi
5610
5611if test "$ac_cv_lib_ntl_main" = yes; then
5612  ac_cv_ntl_ok=yes
5613fi
5614
5615SAVE_LIBS=$LIBS
5616echo $ac_n "checking for __stack_chk_fail_local in -lc_nonshared""... $ac_c" 1>&6
5617echo "configure:5617: checking for __stack_chk_fail_local in -lc_nonshared" >&5
5618ac_lib_var=`echo c_nonshared'_'__stack_chk_fail_local | sed 'y%./+-%__p_%'`
5619if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5620  echo $ac_n "(cached) $ac_c" 1>&6
5621else
5622  ac_save_LIBS="$LIBS"
5623LIBS="-lc_nonshared  $LIBS"
5624cat > conftest.$ac_ext <<EOF
5625#line 5625 "configure"
5626#include "confdefs.h"
5627/* Override any gcc2 internal prototype to avoid an error.  */
5628/* We use char because int might match the return type of a gcc2
5629    builtin and then its argument prototype would still apply.  */
5630char __stack_chk_fail_local();
5631
5632int main() {
5633__stack_chk_fail_local()
5634; return 0; }
5635EOF
5636if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637  rm -rf conftest*
5638  eval "ac_cv_lib_$ac_lib_var=yes"
5639else
5640  echo "configure: failed program was:" >&5
5641  cat conftest.$ac_ext >&5
5642  rm -rf conftest*
5643  eval "ac_cv_lib_$ac_lib_var=no"
5644fi
5645rm -f conftest*
5646LIBS="$ac_save_LIBS"
5647
5648fi
5649if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5650  echo "$ac_t""yes" 1>&6
5651  GLIBC_DYN_FIX="-lc_nonshared"
5652else
5653  echo "$ac_t""no" 1>&6
5654GLIBC_DYN_FIX=""
5655fi
5656
5657LIBS=$SAVE_LIBS
5658
5659
5660
5661# evaluate results
5662if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
5663  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
5664fi
5665
5666echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
5667echo "configure:5667: checking which apint package to use" >&5
5668if test "${with_apint}" != gmp; then
5669  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
5670    echo "$ac_t""gmp" 1>&6
5671    will_have_gmp=yes
5672    NEED_LIBS="-lgmp ${NEED_LIBS}"
5673  else
5674    echo "$ac_t""none" 1>&6
5675    { echo "configure: error: can not build without gmp" 1>&2; exit 1; }
5676  fi
5677else
5678  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
5679    echo "$ac_t""gmp" 1>&6
5680    will_have_gmp=yes
5681    NEED_LIBS="-lgmp ${NEED_LIBS}"
5682  else
5683    echo "$ac_t""none" 1>&6
5684    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
5685  fi
5686fi
5687
5688echo $ac_n "checking gfanlib""... $ac_c" 1>&6
5689echo "configure:5689: checking gfanlib" >&5
5690if test "$enable_gfanlib" = yes; then
5691  echo "$ac_t""yes" 1>&6
5692  NEED_LIBS="${NEED_LIBS} -lgfan -lcddgmp"
5693else
5694  echo "$ac_t""can not build with gfan lib" 1>&6
5695fi
5696
5697echo $ac_n "checking whether to use libsvd""... $ac_c" 1>&6
5698echo "configure:5698: checking whether to use libsvd" >&5
5699if test "$with_svd" = yes; then
5700  echo "$ac_t""yes" 1>&6
5701  cat >> confdefs.h <<\EOF
5702#define HAVE_SVD 1
5703EOF
5704
5705  NEED_LIBS="-lsvd -lmpfr ${NEED_LIBS}"
5706else
5707  echo "$ac_t""no" 1>&6
5708fi
5709
5710
5711#
5712echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
5713echo "configure:5713: checking whether to have MP" >&5
5714if test "${with_MP}" != yes && test "${with_MP}" != no; then
5715  if (test "${will_have_gmp}" = yes) && \
5716     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
5717    echo "$ac_t""yes" 1>&6
5718    cat >> confdefs.h <<\EOF
5719#define HAVE_MPSR 1
5720EOF
5721
5722    HAVE_MPSR=1
5723    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
5724  else
5725    echo "$ac_t""no" 1>&6
5726  fi
5727elif  test "${with_MP}" = yes; then
5728  if (test "${will_have_gmp}" = yes) && \
5729     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
5730    echo "$ac_t""yes" 1>&6
5731    cat >> confdefs.h <<\EOF
5732#define HAVE_MPSR 1
5733EOF
5734
5735    HAVE_MPSR=1
5736    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
5737  else
5738    echo "$ac_t""no" 1>&6
5739    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
5740  fi
5741else
5742  echo "$ac_t""no" 1>&6
5743fi
5744
5745
5746
5747echo $ac_n "checking whether to have NTL""... $ac_c" 1>&6
5748echo "configure:5748: checking whether to have NTL" >&5
5749if test "${with_NTL}" = yes ; then
5750  echo "$ac_t""yes" 1>&6
5751  NEED_LIBS="-lntl ${NEED_LIBS}"
5752else
5753  echo "$ac_t""no" 1>&6
5754fi
5755
5756echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
5757echo "configure:5757: checking whether to have factory" >&5
5758if test "${with_factory}" != yes && test "${with_factory}" != no; then
5759  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
5760    echo "$ac_t""yes" 1>&6
5761    cat >> confdefs.h <<\EOF
5762#define HAVE_FACTORY 1
5763EOF
5764
5765    will_have_factory=yes
5766    NEED_LIBS="-lsingcf ${NEED_LIBS}"
5767  else
5768    echo "$ac_t""no" 1>&6
5769  fi
5770elif  test "${with_factory}" = yes; then
5771  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
5772    echo "$ac_t""yes" 1>&6
5773    cat >> confdefs.h <<\EOF
5774#define HAVE_FACTORY 1
5775EOF
5776
5777    will_have_factory=yes
5778    NEED_LIBS="-lsingcf ${NEED_LIBS}"
5779  else
5780    echo "$ac_t""no" 1>&6
5781    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
5782  fi
5783else
5784  echo "$ac_t""no" 1>&6
5785fi
5786
5787echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
5788echo "configure:5788: checking whether to have libfac" >&5
5789if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
5790  if (test "${will_have_factory}" = yes) && \
5791     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
5792    echo "$ac_t""yes" 1>&6
5793    NEED_LIBS="-lsingfac ${NEED_LIBS}"
5794  else
5795    echo "$ac_t""no" 1>&6
5796    { echo "configure: error: can not build without libfac" 1>&2; exit 1; }
5797  fi
5798elif  test "${with_libfac}" = yes; then
5799  if (test "${will_have_factory}" = yes) && \
5800     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
5801    echo "$ac_t""yes" 1>&6
5802    NEED_LIBS="-lsingfac ${NEED_LIBS}"
5803  else
5804    echo "$ac_t""no" 1>&6
5805    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
5806  fi
5807else
5808  echo "$ac_t""no" 1>&6
5809fi
5810
5811NEED_LIBSG="${NEED_LIBS}"
5812if test "$ac_cv_sizeof_voidp" != 4; then
5813  NEED_LIBS="${NEED_LIBS} -lomalloc"
5814else
5815  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug"
5816fi
5817
5818
5819
5820
5821
5822echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
5823echo "configure:5823: checking whether to have dbm links" >&5
5824if test "$with_dbm" != no; then
5825  cat >> confdefs.h <<\EOF
5826#define HAVE_DBM 1
5827EOF
5828
5829  echo "$ac_t""yes" 1>&6
5830else
5831  echo "$ac_t""no" 1>&6
5832fi
5833
5834echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
5835echo "configure:5835: checking whether to have dynamic modules" >&5
5836if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then
5837  echo "$ac_t""no" 1>&6
5838else
5839  cat >> confdefs.h <<\EOF
5840#define HAVE_DYNAMIC_LOADING 1
5841EOF
5842
5843  echo "$ac_t""yes" 1>&6
5844fi
5845
5846echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
5847echo "configure:5847: checking whether to have dynamic kernel" >&5
5848if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
5849  DL_KERNEL=1
5850 
5851  echo "$ac_t""yes" 1>&6
5852else
5853  echo "$ac_t""no" 1>&6
5854fi
5855
5856echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
5857echo "configure:5857: checking whether to have Plural" >&5
5858if test "$with_Plural" != no && test "$enable_Plural" != no; then
5859  cat >> confdefs.h <<\EOF
5860#define HAVE_PLURAL 1
5861EOF
5862
5863  echo "$ac_t""yes" 1>&6
5864  PLURAL=1
5865 
5866else
5867  echo "$ac_t""no" 1>&6
5868fi
5869
5870echo $ac_n "checking whether to have ratGB""... $ac_c" 1>&6
5871echo "configure:5871: checking whether to have ratGB" >&5
5872if test "$with_ratGB" != yes && test "$enable_ratGB" != yes; then
5873  echo "$ac_t""no" 1>&6
5874else
5875  cat >> confdefs.h <<\EOF
5876#define HAVE_RATGRING 1
5877EOF
5878
5879  echo "$ac_t""yes" 1>&6
5880fi
5881
5882
5883OUTPUT_MAKEFILES="Makefile ../kernel/Makefile"
5884
5885if test "$ac_cv_singuname" = "ix86-Win"; then
5886  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
5887fi
5888
5889trap '' 1 2 15
5890cat > confcache <<\EOF
5891# This file is a shell script that caches the results of configure
5892# tests run on this system so they can be shared between configure
5893# scripts and configure runs.  It is not useful on other systems.
5894# If it contains results you don't want to keep, you may remove or edit it.
5895#
5896# By default, configure uses ./config.cache as the cache file,
5897# creating it if it does not exist already.  You can give configure
5898# the --cache-file=FILE option to use a different cache file; that is
5899# what configure does when it calls configure scripts in
5900# subdirectories, so they share the cache.
5901# Giving --cache-file=/dev/null disables caching, for debugging configure.
5902# config.status only pays attention to the cache file if you give it the
5903# --recheck option to rerun configure.
5904#
5905EOF
5906# The following way of writing the cache mishandles newlines in values,
5907# but we know of no workaround that is simple, portable, and efficient.
5908# So, don't put newlines in cache variables' values.
5909# Ultrix sh set writes to stderr and can't be redirected directly,
5910# and sets the high bit in the cache file unless we assign to the vars.
5911(set) 2>&1 |
5912  case `(ac_space=' '; set | grep ac_space) 2>&1` in
5913  *ac_space=\ *)
5914    # `set' does not quote correctly, so add quotes (double-quote substitution
5915    # turns \\\\ into \\, and sed turns \\ into \).
5916    sed -n \
5917      -e "s/'/'\\\\''/g" \
5918      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5919    ;;
5920  *)
5921    # `set' quotes correctly as required by POSIX, so do not add quotes.
5922    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5923    ;;
5924  esac >> confcache
5925if cmp -s $cache_file confcache; then
5926  :
5927else
5928  if test -w $cache_file; then
5929    echo "updating cache $cache_file"
5930    cat confcache > $cache_file
5931  else
5932    echo "not updating unwritable cache $cache_file"
5933  fi
5934fi
5935rm -f confcache
5936
5937trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5938
5939test "x$prefix" = xNONE && prefix=$ac_default_prefix
5940# Let make expand exec_prefix.
5941test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5942
5943# Any assignment to VPATH causes Sun make to only execute
5944# the first set of double-colon rules, so remove it if not needed.
5945# If there is a colon in the path, we need to keep it.
5946if test "x$srcdir" = x.; then
5947  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5948fi
5949
5950trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5951
5952DEFS=-DHAVE_CONFIG_H
5953
5954# Without the "./", some shells look in PATH for config.status.
5955: ${CONFIG_STATUS=./config.status}
5956
5957echo creating $CONFIG_STATUS
5958rm -f $CONFIG_STATUS
5959cat > $CONFIG_STATUS <<EOF
5960#! /bin/sh
5961# Generated automatically by configure.
5962# Run this file to recreate the current configuration.
5963# This directory was configured as follows,
5964# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5965#
5966# $0 $ac_configure_args
5967#
5968# Compiler output produced by configure, useful for debugging
5969# configure, is in ./config.log if it exists.
5970
5971ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5972for ac_option
5973do
5974  case "\$ac_option" in
5975  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5976    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5977    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5978  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5979    echo "$CONFIG_STATUS generated by autoconf version 2.13"
5980    exit 0 ;;
5981  -help | --help | --hel | --he | --h)
5982    echo "\$ac_cs_usage"; exit 0 ;;
5983  *) echo "\$ac_cs_usage"; exit 1 ;;
5984  esac
5985done
5986
5987ac_given_srcdir=$srcdir
5988ac_given_INSTALL="$INSTALL"
5989
5990trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5991EOF
5992cat >> $CONFIG_STATUS <<EOF
5993
5994# Protect against being on the right side of a sed subst in config.status.
5995sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5996 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5997$ac_vpsub
5998$extrasub
5999s%@SHELL@%$SHELL%g
6000s%@CFLAGS@%$CFLAGS%g
6001s%@CPPFLAGS@%$CPPFLAGS%g
6002s%@CXXFLAGS@%$CXXFLAGS%g
6003s%@FFLAGS@%$FFLAGS%g
6004s%@DEFS@%$DEFS%g
6005s%@LDFLAGS@%$LDFLAGS%g
6006s%@LIBS@%$LIBS%g
6007s%@exec_prefix@%$exec_prefix%g
6008s%@prefix@%$prefix%g
6009s%@program_transform_name@%$program_transform_name%g
6010s%@bindir@%$bindir%g
6011s%@sbindir@%$sbindir%g
6012s%@libexecdir@%$libexecdir%g
6013s%@datadir@%$datadir%g
6014s%@sysconfdir@%$sysconfdir%g
6015s%@sharedstatedir@%$sharedstatedir%g
6016s%@localstatedir@%$localstatedir%g
6017s%@libdir@%$libdir%g
6018s%@includedir@%$includedir%g
6019s%@oldincludedir@%$oldincludedir%g
6020s%@infodir@%$infodir%g
6021s%@mandir@%$mandir%g
6022s%@SINGUNAME@%$SINGUNAME%g
6023s%@SI_CPU_I386@%$SI_CPU_I386%g
6024s%@EXEC_EXT@%$EXEC_EXT%g
6025s%@SI_CPU_X86_64@%$SI_CPU_X86_64%g
6026s%@SI_CPU_IA64@%$SI_CPU_IA64%g
6027s%@SI_CPU_PPC@%$SI_CPU_PPC%g
6028s%@SI_CPU_SPARC@%$SI_CPU_SPARC%g
6029s%@SING_UNAME@%$SING_UNAME%g
6030s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
6031s%@VERSION_DATE@%$VERSION_DATE%g
6032s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
6033s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
6034s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
6035s%@CC@%$CC%g
6036s%@CPP@%$CPP%g
6037s%@CXX@%$CXX%g
6038s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6039s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6040s%@INSTALL_DATA@%$INSTALL_DATA%g
6041s%@PIPE@%$PIPE%g
6042s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
6043s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
6044s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
6045s%@SET_MAKE@%$SET_MAKE%g
6046s%@SINGULAR@%$SINGULAR%g
6047s%@LEX@%$LEX%g
6048s%@BISON@%$BISON%g
6049s%@LN_S@%$LN_S%g
6050s%@PERL@%$PERL%g
6051s%@PYTHON@%$PYTHON%g
6052s%@PYTHON_CPPFLAGS@%$PYTHON_CPPFLAGS%g
6053s%@PYTHON_LDFLAGS@%$PYTHON_LDFLAGS%g
6054s%@PYTHON_SITE_PKG@%$PYTHON_SITE_PKG%g
6055s%@PYTHON_EXTRA_LIBS@%$PYTHON_EXTRA_LIBS%g
6056s%@PYTHON_EXTRA_LDFLAGS@%$PYTHON_EXTRA_LDFLAGS%g
6057s%@HAVE_PYTHON_VALUE@%$HAVE_PYTHON_VALUE%g
6058s%@PYTHON_STATIC_LIBS@%$PYTHON_STATIC_LIBS%g
6059s%@PYTHON_MODULE_FLAGS@%$PYTHON_MODULE_FLAGS%g
6060s%@PYTHON_EMBED_LIBS@%$PYTHON_EMBED_LIBS%g
6061s%@EMBED_PYTHON_VALUE@%$EMBED_PYTHON_VALUE%g
6062s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
6063s%@SFLAGS@%$SFLAGS%g
6064s%@SLDFLAGS@%$SLDFLAGS%g
6065s%@LD@%$LD%g
6066s%@ALLOCA@%$ALLOCA%g
6067s%@CXXCPP@%$CXXCPP%g
6068s%@USE_STDVECBOOL@%$USE_STDVECBOOL%g
6069s%@GLIBC_DYN_FIX@%$GLIBC_DYN_FIX%g
6070s%@HAVE_SVD@%$HAVE_SVD%g
6071s%@HAVE_MPSR@%$HAVE_MPSR%g
6072s%@MP_LIBS@%$MP_LIBS%g
6073s%@NEED_LIBS@%$NEED_LIBS%g
6074s%@NEED_LIBSG@%$NEED_LIBSG%g
6075s%@DL_KERNEL@%$DL_KERNEL%g
6076s%@PLURAL@%$PLURAL%g
6077
6078CEOF
6079EOF
6080
6081cat >> $CONFIG_STATUS <<\EOF
6082
6083# Split the substitutions into bite-sized pieces for seds with
6084# small command number limits, like on Digital OSF/1 and HP-UX.
6085ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6086ac_file=1 # Number of current file.
6087ac_beg=1 # First line for current file.
6088ac_end=$ac_max_sed_cmds # Line after last line for current file.
6089ac_more_lines=:
6090ac_sed_cmds=""
6091while $ac_more_lines; do
6092  if test $ac_beg -gt 1; then
6093    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6094  else
6095    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6096  fi
6097  if test ! -s conftest.s$ac_file; then
6098    ac_more_lines=false
6099    rm -f conftest.s$ac_file
6100  else
6101    if test -z "$ac_sed_cmds"; then
6102      ac_sed_cmds="sed -f conftest.s$ac_file"
6103    else
6104      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6105    fi
6106    ac_file=`expr $ac_file + 1`
6107    ac_beg=$ac_end
6108    ac_end=`expr $ac_end + $ac_max_sed_cmds`
6109  fi
6110done
6111if test -z "$ac_sed_cmds"; then
6112  ac_sed_cmds=cat
6113fi
6114EOF
6115
6116cat >> $CONFIG_STATUS <<EOF
6117
6118CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
6119EOF
6120cat >> $CONFIG_STATUS <<\EOF
6121for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6122  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6123  case "$ac_file" in
6124  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6125       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6126  *) ac_file_in="${ac_file}.in" ;;
6127  esac
6128
6129  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6130
6131  # Remove last slash and all that follows it.  Not all systems have dirname.
6132  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6133  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6134    # The file is in a subdirectory.
6135    test ! -d "$ac_dir" && mkdir "$ac_dir"
6136    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6137    # A "../" for each directory in $ac_dir_suffix.
6138    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6139  else
6140    ac_dir_suffix= ac_dots=
6141  fi
6142
6143  case "$ac_given_srcdir" in
6144  .)  srcdir=.
6145      if test -z "$ac_dots"; then top_srcdir=.
6146      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6147  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6148  *) # Relative path.
6149    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6150    top_srcdir="$ac_dots$ac_given_srcdir" ;;
6151  esac
6152
6153  case "$ac_given_INSTALL" in
6154  [/$]*) INSTALL="$ac_given_INSTALL" ;;
6155  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6156  esac
6157
6158  echo creating "$ac_file"
6159  rm -f "$ac_file"
6160  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6161  case "$ac_file" in
6162  *Makefile*) ac_comsub="1i\\
6163# $configure_input" ;;
6164  *) ac_comsub= ;;
6165  esac
6166
6167  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6168  sed -e "$ac_comsub
6169s%@configure_input@%$configure_input%g
6170s%@srcdir@%$srcdir%g
6171s%@top_srcdir@%$top_srcdir%g
6172s%@INSTALL@%$INSTALL%g
6173" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6174fi; done
6175rm -f conftest.s*
6176
6177# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6178# NAME is the cpp macro being defined and VALUE is the value it is being given.
6179#
6180# ac_d sets the value in "#define NAME VALUE" lines.
6181ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6182ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6183ac_dC='\3'
6184ac_dD='%g'
6185# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6186ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6187ac_uB='\([      ]\)%\1#\2define\3'
6188ac_uC=' '
6189ac_uD='\4%g'
6190# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6191ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6192ac_eB='$%\1#\2define\3'
6193ac_eC=' '
6194ac_eD='%g'
6195
6196if test "${CONFIG_HEADERS+set}" != set; then
6197EOF
6198cat >> $CONFIG_STATUS <<EOF
6199  CONFIG_HEADERS="mod2.h"
6200EOF
6201cat >> $CONFIG_STATUS <<\EOF
6202fi
6203for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6204  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6205  case "$ac_file" in
6206  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6207       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6208  *) ac_file_in="${ac_file}.in" ;;
6209  esac
6210
6211  echo creating $ac_file
6212
6213  rm -f conftest.frag conftest.in conftest.out
6214  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6215  cat $ac_file_inputs > conftest.in
6216
6217EOF
6218
6219# Transform confdefs.h into a sed script conftest.vals that substitutes
6220# the proper values into config.h.in to produce config.h.  And first:
6221# Protect against being on the right side of a sed subst in config.status.
6222# Protect against being in an unquoted here document in config.status.
6223rm -f conftest.vals
6224cat > conftest.hdr <<\EOF
6225s/[\\&%]/\\&/g
6226s%[\\$`]%\\&%g
6227s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6228s%ac_d%ac_u%gp
6229s%ac_u%ac_e%gp
6230EOF
6231sed -n -f conftest.hdr confdefs.h > conftest.vals
6232rm -f conftest.hdr
6233
6234# This sed command replaces #undef with comments.  This is necessary, for
6235# example, in the case of _POSIX_SOURCE, which is predefined and required
6236# on some systems where configure will not decide to define it.
6237cat >> conftest.vals <<\EOF
6238s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6239EOF
6240
6241# Break up conftest.vals because some shells have a limit on
6242# the size of here documents, and old seds have small limits too.
6243
6244rm -f conftest.tail
6245while :
6246do
6247  ac_lines=`grep -c . conftest.vals`
6248  # grep -c gives empty output for an empty file on some AIX systems.
6249  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6250  # Write a limited-size here document to conftest.frag.
6251  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6252  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6253  echo 'CEOF
6254  sed -f conftest.frag conftest.in > conftest.out
6255  rm -f conftest.in
6256  mv conftest.out conftest.in
6257' >> $CONFIG_STATUS
6258  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6259  rm -f conftest.vals
6260  mv conftest.tail conftest.vals
6261done
6262rm -f conftest.vals
6263
6264cat >> $CONFIG_STATUS <<\EOF
6265  rm -f conftest.frag conftest.h
6266  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6267  cat conftest.in >> conftest.h
6268  rm -f conftest.in
6269  if cmp -s $ac_file conftest.h 2>/dev/null; then
6270    echo "$ac_file is unchanged"
6271    rm -f conftest.h
6272  else
6273    # Remove last slash and all that follows it.  Not all systems have dirname.
6274      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6275      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6276      # The file is in a subdirectory.
6277      test ! -d "$ac_dir" && mkdir "$ac_dir"
6278    fi
6279    rm -f $ac_file
6280    mv conftest.h $ac_file
6281  fi
6282fi; done
6283
6284EOF
6285cat >> $CONFIG_STATUS <<EOF
6286
6287EOF
6288cat >> $CONFIG_STATUS <<\EOF
6289\
6290 cp mod2.h ../kernel/mod2.h; \
6291 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
6292exit 0
6293EOF
6294chmod +x $CONFIG_STATUS
6295rm -fr confdefs* $ac_clean_files
6296test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6297
Note: See TracBrowser for help on using the repository browser.