source: git/Singular/configure @ 1bc850

spielwiese
Last change on this file since 1bc850 was 1bc850, checked in by Hans Schönemann <hannes@…>, 14 years ago
*hannes: arithmetic shifts git-svn-id: file:///usr/local/Singular/svn/trunk@11960 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 160.1 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
3674#AC_MSG_CHECKING(whether your machine has correct arithmetic shifts)
3675#AC_CACHE_VAL(ac_cv_shift, AC_TRY_RUN(
3676#  [ int main() { if (-2 >> 1 == -1) return(0); else return(1); } ],
3677#   ac_cv_shift=yes,
3678#   ac_cv_shift=no,
3679#   if test "$ac_c_cross_dos" = yes; then
3680#     ac_cv_shift=yes;
3681#   else
3682#     AC_MSG_RESULT(no)
3683#     AC_MSG_ERROR(cross compilation without default value)
3684#   fi))
3685#
3686#if test "$ac_cv_shift" = yes; then
3687#  AC_MSG_RESULT(yes)
3688#else
3689#  AC_MSG_RESULT(no)
3690#  AC_MSG_ERROR(need  -2 >> 1 == -1)
3691#fi
3692
3693
3694# check for a peculiar constructor initialization
3695echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
3696echo "configure:3697: checking whether explicit C++ constructor calls are allowed" >&5
3697
3698ac_ext=C
3699# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3700ac_cpp='$CXXCPP $CPPFLAGS'
3701ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3702ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3703cross_compiling=$ac_cv_prog_cxx_cross
3704
3705if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then
3706  echo $ac_n "(cached) $ac_c" 1>&6
3707else
3708  cat > conftest.$ac_ext <<EOF
3709#line 3710 "configure"
3710#include "confdefs.h"
3711
3712int main() {
3713class testclass
3714  {
3715  public:
3716    int value;
3717    testclass() : value(0) {}
3718    testclass( int i ) : value(i) {}
3719    ~testclass() { value = 0; }
3720  };
3721
3722  testclass ptr;
3723  ptr.testclass(1);
3724
3725; return 0; }
3726EOF
3727if { (eval echo configure:3728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3728  rm -rf conftest*
3729  ac_cv_explicit_const=yes
3730else
3731  echo "configure: failed program was:" >&5
3732  cat conftest.$ac_ext >&5
3733  rm -rf conftest*
3734  ac_cv_explicit_const=no
3735fi
3736rm -f conftest*
3737fi
3738
3739ac_ext=c
3740# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3741ac_cpp='$CPP $CPPFLAGS'
3742ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3743ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3744cross_compiling=$ac_cv_prog_cc_cross
3745
3746echo "$ac_t""$ac_cv_explicit_const" 1>&6
3747if test "$ac_cv_explicit_const" = yes; then
3748  cat >> confdefs.h <<\EOF
3749#define HAVE_EXPLICIT_CONSTR 1
3750EOF
3751
3752fi
3753
3754# sprintf returns number of printed chars
3755echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3756echo "configure:3757: checking whether vsprintf returns number of printed chars" >&5
3757if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3758  echo $ac_n "(cached) $ac_c" 1>&6
3759else
3760  if test "$cross_compiling" = yes; then
3761  ac_cv_returns_n_of_chars=no
3762else
3763  cat > conftest.$ac_ext <<EOF
3764#line 3765 "configure"
3765#include "confdefs.h"
3766#include <stdio.h>
3767 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3768EOF
3769if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3770then
3771  ac_cv_returns_n_of_chars=yes
3772else
3773  echo "configure: failed program was:" >&5
3774  cat conftest.$ac_ext >&5
3775  rm -fr conftest*
3776  ac_cv_returns_n_of_chars=no
3777fi
3778rm -fr conftest*
3779fi
3780
3781fi
3782
3783if test "$ac_cv_returns_n_of_chars" = yes; then
3784  echo "$ac_t""yes" 1>&6
3785else
3786  echo "$ac_t""no" 1>&6
3787  cat >> confdefs.h <<\EOF
3788#define BSD_SPRINTF 1
3789EOF
3790
3791fi
3792
3793# determine ALIGN_8
3794echo $ac_n "checking size of char""... $ac_c" 1>&6
3795echo "configure:3796: checking size of char" >&5
3796if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3797  echo $ac_n "(cached) $ac_c" 1>&6
3798else
3799  if test "$cross_compiling" = yes; then
3800  ac_cv_sizeof_char=1
3801else
3802  cat > conftest.$ac_ext <<EOF
3803#line 3804 "configure"
3804#include "confdefs.h"
3805#include <stdio.h>
3806main()
3807{
3808  FILE *f=fopen("conftestval", "w");
3809  if (!f) exit(1);
3810  fprintf(f, "%d\n", sizeof(char));
3811  exit(0);
3812}
3813EOF
3814if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3815then
3816  ac_cv_sizeof_char=`cat conftestval`
3817else
3818  echo "configure: failed program was:" >&5
3819  cat conftest.$ac_ext >&5
3820  rm -fr conftest*
3821  ac_cv_sizeof_char=0
3822fi
3823rm -fr conftest*
3824fi
3825
3826fi
3827echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3828cat >> confdefs.h <<EOF
3829#define SIZEOF_CHAR $ac_cv_sizeof_char
3830EOF
3831
3832
3833echo $ac_n "checking size of short""... $ac_c" 1>&6
3834echo "configure:3835: checking size of short" >&5
3835if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3836  echo $ac_n "(cached) $ac_c" 1>&6
3837else
3838  if test "$cross_compiling" = yes; then
3839  ac_cv_sizeof_short=2
3840else
3841  cat > conftest.$ac_ext <<EOF
3842#line 3843 "configure"
3843#include "confdefs.h"
3844#include <stdio.h>
3845main()
3846{
3847  FILE *f=fopen("conftestval", "w");
3848  if (!f) exit(1);
3849  fprintf(f, "%d\n", sizeof(short));
3850  exit(0);
3851}
3852EOF
3853if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3854then
3855  ac_cv_sizeof_short=`cat conftestval`
3856else
3857  echo "configure: failed program was:" >&5
3858  cat conftest.$ac_ext >&5
3859  rm -fr conftest*
3860  ac_cv_sizeof_short=0
3861fi
3862rm -fr conftest*
3863fi
3864
3865fi
3866echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3867cat >> confdefs.h <<EOF
3868#define SIZEOF_SHORT $ac_cv_sizeof_short
3869EOF
3870
3871
3872echo $ac_n "checking size of int""... $ac_c" 1>&6
3873echo "configure:3874: checking size of int" >&5
3874if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3875  echo $ac_n "(cached) $ac_c" 1>&6
3876else
3877  if test "$cross_compiling" = yes; then
3878  ac_cv_sizeof_int=4
3879else
3880  cat > conftest.$ac_ext <<EOF
3881#line 3882 "configure"
3882#include "confdefs.h"
3883#include <stdio.h>
3884main()
3885{
3886  FILE *f=fopen("conftestval", "w");
3887  if (!f) exit(1);
3888  fprintf(f, "%d\n", sizeof(int));
3889  exit(0);
3890}
3891EOF
3892if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3893then
3894  ac_cv_sizeof_int=`cat conftestval`
3895else
3896  echo "configure: failed program was:" >&5
3897  cat conftest.$ac_ext >&5
3898  rm -fr conftest*
3899  ac_cv_sizeof_int=0
3900fi
3901rm -fr conftest*
3902fi
3903
3904fi
3905echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3906cat >> confdefs.h <<EOF
3907#define SIZEOF_INT $ac_cv_sizeof_int
3908EOF
3909
3910
3911echo $ac_n "checking size of long""... $ac_c" 1>&6
3912echo "configure:3913: checking size of long" >&5
3913if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3914  echo $ac_n "(cached) $ac_c" 1>&6
3915else
3916  if test "$cross_compiling" = yes; then
3917  ac_cv_sizeof_long=4
3918else
3919  cat > conftest.$ac_ext <<EOF
3920#line 3921 "configure"
3921#include "confdefs.h"
3922#include <stdio.h>
3923main()
3924{
3925  FILE *f=fopen("conftestval", "w");
3926  if (!f) exit(1);
3927  fprintf(f, "%d\n", sizeof(long));
3928  exit(0);
3929}
3930EOF
3931if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3932then
3933  ac_cv_sizeof_long=`cat conftestval`
3934else
3935  echo "configure: failed program was:" >&5
3936  cat conftest.$ac_ext >&5
3937  rm -fr conftest*
3938  ac_cv_sizeof_long=0
3939fi
3940rm -fr conftest*
3941fi
3942
3943fi
3944echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3945cat >> confdefs.h <<EOF
3946#define SIZEOF_LONG $ac_cv_sizeof_long
3947EOF
3948
3949
3950echo $ac_n "checking size of void*""... $ac_c" 1>&6
3951echo "configure:3952: checking size of void*" >&5
3952if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3953  echo $ac_n "(cached) $ac_c" 1>&6
3954else
3955  if test "$cross_compiling" = yes; then
3956  ac_cv_sizeof_voidp=4
3957else
3958  cat > conftest.$ac_ext <<EOF
3959#line 3960 "configure"
3960#include "confdefs.h"
3961#include <stdio.h>
3962main()
3963{
3964  FILE *f=fopen("conftestval", "w");
3965  if (!f) exit(1);
3966  fprintf(f, "%d\n", sizeof(void*));
3967  exit(0);
3968}
3969EOF
3970if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3971then
3972  ac_cv_sizeof_voidp=`cat conftestval`
3973else
3974  echo "configure: failed program was:" >&5
3975  cat conftest.$ac_ext >&5
3976  rm -fr conftest*
3977  ac_cv_sizeof_voidp=0
3978fi
3979rm -fr conftest*
3980fi
3981
3982fi
3983echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3984cat >> confdefs.h <<EOF
3985#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3986EOF
3987
3988
3989echo $ac_n "checking size of double""... $ac_c" 1>&6
3990echo "configure:3991: checking size of double" >&5
3991if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3992  echo $ac_n "(cached) $ac_c" 1>&6
3993else
3994  if test "$cross_compiling" = yes; then
3995  ac_cv_sizeof_double=8
3996else
3997  cat > conftest.$ac_ext <<EOF
3998#line 3999 "configure"
3999#include "confdefs.h"
4000#include <stdio.h>
4001main()
4002{
4003  FILE *f=fopen("conftestval", "w");
4004  if (!f) exit(1);
4005  fprintf(f, "%d\n", sizeof(double));
4006  exit(0);
4007}
4008EOF
4009if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4010then
4011  ac_cv_sizeof_double=`cat conftestval`
4012else
4013  echo "configure: failed program was:" >&5
4014  cat conftest.$ac_ext >&5
4015  rm -fr conftest*
4016  ac_cv_sizeof_double=0
4017fi
4018rm -fr conftest*
4019fi
4020
4021fi
4022echo "$ac_t""$ac_cv_sizeof_double" 1>&6
4023cat >> confdefs.h <<EOF
4024#define SIZEOF_DOUBLE $ac_cv_sizeof_double
4025EOF
4026
4027
4028echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4029echo "configure:4030: checking whether byte ordering is bigendian" >&5
4030if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4031  echo $ac_n "(cached) $ac_c" 1>&6
4032else
4033  ac_cv_c_bigendian=unknown
4034# See if sys/param.h defines the BYTE_ORDER macro.
4035cat > conftest.$ac_ext <<EOF
4036#line 4037 "configure"
4037#include "confdefs.h"
4038#include <sys/types.h>
4039#include <sys/param.h>
4040int main() {
4041
4042#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4043 bogus endian macros
4044#endif
4045; return 0; }
4046EOF
4047if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4048  rm -rf conftest*
4049  # It does; now see whether it defined to BIG_ENDIAN or not.
4050cat > conftest.$ac_ext <<EOF
4051#line 4052 "configure"
4052#include "confdefs.h"
4053#include <sys/types.h>
4054#include <sys/param.h>
4055int main() {
4056
4057#if BYTE_ORDER != BIG_ENDIAN
4058 not big endian
4059#endif
4060; return 0; }
4061EOF
4062if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4063  rm -rf conftest*
4064  ac_cv_c_bigendian=yes
4065else
4066  echo "configure: failed program was:" >&5
4067  cat conftest.$ac_ext >&5
4068  rm -rf conftest*
4069  ac_cv_c_bigendian=no
4070fi
4071rm -f conftest*
4072else
4073  echo "configure: failed program was:" >&5
4074  cat conftest.$ac_ext >&5
4075fi
4076rm -f conftest*
4077if test $ac_cv_c_bigendian = unknown; then
4078if test "$cross_compiling" = yes; then
4079    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4080else
4081  cat > conftest.$ac_ext <<EOF
4082#line 4083 "configure"
4083#include "confdefs.h"
4084main () {
4085  /* Are we little or big endian?  From Harbison&Steele.  */
4086  union
4087  {
4088    long l;
4089    char c[sizeof (long)];
4090  } u;
4091  u.l = 1;
4092  exit (u.c[sizeof (long) - 1] == 1);
4093}
4094EOF
4095if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4096then
4097  ac_cv_c_bigendian=no
4098else
4099  echo "configure: failed program was:" >&5
4100  cat conftest.$ac_ext >&5
4101  rm -fr conftest*
4102  ac_cv_c_bigendian=yes
4103fi
4104rm -fr conftest*
4105fi
4106
4107fi
4108fi
4109
4110echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4111if test $ac_cv_c_bigendian = yes; then
4112  cat >> confdefs.h <<\EOF
4113#define WORDS_BIGENDIAN 1
4114EOF
4115
4116fi
4117
4118if test "$ac_cv_sizeof_int" != 4; then
4119  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
4120fi
4121if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
4122  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
4123fi
4124if test "$ac_cv_sizeof_double" != 8; then
4125  { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; }
4126fi
4127if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
4128  { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; }
4129fi
4130if test "$ac_cv_sizeof_voidp" != 4; then
4131  DEFS="-UOM_NDEBUG"
4132 
4133fi
4134
4135# Check whether --with-rootdir or --without-rootdir was given.
4136if test "${with_rootdir+set}" = set; then
4137  withval="$with_rootdir"
4138  :
4139fi
4140
4141# Check whether --with-lex or --without-lex was given.
4142if test "${with_lex+set}" = set; then
4143  withval="$with_lex"
4144  :
4145fi
4146
4147# Check whether --with-readline or --without-readline was given.
4148if test "${with_readline+set}" = set; then
4149  withval="$with_readline"
4150  :
4151fi
4152
4153# Check whether --with-Boost or --without-Boost was given.
4154if test "${with_Boost+set}" = set; then
4155  withval="$with_Boost"
4156  :
4157fi
4158
4159# Check whether --with-stdvec or --without-stdvec was given.
4160if test "${with_stdvec+set}" = set; then
4161  withval="$with_stdvec"
4162  :
4163fi
4164
4165# Check whether --with-MP or --without-MP was given.
4166if test "${with_MP+set}" = set; then
4167  withval="$with_MP"
4168  :
4169fi
4170
4171# Check whether --with-dbm or --without-dbm was given.
4172if test "${with_dbm+set}" = set; then
4173  withval="$with_dbm"
4174  :
4175fi
4176
4177# Check whether --with-factory or --without-factory was given.
4178if test "${with_factory+set}" = set; then
4179  withval="$with_factory"
4180  :
4181fi
4182
4183# Check whether --with-libfac or --without-libfac was given.
4184if test "${with_libfac+set}" = set; then
4185  withval="$with_libfac"
4186  :
4187fi
4188
4189# Check whether --with-namespaces or --without-namespaces was given.
4190if test "${with_namespaces+set}" = set; then
4191  withval="$with_namespaces"
4192  :
4193fi
4194
4195# Check whether --with-dl or --without-dl was given.
4196if test "${with_dl+set}" = set; then
4197  withval="$with_dl"
4198  :
4199fi
4200
4201# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
4202if test "${with_dynamic_modules+set}" = set; then
4203  withval="$with_dynamic_modules"
4204  :
4205fi
4206
4207# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
4208if test "${with_dynamic_kernel+set}" = set; then
4209  withval="$with_dynamic_kernel"
4210  :
4211fi
4212
4213# Check whether --with-apint or --without-apint was given.
4214if test "${with_apint+set}" = set; then
4215  withval="$with_apint"
4216  :
4217fi
4218
4219# Check whether --with-svd or --without-svd was given.
4220if test "${with_svd+set}" = set; then
4221  withval="$with_svd"
4222  :
4223fi
4224
4225# Check whether --with-Plural or --without-Plural was given.
4226if test "${with_Plural+set}" = set; then
4227  withval="$with_Plural"
4228  :
4229fi
4230
4231# Check whether --with-NTL or --without-NTL was given.
4232if test "${with_NTL+set}" = set; then
4233  withval="$with_NTL"
4234  :
4235else
4236  with_NTL=yes
4237fi
4238
4239# Check whether --with-RatGB or --without-RatGB was given.
4240if test "${with_RatGB+set}" = set; then
4241  withval="$with_RatGB"
4242  :
4243fi
4244
4245
4246
4247
4248echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
4249echo "configure:4250: checking whether to use dynamic linking" >&5
4250if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
4251  cat >> confdefs.h <<\EOF
4252#define HAVE_DL 1
4253EOF
4254
4255  ac_have_dl=yes
4256  echo "$ac_t""yes" 1>&6
4257else
4258  echo "$ac_t""no" 1>&6
4259fi
4260
4261echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
4262echo "configure:4263: checking for tgetent in -lncurses" >&5
4263ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
4264if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4265  echo $ac_n "(cached) $ac_c" 1>&6
4266else
4267  ac_save_LIBS="$LIBS"
4268LIBS="-lncurses  $LIBS"
4269cat > conftest.$ac_ext <<EOF
4270#line 4271 "configure"
4271#include "confdefs.h"
4272/* Override any gcc2 internal prototype to avoid an error.  */
4273/* We use char because int might match the return type of a gcc2
4274    builtin and then its argument prototype would still apply.  */
4275char tgetent();
4276
4277int main() {
4278tgetent()
4279; return 0; }
4280EOF
4281if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4282  rm -rf conftest*
4283  eval "ac_cv_lib_$ac_lib_var=yes"
4284else
4285  echo "configure: failed program was:" >&5
4286  cat conftest.$ac_ext >&5
4287  rm -rf conftest*
4288  eval "ac_cv_lib_$ac_lib_var=no"
4289fi
4290rm -f conftest*
4291LIBS="$ac_save_LIBS"
4292
4293fi
4294if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4295  echo "$ac_t""yes" 1>&6
4296    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4297    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4298  cat >> confdefs.h <<EOF
4299#define $ac_tr_lib 1
4300EOF
4301
4302  LIBS="-lncurses $LIBS"
4303
4304else
4305  echo "$ac_t""no" 1>&6
4306\
4307 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
4308echo "configure:4309: checking for tgetent in -lcurses" >&5
4309ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
4310if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4311  echo $ac_n "(cached) $ac_c" 1>&6
4312else
4313  ac_save_LIBS="$LIBS"
4314LIBS="-lcurses  $LIBS"
4315cat > conftest.$ac_ext <<EOF
4316#line 4317 "configure"
4317#include "confdefs.h"
4318/* Override any gcc2 internal prototype to avoid an error.  */
4319/* We use char because int might match the return type of a gcc2
4320    builtin and then its argument prototype would still apply.  */
4321char tgetent();
4322
4323int main() {
4324tgetent()
4325; return 0; }
4326EOF
4327if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4328  rm -rf conftest*
4329  eval "ac_cv_lib_$ac_lib_var=yes"
4330else
4331  echo "configure: failed program was:" >&5
4332  cat conftest.$ac_ext >&5
4333  rm -rf conftest*
4334  eval "ac_cv_lib_$ac_lib_var=no"
4335fi
4336rm -f conftest*
4337LIBS="$ac_save_LIBS"
4338
4339fi
4340if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4341  echo "$ac_t""yes" 1>&6
4342    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
4343    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4344  cat >> confdefs.h <<EOF
4345#define $ac_tr_lib 1
4346EOF
4347
4348  LIBS="-lcurses $LIBS"
4349
4350else
4351  echo "$ac_t""no" 1>&6
4352\
4353  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
4354echo "configure:4355: checking for tgetent in -ltermcap" >&5
4355ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
4356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4357  echo $ac_n "(cached) $ac_c" 1>&6
4358else
4359  ac_save_LIBS="$LIBS"
4360LIBS="-ltermcap  $LIBS"
4361cat > conftest.$ac_ext <<EOF
4362#line 4363 "configure"
4363#include "confdefs.h"
4364/* Override any gcc2 internal prototype to avoid an error.  */
4365/* We use char because int might match the return type of a gcc2
4366    builtin and then its argument prototype would still apply.  */
4367char tgetent();
4368
4369int main() {
4370tgetent()
4371; return 0; }
4372EOF
4373if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4374  rm -rf conftest*
4375  eval "ac_cv_lib_$ac_lib_var=yes"
4376else
4377  echo "configure: failed program was:" >&5
4378  cat conftest.$ac_ext >&5
4379  rm -rf conftest*
4380  eval "ac_cv_lib_$ac_lib_var=no"
4381fi
4382rm -f conftest*
4383LIBS="$ac_save_LIBS"
4384
4385fi
4386if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4387  echo "$ac_t""yes" 1>&6
4388    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
4389    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4390  cat >> confdefs.h <<EOF
4391#define $ac_tr_lib 1
4392EOF
4393
4394  LIBS="-ltermcap $LIBS"
4395
4396else
4397  echo "$ac_t""no" 1>&6
4398fi
4399
4400fi
4401
4402fi
4403
4404
4405# readline
4406if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
4407  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
4408  with_readline=static
4409fi
4410
4411
4412if test "$with_readline" != dynamic && test "$with_readline" != no; then
4413
4414ac_ext=C
4415# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4416ac_cpp='$CXXCPP $CPPFLAGS'
4417ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4418ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4419cross_compiling=$ac_cv_prog_cxx_cross
4420
4421   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
4422echo "configure:4423: checking for rl_abort in -lreadline" >&5
4423ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
4424if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4425  echo $ac_n "(cached) $ac_c" 1>&6
4426else
4427  ac_save_LIBS="$LIBS"
4428LIBS="-lreadline  $LIBS"
4429cat > conftest.$ac_ext <<EOF
4430#line 4431 "configure"
4431#include "confdefs.h"
4432/* Override any gcc2 internal prototype to avoid an error.  */
4433#ifdef __cplusplus
4434extern "C"
4435#endif
4436/* We use char because int might match the return type of a gcc2
4437    builtin and then its argument prototype would still apply.  */
4438char rl_abort();
4439
4440int main() {
4441rl_abort()
4442; return 0; }
4443EOF
4444if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4445  rm -rf conftest*
4446  eval "ac_cv_lib_$ac_lib_var=yes"
4447else
4448  echo "configure: failed program was:" >&5
4449  cat conftest.$ac_ext >&5
4450  rm -rf conftest*
4451  eval "ac_cv_lib_$ac_lib_var=no"
4452fi
4453rm -f conftest*
4454LIBS="$ac_save_LIBS"
4455
4456fi
4457if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4458  echo "$ac_t""yes" 1>&6
4459    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4460    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4461  cat >> confdefs.h <<EOF
4462#define $ac_tr_lib 1
4463EOF
4464
4465  LIBS="-lreadline $LIBS"
4466
4467else
4468  echo "$ac_t""no" 1>&6
4469fi
4470
4471   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
4472echo "configure:4473: checking how to run the C++ preprocessor" >&5
4473if test -z "$CXXCPP"; then
4474if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
4475  echo $ac_n "(cached) $ac_c" 1>&6
4476else
4477  ac_ext=C
4478# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4479ac_cpp='$CXXCPP $CPPFLAGS'
4480ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4481ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4482cross_compiling=$ac_cv_prog_cxx_cross
4483  CXXCPP="${CXX-g++} -E"
4484  cat > conftest.$ac_ext <<EOF
4485#line 4486 "configure"
4486#include "confdefs.h"
4487#include <stdlib.h>
4488EOF
4489ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4490{ (eval echo configure:4491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4491ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4492if test -z "$ac_err"; then
4493  :
4494else
4495  echo "$ac_err" >&5
4496  echo "configure: failed program was:" >&5
4497  cat conftest.$ac_ext >&5
4498  rm -rf conftest*
4499  CXXCPP=/lib/cpp
4500fi
4501rm -f conftest*
4502  ac_cv_prog_CXXCPP="$CXXCPP"
4503ac_ext=C
4504# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4505ac_cpp='$CXXCPP $CPPFLAGS'
4506ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4507ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4508cross_compiling=$ac_cv_prog_cxx_cross
4509fi
4510fi
4511CXXCPP="$ac_cv_prog_CXXCPP"
4512echo "$ac_t""$CXXCPP" 1>&6
4513
4514for ac_hdr in readline/readline.h readline/history.h
4515do
4516ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4517echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4518echo "configure:4519: checking for $ac_hdr" >&5
4519if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4520  echo $ac_n "(cached) $ac_c" 1>&6
4521else
4522  cat > conftest.$ac_ext <<EOF
4523#line 4524 "configure"
4524#include "confdefs.h"
4525#include <$ac_hdr>
4526EOF
4527ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4528{ (eval echo configure:4529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4529ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4530if test -z "$ac_err"; then
4531  rm -rf conftest*
4532  eval "ac_cv_header_$ac_safe=yes"
4533else
4534  echo "$ac_err" >&5
4535  echo "configure: failed program was:" >&5
4536  cat conftest.$ac_ext >&5
4537  rm -rf conftest*
4538  eval "ac_cv_header_$ac_safe=no"
4539fi
4540rm -f conftest*
4541fi
4542if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4543  echo "$ac_t""yes" 1>&6
4544    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4545  cat >> confdefs.h <<EOF
4546#define $ac_tr_hdr 1
4547EOF
4548 
4549else
4550  echo "$ac_t""no" 1>&6
4551fi
4552done
4553
4554   if test "$ac_cv_lib_readline_rl_abort" = yes && \
4555      test "$ac_cv_header_readline_readline_h" = yes; then
4556     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
4557echo "configure:4558: checking whether readline.h is ok" >&5
4558     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
4559  echo $ac_n "(cached) $ac_c" 1>&6
4560else
4561  cat > conftest.$ac_ext <<EOF
4562#line 4563 "configure"
4563#include "confdefs.h"
4564#include<unistd.h>
4565#include<stdio.h>
4566#include<readline/readline.h>
4567#ifdef HAVE_READLINE_HISTORY_H
4568#include<readline/history.h>
4569#endif
4570
4571int main() {
4572
4573; return 0; }
4574EOF
4575if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4576  rm -rf conftest*
4577  ac_cv_header_readline_readline_h_ok="yes"
4578else
4579  echo "configure: failed program was:" >&5
4580  cat conftest.$ac_ext >&5
4581  rm -rf conftest*
4582  ac_cv_header_readline_readline_h_ok="no"
4583fi
4584rm -f conftest*
4585fi
4586
4587    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
4588    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
4589#not ok -- try once more with explicitly declaring everything
4590      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
4591echo "configure:4592: checking whether or not we nevertheless can use readline" >&5
4592      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
4593  echo $ac_n "(cached) $ac_c" 1>&6
4594else
4595  cat > conftest.$ac_ext <<EOF
4596#line 4597 "configure"
4597#include "confdefs.h"
4598#include <stdio.h>
4599extern "C"
4600{
4601extern char * rl_readline_name;
4602extern char *rl_line_buffer;
4603char *filename_completion_function();
4604typedef char **CPPFunction ();
4605extern char ** completion_matches ();
4606extern CPPFunction * rl_attempted_completion_function;
4607extern FILE * rl_outstream;
4608char * readline ();
4609void add_history ();
4610int write_history ();
4611int read_history();
4612}
4613#ifndef NULL
4614#define NULL 0
4615#endif
4616
4617int main() {
4618rl_readline_name=NULL;
4619*rl_line_buffer=1;
4620completion_matches(NULL, filename_completion_function);
4621rl_attempted_completion_function = (CPPFunction *) NULL;
4622rl_outstream=NULL;
4623readline(NULL);
4624add_history(NULL);
4625read_history(NULL);
4626write_history(NULL);
4627
4628; return 0; }
4629EOF
4630if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4631  rm -rf conftest*
4632  ac_cv_have_readline="yes"
4633
4634else
4635  echo "configure: failed program was:" >&5
4636  cat conftest.$ac_ext >&5
4637  rm -rf conftest*
4638  ac_cv_have_readline="no"
4639
4640fi
4641rm -f conftest*
4642fi
4643
4644      echo "$ac_t""$ac_cv_have_readline" 1>&6
4645    else
4646      cat >> confdefs.h <<\EOF
4647#define READLINE_READLINE_H_OK 1
4648EOF
4649
4650      ac_cv_have_readline="yes"
4651    fi
4652  fi
4653  if test "$ac_cv_have_readline" = yes; then
4654    cat >> confdefs.h <<\EOF
4655#define HAVE_READLINE 1
4656EOF
4657
4658  fi
4659ac_ext=c
4660# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4661ac_cpp='$CPP $CPPFLAGS'
4662ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4663ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4664cross_compiling=$ac_cv_prog_cc_cross
4665
4666fi
4667
4668echo $ac_n "checking which readline to use""... $ac_c" 1>&6
4669echo "configure:4670: checking which readline to use" >&5
4670if test "$ac_cv_with_readline" = dynamic; then
4671  echo "$ac_t""dynamic" 1>&6
4672  cat >> confdefs.h <<\EOF
4673#define HAVE_DYN_RL 1
4674EOF
4675
4676elif test "$ac_cv_have_readline" = yes; then
4677  echo "$ac_t""static" 1>&6
4678elif test "$ac_cv_singuname" = PowerMacintosh-darwin; then
4679  { echo "configure: error: building without readline impossible on PowerMacintosh-darwin" 1>&2; exit 1; }
4680else
4681  echo "$ac_t""none" 1>&6
4682  echo "configure: warning: building without readline: disabling fancy display" 1>&2
4683fi
4684
4685NEED_LIBS=$LIBS
4686
4687# gmp, MP, MPT, factory, libfac
4688echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
4689echo "configure:4690: checking for main in -lgmp" >&5
4690ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
4691if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4692  echo $ac_n "(cached) $ac_c" 1>&6
4693else
4694  ac_save_LIBS="$LIBS"
4695LIBS="-lgmp  $LIBS"
4696cat > conftest.$ac_ext <<EOF
4697#line 4698 "configure"
4698#include "confdefs.h"
4699
4700int main() {
4701main()
4702; return 0; }
4703EOF
4704if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4705  rm -rf conftest*
4706  eval "ac_cv_lib_$ac_lib_var=yes"
4707else
4708  echo "configure: failed program was:" >&5
4709  cat conftest.$ac_ext >&5
4710  rm -rf conftest*
4711  eval "ac_cv_lib_$ac_lib_var=no"
4712fi
4713rm -f conftest*
4714LIBS="$ac_save_LIBS"
4715
4716fi
4717if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4718  echo "$ac_t""yes" 1>&6
4719    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4720    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4721  cat >> confdefs.h <<EOF
4722#define $ac_tr_lib 1
4723EOF
4724
4725  LIBS="-lgmp $LIBS"
4726
4727else
4728  echo "$ac_t""no" 1>&6
4729fi
4730
4731SAVE_LIBS=$LIBS
4732echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4733echo "configure:4734: checking for IMP_PutGmpInt in -lMP" >&5
4734ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4735if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4736  echo $ac_n "(cached) $ac_c" 1>&6
4737else
4738  ac_save_LIBS="$LIBS"
4739LIBS="-lMP $MP_LIBS $LIBS"
4740cat > conftest.$ac_ext <<EOF
4741#line 4742 "configure"
4742#include "confdefs.h"
4743/* Override any gcc2 internal prototype to avoid an error.  */
4744/* We use char because int might match the return type of a gcc2
4745    builtin and then its argument prototype would still apply.  */
4746char IMP_PutGmpInt();
4747
4748int main() {
4749IMP_PutGmpInt()
4750; return 0; }
4751EOF
4752if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753  rm -rf conftest*
4754  eval "ac_cv_lib_$ac_lib_var=yes"
4755else
4756  echo "configure: failed program was:" >&5
4757  cat conftest.$ac_ext >&5
4758  rm -rf conftest*
4759  eval "ac_cv_lib_$ac_lib_var=no"
4760fi
4761rm -f conftest*
4762LIBS="$ac_save_LIBS"
4763
4764fi
4765if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4766  echo "$ac_t""yes" 1>&6
4767    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4768    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4769  cat >> confdefs.h <<EOF
4770#define $ac_tr_lib 1
4771EOF
4772
4773  LIBS="-lMP $LIBS"
4774
4775else
4776  echo "$ac_t""no" 1>&6
4777fi
4778
4779echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4780echo "configure:4781: checking for MPT_GetTree in -lMPT" >&5
4781ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4782if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4783  echo $ac_n "(cached) $ac_c" 1>&6
4784else
4785  ac_save_LIBS="$LIBS"
4786LIBS="-lMPT $MP_LIBS $LIBS"
4787cat > conftest.$ac_ext <<EOF
4788#line 4789 "configure"
4789#include "confdefs.h"
4790/* Override any gcc2 internal prototype to avoid an error.  */
4791/* We use char because int might match the return type of a gcc2
4792    builtin and then its argument prototype would still apply.  */
4793char MPT_GetTree();
4794
4795int main() {
4796MPT_GetTree()
4797; return 0; }
4798EOF
4799if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4800  rm -rf conftest*
4801  eval "ac_cv_lib_$ac_lib_var=yes"
4802else
4803  echo "configure: failed program was:" >&5
4804  cat conftest.$ac_ext >&5
4805  rm -rf conftest*
4806  eval "ac_cv_lib_$ac_lib_var=no"
4807fi
4808rm -f conftest*
4809LIBS="$ac_save_LIBS"
4810
4811fi
4812if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4813  echo "$ac_t""yes" 1>&6
4814    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4815    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4816  cat >> confdefs.h <<EOF
4817#define $ac_tr_lib 1
4818EOF
4819
4820  LIBS="-lMPT $LIBS"
4821
4822else
4823  echo "$ac_t""no" 1>&6
4824fi
4825
4826LIBS=$SAVE_LIBS
4827echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4828echo "configure:4829: checking for atof in -lsingcf" >&5
4829ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4830if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4831  echo $ac_n "(cached) $ac_c" 1>&6
4832else
4833  ac_save_LIBS="$LIBS"
4834LIBS="-lsingcf  $LIBS"
4835cat > conftest.$ac_ext <<EOF
4836#line 4837 "configure"
4837#include "confdefs.h"
4838/* Override any gcc2 internal prototype to avoid an error.  */
4839/* We use char because int might match the return type of a gcc2
4840    builtin and then its argument prototype would still apply.  */
4841char atof();
4842
4843int main() {
4844atof()
4845; return 0; }
4846EOF
4847if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4848  rm -rf conftest*
4849  eval "ac_cv_lib_$ac_lib_var=yes"
4850else
4851  echo "configure: failed program was:" >&5
4852  cat conftest.$ac_ext >&5
4853  rm -rf conftest*
4854  eval "ac_cv_lib_$ac_lib_var=no"
4855fi
4856rm -f conftest*
4857LIBS="$ac_save_LIBS"
4858
4859fi
4860if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4861  echo "$ac_t""yes" 1>&6
4862    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4863    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4864  cat >> confdefs.h <<EOF
4865#define $ac_tr_lib 1
4866EOF
4867
4868  LIBS="-lsingcf $LIBS"
4869
4870else
4871  echo "$ac_t""no" 1>&6
4872fi
4873
4874echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4875echo "configure:4876: checking for atof in -lsingfac" >&5
4876ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4877if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4878  echo $ac_n "(cached) $ac_c" 1>&6
4879else
4880  ac_save_LIBS="$LIBS"
4881LIBS="-lsingfac  $LIBS"
4882cat > conftest.$ac_ext <<EOF
4883#line 4884 "configure"
4884#include "confdefs.h"
4885/* Override any gcc2 internal prototype to avoid an error.  */
4886/* We use char because int might match the return type of a gcc2
4887    builtin and then its argument prototype would still apply.  */
4888char atof();
4889
4890int main() {
4891atof()
4892; return 0; }
4893EOF
4894if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4895  rm -rf conftest*
4896  eval "ac_cv_lib_$ac_lib_var=yes"
4897else
4898  echo "configure: failed program was:" >&5
4899  cat conftest.$ac_ext >&5
4900  rm -rf conftest*
4901  eval "ac_cv_lib_$ac_lib_var=no"
4902fi
4903rm -f conftest*
4904LIBS="$ac_save_LIBS"
4905
4906fi
4907if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4908  echo "$ac_t""yes" 1>&6
4909    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4910    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4911  cat >> confdefs.h <<EOF
4912#define $ac_tr_lib 1
4913EOF
4914
4915  LIBS="-lsingfac $LIBS"
4916
4917else
4918  echo "$ac_t""no" 1>&6
4919fi
4920
4921echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
4922echo "configure:4923: checking for omTestAddr in -lomalloc" >&5
4923ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
4924if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4925  echo $ac_n "(cached) $ac_c" 1>&6
4926else
4927  ac_save_LIBS="$LIBS"
4928LIBS="-lomalloc  $LIBS"
4929cat > conftest.$ac_ext <<EOF
4930#line 4931 "configure"
4931#include "confdefs.h"
4932/* Override any gcc2 internal prototype to avoid an error.  */
4933/* We use char because int might match the return type of a gcc2
4934    builtin and then its argument prototype would still apply.  */
4935char omTestAddr();
4936
4937int main() {
4938omTestAddr()
4939; return 0; }
4940EOF
4941if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942  rm -rf conftest*
4943  eval "ac_cv_lib_$ac_lib_var=yes"
4944else
4945  echo "configure: failed program was:" >&5
4946  cat conftest.$ac_ext >&5
4947  rm -rf conftest*
4948  eval "ac_cv_lib_$ac_lib_var=no"
4949fi
4950rm -f conftest*
4951LIBS="$ac_save_LIBS"
4952
4953fi
4954if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4955  echo "$ac_t""yes" 1>&6
4956    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4957    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4958  cat >> confdefs.h <<EOF
4959#define $ac_tr_lib 1
4960EOF
4961
4962  LIBS="-lomalloc $LIBS"
4963
4964else
4965  echo "$ac_t""no" 1>&6
4966fi
4967
4968echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
4969echo "configure:4970: checking for main in -lomalloc_ndebug" >&5
4970ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
4971if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4972  echo $ac_n "(cached) $ac_c" 1>&6
4973else
4974  ac_save_LIBS="$LIBS"
4975LIBS="-lomalloc_ndebug  $LIBS"
4976cat > conftest.$ac_ext <<EOF
4977#line 4978 "configure"
4978#include "confdefs.h"
4979
4980int main() {
4981main()
4982; return 0; }
4983EOF
4984if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985  rm -rf conftest*
4986  eval "ac_cv_lib_$ac_lib_var=yes"
4987else
4988  echo "configure: failed program was:" >&5
4989  cat conftest.$ac_ext >&5
4990  rm -rf conftest*
4991  eval "ac_cv_lib_$ac_lib_var=no"
4992fi
4993rm -f conftest*
4994LIBS="$ac_save_LIBS"
4995
4996fi
4997if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4998  echo "$ac_t""yes" 1>&6
4999    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5000    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5001  cat >> confdefs.h <<EOF
5002#define $ac_tr_lib 1
5003EOF
5004
5005  LIBS="-lomalloc_ndebug $LIBS"
5006
5007else
5008  echo "$ac_t""no" 1>&6
5009fi
5010
5011echo $ac_n "checking for main in -lntl""... $ac_c" 1>&6
5012echo "configure:5013: checking for main in -lntl" >&5
5013ac_lib_var=`echo ntl'_'main | sed 'y%./+-%__p_%'`
5014if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5015  echo $ac_n "(cached) $ac_c" 1>&6
5016else
5017  ac_save_LIBS="$LIBS"
5018LIBS="-lntl  $LIBS"
5019cat > conftest.$ac_ext <<EOF
5020#line 5021 "configure"
5021#include "confdefs.h"
5022
5023int main() {
5024main()
5025; return 0; }
5026EOF
5027if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5028  rm -rf conftest*
5029  eval "ac_cv_lib_$ac_lib_var=yes"
5030else
5031  echo "configure: failed program was:" >&5
5032  cat conftest.$ac_ext >&5
5033  rm -rf conftest*
5034  eval "ac_cv_lib_$ac_lib_var=no"
5035fi
5036rm -f conftest*
5037LIBS="$ac_save_LIBS"
5038
5039fi
5040if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5041  echo "$ac_t""yes" 1>&6
5042    ac_tr_lib=HAVE_LIB`echo ntl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5043    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5044  cat >> confdefs.h <<EOF
5045#define $ac_tr_lib 1
5046EOF
5047
5048  LIBS="-lntl $LIBS"
5049
5050else
5051  echo "$ac_t""no" 1>&6
5052fi
5053
5054
5055for ac_hdr in gmp.h MP.h  MPT.h factory.h factor.h omalloc.h \
5056 omalloc.c
5057do
5058ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5059echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5060echo "configure:5061: checking for $ac_hdr" >&5
5061if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5062  echo $ac_n "(cached) $ac_c" 1>&6
5063else
5064  cat > conftest.$ac_ext <<EOF
5065#line 5066 "configure"
5066#include "confdefs.h"
5067#include <$ac_hdr>
5068EOF
5069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5070{ (eval echo configure:5071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5071ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5072if test -z "$ac_err"; then
5073  rm -rf conftest*
5074  eval "ac_cv_header_$ac_safe=yes"
5075else
5076  echo "$ac_err" >&5
5077  echo "configure: failed program was:" >&5
5078  cat conftest.$ac_ext >&5
5079  rm -rf conftest*
5080  eval "ac_cv_header_$ac_safe=no"
5081fi
5082rm -f conftest*
5083fi
5084if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5085  echo "$ac_t""yes" 1>&6
5086    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5087  cat >> confdefs.h <<EOF
5088#define $ac_tr_hdr 1
5089EOF
5090 
5091else
5092  echo "$ac_t""no" 1>&6
5093fi
5094done
5095
5096
5097echo $ac_n "checking whether to use Boost""... $ac_c" 1>&6
5098echo "configure:5099: checking whether to use Boost" >&5
5099if test "$with_Boost" != no; then
5100  echo "$ac_t""yes" 1>&6
5101 
5102  ac_ext=C
5103# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5104ac_cpp='$CXXCPP $CPPFLAGS'
5105ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5106ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5107cross_compiling=$ac_cv_prog_cxx_cross
5108
5109  for ac_hdr in boost/dynamic_bitset.hpp
5110do
5111ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5112echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5113echo "configure:5114: checking for $ac_hdr" >&5
5114if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5115  echo $ac_n "(cached) $ac_c" 1>&6
5116else
5117  cat > conftest.$ac_ext <<EOF
5118#line 5119 "configure"
5119#include "confdefs.h"
5120#include <$ac_hdr>
5121EOF
5122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5123{ (eval echo configure:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5124ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5125if test -z "$ac_err"; then
5126  rm -rf conftest*
5127  eval "ac_cv_header_$ac_safe=yes"
5128else
5129  echo "$ac_err" >&5
5130  echo "configure: failed program was:" >&5
5131  cat conftest.$ac_ext >&5
5132  rm -rf conftest*
5133  eval "ac_cv_header_$ac_safe=no"
5134fi
5135rm -f conftest*
5136fi
5137if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5138  echo "$ac_t""yes" 1>&6
5139    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5140  cat >> confdefs.h <<EOF
5141#define $ac_tr_hdr 1
5142EOF
5143 
5144else
5145  echo "$ac_t""no" 1>&6
5146fi
5147done
5148
5149  ac_ext=c
5150# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5151ac_cpp='$CPP $CPPFLAGS'
5152ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5153ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5154cross_compiling=$ac_cv_prog_cc_cross
5155
5156else
5157  echo "$ac_t""no" 1>&6
5158  echo $ac_n "checking whether to use std::vector""... $ac_c" 1>&6
5159echo "configure:5160: checking whether to use std::vector" >&5
5160  if test "$with_stdvec" != yes; then
5161    echo "$ac_t""no" 1>&6
5162  else
5163    echo "$ac_t""yes" 1>&6
5164    cat >> confdefs.h <<\EOF
5165#define USE_STDVECBOOL 1
5166EOF
5167
5168    USE_STDVECBOOL=1
5169  fi
5170fi
5171
5172
5173if test "$ac_cv_lib_gmp_main" = yes && \
5174 test "$ac_cv_header_gmp_h" = yes; then
5175    ac_gmp_ok=yes
5176fi
5177
5178if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
5179 test "$ac_cv_lib_MPT_MPT_GetTree" && \
5180 test "$ac_cv_header_MP_h" = yes && \
5181 test "$ac_cv_header_MPT_h" = yes; then
5182  ac_MP_ok=yes
5183fi
5184
5185if test "$ac_cv_lib_singcf_atof" = yes && \
5186 test "$ac_cv_header_factory_h" = yes; then
5187  ac_factory_ok=yes
5188fi
5189
5190if test "$ac_cv_lib_singfac_atof" = yes && \
5191 test "$ac_cv_header_factor_h" = yes; then
5192  ac_libfac_ok=yes
5193fi
5194
5195if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
5196   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
5197   test "$ac_cv_header_omalloc_c" = yes && \
5198   test "$ac_cv_header_omalloc_h" = yes; then
5199  ac_cv_omalloc_ok=yes
5200fi
5201
5202if test "$ac_cv_lib_ntl_main" = yes; then
5203  ac_cv_ntl_ok=yes
5204fi
5205
5206SAVE_LIBS=$LIBS
5207echo $ac_n "checking for __stack_chk_fail_local in -lc_nonshared""... $ac_c" 1>&6
5208echo "configure:5209: checking for __stack_chk_fail_local in -lc_nonshared" >&5
5209ac_lib_var=`echo c_nonshared'_'__stack_chk_fail_local | sed 'y%./+-%__p_%'`
5210if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5211  echo $ac_n "(cached) $ac_c" 1>&6
5212else
5213  ac_save_LIBS="$LIBS"
5214LIBS="-lc_nonshared  $LIBS"
5215cat > conftest.$ac_ext <<EOF
5216#line 5217 "configure"
5217#include "confdefs.h"
5218/* Override any gcc2 internal prototype to avoid an error.  */
5219/* We use char because int might match the return type of a gcc2
5220    builtin and then its argument prototype would still apply.  */
5221char __stack_chk_fail_local();
5222
5223int main() {
5224__stack_chk_fail_local()
5225; return 0; }
5226EOF
5227if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5228  rm -rf conftest*
5229  eval "ac_cv_lib_$ac_lib_var=yes"
5230else
5231  echo "configure: failed program was:" >&5
5232  cat conftest.$ac_ext >&5
5233  rm -rf conftest*
5234  eval "ac_cv_lib_$ac_lib_var=no"
5235fi
5236rm -f conftest*
5237LIBS="$ac_save_LIBS"
5238
5239fi
5240if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5241  echo "$ac_t""yes" 1>&6
5242  GLIBC_DYN_FIX="-lc_nonshared"
5243else
5244  echo "$ac_t""no" 1>&6
5245GLIBC_DYN_FIX=""
5246fi
5247
5248LIBS=$SAVE_LIBS
5249
5250
5251# evaluate results
5252if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
5253  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
5254fi
5255
5256echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
5257echo "configure:5258: checking which apint package to use" >&5
5258if test "${with_apint}" != gmp; then
5259  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
5260    echo "$ac_t""gmp" 1>&6
5261    will_have_gmp=yes
5262    NEED_LIBS="-lgmp ${NEED_LIBS}"
5263  else
5264    echo "$ac_t""none" 1>&6
5265    { echo "configure: error: can not build without gmp" 1>&2; exit 1; }
5266  fi
5267else
5268  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
5269    echo "$ac_t""gmp" 1>&6
5270    will_have_gmp=yes
5271    NEED_LIBS="-lgmp ${NEED_LIBS}"
5272  else
5273    echo "$ac_t""none" 1>&6
5274    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
5275  fi
5276fi
5277
5278echo $ac_n "checking whether to use libsvd""... $ac_c" 1>&6
5279echo "configure:5280: checking whether to use libsvd" >&5
5280if test "$with_svd" = yes; then
5281  echo "$ac_t""yes" 1>&6
5282  cat >> confdefs.h <<\EOF
5283#define HAVE_SVD 1
5284EOF
5285
5286  NEED_LIBS="-lsvd -lmpfr ${NEED_LIBS}"
5287else
5288  echo "$ac_t""no" 1>&6
5289fi
5290
5291
5292#
5293echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
5294echo "configure:5295: checking whether to have MP" >&5
5295if test "${with_MP}" != yes && test "${with_MP}" != no; then
5296  if (test "${will_have_gmp}" = yes) && \
5297     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
5298    echo "$ac_t""yes" 1>&6
5299    cat >> confdefs.h <<\EOF
5300#define HAVE_MPSR 1
5301EOF
5302
5303    HAVE_MPSR=1
5304    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
5305  else
5306    echo "$ac_t""no" 1>&6
5307  fi
5308elif  test "${with_MP}" = yes; then
5309  if (test "${will_have_gmp}" = yes) && \
5310     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
5311    echo "$ac_t""yes" 1>&6
5312    cat >> confdefs.h <<\EOF
5313#define HAVE_MPSR 1
5314EOF
5315
5316    HAVE_MPSR=1
5317    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
5318  else
5319    echo "$ac_t""no" 1>&6
5320    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
5321  fi
5322else
5323  echo "$ac_t""no" 1>&6
5324fi
5325
5326
5327
5328echo $ac_n "checking whether to have NTL""... $ac_c" 1>&6
5329echo "configure:5330: checking whether to have NTL" >&5
5330if test "${with_NTL}" = yes ; then
5331  echo "$ac_t""yes" 1>&6
5332  NEED_LIBS="-lntl ${NEED_LIBS}"
5333else
5334  echo "$ac_t""no" 1>&6
5335fi
5336
5337echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
5338echo "configure:5339: checking whether to have factory" >&5
5339if test "${with_factory}" != yes && test "${with_factory}" != no; then
5340  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
5341    echo "$ac_t""yes" 1>&6
5342    cat >> confdefs.h <<\EOF
5343#define HAVE_FACTORY 1
5344EOF
5345
5346    will_have_factory=yes
5347    NEED_LIBS="-lsingcf ${NEED_LIBS}"
5348  else
5349    echo "$ac_t""no" 1>&6
5350  fi
5351elif  test "${with_factory}" = yes; then
5352  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
5353    echo "$ac_t""yes" 1>&6
5354    cat >> confdefs.h <<\EOF
5355#define HAVE_FACTORY 1
5356EOF
5357
5358    will_have_factory=yes
5359    NEED_LIBS="-lsingcf ${NEED_LIBS}"
5360  else
5361    echo "$ac_t""no" 1>&6
5362    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
5363  fi
5364else
5365  echo "$ac_t""no" 1>&6
5366fi
5367
5368echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
5369echo "configure:5370: checking whether to have libfac" >&5
5370if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
5371  if (test "${will_have_factory}" = yes) && \
5372     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
5373    echo "$ac_t""yes" 1>&6
5374    cat >> confdefs.h <<\EOF
5375#define HAVE_LIBFAC_P 1
5376EOF
5377
5378    NEED_LIBS="-lsingfac ${NEED_LIBS}"
5379  else
5380    echo "$ac_t""no" 1>&6
5381  fi
5382elif  test "${with_libfac}" = yes; then
5383  if (test "${will_have_factory}" = yes) && \
5384     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
5385    echo "$ac_t""yes" 1>&6
5386    cat >> confdefs.h <<\EOF
5387#define HAVE_LIBFAC_P 1
5388EOF
5389
5390    NEED_LIBS="-lsingfac ${NEED_LIBS}"
5391  else
5392    echo "$ac_t""no" 1>&6
5393    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
5394  fi
5395else
5396  echo "$ac_t""no" 1>&6
5397fi
5398
5399NEED_LIBSG="${NEED_LIBS}"
5400if test "$ac_cv_sizeof_voidp" != 4; then
5401  NEED_LIBS="${NEED_LIBS} -lomalloc"
5402else
5403  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug"
5404fi
5405
5406
5407
5408
5409
5410echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
5411echo "configure:5412: checking whether to have dbm links" >&5
5412if test "$with_dbm" != no; then
5413  cat >> confdefs.h <<\EOF
5414#define HAVE_DBM 1
5415EOF
5416
5417  echo "$ac_t""yes" 1>&6
5418else
5419  echo "$ac_t""no" 1>&6
5420fi
5421
5422echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
5423echo "configure:5424: checking whether to have namespaces" >&5
5424if test "$with_namespaces" != no; then
5425  echo "$ac_t""yes" 1>&6
5426  cat >> confdefs.h <<\EOF
5427#define HAVE_NS 1
5428EOF
5429
5430else
5431  echo "$ac_t""no" 1>&6
5432fi
5433
5434echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
5435echo "configure:5436: checking whether to have dynamic modules" >&5
5436if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then
5437  echo "$ac_t""no" 1>&6
5438else
5439  cat >> confdefs.h <<\EOF
5440#define HAVE_DYNAMIC_LOADING 1
5441EOF
5442
5443  echo "$ac_t""yes" 1>&6
5444fi
5445
5446echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
5447echo "configure:5448: checking whether to have dynamic kernel" >&5
5448if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
5449  DL_KERNEL=1
5450 
5451  echo "$ac_t""yes" 1>&6
5452else
5453  echo "$ac_t""no" 1>&6
5454fi
5455
5456echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
5457echo "configure:5458: checking whether to have Plural" >&5
5458if test "$with_Plural" != no && test "$enable_Plural" != no; then
5459  cat >> confdefs.h <<\EOF
5460#define HAVE_PLURAL 1
5461EOF
5462
5463  echo "$ac_t""yes" 1>&6
5464  PLURAL=1
5465 
5466else
5467  echo "$ac_t""no" 1>&6
5468fi
5469
5470echo $ac_n "checking whether to have ratGB""... $ac_c" 1>&6
5471echo "configure:5472: checking whether to have ratGB" >&5
5472if test "$with_ratGB" != yes && test "$enable_ratGB" != yes; then
5473  echo "$ac_t""no" 1>&6
5474else
5475  cat >> confdefs.h <<\EOF
5476#define HAVE_RATGRING 1
5477EOF
5478
5479  echo "$ac_t""yes" 1>&6
5480fi
5481
5482
5483OUTPUT_MAKEFILES="Makefile ../kernel/Makefile"
5484
5485if test "$ac_cv_singuname" = "ix86-Win"; then
5486  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
5487fi
5488
5489trap '' 1 2 15
5490cat > confcache <<\EOF
5491# This file is a shell script that caches the results of configure
5492# tests run on this system so they can be shared between configure
5493# scripts and configure runs.  It is not useful on other systems.
5494# If it contains results you don't want to keep, you may remove or edit it.
5495#
5496# By default, configure uses ./config.cache as the cache file,
5497# creating it if it does not exist already.  You can give configure
5498# the --cache-file=FILE option to use a different cache file; that is
5499# what configure does when it calls configure scripts in
5500# subdirectories, so they share the cache.
5501# Giving --cache-file=/dev/null disables caching, for debugging configure.
5502# config.status only pays attention to the cache file if you give it the
5503# --recheck option to rerun configure.
5504#
5505EOF
5506# The following way of writing the cache mishandles newlines in values,
5507# but we know of no workaround that is simple, portable, and efficient.
5508# So, don't put newlines in cache variables' values.
5509# Ultrix sh set writes to stderr and can't be redirected directly,
5510# and sets the high bit in the cache file unless we assign to the vars.
5511(set) 2>&1 |
5512  case `(ac_space=' '; set | grep ac_space) 2>&1` in
5513  *ac_space=\ *)
5514    # `set' does not quote correctly, so add quotes (double-quote substitution
5515    # turns \\\\ into \\, and sed turns \\ into \).
5516    sed -n \
5517      -e "s/'/'\\\\''/g" \
5518      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5519    ;;
5520  *)
5521    # `set' quotes correctly as required by POSIX, so do not add quotes.
5522    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5523    ;;
5524  esac >> confcache
5525if cmp -s $cache_file confcache; then
5526  :
5527else
5528  if test -w $cache_file; then
5529    echo "updating cache $cache_file"
5530    cat confcache > $cache_file
5531  else
5532    echo "not updating unwritable cache $cache_file"
5533  fi
5534fi
5535rm -f confcache
5536
5537trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5538
5539test "x$prefix" = xNONE && prefix=$ac_default_prefix
5540# Let make expand exec_prefix.
5541test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5542
5543# Any assignment to VPATH causes Sun make to only execute
5544# the first set of double-colon rules, so remove it if not needed.
5545# If there is a colon in the path, we need to keep it.
5546if test "x$srcdir" = x.; then
5547  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5548fi
5549
5550trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5551
5552DEFS=-DHAVE_CONFIG_H
5553
5554# Without the "./", some shells look in PATH for config.status.
5555: ${CONFIG_STATUS=./config.status}
5556
5557echo creating $CONFIG_STATUS
5558rm -f $CONFIG_STATUS
5559cat > $CONFIG_STATUS <<EOF
5560#! /bin/sh
5561# Generated automatically by configure.
5562# Run this file to recreate the current configuration.
5563# This directory was configured as follows,
5564# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5565#
5566# $0 $ac_configure_args
5567#
5568# Compiler output produced by configure, useful for debugging
5569# configure, is in ./config.log if it exists.
5570
5571ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5572for ac_option
5573do
5574  case "\$ac_option" in
5575  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5576    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5577    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5578  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5579    echo "$CONFIG_STATUS generated by autoconf version 2.13"
5580    exit 0 ;;
5581  -help | --help | --hel | --he | --h)
5582    echo "\$ac_cs_usage"; exit 0 ;;
5583  *) echo "\$ac_cs_usage"; exit 1 ;;
5584  esac
5585done
5586
5587ac_given_srcdir=$srcdir
5588ac_given_INSTALL="$INSTALL"
5589
5590trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5591EOF
5592cat >> $CONFIG_STATUS <<EOF
5593
5594# Protect against being on the right side of a sed subst in config.status.
5595sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5596 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5597$ac_vpsub
5598$extrasub
5599s%@SHELL@%$SHELL%g
5600s%@CFLAGS@%$CFLAGS%g
5601s%@CPPFLAGS@%$CPPFLAGS%g
5602s%@CXXFLAGS@%$CXXFLAGS%g
5603s%@FFLAGS@%$FFLAGS%g
5604s%@DEFS@%$DEFS%g
5605s%@LDFLAGS@%$LDFLAGS%g
5606s%@LIBS@%$LIBS%g
5607s%@exec_prefix@%$exec_prefix%g
5608s%@prefix@%$prefix%g
5609s%@program_transform_name@%$program_transform_name%g
5610s%@bindir@%$bindir%g
5611s%@sbindir@%$sbindir%g
5612s%@libexecdir@%$libexecdir%g
5613s%@datadir@%$datadir%g
5614s%@sysconfdir@%$sysconfdir%g
5615s%@sharedstatedir@%$sharedstatedir%g
5616s%@localstatedir@%$localstatedir%g
5617s%@libdir@%$libdir%g
5618s%@includedir@%$includedir%g
5619s%@oldincludedir@%$oldincludedir%g
5620s%@infodir@%$infodir%g
5621s%@mandir@%$mandir%g
5622s%@SINGUNAME@%$SINGUNAME%g
5623s%@SI_CPU_I386@%$SI_CPU_I386%g
5624s%@EXEC_EXT@%$EXEC_EXT%g
5625s%@SI_CPU_X86_64@%$SI_CPU_X86_64%g
5626s%@SI_CPU_IA64@%$SI_CPU_IA64%g
5627s%@SI_CPU_PPC@%$SI_CPU_PPC%g
5628s%@SI_CPU_SPARC@%$SI_CPU_SPARC%g
5629s%@SING_UNAME@%$SING_UNAME%g
5630s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
5631s%@VERSION_DATE@%$VERSION_DATE%g
5632s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
5633s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
5634s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
5635s%@CC@%$CC%g
5636s%@CPP@%$CPP%g
5637s%@CXX@%$CXX%g
5638s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5639s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5640s%@INSTALL_DATA@%$INSTALL_DATA%g
5641s%@PIPE@%$PIPE%g
5642s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
5643s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
5644s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
5645s%@SET_MAKE@%$SET_MAKE%g
5646s%@SINGULAR@%$SINGULAR%g
5647s%@LEX@%$LEX%g
5648s%@BISON@%$BISON%g
5649s%@LN_S@%$LN_S%g
5650s%@PERL@%$PERL%g
5651s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
5652s%@SFLAGS@%$SFLAGS%g
5653s%@SLDFLAGS@%$SLDFLAGS%g
5654s%@LD@%$LD%g
5655s%@ALLOCA@%$ALLOCA%g
5656s%@CXXCPP@%$CXXCPP%g
5657s%@USE_STDVECBOOL@%$USE_STDVECBOOL%g
5658s%@GLIBC_DYN_FIX@%$GLIBC_DYN_FIX%g
5659s%@HAVE_SVD@%$HAVE_SVD%g
5660s%@HAVE_MPSR@%$HAVE_MPSR%g
5661s%@MP_LIBS@%$MP_LIBS%g
5662s%@NEED_LIBS@%$NEED_LIBS%g
5663s%@NEED_LIBSG@%$NEED_LIBSG%g
5664s%@DL_KERNEL@%$DL_KERNEL%g
5665s%@PLURAL@%$PLURAL%g
5666
5667CEOF
5668EOF
5669
5670cat >> $CONFIG_STATUS <<\EOF
5671
5672# Split the substitutions into bite-sized pieces for seds with
5673# small command number limits, like on Digital OSF/1 and HP-UX.
5674ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5675ac_file=1 # Number of current file.
5676ac_beg=1 # First line for current file.
5677ac_end=$ac_max_sed_cmds # Line after last line for current file.
5678ac_more_lines=:
5679ac_sed_cmds=""
5680while $ac_more_lines; do
5681  if test $ac_beg -gt 1; then
5682    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5683  else
5684    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5685  fi
5686  if test ! -s conftest.s$ac_file; then
5687    ac_more_lines=false
5688    rm -f conftest.s$ac_file
5689  else
5690    if test -z "$ac_sed_cmds"; then
5691      ac_sed_cmds="sed -f conftest.s$ac_file"
5692    else
5693      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5694    fi
5695    ac_file=`expr $ac_file + 1`
5696    ac_beg=$ac_end
5697    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5698  fi
5699done
5700if test -z "$ac_sed_cmds"; then
5701  ac_sed_cmds=cat
5702fi
5703EOF
5704
5705cat >> $CONFIG_STATUS <<EOF
5706
5707CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
5708EOF
5709cat >> $CONFIG_STATUS <<\EOF
5710for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5711  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5712  case "$ac_file" in
5713  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5714       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5715  *) ac_file_in="${ac_file}.in" ;;
5716  esac
5717
5718  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5719
5720  # Remove last slash and all that follows it.  Not all systems have dirname.
5721  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5722  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5723    # The file is in a subdirectory.
5724    test ! -d "$ac_dir" && mkdir "$ac_dir"
5725    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5726    # A "../" for each directory in $ac_dir_suffix.
5727    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5728  else
5729    ac_dir_suffix= ac_dots=
5730  fi
5731
5732  case "$ac_given_srcdir" in
5733  .)  srcdir=.
5734      if test -z "$ac_dots"; then top_srcdir=.
5735      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5736  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5737  *) # Relative path.
5738    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5739    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5740  esac
5741
5742  case "$ac_given_INSTALL" in
5743  [/$]*) INSTALL="$ac_given_INSTALL" ;;
5744  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5745  esac
5746
5747  echo creating "$ac_file"
5748  rm -f "$ac_file"
5749  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5750  case "$ac_file" in
5751  *Makefile*) ac_comsub="1i\\
5752# $configure_input" ;;
5753  *) ac_comsub= ;;
5754  esac
5755
5756  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5757  sed -e "$ac_comsub
5758s%@configure_input@%$configure_input%g
5759s%@srcdir@%$srcdir%g
5760s%@top_srcdir@%$top_srcdir%g
5761s%@INSTALL@%$INSTALL%g
5762" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5763fi; done
5764rm -f conftest.s*
5765
5766# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5767# NAME is the cpp macro being defined and VALUE is the value it is being given.
5768#
5769# ac_d sets the value in "#define NAME VALUE" lines.
5770ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5771ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5772ac_dC='\3'
5773ac_dD='%g'
5774# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5775ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5776ac_uB='\([      ]\)%\1#\2define\3'
5777ac_uC=' '
5778ac_uD='\4%g'
5779# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5780ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5781ac_eB='$%\1#\2define\3'
5782ac_eC=' '
5783ac_eD='%g'
5784
5785if test "${CONFIG_HEADERS+set}" != set; then
5786EOF
5787cat >> $CONFIG_STATUS <<EOF
5788  CONFIG_HEADERS="mod2.h"
5789EOF
5790cat >> $CONFIG_STATUS <<\EOF
5791fi
5792for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5793  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5794  case "$ac_file" in
5795  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5796       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5797  *) ac_file_in="${ac_file}.in" ;;
5798  esac
5799
5800  echo creating $ac_file
5801
5802  rm -f conftest.frag conftest.in conftest.out
5803  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5804  cat $ac_file_inputs > conftest.in
5805
5806EOF
5807
5808# Transform confdefs.h into a sed script conftest.vals that substitutes
5809# the proper values into config.h.in to produce config.h.  And first:
5810# Protect against being on the right side of a sed subst in config.status.
5811# Protect against being in an unquoted here document in config.status.
5812rm -f conftest.vals
5813cat > conftest.hdr <<\EOF
5814s/[\\&%]/\\&/g
5815s%[\\$`]%\\&%g
5816s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5817s%ac_d%ac_u%gp
5818s%ac_u%ac_e%gp
5819EOF
5820sed -n -f conftest.hdr confdefs.h > conftest.vals
5821rm -f conftest.hdr
5822
5823# This sed command replaces #undef with comments.  This is necessary, for
5824# example, in the case of _POSIX_SOURCE, which is predefined and required
5825# on some systems where configure will not decide to define it.
5826cat >> conftest.vals <<\EOF
5827s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5828EOF
5829
5830# Break up conftest.vals because some shells have a limit on
5831# the size of here documents, and old seds have small limits too.
5832
5833rm -f conftest.tail
5834while :
5835do
5836  ac_lines=`grep -c . conftest.vals`
5837  # grep -c gives empty output for an empty file on some AIX systems.
5838  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5839  # Write a limited-size here document to conftest.frag.
5840  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5841  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5842  echo 'CEOF
5843  sed -f conftest.frag conftest.in > conftest.out
5844  rm -f conftest.in
5845  mv conftest.out conftest.in
5846' >> $CONFIG_STATUS
5847  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5848  rm -f conftest.vals
5849  mv conftest.tail conftest.vals
5850done
5851rm -f conftest.vals
5852
5853cat >> $CONFIG_STATUS <<\EOF
5854  rm -f conftest.frag conftest.h
5855  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5856  cat conftest.in >> conftest.h
5857  rm -f conftest.in
5858  if cmp -s $ac_file conftest.h 2>/dev/null; then
5859    echo "$ac_file is unchanged"
5860    rm -f conftest.h
5861  else
5862    # Remove last slash and all that follows it.  Not all systems have dirname.
5863      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5864      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5865      # The file is in a subdirectory.
5866      test ! -d "$ac_dir" && mkdir "$ac_dir"
5867    fi
5868    rm -f $ac_file
5869    mv conftest.h $ac_file
5870  fi
5871fi; done
5872
5873EOF
5874cat >> $CONFIG_STATUS <<EOF
5875
5876EOF
5877cat >> $CONFIG_STATUS <<\EOF
5878\
5879 cp mod2.h ../kernel/mod2.h; \
5880 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
5881exit 0
5882EOF
5883chmod +x $CONFIG_STATUS
5884rm -fr confdefs* $ac_clean_files
5885test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5886
Note: See TracBrowser for help on using the repository browser.