source: git/Singular/configure @ b4e3253

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