source: git/Singular/configure @ a5ee42

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