source: git/Singular/configure @ 76b37c

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