source: git/Singular/configure @ ca41c34

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