source: git/Singular/configure @ 67ea5a

spielwiese
Last change on this file since 67ea5a was 67ea5a, checked in by Hans Schönemann <hannes@…>, 15 years ago
*hannes: LD=LDSO git-svn-id: file:///usr/local/Singular/svn/trunk@11335 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 160.3 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=`pwd`/..
15ac_help="$ac_help
16  --with-rootdir=DIR      use DIR ass compiled-in root directory
17                             (default is PREFIX)"
18ac_help="$ac_help
19  --with-lex=[LEX,no]     uses LEX as lex program, default is flex"
20ac_help="$ac_help
21  --with-readline=[dynamic,static,no]
22                          do use dynamic/static/no readline for fancy display"
23ac_help="$ac_help
24  --without-Boost         do not use Boost "
25ac_help="$ac_help
26  --with-stdvec           use std::vector "
27ac_help="$ac_help
28  --without-MP            do not use MP (no MP links)"
29ac_help="$ac_help
30  --without-dbm           do not use dbm (no DBM links)"
31ac_help="$ac_help
32  --without-factory       do not use factory (no poly factorization)"
33ac_help="$ac_help
34  --without-libfac        do not use libfac (no primary decompositions)"
35ac_help="$ac_help
36  --with-namespaces       do compile namespace support"
37ac_help="$ac_help
38  --without-dl            do not use dynamic linking, modules, and kernel"
39ac_help="$ac_help
40  --with-dynamic-modules  do compile with dynamic modules support"
41ac_help="$ac_help
42  --without-dynamic-kernel
43                          do not compile with dynamic kernel parts"
44ac_help="$ac_help
45  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic"
46ac_help="$ac_help
47  --with-svd              use libsvd"
48ac_help="$ac_help
49  --without-Plural        do compile without Plural support"
50ac_help="$ac_help
51  --with-NTL              build for use with NTL."
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:-"Aug 2008"}
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}
2079if test "${LD+set}" != set; then
2080  LDSO="${LD}"
2081else
2082  LDSO=ld
2083fi
2084# check for dl lib
2085case "$ac_cv_singuname" in
2086        HPUX*)
2087          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2088echo "configure:2089: checking for shl_load in -ldld" >&5
2089ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2090if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2091  echo $ac_n "(cached) $ac_c" 1>&6
2092else
2093  ac_save_LIBS="$LIBS"
2094LIBS="-ldld  $LIBS"
2095cat > conftest.$ac_ext <<EOF
2096#line 2097 "configure"
2097#include "confdefs.h"
2098/* Override any gcc2 internal prototype to avoid an error.  */
2099/* We use char because int might match the return type of a gcc2
2100    builtin and then its argument prototype would still apply.  */
2101char shl_load();
2102
2103int main() {
2104shl_load()
2105; return 0; }
2106EOF
2107if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2108  rm -rf conftest*
2109  eval "ac_cv_lib_$ac_lib_var=yes"
2110else
2111  echo "configure: failed program was:" >&5
2112  cat conftest.$ac_ext >&5
2113  rm -rf conftest*
2114  eval "ac_cv_lib_$ac_lib_var=no"
2115fi
2116rm -f conftest*
2117LIBS="$ac_save_LIBS"
2118
2119fi
2120if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2121  echo "$ac_t""yes" 1>&6
2122    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2123    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2124  cat >> confdefs.h <<EOF
2125#define $ac_tr_lib 1
2126EOF
2127
2128  LIBS="-ldld $LIBS"
2129
2130else
2131  echo "$ac_t""no" 1>&6
2132fi
2133
2134          if test "$ac_cv_lib_dld_shl_load" = yes; then
2135                LD_DYN_FLAGS="-ldld -Xlinker -E"
2136                SFLAGS="-fpic -fPIC -DPIC"
2137                SLDFLAGS="-fPIC -DPIC -shared"
2138                if test "${LD+set}" != set; then
2139                  LDSO="${LD}"
2140                else
2141                  LDSO=gcc
2142                fi
2143                ac_lib_dl=yes
2144          fi
2145        ;;
2146        *Linux*)
2147          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2148echo "configure:2149: checking for dlopen in -ldl" >&5
2149ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2150if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2151  echo $ac_n "(cached) $ac_c" 1>&6
2152else
2153  ac_save_LIBS="$LIBS"
2154LIBS="-ldl  $LIBS"
2155cat > conftest.$ac_ext <<EOF
2156#line 2157 "configure"
2157#include "confdefs.h"
2158/* Override any gcc2 internal prototype to avoid an error.  */
2159/* We use char because int might match the return type of a gcc2
2160    builtin and then its argument prototype would still apply.  */
2161char dlopen();
2162
2163int main() {
2164dlopen()
2165; return 0; }
2166EOF
2167if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2168  rm -rf conftest*
2169  eval "ac_cv_lib_$ac_lib_var=yes"
2170else
2171  echo "configure: failed program was:" >&5
2172  cat conftest.$ac_ext >&5
2173  rm -rf conftest*
2174  eval "ac_cv_lib_$ac_lib_var=no"
2175fi
2176rm -f conftest*
2177LIBS="$ac_save_LIBS"
2178
2179fi
2180if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2181  echo "$ac_t""yes" 1>&6
2182    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2183    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2184  cat >> confdefs.h <<EOF
2185#define $ac_tr_lib 1
2186EOF
2187
2188  LIBS="-ldl $LIBS"
2189
2190else
2191  echo "$ac_t""no" 1>&6
2192fi
2193
2194          if test "$ac_cv_lib_dl_dlopen" = yes; then
2195                LD_DYN_FLAGS="-ldl -rdynamic"
2196                SFLAGS="-fpic -DPIC"
2197                SLDFLAGS=-shared
2198                if test "${LD+set}" != set; then
2199                  LDSO="${LD}"
2200                else
2201                  LDSO=ld
2202                fi
2203                ac_lib_dl=yes
2204          fi
2205        ;;
2206        IRIX-6)
2207          LD_DYN_FLAGS="-lc"
2208          SFLAGS="-fPIC -DPIC"
2209          SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared"
2210          if test "${LD+set}" != set; then
2211            LDSO="${LD}"
2212          else
2213            LDSO=ld
2214          fi
2215          ac_lib_dl=yes
2216        ;;
2217        SunOS-5)
2218          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2219echo "configure:2220: checking for dlopen in -ldl" >&5
2220ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2221if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2222  echo $ac_n "(cached) $ac_c" 1>&6
2223else
2224  ac_save_LIBS="$LIBS"
2225LIBS="-ldl  $LIBS"
2226cat > conftest.$ac_ext <<EOF
2227#line 2228 "configure"
2228#include "confdefs.h"
2229/* Override any gcc2 internal prototype to avoid an error.  */
2230/* We use char because int might match the return type of a gcc2
2231    builtin and then its argument prototype would still apply.  */
2232char dlopen();
2233
2234int main() {
2235dlopen()
2236; return 0; }
2237EOF
2238if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2239  rm -rf conftest*
2240  eval "ac_cv_lib_$ac_lib_var=yes"
2241else
2242  echo "configure: failed program was:" >&5
2243  cat conftest.$ac_ext >&5
2244  rm -rf conftest*
2245  eval "ac_cv_lib_$ac_lib_var=no"
2246fi
2247rm -f conftest*
2248LIBS="$ac_save_LIBS"
2249
2250fi
2251if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2252  echo "$ac_t""yes" 1>&6
2253    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2254    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2255  cat >> confdefs.h <<EOF
2256#define $ac_tr_lib 1
2257EOF
2258
2259  LIBS="-ldl $LIBS"
2260
2261else
2262  echo "$ac_t""no" 1>&6
2263fi
2264
2265          if test "$ac_cv_lib_dl_dlopen" = yes; then
2266                LD_DYN_FLAGS="-ldl"
2267                SFLAGS="-fpic -DPIC"
2268                SLDFLAGS=-shared
2269                if test "${LD+set}" != set; then
2270                  LDSO="${LD}"
2271                else
2272                  LDSO=$CC
2273                fi
2274                ac_lib_dl=yes
2275          fi
2276        ;;
2277        #use export MACOSX_DEPLOYMENT_TARGET=10.3
2278        ppcMac-darwin)
2279          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2280echo "configure:2281: checking for dlopen in -ldl" >&5
2281ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2282if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2283  echo $ac_n "(cached) $ac_c" 1>&6
2284else
2285  ac_save_LIBS="$LIBS"
2286LIBS="-ldl  $LIBS"
2287cat > conftest.$ac_ext <<EOF
2288#line 2289 "configure"
2289#include "confdefs.h"
2290/* Override any gcc2 internal prototype to avoid an error.  */
2291/* We use char because int might match the return type of a gcc2
2292    builtin and then its argument prototype would still apply.  */
2293char dlopen();
2294
2295int main() {
2296dlopen()
2297; return 0; }
2298EOF
2299if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2300  rm -rf conftest*
2301  eval "ac_cv_lib_$ac_lib_var=yes"
2302else
2303  echo "configure: failed program was:" >&5
2304  cat conftest.$ac_ext >&5
2305  rm -rf conftest*
2306  eval "ac_cv_lib_$ac_lib_var=no"
2307fi
2308rm -f conftest*
2309LIBS="$ac_save_LIBS"
2310
2311fi
2312if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2313  echo "$ac_t""yes" 1>&6
2314    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2315    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2316  cat >> confdefs.h <<EOF
2317#define $ac_tr_lib 1
2318EOF
2319
2320  LIBS="-ldl $LIBS"
2321
2322else
2323  echo "$ac_t""no" 1>&6
2324fi
2325
2326          if test "$ac_cv_lib_dl_dlopen" = yes; then
2327                LD_DYN_FLAGS="-ldl -dynamic"
2328                SFLAGS="-fpic -DPIC"
2329                SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
2330                LDSO=libtool
2331                ac_lib_dl=yes
2332          fi
2333        ;;
2334        ix86Mac-darwin)
2335          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2336echo "configure:2337: checking for dlopen in -ldl" >&5
2337ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2338if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2339  echo $ac_n "(cached) $ac_c" 1>&6
2340else
2341  ac_save_LIBS="$LIBS"
2342LIBS="-ldl  $LIBS"
2343cat > conftest.$ac_ext <<EOF
2344#line 2345 "configure"
2345#include "confdefs.h"
2346/* Override any gcc2 internal prototype to avoid an error.  */
2347/* We use char because int might match the return type of a gcc2
2348    builtin and then its argument prototype would still apply.  */
2349char dlopen();
2350
2351int main() {
2352dlopen()
2353; return 0; }
2354EOF
2355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2356  rm -rf conftest*
2357  eval "ac_cv_lib_$ac_lib_var=yes"
2358else
2359  echo "configure: failed program was:" >&5
2360  cat conftest.$ac_ext >&5
2361  rm -rf conftest*
2362  eval "ac_cv_lib_$ac_lib_var=no"
2363fi
2364rm -f conftest*
2365LIBS="$ac_save_LIBS"
2366
2367fi
2368if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2369  echo "$ac_t""yes" 1>&6
2370    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2371    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2372  cat >> confdefs.h <<EOF
2373#define $ac_tr_lib 1
2374EOF
2375
2376  LIBS="-ldl $LIBS"
2377
2378else
2379  echo "$ac_t""no" 1>&6
2380fi
2381
2382          if test "$ac_cv_lib_dl_dlopen" = yes; then
2383                LD_DYN_FLAGS="-ldl -dynamic"
2384                SFLAGS="-fpic -DPIC"
2385                SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
2386                LDSO=libtool
2387                ac_lib_dl=yes
2388          fi
2389        ;;
2390        ix86-freebsd)
2391          echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
2392echo "configure:2393: checking for dlopen in -lc" >&5
2393ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
2394if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2395  echo $ac_n "(cached) $ac_c" 1>&6
2396else
2397  ac_save_LIBS="$LIBS"
2398LIBS="-lc  $LIBS"
2399cat > conftest.$ac_ext <<EOF
2400#line 2401 "configure"
2401#include "confdefs.h"
2402/* Override any gcc2 internal prototype to avoid an error.  */
2403/* We use char because int might match the return type of a gcc2
2404    builtin and then its argument prototype would still apply.  */
2405char dlopen();
2406
2407int main() {
2408dlopen()
2409; return 0; }
2410EOF
2411if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2412  rm -rf conftest*
2413  eval "ac_cv_lib_$ac_lib_var=yes"
2414else
2415  echo "configure: failed program was:" >&5
2416  cat conftest.$ac_ext >&5
2417  rm -rf conftest*
2418  eval "ac_cv_lib_$ac_lib_var=no"
2419fi
2420rm -f conftest*
2421LIBS="$ac_save_LIBS"
2422
2423fi
2424if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2425  echo "$ac_t""yes" 1>&6
2426    ac_tr_lib=HAVE_LIB`echo c | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2427    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2428  cat >> confdefs.h <<EOF
2429#define $ac_tr_lib 1
2430EOF
2431
2432  LIBS="-lc $LIBS"
2433
2434else
2435  echo "$ac_t""no" 1>&6
2436fi
2437
2438          if test "$ac_cv_lib_c_dlopen" = yes; then
2439                LD_DYN_FLAGS="-Xlinker -E"
2440                SFLAGS="-fpic -DPIC"
2441                SLDFLAGS=-shared
2442                LDSO=ld
2443                ac_lib_dl=yes
2444          fi
2445        ;;
2446esac
2447
2448
2449
2450
2451LIBS=${SAVE_LIBS}
2452
2453
2454# heder file checks
2455echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2456echo "configure:2457: checking for ANSI C header files" >&5
2457if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2458  echo $ac_n "(cached) $ac_c" 1>&6
2459else
2460  cat > conftest.$ac_ext <<EOF
2461#line 2462 "configure"
2462#include "confdefs.h"
2463#include <stdlib.h>
2464#include <stdarg.h>
2465#include <string.h>
2466#include <float.h>
2467EOF
2468ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2469{ (eval echo configure:2470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2470ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2471if test -z "$ac_err"; then
2472  rm -rf conftest*
2473  ac_cv_header_stdc=yes
2474else
2475  echo "$ac_err" >&5
2476  echo "configure: failed program was:" >&5
2477  cat conftest.$ac_ext >&5
2478  rm -rf conftest*
2479  ac_cv_header_stdc=no
2480fi
2481rm -f conftest*
2482
2483if test $ac_cv_header_stdc = yes; then
2484  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2485cat > conftest.$ac_ext <<EOF
2486#line 2487 "configure"
2487#include "confdefs.h"
2488#include <string.h>
2489EOF
2490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2491  egrep "memchr" >/dev/null 2>&1; then
2492  :
2493else
2494  rm -rf conftest*
2495  ac_cv_header_stdc=no
2496fi
2497rm -f conftest*
2498
2499fi
2500
2501if test $ac_cv_header_stdc = yes; then
2502  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2503cat > conftest.$ac_ext <<EOF
2504#line 2505 "configure"
2505#include "confdefs.h"
2506#include <stdlib.h>
2507EOF
2508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2509  egrep "free" >/dev/null 2>&1; then
2510  :
2511else
2512  rm -rf conftest*
2513  ac_cv_header_stdc=no
2514fi
2515rm -f conftest*
2516
2517fi
2518
2519if test $ac_cv_header_stdc = yes; then
2520  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2521if test "$cross_compiling" = yes; then
2522  :
2523else
2524  cat > conftest.$ac_ext <<EOF
2525#line 2526 "configure"
2526#include "confdefs.h"
2527#include <ctype.h>
2528#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2529#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2530#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2531int main () { int i; for (i = 0; i < 256; i++)
2532if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2533exit (0); }
2534
2535EOF
2536if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2537then
2538  :
2539else
2540  echo "configure: failed program was:" >&5
2541  cat conftest.$ac_ext >&5
2542  rm -fr conftest*
2543  ac_cv_header_stdc=no
2544fi
2545rm -fr conftest*
2546fi
2547
2548fi
2549fi
2550
2551echo "$ac_t""$ac_cv_header_stdc" 1>&6
2552if test $ac_cv_header_stdc = yes; then
2553  cat >> confdefs.h <<\EOF
2554#define STDC_HEADERS 1
2555EOF
2556
2557fi
2558
2559for ac_hdr in limits.h unistd.h
2560do
2561ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2562echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2563echo "configure:2564: checking for $ac_hdr" >&5
2564if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2565  echo $ac_n "(cached) $ac_c" 1>&6
2566else
2567  cat > conftest.$ac_ext <<EOF
2568#line 2569 "configure"
2569#include "confdefs.h"
2570#include <$ac_hdr>
2571EOF
2572ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2573{ (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2574ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2575if test -z "$ac_err"; then
2576  rm -rf conftest*
2577  eval "ac_cv_header_$ac_safe=yes"
2578else
2579  echo "$ac_err" >&5
2580  echo "configure: failed program was:" >&5
2581  cat conftest.$ac_ext >&5
2582  rm -rf conftest*
2583  eval "ac_cv_header_$ac_safe=no"
2584fi
2585rm -f conftest*
2586fi
2587if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2588  echo "$ac_t""yes" 1>&6
2589    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2590  cat >> confdefs.h <<EOF
2591#define $ac_tr_hdr 1
2592EOF
2593 
2594else
2595  echo "$ac_t""no" 1>&6
2596{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2597fi
2598done
2599
2600
2601for ac_hdr in sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h \
2602 sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h \
2603 termios.h term.h readline/readline.h
2604do
2605ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2606echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2607echo "configure:2608: checking for $ac_hdr" >&5
2608if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2609  echo $ac_n "(cached) $ac_c" 1>&6
2610else
2611  cat > conftest.$ac_ext <<EOF
2612#line 2613 "configure"
2613#include "confdefs.h"
2614#include <$ac_hdr>
2615EOF
2616ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2617{ (eval echo configure:2618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2618ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2619if test -z "$ac_err"; then
2620  rm -rf conftest*
2621  eval "ac_cv_header_$ac_safe=yes"
2622else
2623  echo "$ac_err" >&5
2624  echo "configure: failed program was:" >&5
2625  cat conftest.$ac_ext >&5
2626  rm -rf conftest*
2627  eval "ac_cv_header_$ac_safe=no"
2628fi
2629rm -f conftest*
2630fi
2631if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2632  echo "$ac_t""yes" 1>&6
2633    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2634  cat >> confdefs.h <<EOF
2635#define $ac_tr_hdr 1
2636EOF
2637 
2638else
2639  echo "$ac_t""no" 1>&6
2640fi
2641done
2642
2643
2644# typedefs, structures
2645echo $ac_n "checking for working const""... $ac_c" 1>&6
2646echo "configure:2647: checking for working const" >&5
2647if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2648  echo $ac_n "(cached) $ac_c" 1>&6
2649else
2650  cat > conftest.$ac_ext <<EOF
2651#line 2652 "configure"
2652#include "confdefs.h"
2653
2654int main() {
2655
2656/* Ultrix mips cc rejects this.  */
2657typedef int charset[2]; const charset x;
2658/* SunOS 4.1.1 cc rejects this.  */
2659char const *const *ccp;
2660char **p;
2661/* NEC SVR4.0.2 mips cc rejects this.  */
2662struct point {int x, y;};
2663static struct point const zero = {0,0};
2664/* AIX XL C 1.02.0.0 rejects this.
2665   It does not let you subtract one const X* pointer from another in an arm
2666   of an if-expression whose if-part is not a constant expression */
2667const char *g = "string";
2668ccp = &g + (g ? g-g : 0);
2669/* HPUX 7.0 cc rejects these. */
2670++ccp;
2671p = (char**) ccp;
2672ccp = (char const *const *) p;
2673{ /* SCO 3.2v4 cc rejects this.  */
2674  char *t;
2675  char const *s = 0 ? (char *) 0 : (char const *) 0;
2676
2677  *t++ = 0;
2678}
2679{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2680  int x[] = {25, 17};
2681  const int *foo = &x[0];
2682  ++foo;
2683}
2684{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2685  typedef const int *iptr;
2686  iptr p = 0;
2687  ++p;
2688}
2689{ /* AIX XL C 1.02.0.0 rejects this saying
2690     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2691  struct s { int j; const int *ap[3]; };
2692  struct s *b; b->j = 5;
2693}
2694{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2695  const int foo = 10;
2696}
2697
2698; return 0; }
2699EOF
2700if { (eval echo configure:2701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2701  rm -rf conftest*
2702  ac_cv_c_const=yes
2703else
2704  echo "configure: failed program was:" >&5
2705  cat conftest.$ac_ext >&5
2706  rm -rf conftest*
2707  ac_cv_c_const=no
2708fi
2709rm -f conftest*
2710fi
2711
2712echo "$ac_t""$ac_cv_c_const" 1>&6
2713if test $ac_cv_c_const = no; then
2714  cat >> confdefs.h <<\EOF
2715#define const
2716EOF
2717
2718fi
2719
2720echo $ac_n "checking for inline""... $ac_c" 1>&6
2721echo "configure:2722: checking for inline" >&5
2722if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2723  echo $ac_n "(cached) $ac_c" 1>&6
2724else
2725  ac_cv_c_inline=no
2726for ac_kw in inline __inline__ __inline; do
2727  cat > conftest.$ac_ext <<EOF
2728#line 2729 "configure"
2729#include "confdefs.h"
2730
2731int main() {
2732} $ac_kw foo() {
2733; return 0; }
2734EOF
2735if { (eval echo configure:2736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2736  rm -rf conftest*
2737  ac_cv_c_inline=$ac_kw; break
2738else
2739  echo "configure: failed program was:" >&5
2740  cat conftest.$ac_ext >&5
2741fi
2742rm -f conftest*
2743done
2744
2745fi
2746
2747echo "$ac_t""$ac_cv_c_inline" 1>&6
2748case "$ac_cv_c_inline" in
2749  inline | yes) ;;
2750  no) cat >> confdefs.h <<\EOF
2751#define inline
2752EOF
2753 ;;
2754  *)  cat >> confdefs.h <<EOF
2755#define inline $ac_cv_c_inline
2756EOF
2757 ;;
2758esac
2759
2760echo $ac_n "checking for size_t""... $ac_c" 1>&6
2761echo "configure:2762: checking for size_t" >&5
2762if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2763  echo $ac_n "(cached) $ac_c" 1>&6
2764else
2765  cat > conftest.$ac_ext <<EOF
2766#line 2767 "configure"
2767#include "confdefs.h"
2768#include <sys/types.h>
2769#if STDC_HEADERS
2770#include <stdlib.h>
2771#include <stddef.h>
2772#endif
2773EOF
2774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2775  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2776  rm -rf conftest*
2777  ac_cv_type_size_t=yes
2778else
2779  rm -rf conftest*
2780  ac_cv_type_size_t=no
2781fi
2782rm -f conftest*
2783
2784fi
2785echo "$ac_t""$ac_cv_type_size_t" 1>&6
2786if test $ac_cv_type_size_t = no; then
2787  cat >> confdefs.h <<\EOF
2788#define size_t unsigned
2789EOF
2790
2791fi
2792
2793echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2794echo "configure:2795: checking whether struct tm is in sys/time.h or time.h" >&5
2795if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2796  echo $ac_n "(cached) $ac_c" 1>&6
2797else
2798  cat > conftest.$ac_ext <<EOF
2799#line 2800 "configure"
2800#include "confdefs.h"
2801#include <sys/types.h>
2802#include <time.h>
2803int main() {
2804struct tm *tp; tp->tm_sec;
2805; return 0; }
2806EOF
2807if { (eval echo configure:2808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2808  rm -rf conftest*
2809  ac_cv_struct_tm=time.h
2810else
2811  echo "configure: failed program was:" >&5
2812  cat conftest.$ac_ext >&5
2813  rm -rf conftest*
2814  ac_cv_struct_tm=sys/time.h
2815fi
2816rm -f conftest*
2817fi
2818
2819echo "$ac_t""$ac_cv_struct_tm" 1>&6
2820if test $ac_cv_struct_tm = sys/time.h; then
2821  cat >> confdefs.h <<\EOF
2822#define TM_IN_SYS_TIME 1
2823EOF
2824
2825fi
2826
2827echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2828echo "configure:2829: checking whether time.h and sys/time.h may both be included" >&5
2829if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2830  echo $ac_n "(cached) $ac_c" 1>&6
2831else
2832  cat > conftest.$ac_ext <<EOF
2833#line 2834 "configure"
2834#include "confdefs.h"
2835#include <sys/types.h>
2836#include <sys/time.h>
2837#include <time.h>
2838int main() {
2839struct tm *tp;
2840; return 0; }
2841EOF
2842if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2843  rm -rf conftest*
2844  ac_cv_header_time=yes
2845else
2846  echo "configure: failed program was:" >&5
2847  cat conftest.$ac_ext >&5
2848  rm -rf conftest*
2849  ac_cv_header_time=no
2850fi
2851rm -f conftest*
2852fi
2853
2854echo "$ac_t""$ac_cv_header_time" 1>&6
2855if test $ac_cv_header_time = yes; then
2856  cat >> confdefs.h <<\EOF
2857#define TIME_WITH_SYS_TIME 1
2858EOF
2859
2860fi
2861
2862
2863# library functions.
2864# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2865# for constant arguments.  Useless!
2866echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2867echo "configure:2868: checking for working alloca.h" >&5
2868if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2869  echo $ac_n "(cached) $ac_c" 1>&6
2870else
2871  cat > conftest.$ac_ext <<EOF
2872#line 2873 "configure"
2873#include "confdefs.h"
2874#include <alloca.h>
2875int main() {
2876char *p = alloca(2 * sizeof(int));
2877; return 0; }
2878EOF
2879if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2880  rm -rf conftest*
2881  ac_cv_header_alloca_h=yes
2882else
2883  echo "configure: failed program was:" >&5
2884  cat conftest.$ac_ext >&5
2885  rm -rf conftest*
2886  ac_cv_header_alloca_h=no
2887fi
2888rm -f conftest*
2889fi
2890
2891echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2892if test $ac_cv_header_alloca_h = yes; then
2893  cat >> confdefs.h <<\EOF
2894#define HAVE_ALLOCA_H 1
2895EOF
2896
2897fi
2898
2899echo $ac_n "checking for alloca""... $ac_c" 1>&6
2900echo "configure:2901: checking for alloca" >&5
2901if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2902  echo $ac_n "(cached) $ac_c" 1>&6
2903else
2904  cat > conftest.$ac_ext <<EOF
2905#line 2906 "configure"
2906#include "confdefs.h"
2907
2908#ifdef __GNUC__
2909# define alloca __builtin_alloca
2910#else
2911# ifdef _MSC_VER
2912#  include <malloc.h>
2913#  define alloca _alloca
2914# else
2915#  if HAVE_ALLOCA_H
2916#   include <alloca.h>
2917#  else
2918#   ifdef _AIX
2919 #pragma alloca
2920#   else
2921#    ifndef alloca /* predefined by HP cc +Olibcalls */
2922char *alloca ();
2923#    endif
2924#   endif
2925#  endif
2926# endif
2927#endif
2928
2929int main() {
2930char *p = (char *) alloca(1);
2931; return 0; }
2932EOF
2933if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2934  rm -rf conftest*
2935  ac_cv_func_alloca_works=yes
2936else
2937  echo "configure: failed program was:" >&5
2938  cat conftest.$ac_ext >&5
2939  rm -rf conftest*
2940  ac_cv_func_alloca_works=no
2941fi
2942rm -f conftest*
2943fi
2944
2945echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2946if test $ac_cv_func_alloca_works = yes; then
2947  cat >> confdefs.h <<\EOF
2948#define HAVE_ALLOCA 1
2949EOF
2950
2951fi
2952
2953if test $ac_cv_func_alloca_works = no; then
2954  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2955  # that cause trouble.  Some versions do not even contain alloca or
2956  # contain a buggy version.  If you still want to use their alloca,
2957  # use ar to extract alloca.o from them instead of compiling alloca.c.
2958  ALLOCA=alloca.${ac_objext}
2959  cat >> confdefs.h <<\EOF
2960#define C_ALLOCA 1
2961EOF
2962
2963
2964echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2965echo "configure:2966: checking whether alloca needs Cray hooks" >&5
2966if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2967  echo $ac_n "(cached) $ac_c" 1>&6
2968else
2969  cat > conftest.$ac_ext <<EOF
2970#line 2971 "configure"
2971#include "confdefs.h"
2972#if defined(CRAY) && ! defined(CRAY2)
2973webecray
2974#else
2975wenotbecray
2976#endif
2977
2978EOF
2979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2980  egrep "webecray" >/dev/null 2>&1; then
2981  rm -rf conftest*
2982  ac_cv_os_cray=yes
2983else
2984  rm -rf conftest*
2985  ac_cv_os_cray=no
2986fi
2987rm -f conftest*
2988
2989fi
2990
2991echo "$ac_t""$ac_cv_os_cray" 1>&6
2992if test $ac_cv_os_cray = yes; then
2993for ac_func in _getb67 GETB67 getb67; do
2994  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2995echo "configure:2996: checking for $ac_func" >&5
2996if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2997  echo $ac_n "(cached) $ac_c" 1>&6
2998else
2999  cat > conftest.$ac_ext <<EOF
3000#line 3001 "configure"
3001#include "confdefs.h"
3002/* System header to define __stub macros and hopefully few prototypes,
3003    which can conflict with char $ac_func(); below.  */
3004#include <assert.h>
3005/* Override any gcc2 internal prototype to avoid an error.  */
3006/* We use char because int might match the return type of a gcc2
3007    builtin and then its argument prototype would still apply.  */
3008char $ac_func();
3009
3010int main() {
3011
3012/* The GNU C library defines this for functions which it implements
3013    to always fail with ENOSYS.  Some functions are actually named
3014    something starting with __ and the normal name is an alias.  */
3015#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3016choke me
3017#else
3018$ac_func();
3019#endif
3020
3021; return 0; }
3022EOF
3023if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3024  rm -rf conftest*
3025  eval "ac_cv_func_$ac_func=yes"
3026else
3027  echo "configure: failed program was:" >&5
3028  cat conftest.$ac_ext >&5
3029  rm -rf conftest*
3030  eval "ac_cv_func_$ac_func=no"
3031fi
3032rm -f conftest*
3033fi
3034
3035if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3036  echo "$ac_t""yes" 1>&6
3037  cat >> confdefs.h <<EOF
3038#define CRAY_STACKSEG_END $ac_func
3039EOF
3040
3041  break
3042else
3043  echo "$ac_t""no" 1>&6
3044fi
3045
3046done
3047fi
3048
3049echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3050echo "configure:3051: checking stack direction for C alloca" >&5
3051if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3052  echo $ac_n "(cached) $ac_c" 1>&6
3053else
3054  if test "$cross_compiling" = yes; then
3055  ac_cv_c_stack_direction=0
3056else
3057  cat > conftest.$ac_ext <<EOF
3058#line 3059 "configure"
3059#include "confdefs.h"
3060find_stack_direction ()
3061{
3062  static char *addr = 0;
3063  auto char dummy;
3064  if (addr == 0)
3065    {
3066      addr = &dummy;
3067      return find_stack_direction ();
3068    }
3069  else
3070    return (&dummy > addr) ? 1 : -1;
3071}
3072main ()
3073{
3074  exit (find_stack_direction() < 0);
3075}
3076EOF
3077if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3078then
3079  ac_cv_c_stack_direction=1
3080else
3081  echo "configure: failed program was:" >&5
3082  cat conftest.$ac_ext >&5
3083  rm -fr conftest*
3084  ac_cv_c_stack_direction=-1
3085fi
3086rm -fr conftest*
3087fi
3088
3089fi
3090
3091echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3092cat >> confdefs.h <<EOF
3093#define STACK_DIRECTION $ac_cv_c_stack_direction
3094EOF
3095
3096fi
3097
3098if test $ac_cv_prog_gcc = yes; then
3099    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3100echo "configure:3101: checking whether ${CC-cc} needs -traditional" >&5
3101if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3102  echo $ac_n "(cached) $ac_c" 1>&6
3103else
3104    ac_pattern="Autoconf.*'x'"
3105  cat > conftest.$ac_ext <<EOF
3106#line 3107 "configure"
3107#include "confdefs.h"
3108#include <sgtty.h>
3109Autoconf TIOCGETP
3110EOF
3111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3112  egrep "$ac_pattern" >/dev/null 2>&1; then
3113  rm -rf conftest*
3114  ac_cv_prog_gcc_traditional=yes
3115else
3116  rm -rf conftest*
3117  ac_cv_prog_gcc_traditional=no
3118fi
3119rm -f conftest*
3120
3121
3122  if test $ac_cv_prog_gcc_traditional = no; then
3123    cat > conftest.$ac_ext <<EOF
3124#line 3125 "configure"
3125#include "confdefs.h"
3126#include <termio.h>
3127Autoconf TCGETA
3128EOF
3129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3130  egrep "$ac_pattern" >/dev/null 2>&1; then
3131  rm -rf conftest*
3132  ac_cv_prog_gcc_traditional=yes
3133fi
3134rm -f conftest*
3135
3136  fi
3137fi
3138
3139echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3140  if test $ac_cv_prog_gcc_traditional = yes; then
3141    CC="$CC -traditional"
3142  fi
3143fi
3144
3145for ac_hdr in unistd.h
3146do
3147ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3148echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3149echo "configure:3150: checking for $ac_hdr" >&5
3150if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3151  echo $ac_n "(cached) $ac_c" 1>&6
3152else
3153  cat > conftest.$ac_ext <<EOF
3154#line 3155 "configure"
3155#include "confdefs.h"
3156#include <$ac_hdr>
3157EOF
3158ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3159{ (eval echo configure:3160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3160ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3161if test -z "$ac_err"; then
3162  rm -rf conftest*
3163  eval "ac_cv_header_$ac_safe=yes"
3164else
3165  echo "$ac_err" >&5
3166  echo "configure: failed program was:" >&5
3167  cat conftest.$ac_ext >&5
3168  rm -rf conftest*
3169  eval "ac_cv_header_$ac_safe=no"
3170fi
3171rm -f conftest*
3172fi
3173if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3174  echo "$ac_t""yes" 1>&6
3175    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3176  cat >> confdefs.h <<EOF
3177#define $ac_tr_hdr 1
3178EOF
3179 
3180else
3181  echo "$ac_t""no" 1>&6
3182fi
3183done
3184
3185for ac_func in getpagesize
3186do
3187echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3188echo "configure:3189: checking for $ac_func" >&5
3189if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3190  echo $ac_n "(cached) $ac_c" 1>&6
3191else
3192  cat > conftest.$ac_ext <<EOF
3193#line 3194 "configure"
3194#include "confdefs.h"
3195/* System header to define __stub macros and hopefully few prototypes,
3196    which can conflict with char $ac_func(); below.  */
3197#include <assert.h>
3198/* Override any gcc2 internal prototype to avoid an error.  */
3199/* We use char because int might match the return type of a gcc2
3200    builtin and then its argument prototype would still apply.  */
3201char $ac_func();
3202
3203int main() {
3204
3205/* The GNU C library defines this for functions which it implements
3206    to always fail with ENOSYS.  Some functions are actually named
3207    something starting with __ and the normal name is an alias.  */
3208#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3209choke me
3210#else
3211$ac_func();
3212#endif
3213
3214; return 0; }
3215EOF
3216if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3217  rm -rf conftest*
3218  eval "ac_cv_func_$ac_func=yes"
3219else
3220  echo "configure: failed program was:" >&5
3221  cat conftest.$ac_ext >&5
3222  rm -rf conftest*
3223  eval "ac_cv_func_$ac_func=no"
3224fi
3225rm -f conftest*
3226fi
3227
3228if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3229  echo "$ac_t""yes" 1>&6
3230    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3231  cat >> confdefs.h <<EOF
3232#define $ac_tr_func 1
3233EOF
3234 
3235else
3236  echo "$ac_t""no" 1>&6
3237fi
3238done
3239
3240echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3241echo "configure:3242: checking for working mmap" >&5
3242if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3243  echo $ac_n "(cached) $ac_c" 1>&6
3244else
3245  if test "$cross_compiling" = yes; then
3246  ac_cv_func_mmap_fixed_mapped=no
3247else
3248  cat > conftest.$ac_ext <<EOF
3249#line 3250 "configure"
3250#include "confdefs.h"
3251
3252/* Thanks to Mike Haertel and Jim Avera for this test.
3253   Here is a matrix of mmap possibilities:
3254        mmap private not fixed
3255        mmap private fixed at somewhere currently unmapped
3256        mmap private fixed at somewhere already mapped
3257        mmap shared not fixed
3258        mmap shared fixed at somewhere currently unmapped
3259        mmap shared fixed at somewhere already mapped
3260   For private mappings, we should verify that changes cannot be read()
3261   back from the file, nor mmap's back from the file at a different
3262   address.  (There have been systems where private was not correctly
3263   implemented like the infamous i386 svr4.0, and systems where the
3264   VM page cache was not coherent with the filesystem buffer cache
3265   like early versions of FreeBSD and possibly contemporary NetBSD.)
3266   For shared mappings, we should conversely verify that changes get
3267   propogated back to all the places they're supposed to be.
3268
3269   Grep wants private fixed already mapped.
3270   The main things grep needs to know about mmap are:
3271   * does it exist and is it safe to write into the mmap'd area
3272   * how to use it (BSD variants)  */
3273#include <sys/types.h>
3274#include <fcntl.h>
3275#include <sys/mman.h>
3276
3277/* This mess was copied from the GNU getpagesize.h.  */
3278#ifndef HAVE_GETPAGESIZE
3279# ifdef HAVE_UNISTD_H
3280#  include <unistd.h>
3281# endif
3282
3283/* Assume that all systems that can run configure have sys/param.h.  */
3284# ifndef HAVE_SYS_PARAM_H
3285#  define HAVE_SYS_PARAM_H 1
3286# endif
3287
3288# ifdef _SC_PAGESIZE
3289#  define getpagesize() sysconf(_SC_PAGESIZE)
3290# else /* no _SC_PAGESIZE */
3291#  ifdef HAVE_SYS_PARAM_H
3292#   include <sys/param.h>
3293#   ifdef EXEC_PAGESIZE
3294#    define getpagesize() EXEC_PAGESIZE
3295#   else /* no EXEC_PAGESIZE */
3296#    ifdef NBPG
3297#     define getpagesize() NBPG * CLSIZE
3298#     ifndef CLSIZE
3299#      define CLSIZE 1
3300#     endif /* no CLSIZE */
3301#    else /* no NBPG */
3302#     ifdef NBPC
3303#      define getpagesize() NBPC
3304#     else /* no NBPC */
3305#      ifdef PAGESIZE
3306#       define getpagesize() PAGESIZE
3307#      endif /* PAGESIZE */
3308#     endif /* no NBPC */
3309#    endif /* no NBPG */
3310#   endif /* no EXEC_PAGESIZE */
3311#  else /* no HAVE_SYS_PARAM_H */
3312#   define getpagesize() 8192   /* punt totally */
3313#  endif /* no HAVE_SYS_PARAM_H */
3314# endif /* no _SC_PAGESIZE */
3315
3316#endif /* no HAVE_GETPAGESIZE */
3317
3318#ifdef __cplusplus
3319extern "C" { void *malloc(unsigned); }
3320#else
3321char *malloc();
3322#endif
3323
3324int
3325main()
3326{
3327        char *data, *data2, *data3;
3328        int i, pagesize;
3329        int fd;
3330
3331        pagesize = getpagesize();
3332
3333        /*
3334         * First, make a file with some known garbage in it.
3335         */
3336        data = malloc(pagesize);
3337        if (!data)
3338                exit(1);
3339        for (i = 0; i < pagesize; ++i)
3340                *(data + i) = rand();
3341        umask(0);
3342        fd = creat("conftestmmap", 0600);
3343        if (fd < 0)
3344                exit(1);
3345        if (write(fd, data, pagesize) != pagesize)
3346                exit(1);
3347        close(fd);
3348
3349        /*
3350         * Next, try to mmap the file at a fixed address which
3351         * already has something else allocated at it.  If we can,
3352         * also make sure that we see the same garbage.
3353         */
3354        fd = open("conftestmmap", O_RDWR);
3355        if (fd < 0)
3356                exit(1);
3357        data2 = malloc(2 * pagesize);
3358        if (!data2)
3359                exit(1);
3360        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3361        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3362            MAP_PRIVATE | MAP_FIXED, fd, 0L))
3363                exit(1);
3364        for (i = 0; i < pagesize; ++i)
3365                if (*(data + i) != *(data2 + i))
3366                        exit(1);
3367
3368        /*
3369         * Finally, make sure that changes to the mapped area
3370         * do not percolate back to the file as seen by read().
3371         * (This is a bug on some variants of i386 svr4.0.)
3372         */
3373        for (i = 0; i < pagesize; ++i)
3374                *(data2 + i) = *(data2 + i) + 1;
3375        data3 = malloc(pagesize);
3376        if (!data3)
3377                exit(1);
3378        if (read(fd, data3, pagesize) != pagesize)
3379                exit(1);
3380        for (i = 0; i < pagesize; ++i)
3381                if (*(data + i) != *(data3 + i))
3382                        exit(1);
3383        close(fd);
3384        unlink("conftestmmap");
3385        exit(0);
3386}
3387
3388EOF
3389if { (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3390then
3391  ac_cv_func_mmap_fixed_mapped=yes
3392else
3393  echo "configure: failed program was:" >&5
3394  cat conftest.$ac_ext >&5
3395  rm -fr conftest*
3396  ac_cv_func_mmap_fixed_mapped=no
3397fi
3398rm -fr conftest*
3399fi
3400
3401fi
3402
3403echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3404if test $ac_cv_func_mmap_fixed_mapped = yes; then
3405  cat >> confdefs.h <<\EOF
3406#define HAVE_MMAP 1
3407EOF
3408
3409fi
3410
3411echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3412echo "configure:3413: checking return type of signal handlers" >&5
3413if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3414  echo $ac_n "(cached) $ac_c" 1>&6
3415else
3416  cat > conftest.$ac_ext <<EOF
3417#line 3418 "configure"
3418#include "confdefs.h"
3419#include <sys/types.h>
3420#include <signal.h>
3421#ifdef signal
3422#undef signal
3423#endif
3424#ifdef __cplusplus
3425extern "C" void (*signal (int, void (*)(int)))(int);
3426#else
3427void (*signal ()) ();
3428#endif
3429
3430int main() {
3431int i;
3432; return 0; }
3433EOF
3434if { (eval echo configure:3435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3435  rm -rf conftest*
3436  ac_cv_type_signal=void
3437else
3438  echo "configure: failed program was:" >&5
3439  cat conftest.$ac_ext >&5
3440  rm -rf conftest*
3441  ac_cv_type_signal=int
3442fi
3443rm -f conftest*
3444fi
3445
3446echo "$ac_t""$ac_cv_type_signal" 1>&6
3447cat >> confdefs.h <<EOF
3448#define RETSIGTYPE $ac_cv_type_signal
3449EOF
3450
3451
3452echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3453echo "configure:3454: checking for vprintf" >&5
3454if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3455  echo $ac_n "(cached) $ac_c" 1>&6
3456else
3457  cat > conftest.$ac_ext <<EOF
3458#line 3459 "configure"
3459#include "confdefs.h"
3460/* System header to define __stub macros and hopefully few prototypes,
3461    which can conflict with char vprintf(); below.  */
3462#include <assert.h>
3463/* Override any gcc2 internal prototype to avoid an error.  */
3464/* We use char because int might match the return type of a gcc2
3465    builtin and then its argument prototype would still apply.  */
3466char vprintf();
3467
3468int main() {
3469
3470/* The GNU C library defines this for functions which it implements
3471    to always fail with ENOSYS.  Some functions are actually named
3472    something starting with __ and the normal name is an alias.  */
3473#if defined (__stub_vprintf) || defined (__stub___vprintf)
3474choke me
3475#else
3476vprintf();
3477#endif
3478
3479; return 0; }
3480EOF
3481if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3482  rm -rf conftest*
3483  eval "ac_cv_func_vprintf=yes"
3484else
3485  echo "configure: failed program was:" >&5
3486  cat conftest.$ac_ext >&5
3487  rm -rf conftest*
3488  eval "ac_cv_func_vprintf=no"
3489fi
3490rm -f conftest*
3491fi
3492
3493if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3494  echo "$ac_t""yes" 1>&6
3495  cat >> confdefs.h <<\EOF
3496#define HAVE_VPRINTF 1
3497EOF
3498
3499else
3500  echo "$ac_t""no" 1>&6
3501fi
3502
3503if test "$ac_cv_func_vprintf" != yes; then
3504echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3505echo "configure:3506: checking for _doprnt" >&5
3506if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3507  echo $ac_n "(cached) $ac_c" 1>&6
3508else
3509  cat > conftest.$ac_ext <<EOF
3510#line 3511 "configure"
3511#include "confdefs.h"
3512/* System header to define __stub macros and hopefully few prototypes,
3513    which can conflict with char _doprnt(); below.  */
3514#include <assert.h>
3515/* Override any gcc2 internal prototype to avoid an error.  */
3516/* We use char because int might match the return type of a gcc2
3517    builtin and then its argument prototype would still apply.  */
3518char _doprnt();
3519
3520int main() {
3521
3522/* The GNU C library defines this for functions which it implements
3523    to always fail with ENOSYS.  Some functions are actually named
3524    something starting with __ and the normal name is an alias.  */
3525#if defined (__stub__doprnt) || defined (__stub____doprnt)
3526choke me
3527#else
3528_doprnt();
3529#endif
3530
3531; return 0; }
3532EOF
3533if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3534  rm -rf conftest*
3535  eval "ac_cv_func__doprnt=yes"
3536else
3537  echo "configure: failed program was:" >&5
3538  cat conftest.$ac_ext >&5
3539  rm -rf conftest*
3540  eval "ac_cv_func__doprnt=no"
3541fi
3542rm -f conftest*
3543fi
3544
3545if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3546  echo "$ac_t""yes" 1>&6
3547  cat >> confdefs.h <<\EOF
3548#define HAVE_DOPRNT 1
3549EOF
3550
3551else
3552  echo "$ac_t""no" 1>&6
3553fi
3554
3555fi
3556
3557
3558echo $ac_n "checking for library containing setenv""... $ac_c" 1>&6
3559echo "configure:3560: checking for library containing setenv" >&5
3560if eval "test \"`echo '$''{'ac_cv_search_setenv'+set}'`\" = set"; then
3561  echo $ac_n "(cached) $ac_c" 1>&6
3562else
3563  ac_func_search_save_LIBS="$LIBS"
3564ac_cv_search_setenv="no"
3565cat > conftest.$ac_ext <<EOF
3566#line 3567 "configure"
3567#include "confdefs.h"
3568/* Override any gcc2 internal prototype to avoid an error.  */
3569/* We use char because int might match the return type of a gcc2
3570    builtin and then its argument prototype would still apply.  */
3571char setenv();
3572
3573int main() {
3574setenv()
3575; return 0; }
3576EOF
3577if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3578  rm -rf conftest*
3579  ac_cv_search_setenv="none required"
3580else
3581  echo "configure: failed program was:" >&5
3582  cat conftest.$ac_ext >&5
3583fi
3584rm -f conftest*
3585test "$ac_cv_search_setenv" = "no" && for i in bsd; do
3586LIBS="-l$i  $ac_func_search_save_LIBS"
3587cat > conftest.$ac_ext <<EOF
3588#line 3589 "configure"
3589#include "confdefs.h"
3590/* Override any gcc2 internal prototype to avoid an error.  */
3591/* We use char because int might match the return type of a gcc2
3592    builtin and then its argument prototype would still apply.  */
3593char setenv();
3594
3595int main() {
3596setenv()
3597; return 0; }
3598EOF
3599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3600  rm -rf conftest*
3601  ac_cv_search_setenv="-l$i"
3602break
3603else
3604  echo "configure: failed program was:" >&5
3605  cat conftest.$ac_ext >&5
3606fi
3607rm -f conftest*
3608done
3609LIBS="$ac_func_search_save_LIBS"
3610fi
3611
3612echo "$ac_t""$ac_cv_search_setenv" 1>&6
3613if test "$ac_cv_search_setenv" != "no"; then
3614  test "$ac_cv_search_setenv" = "none required" || LIBS="$ac_cv_search_setenv $LIBS"
3615 
3616else :
3617 
3618fi
3619for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink \
3620 sleep usleep getpwnam popen setenv siginterrupt sysconf
3621do
3622echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3623echo "configure:3624: checking for $ac_func" >&5
3624if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3625  echo $ac_n "(cached) $ac_c" 1>&6
3626else
3627  cat > conftest.$ac_ext <<EOF
3628#line 3629 "configure"
3629#include "confdefs.h"
3630/* System header to define __stub macros and hopefully few prototypes,
3631    which can conflict with char $ac_func(); below.  */
3632#include <assert.h>
3633/* Override any gcc2 internal prototype to avoid an error.  */
3634/* We use char because int might match the return type of a gcc2
3635    builtin and then its argument prototype would still apply.  */
3636char $ac_func();
3637
3638int main() {
3639
3640/* The GNU C library defines this for functions which it implements
3641    to always fail with ENOSYS.  Some functions are actually named
3642    something starting with __ and the normal name is an alias.  */
3643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3644choke me
3645#else
3646$ac_func();
3647#endif
3648
3649; return 0; }
3650EOF
3651if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3652  rm -rf conftest*
3653  eval "ac_cv_func_$ac_func=yes"
3654else
3655  echo "configure: failed program was:" >&5
3656  cat conftest.$ac_ext >&5
3657  rm -rf conftest*
3658  eval "ac_cv_func_$ac_func=no"
3659fi
3660rm -f conftest*
3661fi
3662
3663if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3664  echo "$ac_t""yes" 1>&6
3665    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3666  cat >> confdefs.h <<EOF
3667#define $ac_tr_func 1
3668EOF
3669 
3670else
3671  echo "$ac_t""no" 1>&6
3672fi
3673done
3674
3675
3676
3677
3678# arithmetic shifts
3679echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3680echo "configure:3681: checking whether your machine has correct arithmetic shifts" >&5
3681if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3682  echo $ac_n "(cached) $ac_c" 1>&6
3683else
3684  if test "$cross_compiling" = yes; then
3685  if test "$ac_c_cross_dos" = yes; then
3686     ac_cv_shift=yes;
3687   else
3688     echo "$ac_t""no" 1>&6
3689     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
3690   fi
3691else
3692  cat > conftest.$ac_ext <<EOF
3693#line 3694 "configure"
3694#include "confdefs.h"
3695 int main() { if (-2 >> 1 == -1) return(0); else return(1); }
3696EOF
3697if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3698then
3699  ac_cv_shift=yes
3700else
3701  echo "configure: failed program was:" >&5
3702  cat conftest.$ac_ext >&5
3703  rm -fr conftest*
3704  ac_cv_shift=no
3705fi
3706rm -fr conftest*
3707fi
3708
3709fi
3710
3711
3712if test "$ac_cv_shift" = yes; then
3713  echo "$ac_t""yes" 1>&6
3714else
3715  echo "$ac_t""no" 1>&6
3716  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3717fi
3718
3719
3720# check for a peculiar constructor initialization
3721echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
3722echo "configure:3723: checking whether explicit C++ constructor calls are allowed" >&5
3723
3724ac_ext=C
3725# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3726ac_cpp='$CXXCPP $CPPFLAGS'
3727ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3728ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3729cross_compiling=$ac_cv_prog_cxx_cross
3730
3731if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then
3732  echo $ac_n "(cached) $ac_c" 1>&6
3733else
3734  cat > conftest.$ac_ext <<EOF
3735#line 3736 "configure"
3736#include "confdefs.h"
3737
3738int main() {
3739class testclass
3740  {
3741  public:
3742    int value;
3743    testclass() : value(0) {}
3744    testclass( int i ) : value(i) {}
3745    ~testclass() { value = 0; }
3746  };
3747
3748  testclass ptr;
3749  ptr.testclass(1);
3750
3751; return 0; }
3752EOF
3753if { (eval echo configure:3754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3754  rm -rf conftest*
3755  ac_cv_explicit_const=yes
3756else
3757  echo "configure: failed program was:" >&5
3758  cat conftest.$ac_ext >&5
3759  rm -rf conftest*
3760  ac_cv_explicit_const=no
3761fi
3762rm -f conftest*
3763fi
3764
3765ac_ext=c
3766# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3767ac_cpp='$CPP $CPPFLAGS'
3768ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3769ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3770cross_compiling=$ac_cv_prog_cc_cross
3771
3772echo "$ac_t""$ac_cv_explicit_const" 1>&6
3773if test "$ac_cv_explicit_const" = yes; then
3774  cat >> confdefs.h <<\EOF
3775#define HAVE_EXPLICIT_CONSTR 1
3776EOF
3777
3778fi
3779
3780# sprintf returns number of printed chars
3781echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3782echo "configure:3783: checking whether vsprintf returns number of printed chars" >&5
3783if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3784  echo $ac_n "(cached) $ac_c" 1>&6
3785else
3786  if test "$cross_compiling" = yes; then
3787  ac_cv_returns_n_of_chars=no
3788else
3789  cat > conftest.$ac_ext <<EOF
3790#line 3791 "configure"
3791#include "confdefs.h"
3792#include <stdio.h>
3793 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3794EOF
3795if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3796then
3797  ac_cv_returns_n_of_chars=yes
3798else
3799  echo "configure: failed program was:" >&5
3800  cat conftest.$ac_ext >&5
3801  rm -fr conftest*
3802  ac_cv_returns_n_of_chars=no
3803fi
3804rm -fr conftest*
3805fi
3806
3807fi
3808
3809if test "$ac_cv_returns_n_of_chars" = yes; then
3810  echo "$ac_t""yes" 1>&6
3811else
3812  echo "$ac_t""no" 1>&6
3813  cat >> confdefs.h <<\EOF
3814#define BSD_SPRINTF 1
3815EOF
3816
3817fi
3818
3819# determine ALIGN_8
3820echo $ac_n "checking size of char""... $ac_c" 1>&6
3821echo "configure:3822: checking size of char" >&5
3822if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3823  echo $ac_n "(cached) $ac_c" 1>&6
3824else
3825  if test "$cross_compiling" = yes; then
3826  ac_cv_sizeof_char=1
3827else
3828  cat > conftest.$ac_ext <<EOF
3829#line 3830 "configure"
3830#include "confdefs.h"
3831#include <stdio.h>
3832main()
3833{
3834  FILE *f=fopen("conftestval", "w");
3835  if (!f) exit(1);
3836  fprintf(f, "%d\n", sizeof(char));
3837  exit(0);
3838}
3839EOF
3840if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3841then
3842  ac_cv_sizeof_char=`cat conftestval`
3843else
3844  echo "configure: failed program was:" >&5
3845  cat conftest.$ac_ext >&5
3846  rm -fr conftest*
3847  ac_cv_sizeof_char=0
3848fi
3849rm -fr conftest*
3850fi
3851
3852fi
3853echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3854cat >> confdefs.h <<EOF
3855#define SIZEOF_CHAR $ac_cv_sizeof_char
3856EOF
3857
3858
3859echo $ac_n "checking size of short""... $ac_c" 1>&6
3860echo "configure:3861: checking size of short" >&5
3861if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3862  echo $ac_n "(cached) $ac_c" 1>&6
3863else
3864  if test "$cross_compiling" = yes; then
3865  ac_cv_sizeof_short=2
3866else
3867  cat > conftest.$ac_ext <<EOF
3868#line 3869 "configure"
3869#include "confdefs.h"
3870#include <stdio.h>
3871main()
3872{
3873  FILE *f=fopen("conftestval", "w");
3874  if (!f) exit(1);
3875  fprintf(f, "%d\n", sizeof(short));
3876  exit(0);
3877}
3878EOF
3879if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3880then
3881  ac_cv_sizeof_short=`cat conftestval`
3882else
3883  echo "configure: failed program was:" >&5
3884  cat conftest.$ac_ext >&5
3885  rm -fr conftest*
3886  ac_cv_sizeof_short=0
3887fi
3888rm -fr conftest*
3889fi
3890
3891fi
3892echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3893cat >> confdefs.h <<EOF
3894#define SIZEOF_SHORT $ac_cv_sizeof_short
3895EOF
3896
3897
3898echo $ac_n "checking size of int""... $ac_c" 1>&6
3899echo "configure:3900: checking size of int" >&5
3900if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3901  echo $ac_n "(cached) $ac_c" 1>&6
3902else
3903  if test "$cross_compiling" = yes; then
3904  ac_cv_sizeof_int=4
3905else
3906  cat > conftest.$ac_ext <<EOF
3907#line 3908 "configure"
3908#include "confdefs.h"
3909#include <stdio.h>
3910main()
3911{
3912  FILE *f=fopen("conftestval", "w");
3913  if (!f) exit(1);
3914  fprintf(f, "%d\n", sizeof(int));
3915  exit(0);
3916}
3917EOF
3918if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3919then
3920  ac_cv_sizeof_int=`cat conftestval`
3921else
3922  echo "configure: failed program was:" >&5
3923  cat conftest.$ac_ext >&5
3924  rm -fr conftest*
3925  ac_cv_sizeof_int=0
3926fi
3927rm -fr conftest*
3928fi
3929
3930fi
3931echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3932cat >> confdefs.h <<EOF
3933#define SIZEOF_INT $ac_cv_sizeof_int
3934EOF
3935
3936
3937echo $ac_n "checking size of long""... $ac_c" 1>&6
3938echo "configure:3939: checking size of long" >&5
3939if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3940  echo $ac_n "(cached) $ac_c" 1>&6
3941else
3942  if test "$cross_compiling" = yes; then
3943  ac_cv_sizeof_long=4
3944else
3945  cat > conftest.$ac_ext <<EOF
3946#line 3947 "configure"
3947#include "confdefs.h"
3948#include <stdio.h>
3949main()
3950{
3951  FILE *f=fopen("conftestval", "w");
3952  if (!f) exit(1);
3953  fprintf(f, "%d\n", sizeof(long));
3954  exit(0);
3955}
3956EOF
3957if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3958then
3959  ac_cv_sizeof_long=`cat conftestval`
3960else
3961  echo "configure: failed program was:" >&5
3962  cat conftest.$ac_ext >&5
3963  rm -fr conftest*
3964  ac_cv_sizeof_long=0
3965fi
3966rm -fr conftest*
3967fi
3968
3969fi
3970echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3971cat >> confdefs.h <<EOF
3972#define SIZEOF_LONG $ac_cv_sizeof_long
3973EOF
3974
3975
3976echo $ac_n "checking size of void*""... $ac_c" 1>&6
3977echo "configure:3978: checking size of void*" >&5
3978if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3979  echo $ac_n "(cached) $ac_c" 1>&6
3980else
3981  if test "$cross_compiling" = yes; then
3982  ac_cv_sizeof_voidp=4
3983else
3984  cat > conftest.$ac_ext <<EOF
3985#line 3986 "configure"
3986#include "confdefs.h"
3987#include <stdio.h>
3988main()
3989{
3990  FILE *f=fopen("conftestval", "w");
3991  if (!f) exit(1);
3992  fprintf(f, "%d\n", sizeof(void*));
3993  exit(0);
3994}
3995EOF
3996if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3997then
3998  ac_cv_sizeof_voidp=`cat conftestval`
3999else
4000  echo "configure: failed program was:" >&5
4001  cat conftest.$ac_ext >&5
4002  rm -fr conftest*
4003  ac_cv_sizeof_voidp=0
4004fi
4005rm -fr conftest*
4006fi
4007
4008fi
4009echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
4010cat >> confdefs.h <<EOF
4011#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
4012EOF
4013
4014
4015echo $ac_n "checking size of double""... $ac_c" 1>&6
4016echo "configure:4017: checking size of double" >&5
4017if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
4018  echo $ac_n "(cached) $ac_c" 1>&6
4019else
4020  if test "$cross_compiling" = yes; then
4021  ac_cv_sizeof_double=8
4022else
4023  cat > conftest.$ac_ext <<EOF
4024#line 4025 "configure"
4025#include "confdefs.h"
4026#include <stdio.h>
4027main()
4028{
4029  FILE *f=fopen("conftestval", "w");
4030  if (!f) exit(1);
4031  fprintf(f, "%d\n", sizeof(double));
4032  exit(0);
4033}
4034EOF
4035if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4036then
4037  ac_cv_sizeof_double=`cat conftestval`
4038else
4039  echo "configure: failed program was:" >&5
4040  cat conftest.$ac_ext >&5
4041  rm -fr conftest*
4042  ac_cv_sizeof_double=0
4043fi
4044rm -fr conftest*
4045fi
4046
4047fi
4048echo "$ac_t""$ac_cv_sizeof_double" 1>&6
4049cat >> confdefs.h <<EOF
4050#define SIZEOF_DOUBLE $ac_cv_sizeof_double
4051EOF
4052
4053
4054echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4055echo "configure:4056: checking whether byte ordering is bigendian" >&5
4056if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4057  echo $ac_n "(cached) $ac_c" 1>&6
4058else
4059  ac_cv_c_bigendian=unknown
4060# See if sys/param.h defines the BYTE_ORDER macro.
4061cat > conftest.$ac_ext <<EOF
4062#line 4063 "configure"
4063#include "confdefs.h"
4064#include <sys/types.h>
4065#include <sys/param.h>
4066int main() {
4067
4068#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4069 bogus endian macros
4070#endif
4071; return 0; }
4072EOF
4073if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4074  rm -rf conftest*
4075  # It does; now see whether it defined to BIG_ENDIAN or not.
4076cat > conftest.$ac_ext <<EOF
4077#line 4078 "configure"
4078#include "confdefs.h"
4079#include <sys/types.h>
4080#include <sys/param.h>
4081int main() {
4082
4083#if BYTE_ORDER != BIG_ENDIAN
4084 not big endian
4085#endif
4086; return 0; }
4087EOF
4088if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4089  rm -rf conftest*
4090  ac_cv_c_bigendian=yes
4091else
4092  echo "configure: failed program was:" >&5
4093  cat conftest.$ac_ext >&5
4094  rm -rf conftest*
4095  ac_cv_c_bigendian=no
4096fi
4097rm -f conftest*
4098else
4099  echo "configure: failed program was:" >&5
4100  cat conftest.$ac_ext >&5
4101fi
4102rm -f conftest*
4103if test $ac_cv_c_bigendian = unknown; then
4104if test "$cross_compiling" = yes; then
4105    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4106else
4107  cat > conftest.$ac_ext <<EOF
4108#line 4109 "configure"
4109#include "confdefs.h"
4110main () {
4111  /* Are we little or big endian?  From Harbison&Steele.  */
4112  union
4113  {
4114    long l;
4115    char c[sizeof (long)];
4116  } u;
4117  u.l = 1;
4118  exit (u.c[sizeof (long) - 1] == 1);
4119}
4120EOF
4121if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4122then
4123  ac_cv_c_bigendian=no
4124else
4125  echo "configure: failed program was:" >&5
4126  cat conftest.$ac_ext >&5
4127  rm -fr conftest*
4128  ac_cv_c_bigendian=yes
4129fi
4130rm -fr conftest*
4131fi
4132
4133fi
4134fi
4135
4136echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4137if test $ac_cv_c_bigendian = yes; then
4138  cat >> confdefs.h <<\EOF
4139#define WORDS_BIGENDIAN 1
4140EOF
4141
4142fi
4143
4144if test "$ac_cv_sizeof_int" != 4; then
4145  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
4146fi
4147if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
4148  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
4149fi
4150if test "$ac_cv_sizeof_double" != 8; then
4151  { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; }
4152fi
4153if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
4154  { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; }
4155fi
4156if test "$ac_cv_sizeof_voidp" != 4; then
4157  DEFS="-UOM_NDEBUG"
4158 
4159fi
4160
4161# Check whether --with-rootdir or --without-rootdir was given.
4162if test "${with_rootdir+set}" = set; then
4163  withval="$with_rootdir"
4164  :
4165fi
4166
4167# Check whether --with-lex or --without-lex was given.
4168if test "${with_lex+set}" = set; then
4169  withval="$with_lex"
4170  :
4171fi
4172
4173# Check whether --with-readline or --without-readline was given.
4174if test "${with_readline+set}" = set; then
4175  withval="$with_readline"
4176  :
4177fi
4178
4179# Check whether --with-Boost or --without-Boost was given.
4180if test "${with_Boost+set}" = set; then
4181  withval="$with_Boost"
4182  :
4183fi
4184
4185# Check whether --with-stdvec or --without-stdvec was given.
4186if test "${with_stdvec+set}" = set; then
4187  withval="$with_stdvec"
4188  :
4189fi
4190
4191# Check whether --with-MP or --without-MP was given.
4192if test "${with_MP+set}" = set; then
4193  withval="$with_MP"
4194  :
4195fi
4196
4197# Check whether --with-dbm or --without-dbm was given.
4198if test "${with_dbm+set}" = set; then
4199  withval="$with_dbm"
4200  :
4201fi
4202
4203# Check whether --with-factory or --without-factory was given.
4204if test "${with_factory+set}" = set; then
4205  withval="$with_factory"
4206  :
4207fi
4208
4209# Check whether --with-libfac or --without-libfac was given.
4210if test "${with_libfac+set}" = set; then
4211  withval="$with_libfac"
4212  :
4213fi
4214
4215# Check whether --with-namespaces or --without-namespaces was given.
4216if test "${with_namespaces+set}" = set; then
4217  withval="$with_namespaces"
4218  :
4219fi
4220
4221# Check whether --with-dl or --without-dl was given.
4222if test "${with_dl+set}" = set; then
4223  withval="$with_dl"
4224  :
4225fi
4226
4227# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
4228if test "${with_dynamic_modules+set}" = set; then
4229  withval="$with_dynamic_modules"
4230  :
4231fi
4232
4233# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
4234if test "${with_dynamic_kernel+set}" = set; then
4235  withval="$with_dynamic_kernel"
4236  :
4237fi
4238
4239# Check whether --with-apint or --without-apint was given.
4240if test "${with_apint+set}" = set; then
4241  withval="$with_apint"
4242  :
4243fi
4244
4245# Check whether --with-svd or --without-svd was given.
4246if test "${with_svd+set}" = set; then
4247  withval="$with_svd"
4248  :
4249fi
4250
4251# Check whether --with-Plural or --without-Plural was given.
4252if test "${with_Plural+set}" = set; then
4253  withval="$with_Plural"
4254  :
4255fi
4256
4257# Check whether --with-NTL or --without-NTL was given.
4258if test "${with_NTL+set}" = set; then
4259  withval="$with_NTL"
4260  :
4261else
4262  with_NTL=yes
4263fi
4264
4265
4266
4267
4268echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
4269echo "configure:4270: checking whether to use dynamic linking" >&5
4270if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
4271  cat >> confdefs.h <<\EOF
4272#define HAVE_DL 1
4273EOF
4274
4275  ac_have_dl=yes
4276  echo "$ac_t""yes" 1>&6
4277else
4278  echo "$ac_t""no" 1>&6
4279fi
4280
4281echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
4282echo "configure:4283: checking for tgetent in -lncurses" >&5
4283ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
4284if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4285  echo $ac_n "(cached) $ac_c" 1>&6
4286else
4287  ac_save_LIBS="$LIBS"
4288LIBS="-lncurses  $LIBS"
4289cat > conftest.$ac_ext <<EOF
4290#line 4291 "configure"
4291#include "confdefs.h"
4292/* Override any gcc2 internal prototype to avoid an error.  */
4293/* We use char because int might match the return type of a gcc2
4294    builtin and then its argument prototype would still apply.  */
4295char tgetent();
4296
4297int main() {
4298tgetent()
4299; return 0; }
4300EOF
4301if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4302  rm -rf conftest*
4303  eval "ac_cv_lib_$ac_lib_var=yes"
4304else
4305  echo "configure: failed program was:" >&5
4306  cat conftest.$ac_ext >&5
4307  rm -rf conftest*
4308  eval "ac_cv_lib_$ac_lib_var=no"
4309fi
4310rm -f conftest*
4311LIBS="$ac_save_LIBS"
4312
4313fi
4314if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4315  echo "$ac_t""yes" 1>&6
4316    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4317    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4318  cat >> confdefs.h <<EOF
4319#define $ac_tr_lib 1
4320EOF
4321
4322  LIBS="-lncurses $LIBS"
4323
4324else
4325  echo "$ac_t""no" 1>&6
4326\
4327 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
4328echo "configure:4329: checking for tgetent in -lcurses" >&5
4329ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
4330if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4331  echo $ac_n "(cached) $ac_c" 1>&6
4332else
4333  ac_save_LIBS="$LIBS"
4334LIBS="-lcurses  $LIBS"
4335cat > conftest.$ac_ext <<EOF
4336#line 4337 "configure"
4337#include "confdefs.h"
4338/* Override any gcc2 internal prototype to avoid an error.  */
4339/* We use char because int might match the return type of a gcc2
4340    builtin and then its argument prototype would still apply.  */
4341char tgetent();
4342
4343int main() {
4344tgetent()
4345; return 0; }
4346EOF
4347if { (eval echo configure:4348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4348  rm -rf conftest*
4349  eval "ac_cv_lib_$ac_lib_var=yes"
4350else
4351  echo "configure: failed program was:" >&5
4352  cat conftest.$ac_ext >&5
4353  rm -rf conftest*
4354  eval "ac_cv_lib_$ac_lib_var=no"
4355fi
4356rm -f conftest*
4357LIBS="$ac_save_LIBS"
4358
4359fi
4360if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4361  echo "$ac_t""yes" 1>&6
4362    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
4363    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4364  cat >> confdefs.h <<EOF
4365#define $ac_tr_lib 1
4366EOF
4367
4368  LIBS="-lcurses $LIBS"
4369
4370else
4371  echo "$ac_t""no" 1>&6
4372\
4373  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
4374echo "configure:4375: checking for tgetent in -ltermcap" >&5
4375ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
4376if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4377  echo $ac_n "(cached) $ac_c" 1>&6
4378else
4379  ac_save_LIBS="$LIBS"
4380LIBS="-ltermcap  $LIBS"
4381cat > conftest.$ac_ext <<EOF
4382#line 4383 "configure"
4383#include "confdefs.h"
4384/* Override any gcc2 internal prototype to avoid an error.  */
4385/* We use char because int might match the return type of a gcc2
4386    builtin and then its argument prototype would still apply.  */
4387char tgetent();
4388
4389int main() {
4390tgetent()
4391; return 0; }
4392EOF
4393if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394  rm -rf conftest*
4395  eval "ac_cv_lib_$ac_lib_var=yes"
4396else
4397  echo "configure: failed program was:" >&5
4398  cat conftest.$ac_ext >&5
4399  rm -rf conftest*
4400  eval "ac_cv_lib_$ac_lib_var=no"
4401fi
4402rm -f conftest*
4403LIBS="$ac_save_LIBS"
4404
4405fi
4406if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407  echo "$ac_t""yes" 1>&6
4408    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
4409    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4410  cat >> confdefs.h <<EOF
4411#define $ac_tr_lib 1
4412EOF
4413
4414  LIBS="-ltermcap $LIBS"
4415
4416else
4417  echo "$ac_t""no" 1>&6
4418fi
4419
4420fi
4421
4422fi
4423
4424
4425# readline
4426if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
4427  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
4428  with_readline=static
4429fi
4430
4431
4432if test "$with_readline" != dynamic && test "$with_readline" != no; then
4433
4434ac_ext=C
4435# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4436ac_cpp='$CXXCPP $CPPFLAGS'
4437ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4438ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4439cross_compiling=$ac_cv_prog_cxx_cross
4440
4441   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
4442echo "configure:4443: checking for rl_abort in -lreadline" >&5
4443ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
4444if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4445  echo $ac_n "(cached) $ac_c" 1>&6
4446else
4447  ac_save_LIBS="$LIBS"
4448LIBS="-lreadline  $LIBS"
4449cat > conftest.$ac_ext <<EOF
4450#line 4451 "configure"
4451#include "confdefs.h"
4452/* Override any gcc2 internal prototype to avoid an error.  */
4453#ifdef __cplusplus
4454extern "C"
4455#endif
4456/* We use char because int might match the return type of a gcc2
4457    builtin and then its argument prototype would still apply.  */
4458char rl_abort();
4459
4460int main() {
4461rl_abort()
4462; return 0; }
4463EOF
4464if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4465  rm -rf conftest*
4466  eval "ac_cv_lib_$ac_lib_var=yes"
4467else
4468  echo "configure: failed program was:" >&5
4469  cat conftest.$ac_ext >&5
4470  rm -rf conftest*
4471  eval "ac_cv_lib_$ac_lib_var=no"
4472fi
4473rm -f conftest*
4474LIBS="$ac_save_LIBS"
4475
4476fi
4477if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4478  echo "$ac_t""yes" 1>&6
4479    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4480    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4481  cat >> confdefs.h <<EOF
4482#define $ac_tr_lib 1
4483EOF
4484
4485  LIBS="-lreadline $LIBS"
4486
4487else
4488  echo "$ac_t""no" 1>&6
4489fi
4490
4491   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
4492echo "configure:4493: checking how to run the C++ preprocessor" >&5
4493if test -z "$CXXCPP"; then
4494if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
4495  echo $ac_n "(cached) $ac_c" 1>&6
4496else
4497  ac_ext=C
4498# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4499ac_cpp='$CXXCPP $CPPFLAGS'
4500ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4501ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4502cross_compiling=$ac_cv_prog_cxx_cross
4503  CXXCPP="${CXX-g++} -E"
4504  cat > conftest.$ac_ext <<EOF
4505#line 4506 "configure"
4506#include "confdefs.h"
4507#include <stdlib.h>
4508EOF
4509ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4510{ (eval echo configure:4511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4511ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4512if test -z "$ac_err"; then
4513  :
4514else
4515  echo "$ac_err" >&5
4516  echo "configure: failed program was:" >&5
4517  cat conftest.$ac_ext >&5
4518  rm -rf conftest*
4519  CXXCPP=/lib/cpp
4520fi
4521rm -f conftest*
4522  ac_cv_prog_CXXCPP="$CXXCPP"
4523ac_ext=C
4524# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4525ac_cpp='$CXXCPP $CPPFLAGS'
4526ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4527ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4528cross_compiling=$ac_cv_prog_cxx_cross
4529fi
4530fi
4531CXXCPP="$ac_cv_prog_CXXCPP"
4532echo "$ac_t""$CXXCPP" 1>&6
4533
4534for ac_hdr in readline/readline.h readline/history.h
4535do
4536ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4537echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4538echo "configure:4539: checking for $ac_hdr" >&5
4539if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4540  echo $ac_n "(cached) $ac_c" 1>&6
4541else
4542  cat > conftest.$ac_ext <<EOF
4543#line 4544 "configure"
4544#include "confdefs.h"
4545#include <$ac_hdr>
4546EOF
4547ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4548{ (eval echo configure:4549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4549ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4550if test -z "$ac_err"; then
4551  rm -rf conftest*
4552  eval "ac_cv_header_$ac_safe=yes"
4553else
4554  echo "$ac_err" >&5
4555  echo "configure: failed program was:" >&5
4556  cat conftest.$ac_ext >&5
4557  rm -rf conftest*
4558  eval "ac_cv_header_$ac_safe=no"
4559fi
4560rm -f conftest*
4561fi
4562if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4563  echo "$ac_t""yes" 1>&6
4564    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4565  cat >> confdefs.h <<EOF
4566#define $ac_tr_hdr 1
4567EOF
4568 
4569else
4570  echo "$ac_t""no" 1>&6
4571fi
4572done
4573
4574   if test "$ac_cv_lib_readline_rl_abort" = yes && \
4575      test "$ac_cv_header_readline_readline_h" = yes; then
4576     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
4577echo "configure:4578: checking whether readline.h is ok" >&5
4578     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
4579  echo $ac_n "(cached) $ac_c" 1>&6
4580else
4581  cat > conftest.$ac_ext <<EOF
4582#line 4583 "configure"
4583#include "confdefs.h"
4584#include<unistd.h>
4585#include<stdio.h>
4586#include<readline/readline.h>
4587#ifdef HAVE_READLINE_HISTORY_H
4588#include<readline/history.h>
4589#endif
4590
4591int main() {
4592
4593; return 0; }
4594EOF
4595if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596  rm -rf conftest*
4597  ac_cv_header_readline_readline_h_ok="yes"
4598else
4599  echo "configure: failed program was:" >&5
4600  cat conftest.$ac_ext >&5
4601  rm -rf conftest*
4602  ac_cv_header_readline_readline_h_ok="no"
4603fi
4604rm -f conftest*
4605fi
4606
4607    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
4608    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
4609#not ok -- try once more with explicitly declaring everything
4610      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
4611echo "configure:4612: checking whether or not we nevertheless can use readline" >&5
4612      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
4613  echo $ac_n "(cached) $ac_c" 1>&6
4614else
4615  cat > conftest.$ac_ext <<EOF
4616#line 4617 "configure"
4617#include "confdefs.h"
4618#include <stdio.h>
4619extern "C"
4620{
4621extern char * rl_readline_name;
4622extern char *rl_line_buffer;
4623char *filename_completion_function();
4624typedef char **CPPFunction ();
4625extern char ** completion_matches ();
4626extern CPPFunction * rl_attempted_completion_function;
4627extern FILE * rl_outstream;
4628char * readline ();
4629void add_history ();
4630int write_history ();
4631int read_history();
4632}
4633#ifndef NULL
4634#define NULL 0
4635#endif
4636
4637int main() {
4638rl_readline_name=NULL;
4639*rl_line_buffer=1;
4640completion_matches(NULL, filename_completion_function);
4641rl_attempted_completion_function = (CPPFunction *) NULL;
4642rl_outstream=NULL;
4643readline(NULL);
4644add_history(NULL);
4645read_history(NULL);
4646write_history(NULL);
4647
4648; return 0; }
4649EOF
4650if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4651  rm -rf conftest*
4652  ac_cv_have_readline="yes"
4653
4654else
4655  echo "configure: failed program was:" >&5
4656  cat conftest.$ac_ext >&5
4657  rm -rf conftest*
4658  ac_cv_have_readline="no"
4659
4660fi
4661rm -f conftest*
4662fi
4663
4664      echo "$ac_t""$ac_cv_have_readline" 1>&6
4665    else
4666      cat >> confdefs.h <<\EOF
4667#define READLINE_READLINE_H_OK 1
4668EOF
4669
4670      ac_cv_have_readline="yes"
4671    fi
4672  fi
4673  if test "$ac_cv_have_readline" = yes; then
4674    cat >> confdefs.h <<\EOF
4675#define HAVE_READLINE 1
4676EOF
4677
4678  fi
4679ac_ext=c
4680# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4681ac_cpp='$CPP $CPPFLAGS'
4682ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4683ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4684cross_compiling=$ac_cv_prog_cc_cross
4685
4686fi
4687
4688echo $ac_n "checking which readline to use""... $ac_c" 1>&6
4689echo "configure:4690: checking which readline to use" >&5
4690if test "$ac_cv_with_readline" = dynamic; then
4691  echo "$ac_t""dynamic" 1>&6
4692  cat >> confdefs.h <<\EOF
4693#define HAVE_DYN_RL 1
4694EOF
4695
4696elif test "$ac_cv_have_readline" = yes; then
4697  echo "$ac_t""static" 1>&6
4698elif test "$ac_cv_singuname" = PowerMacintosh-darwin; then
4699  { echo "configure: error: building without readline impossible on PowerMacintosh-darwin" 1>&2; exit 1; }
4700else
4701  echo "$ac_t""none" 1>&6
4702  echo "configure: warning: building without readline: disabling fancy display" 1>&2
4703fi
4704
4705NEED_LIBS=$LIBS
4706
4707# gmp, MP, MPT, factory, libfac
4708echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
4709echo "configure:4710: checking for main in -lgmp" >&5
4710ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
4711if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4712  echo $ac_n "(cached) $ac_c" 1>&6
4713else
4714  ac_save_LIBS="$LIBS"
4715LIBS="-lgmp  $LIBS"
4716cat > conftest.$ac_ext <<EOF
4717#line 4718 "configure"
4718#include "confdefs.h"
4719
4720int main() {
4721main()
4722; return 0; }
4723EOF
4724if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4725  rm -rf conftest*
4726  eval "ac_cv_lib_$ac_lib_var=yes"
4727else
4728  echo "configure: failed program was:" >&5
4729  cat conftest.$ac_ext >&5
4730  rm -rf conftest*
4731  eval "ac_cv_lib_$ac_lib_var=no"
4732fi
4733rm -f conftest*
4734LIBS="$ac_save_LIBS"
4735
4736fi
4737if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4738  echo "$ac_t""yes" 1>&6
4739    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4740    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4741  cat >> confdefs.h <<EOF
4742#define $ac_tr_lib 1
4743EOF
4744
4745  LIBS="-lgmp $LIBS"
4746
4747else
4748  echo "$ac_t""no" 1>&6
4749fi
4750
4751SAVE_LIBS=$LIBS
4752echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4753echo "configure:4754: checking for IMP_PutGmpInt in -lMP" >&5
4754ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4755if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4756  echo $ac_n "(cached) $ac_c" 1>&6
4757else
4758  ac_save_LIBS="$LIBS"
4759LIBS="-lMP $MP_LIBS $LIBS"
4760cat > conftest.$ac_ext <<EOF
4761#line 4762 "configure"
4762#include "confdefs.h"
4763/* Override any gcc2 internal prototype to avoid an error.  */
4764/* We use char because int might match the return type of a gcc2
4765    builtin and then its argument prototype would still apply.  */
4766char IMP_PutGmpInt();
4767
4768int main() {
4769IMP_PutGmpInt()
4770; return 0; }
4771EOF
4772if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773  rm -rf conftest*
4774  eval "ac_cv_lib_$ac_lib_var=yes"
4775else
4776  echo "configure: failed program was:" >&5
4777  cat conftest.$ac_ext >&5
4778  rm -rf conftest*
4779  eval "ac_cv_lib_$ac_lib_var=no"
4780fi
4781rm -f conftest*
4782LIBS="$ac_save_LIBS"
4783
4784fi
4785if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4786  echo "$ac_t""yes" 1>&6
4787    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4788    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4789  cat >> confdefs.h <<EOF
4790#define $ac_tr_lib 1
4791EOF
4792
4793  LIBS="-lMP $LIBS"
4794
4795else
4796  echo "$ac_t""no" 1>&6
4797fi
4798
4799echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4800echo "configure:4801: checking for MPT_GetTree in -lMPT" >&5
4801ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4802if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4803  echo $ac_n "(cached) $ac_c" 1>&6
4804else
4805  ac_save_LIBS="$LIBS"
4806LIBS="-lMPT $MP_LIBS $LIBS"
4807cat > conftest.$ac_ext <<EOF
4808#line 4809 "configure"
4809#include "confdefs.h"
4810/* Override any gcc2 internal prototype to avoid an error.  */
4811/* We use char because int might match the return type of a gcc2
4812    builtin and then its argument prototype would still apply.  */
4813char MPT_GetTree();
4814
4815int main() {
4816MPT_GetTree()
4817; return 0; }
4818EOF
4819if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820  rm -rf conftest*
4821  eval "ac_cv_lib_$ac_lib_var=yes"
4822else
4823  echo "configure: failed program was:" >&5
4824  cat conftest.$ac_ext >&5
4825  rm -rf conftest*
4826  eval "ac_cv_lib_$ac_lib_var=no"
4827fi
4828rm -f conftest*
4829LIBS="$ac_save_LIBS"
4830
4831fi
4832if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4833  echo "$ac_t""yes" 1>&6
4834    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4835    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4836  cat >> confdefs.h <<EOF
4837#define $ac_tr_lib 1
4838EOF
4839
4840  LIBS="-lMPT $LIBS"
4841
4842else
4843  echo "$ac_t""no" 1>&6
4844fi
4845
4846LIBS=$SAVE_LIBS
4847echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4848echo "configure:4849: checking for atof in -lsingcf" >&5
4849ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4850if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4851  echo $ac_n "(cached) $ac_c" 1>&6
4852else
4853  ac_save_LIBS="$LIBS"
4854LIBS="-lsingcf  $LIBS"
4855cat > conftest.$ac_ext <<EOF
4856#line 4857 "configure"
4857#include "confdefs.h"
4858/* Override any gcc2 internal prototype to avoid an error.  */
4859/* We use char because int might match the return type of a gcc2
4860    builtin and then its argument prototype would still apply.  */
4861char atof();
4862
4863int main() {
4864atof()
4865; return 0; }
4866EOF
4867if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4868  rm -rf conftest*
4869  eval "ac_cv_lib_$ac_lib_var=yes"
4870else
4871  echo "configure: failed program was:" >&5
4872  cat conftest.$ac_ext >&5
4873  rm -rf conftest*
4874  eval "ac_cv_lib_$ac_lib_var=no"
4875fi
4876rm -f conftest*
4877LIBS="$ac_save_LIBS"
4878
4879fi
4880if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4881  echo "$ac_t""yes" 1>&6
4882    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4883    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4884  cat >> confdefs.h <<EOF
4885#define $ac_tr_lib 1
4886EOF
4887
4888  LIBS="-lsingcf $LIBS"
4889
4890else
4891  echo "$ac_t""no" 1>&6
4892fi
4893
4894echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4895echo "configure:4896: checking for atof in -lsingfac" >&5
4896ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4897if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4898  echo $ac_n "(cached) $ac_c" 1>&6
4899else
4900  ac_save_LIBS="$LIBS"
4901LIBS="-lsingfac  $LIBS"
4902cat > conftest.$ac_ext <<EOF
4903#line 4904 "configure"
4904#include "confdefs.h"
4905/* Override any gcc2 internal prototype to avoid an error.  */
4906/* We use char because int might match the return type of a gcc2
4907    builtin and then its argument prototype would still apply.  */
4908char atof();
4909
4910int main() {
4911atof()
4912; return 0; }
4913EOF
4914if { (eval echo configure:4915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4915  rm -rf conftest*
4916  eval "ac_cv_lib_$ac_lib_var=yes"
4917else
4918  echo "configure: failed program was:" >&5
4919  cat conftest.$ac_ext >&5
4920  rm -rf conftest*
4921  eval "ac_cv_lib_$ac_lib_var=no"
4922fi
4923rm -f conftest*
4924LIBS="$ac_save_LIBS"
4925
4926fi
4927if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4928  echo "$ac_t""yes" 1>&6
4929    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4930    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4931  cat >> confdefs.h <<EOF
4932#define $ac_tr_lib 1
4933EOF
4934
4935  LIBS="-lsingfac $LIBS"
4936
4937else
4938  echo "$ac_t""no" 1>&6
4939fi
4940
4941echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
4942echo "configure:4943: checking for omTestAddr in -lomalloc" >&5
4943ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
4944if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4945  echo $ac_n "(cached) $ac_c" 1>&6
4946else
4947  ac_save_LIBS="$LIBS"
4948LIBS="-lomalloc  $LIBS"
4949cat > conftest.$ac_ext <<EOF
4950#line 4951 "configure"
4951#include "confdefs.h"
4952/* Override any gcc2 internal prototype to avoid an error.  */
4953/* We use char because int might match the return type of a gcc2
4954    builtin and then its argument prototype would still apply.  */
4955char omTestAddr();
4956
4957int main() {
4958omTestAddr()
4959; return 0; }
4960EOF
4961if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4962  rm -rf conftest*
4963  eval "ac_cv_lib_$ac_lib_var=yes"
4964else
4965  echo "configure: failed program was:" >&5
4966  cat conftest.$ac_ext >&5
4967  rm -rf conftest*
4968  eval "ac_cv_lib_$ac_lib_var=no"
4969fi
4970rm -f conftest*
4971LIBS="$ac_save_LIBS"
4972
4973fi
4974if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4975  echo "$ac_t""yes" 1>&6
4976    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4977    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4978  cat >> confdefs.h <<EOF
4979#define $ac_tr_lib 1
4980EOF
4981
4982  LIBS="-lomalloc $LIBS"
4983
4984else
4985  echo "$ac_t""no" 1>&6
4986fi
4987
4988echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
4989echo "configure:4990: checking for main in -lomalloc_ndebug" >&5
4990ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
4991if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4992  echo $ac_n "(cached) $ac_c" 1>&6
4993else
4994  ac_save_LIBS="$LIBS"
4995LIBS="-lomalloc_ndebug  $LIBS"
4996cat > conftest.$ac_ext <<EOF
4997#line 4998 "configure"
4998#include "confdefs.h"
4999
5000int main() {
5001main()
5002; return 0; }
5003EOF
5004if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5005  rm -rf conftest*
5006  eval "ac_cv_lib_$ac_lib_var=yes"
5007else
5008  echo "configure: failed program was:" >&5
5009  cat conftest.$ac_ext >&5
5010  rm -rf conftest*
5011  eval "ac_cv_lib_$ac_lib_var=no"
5012fi
5013rm -f conftest*
5014LIBS="$ac_save_LIBS"
5015
5016fi
5017if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5018  echo "$ac_t""yes" 1>&6
5019    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5020    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5021  cat >> confdefs.h <<EOF
5022#define $ac_tr_lib 1
5023EOF
5024
5025  LIBS="-lomalloc_ndebug $LIBS"
5026
5027else
5028  echo "$ac_t""no" 1>&6
5029fi
5030
5031echo $ac_n "checking for main in -lntl""... $ac_c" 1>&6
5032echo "configure:5033: checking for main in -lntl" >&5
5033ac_lib_var=`echo ntl'_'main | sed 'y%./+-%__p_%'`
5034if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5035  echo $ac_n "(cached) $ac_c" 1>&6
5036else
5037  ac_save_LIBS="$LIBS"
5038LIBS="-lntl  $LIBS"
5039cat > conftest.$ac_ext <<EOF
5040#line 5041 "configure"
5041#include "confdefs.h"
5042
5043int main() {
5044main()
5045; return 0; }
5046EOF
5047if { (eval echo configure:5048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5048  rm -rf conftest*
5049  eval "ac_cv_lib_$ac_lib_var=yes"
5050else
5051  echo "configure: failed program was:" >&5
5052  cat conftest.$ac_ext >&5
5053  rm -rf conftest*
5054  eval "ac_cv_lib_$ac_lib_var=no"
5055fi
5056rm -f conftest*
5057LIBS="$ac_save_LIBS"
5058
5059fi
5060if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5061  echo "$ac_t""yes" 1>&6
5062    ac_tr_lib=HAVE_LIB`echo ntl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5063    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5064  cat >> confdefs.h <<EOF
5065#define $ac_tr_lib 1
5066EOF
5067
5068  LIBS="-lntl $LIBS"
5069
5070else
5071  echo "$ac_t""no" 1>&6
5072fi
5073
5074
5075for ac_hdr in gmp.h MP.h  MPT.h factory.h factor.h omalloc.h \
5076 omalloc.c
5077do
5078ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5079echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5080echo "configure:5081: checking for $ac_hdr" >&5
5081if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5082  echo $ac_n "(cached) $ac_c" 1>&6
5083else
5084  cat > conftest.$ac_ext <<EOF
5085#line 5086 "configure"
5086#include "confdefs.h"
5087#include <$ac_hdr>
5088EOF
5089ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5090{ (eval echo configure:5091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5091ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5092if test -z "$ac_err"; then
5093  rm -rf conftest*
5094  eval "ac_cv_header_$ac_safe=yes"
5095else
5096  echo "$ac_err" >&5
5097  echo "configure: failed program was:" >&5
5098  cat conftest.$ac_ext >&5
5099  rm -rf conftest*
5100  eval "ac_cv_header_$ac_safe=no"
5101fi
5102rm -f conftest*
5103fi
5104if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5105  echo "$ac_t""yes" 1>&6
5106    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5107  cat >> confdefs.h <<EOF
5108#define $ac_tr_hdr 1
5109EOF
5110 
5111else
5112  echo "$ac_t""no" 1>&6
5113fi
5114done
5115
5116
5117echo $ac_n "checking whether to use Boost""... $ac_c" 1>&6
5118echo "configure:5119: checking whether to use Boost" >&5
5119if test "$with_Boost" != no; then
5120  echo "$ac_t""yes" 1>&6
5121 
5122  ac_ext=C
5123# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5124ac_cpp='$CXXCPP $CPPFLAGS'
5125ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5126ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5127cross_compiling=$ac_cv_prog_cxx_cross
5128
5129  for ac_hdr in boost/dynamic_bitset.hpp
5130do
5131ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5132echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5133echo "configure:5134: checking for $ac_hdr" >&5
5134if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5135  echo $ac_n "(cached) $ac_c" 1>&6
5136else
5137  cat > conftest.$ac_ext <<EOF
5138#line 5139 "configure"
5139#include "confdefs.h"
5140#include <$ac_hdr>
5141EOF
5142ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5143{ (eval echo configure:5144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5144ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5145if test -z "$ac_err"; then
5146  rm -rf conftest*
5147  eval "ac_cv_header_$ac_safe=yes"
5148else
5149  echo "$ac_err" >&5
5150  echo "configure: failed program was:" >&5
5151  cat conftest.$ac_ext >&5
5152  rm -rf conftest*
5153  eval "ac_cv_header_$ac_safe=no"
5154fi
5155rm -f conftest*
5156fi
5157if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5158  echo "$ac_t""yes" 1>&6
5159    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5160  cat >> confdefs.h <<EOF
5161#define $ac_tr_hdr 1
5162EOF
5163 
5164else
5165  echo "$ac_t""no" 1>&6
5166fi
5167done
5168
5169  ac_ext=c
5170# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5171ac_cpp='$CPP $CPPFLAGS'
5172ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5173ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5174cross_compiling=$ac_cv_prog_cc_cross
5175
5176else
5177  echo "$ac_t""no" 1>&6
5178  echo $ac_n "checking whether to use std::vector""... $ac_c" 1>&6
5179echo "configure:5180: checking whether to use std::vector" >&5
5180  if test "$with_stdvec" != yes; then
5181    echo "$ac_t""no" 1>&6
5182  else
5183    echo "$ac_t""yes" 1>&6
5184    cat >> confdefs.h <<\EOF
5185#define USE_STDVECBOOL 1
5186EOF
5187
5188    USE_STDVECBOOL=1
5189  fi
5190fi
5191
5192
5193if test "$ac_cv_lib_gmp_main" = yes && \
5194 test "$ac_cv_header_gmp_h" = yes; then
5195    ac_gmp_ok=yes
5196fi
5197
5198if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
5199 test "$ac_cv_lib_MPT_MPT_GetTree" && \
5200 test "$ac_cv_header_MP_h" = yes && \
5201 test "$ac_cv_header_MPT_h" = yes; then
5202  ac_MP_ok=yes
5203fi
5204
5205if test "$ac_cv_lib_singcf_atof" = yes && \
5206 test "$ac_cv_header_factory_h" = yes; then
5207  ac_factory_ok=yes
5208fi
5209
5210if test "$ac_cv_lib_singfac_atof" = yes && \
5211 test "$ac_cv_header_factor_h" = yes; then
5212  ac_libfac_ok=yes
5213fi
5214
5215if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
5216   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
5217   test "$ac_cv_header_omalloc_c" = yes && \
5218   test "$ac_cv_header_omalloc_h" = yes; then
5219  ac_cv_omalloc_ok=yes
5220fi
5221
5222if test "$ac_cv_lib_ntl_main" = yes; then
5223  ac_cv_ntl_ok=yes
5224fi
5225
5226SAVE_LIBS=$LIBS
5227echo $ac_n "checking for __stack_chk_fail_local in -lc_nonshared""... $ac_c" 1>&6
5228echo "configure:5229: checking for __stack_chk_fail_local in -lc_nonshared" >&5
5229ac_lib_var=`echo c_nonshared'_'__stack_chk_fail_local | sed 'y%./+-%__p_%'`
5230if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5231  echo $ac_n "(cached) $ac_c" 1>&6
5232else
5233  ac_save_LIBS="$LIBS"
5234LIBS="-lc_nonshared  $LIBS"
5235cat > conftest.$ac_ext <<EOF
5236#line 5237 "configure"
5237#include "confdefs.h"
5238/* Override any gcc2 internal prototype to avoid an error.  */
5239/* We use char because int might match the return type of a gcc2
5240    builtin and then its argument prototype would still apply.  */
5241char __stack_chk_fail_local();
5242
5243int main() {
5244__stack_chk_fail_local()
5245; return 0; }
5246EOF
5247if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248  rm -rf conftest*
5249  eval "ac_cv_lib_$ac_lib_var=yes"
5250else
5251  echo "configure: failed program was:" >&5
5252  cat conftest.$ac_ext >&5
5253  rm -rf conftest*
5254  eval "ac_cv_lib_$ac_lib_var=no"
5255fi
5256rm -f conftest*
5257LIBS="$ac_save_LIBS"
5258
5259fi
5260if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5261  echo "$ac_t""yes" 1>&6
5262  GLIBC_DYN_FIX="-lc_nonshared"
5263else
5264  echo "$ac_t""no" 1>&6
5265GLIBC_DYN_FIX=""
5266fi
5267
5268LIBS=$SAVE_LIBS
5269
5270
5271# evaluate results
5272if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
5273  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
5274fi
5275
5276echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
5277echo "configure:5278: checking which apint package to use" >&5
5278if test "${with_apint}" != gmp; then
5279  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
5280    echo "$ac_t""gmp" 1>&6
5281    will_have_gmp=yes
5282    NEED_LIBS="-lgmp ${NEED_LIBS}"
5283  else
5284    echo "$ac_t""none" 1>&6
5285    { echo "configure: error: can not build without gmp" 1>&2; exit 1; }
5286  fi
5287else
5288  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
5289    echo "$ac_t""gmp" 1>&6
5290    will_have_gmp=yes
5291    NEED_LIBS="-lgmp ${NEED_LIBS}"
5292  else
5293    echo "$ac_t""none" 1>&6
5294    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
5295  fi
5296fi
5297
5298echo $ac_n "checking whether to use libsvd""... $ac_c" 1>&6
5299echo "configure:5300: checking whether to use libsvd" >&5
5300if test "$with_svd" = yes; then
5301  echo "$ac_t""yes" 1>&6
5302  cat >> confdefs.h <<\EOF
5303#define HAVE_SVD 1
5304EOF
5305
5306  NEED_LIBS="-lsvd -lmpfr ${NEED_LIBS}"
5307else
5308  echo "$ac_t""no" 1>&6
5309fi
5310
5311
5312#
5313echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
5314echo "configure:5315: checking whether to have MP" >&5
5315if test "${with_MP}" != yes && test "${with_MP}" != no; then
5316  if (test "${will_have_gmp}" = yes) && \
5317     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
5318    echo "$ac_t""yes" 1>&6
5319    cat >> confdefs.h <<\EOF
5320#define HAVE_MPSR 1
5321EOF
5322
5323    HAVE_MPSR=1
5324    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
5325  else
5326    echo "$ac_t""no" 1>&6
5327  fi
5328elif  test "${with_MP}" = yes; then
5329  if (test "${will_have_gmp}" = yes) && \
5330     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
5331    echo "$ac_t""yes" 1>&6
5332    cat >> confdefs.h <<\EOF
5333#define HAVE_MPSR 1
5334EOF
5335
5336    HAVE_MPSR=1
5337    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
5338  else
5339    echo "$ac_t""no" 1>&6
5340    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
5341  fi
5342else
5343  echo "$ac_t""no" 1>&6
5344fi
5345
5346
5347
5348echo $ac_n "checking whether to have NTL""... $ac_c" 1>&6
5349echo "configure:5350: checking whether to have NTL" >&5
5350if test "${with_NTL}" = yes ; then
5351  echo "$ac_t""yes" 1>&6
5352  NEED_LIBS="-lntl ${NEED_LIBS}"
5353else
5354  echo "$ac_t""no" 1>&6
5355fi
5356
5357echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
5358echo "configure:5359: checking whether to have factory" >&5
5359if test "${with_factory}" != yes && test "${with_factory}" != no; then
5360  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
5361    echo "$ac_t""yes" 1>&6
5362    cat >> confdefs.h <<\EOF
5363#define HAVE_FACTORY 1
5364EOF
5365
5366    will_have_factory=yes
5367    NEED_LIBS="-lsingcf ${NEED_LIBS}"
5368  else
5369    echo "$ac_t""no" 1>&6
5370  fi
5371elif  test "${with_factory}" = yes; then
5372  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
5373    echo "$ac_t""yes" 1>&6
5374    cat >> confdefs.h <<\EOF
5375#define HAVE_FACTORY 1
5376EOF
5377
5378    will_have_factory=yes
5379    NEED_LIBS="-lsingcf ${NEED_LIBS}"
5380  else
5381    echo "$ac_t""no" 1>&6
5382    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
5383  fi
5384else
5385  echo "$ac_t""no" 1>&6
5386fi
5387
5388echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
5389echo "configure:5390: checking whether to have libfac" >&5
5390if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
5391  if (test "${will_have_factory}" = yes) && \
5392     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
5393    echo "$ac_t""yes" 1>&6
5394    cat >> confdefs.h <<\EOF
5395#define HAVE_LIBFAC_P 1
5396EOF
5397
5398    NEED_LIBS="-lsingfac ${NEED_LIBS}"
5399  else
5400    echo "$ac_t""no" 1>&6
5401  fi
5402elif  test "${with_libfac}" = yes; then
5403  if (test "${will_have_factory}" = yes) && \
5404     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
5405    echo "$ac_t""yes" 1>&6
5406    cat >> confdefs.h <<\EOF
5407#define HAVE_LIBFAC_P 1
5408EOF
5409
5410    NEED_LIBS="-lsingfac ${NEED_LIBS}"
5411  else
5412    echo "$ac_t""no" 1>&6
5413    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
5414  fi
5415else
5416  echo "$ac_t""no" 1>&6
5417fi
5418
5419NEED_LIBSG="${NEED_LIBS}"
5420if test "$ac_cv_sizeof_voidp" != 4; then
5421  NEED_LIBS="${NEED_LIBS} -lomalloc"
5422else
5423  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug"
5424fi
5425
5426
5427
5428
5429
5430echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
5431echo "configure:5432: checking whether to have dbm links" >&5
5432if test "$with_dbm" != no; then
5433  cat >> confdefs.h <<\EOF
5434#define HAVE_DBM 1
5435EOF
5436
5437  echo "$ac_t""yes" 1>&6
5438else
5439  echo "$ac_t""no" 1>&6
5440fi
5441
5442echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
5443echo "configure:5444: checking whether to have namespaces" >&5
5444if test "$with_namespaces" != no; then
5445  echo "$ac_t""yes" 1>&6
5446  cat >> confdefs.h <<\EOF
5447#define HAVE_NS 1
5448EOF
5449
5450else
5451  echo "$ac_t""no" 1>&6
5452fi
5453
5454echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
5455echo "configure:5456: checking whether to have dynamic modules" >&5
5456if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then
5457  echo "$ac_t""no" 1>&6
5458else
5459  cat >> confdefs.h <<\EOF
5460#define HAVE_DYNAMIC_LOADING 1
5461EOF
5462
5463  echo "$ac_t""yes" 1>&6
5464fi
5465
5466echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
5467echo "configure:5468: checking whether to have dynamic kernel" >&5
5468if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
5469  DL_KERNEL=1
5470 
5471  echo "$ac_t""yes" 1>&6
5472else
5473  echo "$ac_t""no" 1>&6
5474fi
5475
5476echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
5477echo "configure:5478: checking whether to have Plural" >&5
5478if test "$with_Plural" != no && test "$enable_Plural" != no; then
5479  cat >> confdefs.h <<\EOF
5480#define HAVE_PLURAL 1
5481EOF
5482
5483  echo "$ac_t""yes" 1>&6
5484  PLURAL=1
5485 
5486else
5487  echo "$ac_t""no" 1>&6
5488fi
5489
5490
5491OUTPUT_MAKEFILES="Makefile ../kernel/Makefile"
5492
5493if test "$ac_cv_singuname" = "ix86-Win"; then
5494  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
5495fi
5496
5497trap '' 1 2 15
5498cat > confcache <<\EOF
5499# This file is a shell script that caches the results of configure
5500# tests run on this system so they can be shared between configure
5501# scripts and configure runs.  It is not useful on other systems.
5502# If it contains results you don't want to keep, you may remove or edit it.
5503#
5504# By default, configure uses ./config.cache as the cache file,
5505# creating it if it does not exist already.  You can give configure
5506# the --cache-file=FILE option to use a different cache file; that is
5507# what configure does when it calls configure scripts in
5508# subdirectories, so they share the cache.
5509# Giving --cache-file=/dev/null disables caching, for debugging configure.
5510# config.status only pays attention to the cache file if you give it the
5511# --recheck option to rerun configure.
5512#
5513EOF
5514# The following way of writing the cache mishandles newlines in values,
5515# but we know of no workaround that is simple, portable, and efficient.
5516# So, don't put newlines in cache variables' values.
5517# Ultrix sh set writes to stderr and can't be redirected directly,
5518# and sets the high bit in the cache file unless we assign to the vars.
5519(set) 2>&1 |
5520  case `(ac_space=' '; set | grep ac_space) 2>&1` in
5521  *ac_space=\ *)
5522    # `set' does not quote correctly, so add quotes (double-quote substitution
5523    # turns \\\\ into \\, and sed turns \\ into \).
5524    sed -n \
5525      -e "s/'/'\\\\''/g" \
5526      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5527    ;;
5528  *)
5529    # `set' quotes correctly as required by POSIX, so do not add quotes.
5530    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5531    ;;
5532  esac >> confcache
5533if cmp -s $cache_file confcache; then
5534  :
5535else
5536  if test -w $cache_file; then
5537    echo "updating cache $cache_file"
5538    cat confcache > $cache_file
5539  else
5540    echo "not updating unwritable cache $cache_file"
5541  fi
5542fi
5543rm -f confcache
5544
5545trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5546
5547test "x$prefix" = xNONE && prefix=$ac_default_prefix
5548# Let make expand exec_prefix.
5549test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5550
5551# Any assignment to VPATH causes Sun make to only execute
5552# the first set of double-colon rules, so remove it if not needed.
5553# If there is a colon in the path, we need to keep it.
5554if test "x$srcdir" = x.; then
5555  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5556fi
5557
5558trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5559
5560DEFS=-DHAVE_CONFIG_H
5561
5562# Without the "./", some shells look in PATH for config.status.
5563: ${CONFIG_STATUS=./config.status}
5564
5565echo creating $CONFIG_STATUS
5566rm -f $CONFIG_STATUS
5567cat > $CONFIG_STATUS <<EOF
5568#! /bin/sh
5569# Generated automatically by configure.
5570# Run this file to recreate the current configuration.
5571# This directory was configured as follows,
5572# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5573#
5574# $0 $ac_configure_args
5575#
5576# Compiler output produced by configure, useful for debugging
5577# configure, is in ./config.log if it exists.
5578
5579ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5580for ac_option
5581do
5582  case "\$ac_option" in
5583  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5584    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5585    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5586  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5587    echo "$CONFIG_STATUS generated by autoconf version 2.13"
5588    exit 0 ;;
5589  -help | --help | --hel | --he | --h)
5590    echo "\$ac_cs_usage"; exit 0 ;;
5591  *) echo "\$ac_cs_usage"; exit 1 ;;
5592  esac
5593done
5594
5595ac_given_srcdir=$srcdir
5596ac_given_INSTALL="$INSTALL"
5597
5598trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5599EOF
5600cat >> $CONFIG_STATUS <<EOF
5601
5602# Protect against being on the right side of a sed subst in config.status.
5603sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5604 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5605$ac_vpsub
5606$extrasub
5607s%@SHELL@%$SHELL%g
5608s%@CFLAGS@%$CFLAGS%g
5609s%@CPPFLAGS@%$CPPFLAGS%g
5610s%@CXXFLAGS@%$CXXFLAGS%g
5611s%@FFLAGS@%$FFLAGS%g
5612s%@DEFS@%$DEFS%g
5613s%@LDFLAGS@%$LDFLAGS%g
5614s%@LIBS@%$LIBS%g
5615s%@exec_prefix@%$exec_prefix%g
5616s%@prefix@%$prefix%g
5617s%@program_transform_name@%$program_transform_name%g
5618s%@bindir@%$bindir%g
5619s%@sbindir@%$sbindir%g
5620s%@libexecdir@%$libexecdir%g
5621s%@datadir@%$datadir%g
5622s%@sysconfdir@%$sysconfdir%g
5623s%@sharedstatedir@%$sharedstatedir%g
5624s%@localstatedir@%$localstatedir%g
5625s%@libdir@%$libdir%g
5626s%@includedir@%$includedir%g
5627s%@oldincludedir@%$oldincludedir%g
5628s%@infodir@%$infodir%g
5629s%@mandir@%$mandir%g
5630s%@SINGUNAME@%$SINGUNAME%g
5631s%@SI_CPU_I386@%$SI_CPU_I386%g
5632s%@EXEC_EXT@%$EXEC_EXT%g
5633s%@SI_CPU_X86_64@%$SI_CPU_X86_64%g
5634s%@SI_CPU_IA64@%$SI_CPU_IA64%g
5635s%@SI_CPU_PPC@%$SI_CPU_PPC%g
5636s%@SI_CPU_SPARC@%$SI_CPU_SPARC%g
5637s%@SING_UNAME@%$SING_UNAME%g
5638s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
5639s%@VERSION_DATE@%$VERSION_DATE%g
5640s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
5641s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
5642s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
5643s%@CC@%$CC%g
5644s%@CPP@%$CPP%g
5645s%@CXX@%$CXX%g
5646s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5647s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5648s%@INSTALL_DATA@%$INSTALL_DATA%g
5649s%@PIPE@%$PIPE%g
5650s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
5651s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
5652s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
5653s%@SET_MAKE@%$SET_MAKE%g
5654s%@SINGULAR@%$SINGULAR%g
5655s%@LEX@%$LEX%g
5656s%@BISON@%$BISON%g
5657s%@LN_S@%$LN_S%g
5658s%@PERL@%$PERL%g
5659s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
5660s%@SFLAGS@%$SFLAGS%g
5661s%@SLDFLAGS@%$SLDFLAGS%g
5662s%@LDSO@%$LDSO%g
5663s%@ALLOCA@%$ALLOCA%g
5664s%@CXXCPP@%$CXXCPP%g
5665s%@USE_STDVECBOOL@%$USE_STDVECBOOL%g
5666s%@GLIBC_DYN_FIX@%$GLIBC_DYN_FIX%g
5667s%@HAVE_SVD@%$HAVE_SVD%g
5668s%@HAVE_MPSR@%$HAVE_MPSR%g
5669s%@MP_LIBS@%$MP_LIBS%g
5670s%@NEED_LIBS@%$NEED_LIBS%g
5671s%@NEED_LIBSG@%$NEED_LIBSG%g
5672s%@DL_KERNEL@%$DL_KERNEL%g
5673s%@PLURAL@%$PLURAL%g
5674
5675CEOF
5676EOF
5677
5678cat >> $CONFIG_STATUS <<\EOF
5679
5680# Split the substitutions into bite-sized pieces for seds with
5681# small command number limits, like on Digital OSF/1 and HP-UX.
5682ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5683ac_file=1 # Number of current file.
5684ac_beg=1 # First line for current file.
5685ac_end=$ac_max_sed_cmds # Line after last line for current file.
5686ac_more_lines=:
5687ac_sed_cmds=""
5688while $ac_more_lines; do
5689  if test $ac_beg -gt 1; then
5690    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5691  else
5692    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5693  fi
5694  if test ! -s conftest.s$ac_file; then
5695    ac_more_lines=false
5696    rm -f conftest.s$ac_file
5697  else
5698    if test -z "$ac_sed_cmds"; then
5699      ac_sed_cmds="sed -f conftest.s$ac_file"
5700    else
5701      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5702    fi
5703    ac_file=`expr $ac_file + 1`
5704    ac_beg=$ac_end
5705    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5706  fi
5707done
5708if test -z "$ac_sed_cmds"; then
5709  ac_sed_cmds=cat
5710fi
5711EOF
5712
5713cat >> $CONFIG_STATUS <<EOF
5714
5715CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
5716EOF
5717cat >> $CONFIG_STATUS <<\EOF
5718for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5719  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5720  case "$ac_file" in
5721  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5722       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5723  *) ac_file_in="${ac_file}.in" ;;
5724  esac
5725
5726  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5727
5728  # Remove last slash and all that follows it.  Not all systems have dirname.
5729  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5730  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5731    # The file is in a subdirectory.
5732    test ! -d "$ac_dir" && mkdir "$ac_dir"
5733    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5734    # A "../" for each directory in $ac_dir_suffix.
5735    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5736  else
5737    ac_dir_suffix= ac_dots=
5738  fi
5739
5740  case "$ac_given_srcdir" in
5741  .)  srcdir=.
5742      if test -z "$ac_dots"; then top_srcdir=.
5743      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5744  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5745  *) # Relative path.
5746    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5747    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5748  esac
5749
5750  case "$ac_given_INSTALL" in
5751  [/$]*) INSTALL="$ac_given_INSTALL" ;;
5752  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5753  esac
5754
5755  echo creating "$ac_file"
5756  rm -f "$ac_file"
5757  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5758  case "$ac_file" in
5759  *Makefile*) ac_comsub="1i\\
5760# $configure_input" ;;
5761  *) ac_comsub= ;;
5762  esac
5763
5764  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5765  sed -e "$ac_comsub
5766s%@configure_input@%$configure_input%g
5767s%@srcdir@%$srcdir%g
5768s%@top_srcdir@%$top_srcdir%g
5769s%@INSTALL@%$INSTALL%g
5770" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5771fi; done
5772rm -f conftest.s*
5773
5774# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5775# NAME is the cpp macro being defined and VALUE is the value it is being given.
5776#
5777# ac_d sets the value in "#define NAME VALUE" lines.
5778ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5779ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5780ac_dC='\3'
5781ac_dD='%g'
5782# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5783ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5784ac_uB='\([      ]\)%\1#\2define\3'
5785ac_uC=' '
5786ac_uD='\4%g'
5787# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5788ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5789ac_eB='$%\1#\2define\3'
5790ac_eC=' '
5791ac_eD='%g'
5792
5793if test "${CONFIG_HEADERS+set}" != set; then
5794EOF
5795cat >> $CONFIG_STATUS <<EOF
5796  CONFIG_HEADERS="mod2.h"
5797EOF
5798cat >> $CONFIG_STATUS <<\EOF
5799fi
5800for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5801  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5802  case "$ac_file" in
5803  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5804       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5805  *) ac_file_in="${ac_file}.in" ;;
5806  esac
5807
5808  echo creating $ac_file
5809
5810  rm -f conftest.frag conftest.in conftest.out
5811  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5812  cat $ac_file_inputs > conftest.in
5813
5814EOF
5815
5816# Transform confdefs.h into a sed script conftest.vals that substitutes
5817# the proper values into config.h.in to produce config.h.  And first:
5818# Protect against being on the right side of a sed subst in config.status.
5819# Protect against being in an unquoted here document in config.status.
5820rm -f conftest.vals
5821cat > conftest.hdr <<\EOF
5822s/[\\&%]/\\&/g
5823s%[\\$`]%\\&%g
5824s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5825s%ac_d%ac_u%gp
5826s%ac_u%ac_e%gp
5827EOF
5828sed -n -f conftest.hdr confdefs.h > conftest.vals
5829rm -f conftest.hdr
5830
5831# This sed command replaces #undef with comments.  This is necessary, for
5832# example, in the case of _POSIX_SOURCE, which is predefined and required
5833# on some systems where configure will not decide to define it.
5834cat >> conftest.vals <<\EOF
5835s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5836EOF
5837
5838# Break up conftest.vals because some shells have a limit on
5839# the size of here documents, and old seds have small limits too.
5840
5841rm -f conftest.tail
5842while :
5843do
5844  ac_lines=`grep -c . conftest.vals`
5845  # grep -c gives empty output for an empty file on some AIX systems.
5846  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5847  # Write a limited-size here document to conftest.frag.
5848  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5849  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5850  echo 'CEOF
5851  sed -f conftest.frag conftest.in > conftest.out
5852  rm -f conftest.in
5853  mv conftest.out conftest.in
5854' >> $CONFIG_STATUS
5855  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5856  rm -f conftest.vals
5857  mv conftest.tail conftest.vals
5858done
5859rm -f conftest.vals
5860
5861cat >> $CONFIG_STATUS <<\EOF
5862  rm -f conftest.frag conftest.h
5863  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5864  cat conftest.in >> conftest.h
5865  rm -f conftest.in
5866  if cmp -s $ac_file conftest.h 2>/dev/null; then
5867    echo "$ac_file is unchanged"
5868    rm -f conftest.h
5869  else
5870    # Remove last slash and all that follows it.  Not all systems have dirname.
5871      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5872      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5873      # The file is in a subdirectory.
5874      test ! -d "$ac_dir" && mkdir "$ac_dir"
5875    fi
5876    rm -f $ac_file
5877    mv conftest.h $ac_file
5878  fi
5879fi; done
5880
5881EOF
5882cat >> $CONFIG_STATUS <<EOF
5883
5884EOF
5885cat >> $CONFIG_STATUS <<\EOF
5886\
5887 cp mod2.h ../kernel/mod2.h; \
5888 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
5889exit 0
5890EOF
5891chmod +x $CONFIG_STATUS
5892rm -fr confdefs* $ac_clean_files
5893test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5894
Note: See TracBrowser for help on using the repository browser.