source: git/Singular/configure.SAVE @ 151a06

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