source: git/Singular/configure @ d93f1e

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