source: git/Singular/configure @ 05c6849

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