source: git/Singular/configure @ bef194

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