source: git/Singular/configure @ d3e630

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