source: git/Singular/configure @ 9e9dbc

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