source: git/Singular/configure @ a2dde00

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