source: git/Singular/configure @ 185af8

spielwiese
Last change on this file since 185af8 was 185af8, checked in by Olaf Bachmann <obachman@…>, 23 years ago
* HP adjustments git-svn-id: file:///usr/local/Singular/svn/trunk@4880 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 136.9 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:-10}
603SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
604VERSION_DATE=${VERSION_DATE:-"November 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
1211# check whether gcc accepts --no-rtti
1212echo $ac_n "checking whether gcc accepts --no-rtti""... $ac_c" 1>&6
1213echo "configure:1214: checking whether gcc accepts --no-rtti" >&5
1214CXXFLAGS="${CXXFLAGS} --no-rtti"
1215if eval "test \"`echo '$''{'ac_cv_cxx_have_rtti'+set}'`\" = set"; then
1216  echo $ac_n "(cached) $ac_c" 1>&6
1217else
1218  cat > conftest.$ac_ext <<EOF
1219#line 1220 "configure"
1220#include "confdefs.h"
1221
1222int main() {
1223
1224; return 0; }
1225EOF
1226if { (eval echo configure:1227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1227  rm -rf conftest*
1228  ac_cv_cxx_have_rtti=yes
1229else
1230  echo "configure: failed program was:" >&5
1231  cat conftest.$ac_ext >&5
1232  rm -rf conftest*
1233  ac_cv_cxx_have_rtti=no
1234fi
1235rm -f conftest*
1236
1237fi
1238
1239echo "$ac_t""${ac_cv_cxx_have_rtti}" 1>&6
1240if test "${ac_cv_cxx_have_rtti}" != yes; then
1241CXXFLAGS=$temp_flags
1242else
1243CXX="${CXX} --no-rtti"
1244fi
1245
1246# check whether gcc accepts --no-exceptions
1247echo $ac_n "checking whether gcc accepts --no-exceptions""... $ac_c" 1>&6
1248echo "configure:1249: checking whether gcc accepts --no-exceptions" >&5
1249CXXFLAGS="${CXXFLAGS} --no-exceptions"
1250if eval "test \"`echo '$''{'ac_cv_cxx_have_exceptions'+set}'`\" = set"; then
1251  echo $ac_n "(cached) $ac_c" 1>&6
1252else
1253  cat > conftest.$ac_ext <<EOF
1254#line 1255 "configure"
1255#include "confdefs.h"
1256
1257int main() {
1258
1259; return 0; }
1260EOF
1261if { (eval echo configure:1262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1262  rm -rf conftest*
1263  ac_cv_cxx_have_exceptions=yes
1264else
1265  echo "configure: failed program was:" >&5
1266  cat conftest.$ac_ext >&5
1267  rm -rf conftest*
1268  ac_cv_cxx_have_exceptions=no
1269fi
1270rm -f conftest*
1271
1272fi
1273
1274echo "$ac_t""${ac_cv_cxx_have_exceptions}" 1>&6
1275if test "${ac_cv_cxx_have_exceptions}" != yes; then
1276CXXFLAGS=$temp_flags
1277else
1278CXX="${CXX} --no-exceptions"
1279fi
1280
1281CXXFLAGS=$temp_flags
1282
1283fi
1284
1285# check whether the compiler accepts -pipe
1286echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
1287echo "configure:1288: checking whether compiler accepts -pipe" >&5
1288temp_cflags=${CFLAGS}
1289CFLAGS="${CFLAGS} -pipe"
1290if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then
1291  echo $ac_n "(cached) $ac_c" 1>&6
1292else
1293  cat > conftest.$ac_ext <<EOF
1294#line 1295 "configure"
1295#include "confdefs.h"
1296
1297int main() {
1298
1299; return 0; }
1300EOF
1301if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1302  rm -rf conftest*
1303  ac_cv_cxx_have_pipe=yes
1304else
1305  echo "configure: failed program was:" >&5
1306  cat conftest.$ac_ext >&5
1307  rm -rf conftest*
1308  ac_cv_cxx_have_pipe=no
1309fi
1310rm -f conftest*
1311
1312fi
1313
1314echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6
1315CFLAGS=${temp_cflags}
1316if test "${ac_cv_cxx_have_pipe}" != yes; then
1317  PIPE=
1318else
1319  PIPE="-pipe"
1320fi
1321
1322
1323# Customize CFLAGS
1324echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
1325echo "configure:1326: checking whether _AIX is defined" >&5
1326if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
1327  echo $ac_n "(cached) $ac_c" 1>&6
1328else
1329  cat > conftest.$ac_ext <<EOF
1330#line 1331 "configure"
1331#include "confdefs.h"
1332#ifdef _AIX
1333    yes
1334#endif
1335
1336EOF
1337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1338  egrep "yes" >/dev/null 2>&1; then
1339  rm -rf conftest*
1340  ac_cv_is_aix=yes
1341else
1342  rm -rf conftest*
1343  ac_cv_is_aix=no
1344fi
1345rm -f conftest*
1346
1347fi
1348
1349if test "$ac_cv_is_aix" = yes; then
1350  echo "$ac_t""yes" 1>&6
1351else
1352  echo "$ac_t""no" 1>&6
1353fi
1354
1355# we know best when compiling with gcc
1356if test "${GXX}" = yes; then
1357  if test "$ac_cxxflags_set" = no; then
1358    CXXFLAGS="-O3 -w -fomit-frame-pointer"
1359  fi
1360  CXXTEMPLFLAGS="-fno-implicit-templates"
1361  if test "$ac_cv_is_aix" = yes; then
1362    CXXNOOPTFLAGS="-w"
1363  else
1364    CXXNOOPTFLAGS=$CXXFLAGS
1365  fi
1366  STATIC_LDFLAGS="-static"
1367else
1368  CXXTEMPFLAGS=""
1369  CXXNOOPTFLAGS=$CXXFLAGS
1370  STATIC_LDFLAGS=""
1371fi
1372
1373
1374
1375
1376if test "${GCC}" = yes && test "$ac_cflags_set" = no ; then
1377  CFLAGS="-O3 -w -fomit-frame-pointer"
1378fi
1379
1380echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1381echo "configure:1382: checking whether ${MAKE-make} sets \${MAKE}" >&5
1382set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1383if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1384  echo $ac_n "(cached) $ac_c" 1>&6
1385else
1386  cat > conftestmake <<\EOF
1387all:
1388        @echo 'ac_maketemp="${MAKE}"'
1389EOF
1390# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1391eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1392if test -n "$ac_maketemp"; then
1393  eval ac_cv_prog_make_${ac_make}_set=yes
1394else
1395  eval ac_cv_prog_make_${ac_make}_set=no
1396fi
1397rm -f conftestmake
1398fi
1399if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1400  echo "$ac_t""yes" 1>&6
1401  SET_MAKE=
1402else
1403  echo "$ac_t""no" 1>&6
1404  SET_MAKE="MAKE=${MAKE-make}"
1405fi
1406
1407
1408
1409
1410
1411# expand prefix
1412test "x$prefix" = xNONE && prefix=$ac_default_prefix
1413if test "${with_rootdir+set}" != set; then
1414  cat >> confdefs.h <<EOF
1415#define S_ROOT_DIR "${prefix}"
1416EOF
1417
1418else
1419  cat >> confdefs.h <<EOF
1420#define S_ROOT_DIR "${with_rootdir}"
1421EOF
1422
1423fi
1424
1425# expand exec_prefixad
1426if test "x$exec_prefix" = xNONE; then
1427 exec_prefix=${prefix}/${ac_cv_singuname}
1428fi
1429
1430# expand bindir
1431test "x$bindir" = 'x${exec_prefix}/bin' && bindir="${exec_prefix}"
1432SINGULAR=${SINGULAR:-$bindir/Singular-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}
1433
1434cat >> confdefs.h <<EOF
1435#define S_BIN_DIR "${bindir}"
1436EOF
1437
1438
1439# expand libdir
1440test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib"
1441
1442# expand includedir
1443test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include"
1444
1445# add to -I to CPPFLAGS and and -L to LDFLAGS, just to be sure
1446LDFLAGS="-L${libdir} ${LDFLAGS} -L/usr/local/lib"
1447CPPFLAGS="-I${includedir} ${CPPFLAGS} -I/usr/local/include"
1448
1449# this is a work-around to include the right term.h
1450if test "$ac_cv_singuname" = SunOS-5; then
1451CPPFLAGS="-I/usr/xpg4/include ${CPPFLAGS}"
1452fi
1453
1454
1455
1456# lex
1457if test "${with_lex+set}" != set; then
1458  echo $ac_n "checking for flex""... $ac_c" 1>&6
1459echo "configure:1460: checking for flex" >&5
1460    if eval "test \"`echo '$''{'ac_cv_prog_flex'+set}'`\" = set"; then
1461  echo $ac_n "(cached) $ac_c" 1>&6
1462else
1463  if (flex --version >/dev/null 2>&1)
1464  then
1465    if (flex --version | egrep "[2-9]\.[5-9]" >/dev/null 2>&1)
1466    then
1467      ac_cv_prog_flex=flex
1468    fi
1469  fi
1470 
1471fi
1472
1473    if test "${ac_cv_prog_flex+set}" = set; then
1474    echo "$ac_t""flex" 1>&6
1475    LEX=flex
1476   
1477  else
1478    { echo "configure: error: can not find flex with version greater 2.4" 1>&2; exit 1; }
1479  fi
1480elif test "${with_lex}" = no; then
1481  echo "configure: warning: building without lex -- make might fail" 1>&2
1482else
1483  unset LEX
1484  unset ac_cv_prog_LEX
1485  for ac_prog in ${with_lex}
1486do
1487# Extract the first word of "$ac_prog", so it can be a program name with args.
1488set dummy $ac_prog; ac_word=$2
1489echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1490echo "configure:1491: checking for $ac_word" >&5
1491if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1492  echo $ac_n "(cached) $ac_c" 1>&6
1493else
1494  if test -n "$LEX"; then
1495  ac_cv_prog_LEX="$LEX" # Let the user override the test.
1496else
1497  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1498  ac_dummy="$PATH"
1499  for ac_dir in $ac_dummy; do
1500    test -z "$ac_dir" && ac_dir=.
1501    if test -f $ac_dir/$ac_word; then
1502      ac_cv_prog_LEX="$ac_prog"
1503      break
1504    fi
1505  done
1506  IFS="$ac_save_ifs"
1507fi
1508fi
1509LEX="$ac_cv_prog_LEX"
1510if test -n "$LEX"; then
1511  echo "$ac_t""$LEX" 1>&6
1512else
1513  echo "$ac_t""no" 1>&6
1514fi
1515
1516test -n "$LEX" && break
1517done
1518
1519  if test "x${LEX}" = x; then
1520    echo "configure: warning: building without lex -- make might fail" 1>&2
1521  fi
1522fi
1523
1524# bison
1525for ac_prog in bison
1526do
1527# Extract the first word of "$ac_prog", so it can be a program name with args.
1528set dummy $ac_prog; ac_word=$2
1529echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1530echo "configure:1531: checking for $ac_word" >&5
1531if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
1532  echo $ac_n "(cached) $ac_c" 1>&6
1533else
1534  if test -n "$BISON"; then
1535  ac_cv_prog_BISON="$BISON" # Let the user override the test.
1536else
1537  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1538  ac_dummy="$PATH"
1539  for ac_dir in $ac_dummy; do
1540    test -z "$ac_dir" && ac_dir=.
1541    if test -f $ac_dir/$ac_word; then
1542      ac_cv_prog_BISON="$ac_prog"
1543      break
1544    fi
1545  done
1546  IFS="$ac_save_ifs"
1547fi
1548fi
1549BISON="$ac_cv_prog_BISON"
1550if test -n "$BISON"; then
1551  echo "$ac_t""$BISON" 1>&6
1552else
1553  echo "$ac_t""no" 1>&6
1554fi
1555
1556test -n "$BISON" && break
1557done
1558
1559if test "${BISON+set}" != set; then
1560  echo "configure: warning: did not find bison -- make might fail" 1>&2
1561fi
1562
1563# ln -s
1564echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1565echo "configure:1566: checking whether ln -s works" >&5
1566if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1567  echo $ac_n "(cached) $ac_c" 1>&6
1568else
1569  rm -f conftestdata
1570if ln -s X conftestdata 2>/dev/null
1571then
1572  rm -f conftestdata
1573  ac_cv_prog_LN_S="ln -s"
1574else
1575  ac_cv_prog_LN_S=ln
1576fi
1577fi
1578LN_S="$ac_cv_prog_LN_S"
1579if test "$ac_cv_prog_LN_S" = "ln -s"; then
1580  echo "$ac_t""yes" 1>&6
1581else
1582  echo "$ac_t""no" 1>&6
1583fi
1584
1585
1586for ac_prog in perl5 perl
1587do
1588# Extract the first word of "$ac_prog", so it can be a program name with args.
1589set dummy $ac_prog; ac_word=$2
1590echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1591echo "configure:1592: checking for $ac_word" >&5
1592if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
1593  echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595  if test -n "$PERL"; then
1596  ac_cv_prog_PERL="$PERL" # Let the user override the test.
1597else
1598  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1599  ac_dummy="$PATH"
1600  for ac_dir in $ac_dummy; do
1601    test -z "$ac_dir" && ac_dir=.
1602    if test -f $ac_dir/$ac_word; then
1603      ac_cv_prog_PERL="$ac_prog"
1604      break
1605    fi
1606  done
1607  IFS="$ac_save_ifs"
1608fi
1609fi
1610PERL="$ac_cv_prog_PERL"
1611if test -n "$PERL"; then
1612  echo "$ac_t""$PERL" 1>&6
1613else
1614  echo "$ac_t""no" 1>&6
1615fi
1616
1617test -n "$PERL" && break
1618done
1619
1620
1621# lib checks
1622echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
1623echo "configure:1624: checking for atof in -lm" >&5
1624ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
1625if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1626  echo $ac_n "(cached) $ac_c" 1>&6
1627else
1628  ac_save_LIBS="$LIBS"
1629LIBS="-lm  $LIBS"
1630cat > conftest.$ac_ext <<EOF
1631#line 1632 "configure"
1632#include "confdefs.h"
1633/* Override any gcc2 internal prototype to avoid an error.  */
1634/* We use char because int might match the return type of a gcc2
1635    builtin and then its argument prototype would still apply.  */
1636char atof();
1637
1638int main() {
1639atof()
1640; return 0; }
1641EOF
1642if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1643  rm -rf conftest*
1644  eval "ac_cv_lib_$ac_lib_var=yes"
1645else
1646  echo "configure: failed program was:" >&5
1647  cat conftest.$ac_ext >&5
1648  rm -rf conftest*
1649  eval "ac_cv_lib_$ac_lib_var=no"
1650fi
1651rm -f conftest*
1652LIBS="$ac_save_LIBS"
1653
1654fi
1655if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1656  echo "$ac_t""yes" 1>&6
1657    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1658    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1659  cat >> confdefs.h <<EOF
1660#define $ac_tr_lib 1
1661EOF
1662
1663  LIBS="-lm $LIBS"
1664
1665else
1666  echo "$ac_t""no" 1>&6
1667fi
1668
1669SAVE_LIBS=${LIBS}
1670LIBS=
1671
1672
1673# check for dl lib
1674case "$ac_cv_singuname" in
1675        HPUX*)
1676          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1677echo "configure:1678: checking for shl_load in -ldld" >&5
1678ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1679if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1680  echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682  ac_save_LIBS="$LIBS"
1683LIBS="-ldld  $LIBS"
1684cat > conftest.$ac_ext <<EOF
1685#line 1686 "configure"
1686#include "confdefs.h"
1687/* Override any gcc2 internal prototype to avoid an error.  */
1688/* We use char because int might match the return type of a gcc2
1689    builtin and then its argument prototype would still apply.  */
1690char shl_load();
1691
1692int main() {
1693shl_load()
1694; return 0; }
1695EOF
1696if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1697  rm -rf conftest*
1698  eval "ac_cv_lib_$ac_lib_var=yes"
1699else
1700  echo "configure: failed program was:" >&5
1701  cat conftest.$ac_ext >&5
1702  rm -rf conftest*
1703  eval "ac_cv_lib_$ac_lib_var=no"
1704fi
1705rm -f conftest*
1706LIBS="$ac_save_LIBS"
1707
1708fi
1709if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1710  echo "$ac_t""yes" 1>&6
1711    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1712    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1713  cat >> confdefs.h <<EOF
1714#define $ac_tr_lib 1
1715EOF
1716
1717  LIBS="-ldld $LIBS"
1718
1719else
1720  echo "$ac_t""no" 1>&6
1721fi
1722
1723          if test "$ac_cv_lib_dld_shl_load" = yes; then
1724                LD_DYN_FLAGS="-ldld -Xlinker -E"
1725                SFLAGS="-fPIC -DPIC"
1726                SLDFLAGS=-shared
1727                ac_lib_dl=yes
1728          fi
1729        ;;
1730        *Linux*)
1731          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1732echo "configure:1733: checking for dlopen in -ldl" >&5
1733ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1734if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1735  echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737  ac_save_LIBS="$LIBS"
1738LIBS="-ldl  $LIBS"
1739cat > conftest.$ac_ext <<EOF
1740#line 1741 "configure"
1741#include "confdefs.h"
1742/* Override any gcc2 internal prototype to avoid an error.  */
1743/* We use char because int might match the return type of a gcc2
1744    builtin and then its argument prototype would still apply.  */
1745char dlopen();
1746
1747int main() {
1748dlopen()
1749; return 0; }
1750EOF
1751if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1752  rm -rf conftest*
1753  eval "ac_cv_lib_$ac_lib_var=yes"
1754else
1755  echo "configure: failed program was:" >&5
1756  cat conftest.$ac_ext >&5
1757  rm -rf conftest*
1758  eval "ac_cv_lib_$ac_lib_var=no"
1759fi
1760rm -f conftest*
1761LIBS="$ac_save_LIBS"
1762
1763fi
1764if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1765  echo "$ac_t""yes" 1>&6
1766    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1767    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1768  cat >> confdefs.h <<EOF
1769#define $ac_tr_lib 1
1770EOF
1771
1772  LIBS="-ldl $LIBS"
1773
1774else
1775  echo "$ac_t""no" 1>&6
1776fi
1777
1778          if test "$ac_cv_lib_dl_dlopen" = yes; then
1779                LD_DYN_FLAGS="-ldl -rdynamic"
1780                SFLAGS="-fpic -DPIC"
1781                SLDFLAGS=-shared
1782                ac_lib_dl=yes
1783          fi
1784        ;;
1785esac
1786
1787
1788
1789LIBS=${SAVE_LIBS}
1790
1791# heder file checks
1792echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1793echo "configure:1794: checking for ANSI C header files" >&5
1794if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1795  echo $ac_n "(cached) $ac_c" 1>&6
1796else
1797  cat > conftest.$ac_ext <<EOF
1798#line 1799 "configure"
1799#include "confdefs.h"
1800#include <stdlib.h>
1801#include <stdarg.h>
1802#include <string.h>
1803#include <float.h>
1804EOF
1805ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1806{ (eval echo configure:1807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1807ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1808if test -z "$ac_err"; then
1809  rm -rf conftest*
1810  ac_cv_header_stdc=yes
1811else
1812  echo "$ac_err" >&5
1813  echo "configure: failed program was:" >&5
1814  cat conftest.$ac_ext >&5
1815  rm -rf conftest*
1816  ac_cv_header_stdc=no
1817fi
1818rm -f conftest*
1819
1820if test $ac_cv_header_stdc = yes; then
1821  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1822cat > conftest.$ac_ext <<EOF
1823#line 1824 "configure"
1824#include "confdefs.h"
1825#include <string.h>
1826EOF
1827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1828  egrep "memchr" >/dev/null 2>&1; then
1829  :
1830else
1831  rm -rf conftest*
1832  ac_cv_header_stdc=no
1833fi
1834rm -f conftest*
1835
1836fi
1837
1838if test $ac_cv_header_stdc = yes; then
1839  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1840cat > conftest.$ac_ext <<EOF
1841#line 1842 "configure"
1842#include "confdefs.h"
1843#include <stdlib.h>
1844EOF
1845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1846  egrep "free" >/dev/null 2>&1; then
1847  :
1848else
1849  rm -rf conftest*
1850  ac_cv_header_stdc=no
1851fi
1852rm -f conftest*
1853
1854fi
1855
1856if test $ac_cv_header_stdc = yes; then
1857  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1858if test "$cross_compiling" = yes; then
1859  :
1860else
1861  cat > conftest.$ac_ext <<EOF
1862#line 1863 "configure"
1863#include "confdefs.h"
1864#include <ctype.h>
1865#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1866#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1867#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1868int main () { int i; for (i = 0; i < 256; i++)
1869if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1870exit (0); }
1871
1872EOF
1873if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1874then
1875  :
1876else
1877  echo "configure: failed program was:" >&5
1878  cat conftest.$ac_ext >&5
1879  rm -fr conftest*
1880  ac_cv_header_stdc=no
1881fi
1882rm -fr conftest*
1883fi
1884
1885fi
1886fi
1887
1888echo "$ac_t""$ac_cv_header_stdc" 1>&6
1889if test $ac_cv_header_stdc = yes; then
1890  cat >> confdefs.h <<\EOF
1891#define STDC_HEADERS 1
1892EOF
1893
1894fi
1895
1896for ac_hdr in limits.h unistd.h
1897do
1898ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1899echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1900echo "configure:1901: checking for $ac_hdr" >&5
1901if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1902  echo $ac_n "(cached) $ac_c" 1>&6
1903else
1904  cat > conftest.$ac_ext <<EOF
1905#line 1906 "configure"
1906#include "confdefs.h"
1907#include <$ac_hdr>
1908EOF
1909ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1910{ (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1911ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1912if test -z "$ac_err"; then
1913  rm -rf conftest*
1914  eval "ac_cv_header_$ac_safe=yes"
1915else
1916  echo "$ac_err" >&5
1917  echo "configure: failed program was:" >&5
1918  cat conftest.$ac_ext >&5
1919  rm -rf conftest*
1920  eval "ac_cv_header_$ac_safe=no"
1921fi
1922rm -f conftest*
1923fi
1924if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1925  echo "$ac_t""yes" 1>&6
1926    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1927  cat >> confdefs.h <<EOF
1928#define $ac_tr_hdr 1
1929EOF
1930 
1931else
1932  echo "$ac_t""no" 1>&6
1933{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
1934fi
1935done
1936
1937
1938for 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
1939do
1940ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1941echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1942echo "configure:1943: checking for $ac_hdr" >&5
1943if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1944  echo $ac_n "(cached) $ac_c" 1>&6
1945else
1946  cat > conftest.$ac_ext <<EOF
1947#line 1948 "configure"
1948#include "confdefs.h"
1949#include <$ac_hdr>
1950EOF
1951ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1952{ (eval echo configure:1953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1953ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1954if test -z "$ac_err"; then
1955  rm -rf conftest*
1956  eval "ac_cv_header_$ac_safe=yes"
1957else
1958  echo "$ac_err" >&5
1959  echo "configure: failed program was:" >&5
1960  cat conftest.$ac_ext >&5
1961  rm -rf conftest*
1962  eval "ac_cv_header_$ac_safe=no"
1963fi
1964rm -f conftest*
1965fi
1966if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1967  echo "$ac_t""yes" 1>&6
1968    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1969  cat >> confdefs.h <<EOF
1970#define $ac_tr_hdr 1
1971EOF
1972 
1973else
1974  echo "$ac_t""no" 1>&6
1975fi
1976done
1977
1978
1979# typedefs, structures
1980echo $ac_n "checking for working const""... $ac_c" 1>&6
1981echo "configure:1982: checking for working const" >&5
1982if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1983  echo $ac_n "(cached) $ac_c" 1>&6
1984else
1985  cat > conftest.$ac_ext <<EOF
1986#line 1987 "configure"
1987#include "confdefs.h"
1988
1989int main() {
1990
1991/* Ultrix mips cc rejects this.  */
1992typedef int charset[2]; const charset x;
1993/* SunOS 4.1.1 cc rejects this.  */
1994char const *const *ccp;
1995char **p;
1996/* NEC SVR4.0.2 mips cc rejects this.  */
1997struct point {int x, y;};
1998static struct point const zero = {0,0};
1999/* AIX XL C 1.02.0.0 rejects this.
2000   It does not let you subtract one const X* pointer from another in an arm
2001   of an if-expression whose if-part is not a constant expression */
2002const char *g = "string";
2003ccp = &g + (g ? g-g : 0);
2004/* HPUX 7.0 cc rejects these. */
2005++ccp;
2006p = (char**) ccp;
2007ccp = (char const *const *) p;
2008{ /* SCO 3.2v4 cc rejects this.  */
2009  char *t;
2010  char const *s = 0 ? (char *) 0 : (char const *) 0;
2011
2012  *t++ = 0;
2013}
2014{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2015  int x[] = {25, 17};
2016  const int *foo = &x[0];
2017  ++foo;
2018}
2019{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2020  typedef const int *iptr;
2021  iptr p = 0;
2022  ++p;
2023}
2024{ /* AIX XL C 1.02.0.0 rejects this saying
2025     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2026  struct s { int j; const int *ap[3]; };
2027  struct s *b; b->j = 5;
2028}
2029{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2030  const int foo = 10;
2031}
2032
2033; return 0; }
2034EOF
2035if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2036  rm -rf conftest*
2037  ac_cv_c_const=yes
2038else
2039  echo "configure: failed program was:" >&5
2040  cat conftest.$ac_ext >&5
2041  rm -rf conftest*
2042  ac_cv_c_const=no
2043fi
2044rm -f conftest*
2045fi
2046
2047echo "$ac_t""$ac_cv_c_const" 1>&6
2048if test $ac_cv_c_const = no; then
2049  cat >> confdefs.h <<\EOF
2050#define const
2051EOF
2052
2053fi
2054
2055echo $ac_n "checking for inline""... $ac_c" 1>&6
2056echo "configure:2057: checking for inline" >&5
2057if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2058  echo $ac_n "(cached) $ac_c" 1>&6
2059else
2060  ac_cv_c_inline=no
2061for ac_kw in inline __inline__ __inline; do
2062  cat > conftest.$ac_ext <<EOF
2063#line 2064 "configure"
2064#include "confdefs.h"
2065
2066int main() {
2067} $ac_kw foo() {
2068; return 0; }
2069EOF
2070if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2071  rm -rf conftest*
2072  ac_cv_c_inline=$ac_kw; break
2073else
2074  echo "configure: failed program was:" >&5
2075  cat conftest.$ac_ext >&5
2076fi
2077rm -f conftest*
2078done
2079
2080fi
2081
2082echo "$ac_t""$ac_cv_c_inline" 1>&6
2083case "$ac_cv_c_inline" in
2084  inline | yes) ;;
2085  no) cat >> confdefs.h <<\EOF
2086#define inline
2087EOF
2088 ;;
2089  *)  cat >> confdefs.h <<EOF
2090#define inline $ac_cv_c_inline
2091EOF
2092 ;;
2093esac
2094
2095echo $ac_n "checking for size_t""... $ac_c" 1>&6
2096echo "configure:2097: checking for size_t" >&5
2097if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2098  echo $ac_n "(cached) $ac_c" 1>&6
2099else
2100  cat > conftest.$ac_ext <<EOF
2101#line 2102 "configure"
2102#include "confdefs.h"
2103#include <sys/types.h>
2104#if STDC_HEADERS
2105#include <stdlib.h>
2106#include <stddef.h>
2107#endif
2108EOF
2109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2110  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2111  rm -rf conftest*
2112  ac_cv_type_size_t=yes
2113else
2114  rm -rf conftest*
2115  ac_cv_type_size_t=no
2116fi
2117rm -f conftest*
2118
2119fi
2120echo "$ac_t""$ac_cv_type_size_t" 1>&6
2121if test $ac_cv_type_size_t = no; then
2122  cat >> confdefs.h <<\EOF
2123#define size_t unsigned
2124EOF
2125
2126fi
2127
2128echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2129echo "configure:2130: checking whether time.h and sys/time.h may both be included" >&5
2130if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2131  echo $ac_n "(cached) $ac_c" 1>&6
2132else
2133  cat > conftest.$ac_ext <<EOF
2134#line 2135 "configure"
2135#include "confdefs.h"
2136#include <sys/types.h>
2137#include <sys/time.h>
2138#include <time.h>
2139int main() {
2140struct tm *tp;
2141; return 0; }
2142EOF
2143if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2144  rm -rf conftest*
2145  ac_cv_header_time=yes
2146else
2147  echo "configure: failed program was:" >&5
2148  cat conftest.$ac_ext >&5
2149  rm -rf conftest*
2150  ac_cv_header_time=no
2151fi
2152rm -f conftest*
2153fi
2154
2155echo "$ac_t""$ac_cv_header_time" 1>&6
2156if test $ac_cv_header_time = yes; then
2157  cat >> confdefs.h <<\EOF
2158#define TIME_WITH_SYS_TIME 1
2159EOF
2160
2161fi
2162
2163echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2164echo "configure:2165: checking whether struct tm is in sys/time.h or time.h" >&5
2165if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2166  echo $ac_n "(cached) $ac_c" 1>&6
2167else
2168  cat > conftest.$ac_ext <<EOF
2169#line 2170 "configure"
2170#include "confdefs.h"
2171#include <sys/types.h>
2172#include <time.h>
2173int main() {
2174struct tm *tp; tp->tm_sec;
2175; return 0; }
2176EOF
2177if { (eval echo configure:2178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2178  rm -rf conftest*
2179  ac_cv_struct_tm=time.h
2180else
2181  echo "configure: failed program was:" >&5
2182  cat conftest.$ac_ext >&5
2183  rm -rf conftest*
2184  ac_cv_struct_tm=sys/time.h
2185fi
2186rm -f conftest*
2187fi
2188
2189echo "$ac_t""$ac_cv_struct_tm" 1>&6
2190if test $ac_cv_struct_tm = sys/time.h; then
2191  cat >> confdefs.h <<\EOF
2192#define TM_IN_SYS_TIME 1
2193EOF
2194
2195fi
2196
2197
2198# library functions.
2199# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2200# for constant arguments.  Useless!
2201echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2202echo "configure:2203: checking for working alloca.h" >&5
2203if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2204  echo $ac_n "(cached) $ac_c" 1>&6
2205else
2206  cat > conftest.$ac_ext <<EOF
2207#line 2208 "configure"
2208#include "confdefs.h"
2209#include <alloca.h>
2210int main() {
2211char *p = alloca(2 * sizeof(int));
2212; return 0; }
2213EOF
2214if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2215  rm -rf conftest*
2216  ac_cv_header_alloca_h=yes
2217else
2218  echo "configure: failed program was:" >&5
2219  cat conftest.$ac_ext >&5
2220  rm -rf conftest*
2221  ac_cv_header_alloca_h=no
2222fi
2223rm -f conftest*
2224fi
2225
2226echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2227if test $ac_cv_header_alloca_h = yes; then
2228  cat >> confdefs.h <<\EOF
2229#define HAVE_ALLOCA_H 1
2230EOF
2231
2232fi
2233
2234echo $ac_n "checking for alloca""... $ac_c" 1>&6
2235echo "configure:2236: checking for alloca" >&5
2236if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2237  echo $ac_n "(cached) $ac_c" 1>&6
2238else
2239  cat > conftest.$ac_ext <<EOF
2240#line 2241 "configure"
2241#include "confdefs.h"
2242
2243#ifdef __GNUC__
2244# define alloca __builtin_alloca
2245#else
2246# ifdef _MSC_VER
2247#  include <malloc.h>
2248#  define alloca _alloca
2249# else
2250#  if HAVE_ALLOCA_H
2251#   include <alloca.h>
2252#  else
2253#   ifdef _AIX
2254 #pragma alloca
2255#   else
2256#    ifndef alloca /* predefined by HP cc +Olibcalls */
2257char *alloca ();
2258#    endif
2259#   endif
2260#  endif
2261# endif
2262#endif
2263
2264int main() {
2265char *p = (char *) alloca(1);
2266; return 0; }
2267EOF
2268if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2269  rm -rf conftest*
2270  ac_cv_func_alloca_works=yes
2271else
2272  echo "configure: failed program was:" >&5
2273  cat conftest.$ac_ext >&5
2274  rm -rf conftest*
2275  ac_cv_func_alloca_works=no
2276fi
2277rm -f conftest*
2278fi
2279
2280echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2281if test $ac_cv_func_alloca_works = yes; then
2282  cat >> confdefs.h <<\EOF
2283#define HAVE_ALLOCA 1
2284EOF
2285
2286fi
2287
2288if test $ac_cv_func_alloca_works = no; then
2289  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2290  # that cause trouble.  Some versions do not even contain alloca or
2291  # contain a buggy version.  If you still want to use their alloca,
2292  # use ar to extract alloca.o from them instead of compiling alloca.c.
2293  ALLOCA=alloca.${ac_objext}
2294  cat >> confdefs.h <<\EOF
2295#define C_ALLOCA 1
2296EOF
2297
2298
2299echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2300echo "configure:2301: checking whether alloca needs Cray hooks" >&5
2301if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2302  echo $ac_n "(cached) $ac_c" 1>&6
2303else
2304  cat > conftest.$ac_ext <<EOF
2305#line 2306 "configure"
2306#include "confdefs.h"
2307#if defined(CRAY) && ! defined(CRAY2)
2308webecray
2309#else
2310wenotbecray
2311#endif
2312
2313EOF
2314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2315  egrep "webecray" >/dev/null 2>&1; then
2316  rm -rf conftest*
2317  ac_cv_os_cray=yes
2318else
2319  rm -rf conftest*
2320  ac_cv_os_cray=no
2321fi
2322rm -f conftest*
2323
2324fi
2325
2326echo "$ac_t""$ac_cv_os_cray" 1>&6
2327if test $ac_cv_os_cray = yes; then
2328for ac_func in _getb67 GETB67 getb67; do
2329  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2330echo "configure:2331: checking for $ac_func" >&5
2331if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2332  echo $ac_n "(cached) $ac_c" 1>&6
2333else
2334  cat > conftest.$ac_ext <<EOF
2335#line 2336 "configure"
2336#include "confdefs.h"
2337/* System header to define __stub macros and hopefully few prototypes,
2338    which can conflict with char $ac_func(); below.  */
2339#include <assert.h>
2340/* Override any gcc2 internal prototype to avoid an error.  */
2341/* We use char because int might match the return type of a gcc2
2342    builtin and then its argument prototype would still apply.  */
2343char $ac_func();
2344
2345int main() {
2346
2347/* The GNU C library defines this for functions which it implements
2348    to always fail with ENOSYS.  Some functions are actually named
2349    something starting with __ and the normal name is an alias.  */
2350#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2351choke me
2352#else
2353$ac_func();
2354#endif
2355
2356; return 0; }
2357EOF
2358if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2359  rm -rf conftest*
2360  eval "ac_cv_func_$ac_func=yes"
2361else
2362  echo "configure: failed program was:" >&5
2363  cat conftest.$ac_ext >&5
2364  rm -rf conftest*
2365  eval "ac_cv_func_$ac_func=no"
2366fi
2367rm -f conftest*
2368fi
2369
2370if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2371  echo "$ac_t""yes" 1>&6
2372  cat >> confdefs.h <<EOF
2373#define CRAY_STACKSEG_END $ac_func
2374EOF
2375
2376  break
2377else
2378  echo "$ac_t""no" 1>&6
2379fi
2380
2381done
2382fi
2383
2384echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2385echo "configure:2386: checking stack direction for C alloca" >&5
2386if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2387  echo $ac_n "(cached) $ac_c" 1>&6
2388else
2389  if test "$cross_compiling" = yes; then
2390  ac_cv_c_stack_direction=0
2391else
2392  cat > conftest.$ac_ext <<EOF
2393#line 2394 "configure"
2394#include "confdefs.h"
2395find_stack_direction ()
2396{
2397  static char *addr = 0;
2398  auto char dummy;
2399  if (addr == 0)
2400    {
2401      addr = &dummy;
2402      return find_stack_direction ();
2403    }
2404  else
2405    return (&dummy > addr) ? 1 : -1;
2406}
2407main ()
2408{
2409  exit (find_stack_direction() < 0);
2410}
2411EOF
2412if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2413then
2414  ac_cv_c_stack_direction=1
2415else
2416  echo "configure: failed program was:" >&5
2417  cat conftest.$ac_ext >&5
2418  rm -fr conftest*
2419  ac_cv_c_stack_direction=-1
2420fi
2421rm -fr conftest*
2422fi
2423
2424fi
2425
2426echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2427cat >> confdefs.h <<EOF
2428#define STACK_DIRECTION $ac_cv_c_stack_direction
2429EOF
2430
2431fi
2432
2433if test $ac_cv_prog_gcc = yes; then
2434    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2435echo "configure:2436: checking whether ${CC-cc} needs -traditional" >&5
2436if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2437  echo $ac_n "(cached) $ac_c" 1>&6
2438else
2439    ac_pattern="Autoconf.*'x'"
2440  cat > conftest.$ac_ext <<EOF
2441#line 2442 "configure"
2442#include "confdefs.h"
2443#include <sgtty.h>
2444Autoconf TIOCGETP
2445EOF
2446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2447  egrep "$ac_pattern" >/dev/null 2>&1; then
2448  rm -rf conftest*
2449  ac_cv_prog_gcc_traditional=yes
2450else
2451  rm -rf conftest*
2452  ac_cv_prog_gcc_traditional=no
2453fi
2454rm -f conftest*
2455
2456
2457  if test $ac_cv_prog_gcc_traditional = no; then
2458    cat > conftest.$ac_ext <<EOF
2459#line 2460 "configure"
2460#include "confdefs.h"
2461#include <termio.h>
2462Autoconf TCGETA
2463EOF
2464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2465  egrep "$ac_pattern" >/dev/null 2>&1; then
2466  rm -rf conftest*
2467  ac_cv_prog_gcc_traditional=yes
2468fi
2469rm -f conftest*
2470
2471  fi
2472fi
2473
2474echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2475  if test $ac_cv_prog_gcc_traditional = yes; then
2476    CC="$CC -traditional"
2477  fi
2478fi
2479
2480for ac_hdr in unistd.h
2481do
2482ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2483echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2484echo "configure:2485: checking for $ac_hdr" >&5
2485if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2486  echo $ac_n "(cached) $ac_c" 1>&6
2487else
2488  cat > conftest.$ac_ext <<EOF
2489#line 2490 "configure"
2490#include "confdefs.h"
2491#include <$ac_hdr>
2492EOF
2493ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2494{ (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2495ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2496if test -z "$ac_err"; then
2497  rm -rf conftest*
2498  eval "ac_cv_header_$ac_safe=yes"
2499else
2500  echo "$ac_err" >&5
2501  echo "configure: failed program was:" >&5
2502  cat conftest.$ac_ext >&5
2503  rm -rf conftest*
2504  eval "ac_cv_header_$ac_safe=no"
2505fi
2506rm -f conftest*
2507fi
2508if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2509  echo "$ac_t""yes" 1>&6
2510    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2511  cat >> confdefs.h <<EOF
2512#define $ac_tr_hdr 1
2513EOF
2514 
2515else
2516  echo "$ac_t""no" 1>&6
2517fi
2518done
2519
2520for ac_func in getpagesize
2521do
2522echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2523echo "configure:2524: checking for $ac_func" >&5
2524if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2525  echo $ac_n "(cached) $ac_c" 1>&6
2526else
2527  cat > conftest.$ac_ext <<EOF
2528#line 2529 "configure"
2529#include "confdefs.h"
2530/* System header to define __stub macros and hopefully few prototypes,
2531    which can conflict with char $ac_func(); below.  */
2532#include <assert.h>
2533/* Override any gcc2 internal prototype to avoid an error.  */
2534/* We use char because int might match the return type of a gcc2
2535    builtin and then its argument prototype would still apply.  */
2536char $ac_func();
2537
2538int main() {
2539
2540/* The GNU C library defines this for functions which it implements
2541    to always fail with ENOSYS.  Some functions are actually named
2542    something starting with __ and the normal name is an alias.  */
2543#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2544choke me
2545#else
2546$ac_func();
2547#endif
2548
2549; return 0; }
2550EOF
2551if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2552  rm -rf conftest*
2553  eval "ac_cv_func_$ac_func=yes"
2554else
2555  echo "configure: failed program was:" >&5
2556  cat conftest.$ac_ext >&5
2557  rm -rf conftest*
2558  eval "ac_cv_func_$ac_func=no"
2559fi
2560rm -f conftest*
2561fi
2562
2563if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2564  echo "$ac_t""yes" 1>&6
2565    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2566  cat >> confdefs.h <<EOF
2567#define $ac_tr_func 1
2568EOF
2569 
2570else
2571  echo "$ac_t""no" 1>&6
2572fi
2573done
2574
2575echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2576echo "configure:2577: checking for working mmap" >&5
2577if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2578  echo $ac_n "(cached) $ac_c" 1>&6
2579else
2580  if test "$cross_compiling" = yes; then
2581  ac_cv_func_mmap_fixed_mapped=no
2582else
2583  cat > conftest.$ac_ext <<EOF
2584#line 2585 "configure"
2585#include "confdefs.h"
2586
2587/* Thanks to Mike Haertel and Jim Avera for this test.
2588   Here is a matrix of mmap possibilities:
2589        mmap private not fixed
2590        mmap private fixed at somewhere currently unmapped
2591        mmap private fixed at somewhere already mapped
2592        mmap shared not fixed
2593        mmap shared fixed at somewhere currently unmapped
2594        mmap shared fixed at somewhere already mapped
2595   For private mappings, we should verify that changes cannot be read()
2596   back from the file, nor mmap's back from the file at a different
2597   address.  (There have been systems where private was not correctly
2598   implemented like the infamous i386 svr4.0, and systems where the
2599   VM page cache was not coherent with the filesystem buffer cache
2600   like early versions of FreeBSD and possibly contemporary NetBSD.)
2601   For shared mappings, we should conversely verify that changes get
2602   propogated back to all the places they're supposed to be.
2603
2604   Grep wants private fixed already mapped.
2605   The main things grep needs to know about mmap are:
2606   * does it exist and is it safe to write into the mmap'd area
2607   * how to use it (BSD variants)  */
2608#include <sys/types.h>
2609#include <fcntl.h>
2610#include <sys/mman.h>
2611
2612/* This mess was copied from the GNU getpagesize.h.  */
2613#ifndef HAVE_GETPAGESIZE
2614# ifdef HAVE_UNISTD_H
2615#  include <unistd.h>
2616# endif
2617
2618/* Assume that all systems that can run configure have sys/param.h.  */
2619# ifndef HAVE_SYS_PARAM_H
2620#  define HAVE_SYS_PARAM_H 1
2621# endif
2622
2623# ifdef _SC_PAGESIZE
2624#  define getpagesize() sysconf(_SC_PAGESIZE)
2625# else /* no _SC_PAGESIZE */
2626#  ifdef HAVE_SYS_PARAM_H
2627#   include <sys/param.h>
2628#   ifdef EXEC_PAGESIZE
2629#    define getpagesize() EXEC_PAGESIZE
2630#   else /* no EXEC_PAGESIZE */
2631#    ifdef NBPG
2632#     define getpagesize() NBPG * CLSIZE
2633#     ifndef CLSIZE
2634#      define CLSIZE 1
2635#     endif /* no CLSIZE */
2636#    else /* no NBPG */
2637#     ifdef NBPC
2638#      define getpagesize() NBPC
2639#     else /* no NBPC */
2640#      ifdef PAGESIZE
2641#       define getpagesize() PAGESIZE
2642#      endif /* PAGESIZE */
2643#     endif /* no NBPC */
2644#    endif /* no NBPG */
2645#   endif /* no EXEC_PAGESIZE */
2646#  else /* no HAVE_SYS_PARAM_H */
2647#   define getpagesize() 8192   /* punt totally */
2648#  endif /* no HAVE_SYS_PARAM_H */
2649# endif /* no _SC_PAGESIZE */
2650
2651#endif /* no HAVE_GETPAGESIZE */
2652
2653#ifdef __cplusplus
2654extern "C" { void *malloc(unsigned); }
2655#else
2656char *malloc();
2657#endif
2658
2659int
2660main()
2661{
2662        char *data, *data2, *data3;
2663        int i, pagesize;
2664        int fd;
2665
2666        pagesize = getpagesize();
2667
2668        /*
2669         * First, make a file with some known garbage in it.
2670         */
2671        data = malloc(pagesize);
2672        if (!data)
2673                exit(1);
2674        for (i = 0; i < pagesize; ++i)
2675                *(data + i) = rand();
2676        umask(0);
2677        fd = creat("conftestmmap", 0600);
2678        if (fd < 0)
2679                exit(1);
2680        if (write(fd, data, pagesize) != pagesize)
2681                exit(1);
2682        close(fd);
2683
2684        /*
2685         * Next, try to mmap the file at a fixed address which
2686         * already has something else allocated at it.  If we can,
2687         * also make sure that we see the same garbage.
2688         */
2689        fd = open("conftestmmap", O_RDWR);
2690        if (fd < 0)
2691                exit(1);
2692        data2 = malloc(2 * pagesize);
2693        if (!data2)
2694                exit(1);
2695        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2696        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2697            MAP_PRIVATE | MAP_FIXED, fd, 0L))
2698                exit(1);
2699        for (i = 0; i < pagesize; ++i)
2700                if (*(data + i) != *(data2 + i))
2701                        exit(1);
2702
2703        /*
2704         * Finally, make sure that changes to the mapped area
2705         * do not percolate back to the file as seen by read().
2706         * (This is a bug on some variants of i386 svr4.0.)
2707         */
2708        for (i = 0; i < pagesize; ++i)
2709                *(data2 + i) = *(data2 + i) + 1;
2710        data3 = malloc(pagesize);
2711        if (!data3)
2712                exit(1);
2713        if (read(fd, data3, pagesize) != pagesize)
2714                exit(1);
2715        for (i = 0; i < pagesize; ++i)
2716                if (*(data + i) != *(data3 + i))
2717                        exit(1);
2718        close(fd);
2719        unlink("conftestmmap");
2720        exit(0);
2721}
2722
2723EOF
2724if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2725then
2726  ac_cv_func_mmap_fixed_mapped=yes
2727else
2728  echo "configure: failed program was:" >&5
2729  cat conftest.$ac_ext >&5
2730  rm -fr conftest*
2731  ac_cv_func_mmap_fixed_mapped=no
2732fi
2733rm -fr conftest*
2734fi
2735
2736fi
2737
2738echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2739if test $ac_cv_func_mmap_fixed_mapped = yes; then
2740  cat >> confdefs.h <<\EOF
2741#define HAVE_MMAP 1
2742EOF
2743
2744fi
2745
2746echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2747echo "configure:2748: checking return type of signal handlers" >&5
2748if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2749  echo $ac_n "(cached) $ac_c" 1>&6
2750else
2751  cat > conftest.$ac_ext <<EOF
2752#line 2753 "configure"
2753#include "confdefs.h"
2754#include <sys/types.h>
2755#include <signal.h>
2756#ifdef signal
2757#undef signal
2758#endif
2759#ifdef __cplusplus
2760extern "C" void (*signal (int, void (*)(int)))(int);
2761#else
2762void (*signal ()) ();
2763#endif
2764
2765int main() {
2766int i;
2767; return 0; }
2768EOF
2769if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2770  rm -rf conftest*
2771  ac_cv_type_signal=void
2772else
2773  echo "configure: failed program was:" >&5
2774  cat conftest.$ac_ext >&5
2775  rm -rf conftest*
2776  ac_cv_type_signal=int
2777fi
2778rm -f conftest*
2779fi
2780
2781echo "$ac_t""$ac_cv_type_signal" 1>&6
2782cat >> confdefs.h <<EOF
2783#define RETSIGTYPE $ac_cv_type_signal
2784EOF
2785
2786
2787echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2788echo "configure:2789: checking for vprintf" >&5
2789if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2790  echo $ac_n "(cached) $ac_c" 1>&6
2791else
2792  cat > conftest.$ac_ext <<EOF
2793#line 2794 "configure"
2794#include "confdefs.h"
2795/* System header to define __stub macros and hopefully few prototypes,
2796    which can conflict with char vprintf(); below.  */
2797#include <assert.h>
2798/* Override any gcc2 internal prototype to avoid an error.  */
2799/* We use char because int might match the return type of a gcc2
2800    builtin and then its argument prototype would still apply.  */
2801char vprintf();
2802
2803int main() {
2804
2805/* The GNU C library defines this for functions which it implements
2806    to always fail with ENOSYS.  Some functions are actually named
2807    something starting with __ and the normal name is an alias.  */
2808#if defined (__stub_vprintf) || defined (__stub___vprintf)
2809choke me
2810#else
2811vprintf();
2812#endif
2813
2814; return 0; }
2815EOF
2816if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2817  rm -rf conftest*
2818  eval "ac_cv_func_vprintf=yes"
2819else
2820  echo "configure: failed program was:" >&5
2821  cat conftest.$ac_ext >&5
2822  rm -rf conftest*
2823  eval "ac_cv_func_vprintf=no"
2824fi
2825rm -f conftest*
2826fi
2827
2828if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2829  echo "$ac_t""yes" 1>&6
2830  cat >> confdefs.h <<\EOF
2831#define HAVE_VPRINTF 1
2832EOF
2833
2834else
2835  echo "$ac_t""no" 1>&6
2836fi
2837
2838if test "$ac_cv_func_vprintf" != yes; then
2839echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2840echo "configure:2841: checking for _doprnt" >&5
2841if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2842  echo $ac_n "(cached) $ac_c" 1>&6
2843else
2844  cat > conftest.$ac_ext <<EOF
2845#line 2846 "configure"
2846#include "confdefs.h"
2847/* System header to define __stub macros and hopefully few prototypes,
2848    which can conflict with char _doprnt(); below.  */
2849#include <assert.h>
2850/* Override any gcc2 internal prototype to avoid an error.  */
2851/* We use char because int might match the return type of a gcc2
2852    builtin and then its argument prototype would still apply.  */
2853char _doprnt();
2854
2855int main() {
2856
2857/* The GNU C library defines this for functions which it implements
2858    to always fail with ENOSYS.  Some functions are actually named
2859    something starting with __ and the normal name is an alias.  */
2860#if defined (__stub__doprnt) || defined (__stub____doprnt)
2861choke me
2862#else
2863_doprnt();
2864#endif
2865
2866; return 0; }
2867EOF
2868if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2869  rm -rf conftest*
2870  eval "ac_cv_func__doprnt=yes"
2871else
2872  echo "configure: failed program was:" >&5
2873  cat conftest.$ac_ext >&5
2874  rm -rf conftest*
2875  eval "ac_cv_func__doprnt=no"
2876fi
2877rm -f conftest*
2878fi
2879
2880if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2881  echo "$ac_t""yes" 1>&6
2882  cat >> confdefs.h <<\EOF
2883#define HAVE_DOPRNT 1
2884EOF
2885
2886else
2887  echo "$ac_t""no" 1>&6
2888fi
2889
2890fi
2891
2892for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink sleep usleep setenv getpwnam popen
2893do
2894echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2895echo "configure:2896: checking for $ac_func" >&5
2896if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2897  echo $ac_n "(cached) $ac_c" 1>&6
2898else
2899  cat > conftest.$ac_ext <<EOF
2900#line 2901 "configure"
2901#include "confdefs.h"
2902/* System header to define __stub macros and hopefully few prototypes,
2903    which can conflict with char $ac_func(); below.  */
2904#include <assert.h>
2905/* Override any gcc2 internal prototype to avoid an error.  */
2906/* We use char because int might match the return type of a gcc2
2907    builtin and then its argument prototype would still apply.  */
2908char $ac_func();
2909
2910int main() {
2911
2912/* The GNU C library defines this for functions which it implements
2913    to always fail with ENOSYS.  Some functions are actually named
2914    something starting with __ and the normal name is an alias.  */
2915#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2916choke me
2917#else
2918$ac_func();
2919#endif
2920
2921; return 0; }
2922EOF
2923if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2924  rm -rf conftest*
2925  eval "ac_cv_func_$ac_func=yes"
2926else
2927  echo "configure: failed program was:" >&5
2928  cat conftest.$ac_ext >&5
2929  rm -rf conftest*
2930  eval "ac_cv_func_$ac_func=no"
2931fi
2932rm -f conftest*
2933fi
2934
2935if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2936  echo "$ac_t""yes" 1>&6
2937    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2938  cat >> confdefs.h <<EOF
2939#define $ac_tr_func 1
2940EOF
2941 
2942else
2943  echo "$ac_t""no" 1>&6
2944fi
2945done
2946
2947
2948
2949# arithmetic shifts
2950echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
2951echo "configure:2952: checking whether your machine has correct arithmetic shifts" >&5
2952if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
2953  echo $ac_n "(cached) $ac_c" 1>&6
2954else
2955  if test "$cross_compiling" = yes; then
2956  if test "$ac_c_cross_dos" = yes; then
2957     ac_cv_shift=yes;
2958   else
2959     echo "$ac_t""no" 1>&6
2960     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
2961   fi
2962else
2963  cat > conftest.$ac_ext <<EOF
2964#line 2965 "configure"
2965#include "confdefs.h"
2966 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
2967EOF
2968if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2969then
2970  ac_cv_shift=yes
2971else
2972  echo "configure: failed program was:" >&5
2973  cat conftest.$ac_ext >&5
2974  rm -fr conftest*
2975  ac_cv_shift=no
2976fi
2977rm -fr conftest*
2978fi
2979
2980fi
2981
2982
2983if test "$ac_cv_shift" = yes; then
2984  echo "$ac_t""yes" 1>&6
2985else
2986  echo "$ac_t""no" 1>&6
2987  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
2988fi
2989
2990
2991# check for a peculiar constructor initialization
2992echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
2993echo "configure:2994: checking whether explicit C++ constructor calls are allowed" >&5
2994
2995ac_ext=C
2996# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2997ac_cpp='$CXXCPP $CPPFLAGS'
2998ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2999ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3000cross_compiling=$ac_cv_prog_cxx_cross
3001
3002if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then
3003  echo $ac_n "(cached) $ac_c" 1>&6
3004else
3005  cat > conftest.$ac_ext <<EOF
3006#line 3007 "configure"
3007#include "confdefs.h"
3008
3009int main() {
3010class testclass
3011  {
3012  public:
3013    int value;
3014    testclass() : value(0) {}
3015    testclass( int i ) : value(i) {}
3016    ~testclass() { value = 0; }
3017  };
3018
3019  testclass ptr;
3020  ptr.testclass(1);
3021
3022; return 0; }
3023EOF
3024if { (eval echo configure:3025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3025  rm -rf conftest*
3026  ac_cv_explicit_const=yes
3027else
3028  echo "configure: failed program was:" >&5
3029  cat conftest.$ac_ext >&5
3030  rm -rf conftest*
3031  ac_cv_explicit_const=no
3032fi
3033rm -f conftest*
3034fi
3035
3036ac_ext=c
3037# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3038ac_cpp='$CPP $CPPFLAGS'
3039ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3040ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3041cross_compiling=$ac_cv_prog_cc_cross
3042
3043echo "$ac_t""$ac_cv_explicit_const" 1>&6
3044if test "$ac_cv_explicit_const" = yes; then
3045  cat >> confdefs.h <<\EOF
3046#define HAVE_EXPLICIT_CONSTR 1
3047EOF
3048
3049fi
3050
3051# sprintf returns number of printed chars
3052echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3053echo "configure:3054: checking whether vsprintf returns number of printed chars" >&5
3054if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3055  echo $ac_n "(cached) $ac_c" 1>&6
3056else
3057  if test "$cross_compiling" = yes; then
3058  ac_cv_returns_n_of_chars=no
3059else
3060  cat > conftest.$ac_ext <<EOF
3061#line 3062 "configure"
3062#include "confdefs.h"
3063#include <stdio.h>
3064 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3065EOF
3066if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3067then
3068  ac_cv_returns_n_of_chars=yes
3069else
3070  echo "configure: failed program was:" >&5
3071  cat conftest.$ac_ext >&5
3072  rm -fr conftest*
3073  ac_cv_returns_n_of_chars=no
3074fi
3075rm -fr conftest*
3076fi
3077
3078fi
3079
3080if test "$ac_cv_returns_n_of_chars" = yes; then
3081  echo "$ac_t""yes" 1>&6
3082else
3083  echo "$ac_t""no" 1>&6
3084  cat >> confdefs.h <<\EOF
3085#define BSD_SPRINTF 1
3086EOF
3087
3088fi
3089
3090# determine ALIGN_8
3091echo $ac_n "checking size of char""... $ac_c" 1>&6
3092echo "configure:3093: checking size of char" >&5
3093if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3094  echo $ac_n "(cached) $ac_c" 1>&6
3095else
3096  if test "$cross_compiling" = yes; then
3097  ac_cv_sizeof_char=1
3098else
3099  cat > conftest.$ac_ext <<EOF
3100#line 3101 "configure"
3101#include "confdefs.h"
3102#include <stdio.h>
3103main()
3104{
3105  FILE *f=fopen("conftestval", "w");
3106  if (!f) exit(1);
3107  fprintf(f, "%d\n", sizeof(char));
3108  exit(0);
3109}
3110EOF
3111if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3112then
3113  ac_cv_sizeof_char=`cat conftestval`
3114else
3115  echo "configure: failed program was:" >&5
3116  cat conftest.$ac_ext >&5
3117  rm -fr conftest*
3118  ac_cv_sizeof_char=0
3119fi
3120rm -fr conftest*
3121fi
3122
3123fi
3124echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3125cat >> confdefs.h <<EOF
3126#define SIZEOF_CHAR $ac_cv_sizeof_char
3127EOF
3128
3129
3130echo $ac_n "checking size of short""... $ac_c" 1>&6
3131echo "configure:3132: checking size of short" >&5
3132if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3133  echo $ac_n "(cached) $ac_c" 1>&6
3134else
3135  if test "$cross_compiling" = yes; then
3136  ac_cv_sizeof_short=2
3137else
3138  cat > conftest.$ac_ext <<EOF
3139#line 3140 "configure"
3140#include "confdefs.h"
3141#include <stdio.h>
3142main()
3143{
3144  FILE *f=fopen("conftestval", "w");
3145  if (!f) exit(1);
3146  fprintf(f, "%d\n", sizeof(short));
3147  exit(0);
3148}
3149EOF
3150if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3151then
3152  ac_cv_sizeof_short=`cat conftestval`
3153else
3154  echo "configure: failed program was:" >&5
3155  cat conftest.$ac_ext >&5
3156  rm -fr conftest*
3157  ac_cv_sizeof_short=0
3158fi
3159rm -fr conftest*
3160fi
3161
3162fi
3163echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3164cat >> confdefs.h <<EOF
3165#define SIZEOF_SHORT $ac_cv_sizeof_short
3166EOF
3167
3168
3169echo $ac_n "checking size of int""... $ac_c" 1>&6
3170echo "configure:3171: checking size of int" >&5
3171if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3172  echo $ac_n "(cached) $ac_c" 1>&6
3173else
3174  if test "$cross_compiling" = yes; then
3175  ac_cv_sizeof_int=4
3176else
3177  cat > conftest.$ac_ext <<EOF
3178#line 3179 "configure"
3179#include "confdefs.h"
3180#include <stdio.h>
3181main()
3182{
3183  FILE *f=fopen("conftestval", "w");
3184  if (!f) exit(1);
3185  fprintf(f, "%d\n", sizeof(int));
3186  exit(0);
3187}
3188EOF
3189if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3190then
3191  ac_cv_sizeof_int=`cat conftestval`
3192else
3193  echo "configure: failed program was:" >&5
3194  cat conftest.$ac_ext >&5
3195  rm -fr conftest*
3196  ac_cv_sizeof_int=0
3197fi
3198rm -fr conftest*
3199fi
3200
3201fi
3202echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3203cat >> confdefs.h <<EOF
3204#define SIZEOF_INT $ac_cv_sizeof_int
3205EOF
3206
3207
3208echo $ac_n "checking size of long""... $ac_c" 1>&6
3209echo "configure:3210: checking size of long" >&5
3210if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3211  echo $ac_n "(cached) $ac_c" 1>&6
3212else
3213  if test "$cross_compiling" = yes; then
3214  ac_cv_sizeof_long=4
3215else
3216  cat > conftest.$ac_ext <<EOF
3217#line 3218 "configure"
3218#include "confdefs.h"
3219#include <stdio.h>
3220main()
3221{
3222  FILE *f=fopen("conftestval", "w");
3223  if (!f) exit(1);
3224  fprintf(f, "%d\n", sizeof(long));
3225  exit(0);
3226}
3227EOF
3228if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3229then
3230  ac_cv_sizeof_long=`cat conftestval`
3231else
3232  echo "configure: failed program was:" >&5
3233  cat conftest.$ac_ext >&5
3234  rm -fr conftest*
3235  ac_cv_sizeof_long=0
3236fi
3237rm -fr conftest*
3238fi
3239
3240fi
3241echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3242cat >> confdefs.h <<EOF
3243#define SIZEOF_LONG $ac_cv_sizeof_long
3244EOF
3245
3246
3247echo $ac_n "checking size of void*""... $ac_c" 1>&6
3248echo "configure:3249: checking size of void*" >&5
3249if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3250  echo $ac_n "(cached) $ac_c" 1>&6
3251else
3252  if test "$cross_compiling" = yes; then
3253  ac_cv_sizeof_voidp=4
3254else
3255  cat > conftest.$ac_ext <<EOF
3256#line 3257 "configure"
3257#include "confdefs.h"
3258#include <stdio.h>
3259main()
3260{
3261  FILE *f=fopen("conftestval", "w");
3262  if (!f) exit(1);
3263  fprintf(f, "%d\n", sizeof(void*));
3264  exit(0);
3265}
3266EOF
3267if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3268then
3269  ac_cv_sizeof_voidp=`cat conftestval`
3270else
3271  echo "configure: failed program was:" >&5
3272  cat conftest.$ac_ext >&5
3273  rm -fr conftest*
3274  ac_cv_sizeof_voidp=0
3275fi
3276rm -fr conftest*
3277fi
3278
3279fi
3280echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3281cat >> confdefs.h <<EOF
3282#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3283EOF
3284
3285
3286echo $ac_n "checking size of double""... $ac_c" 1>&6
3287echo "configure:3288: checking size of double" >&5
3288if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3289  echo $ac_n "(cached) $ac_c" 1>&6
3290else
3291  if test "$cross_compiling" = yes; then
3292  ac_cv_sizeof_double=8
3293else
3294  cat > conftest.$ac_ext <<EOF
3295#line 3296 "configure"
3296#include "confdefs.h"
3297#include <stdio.h>
3298main()
3299{
3300  FILE *f=fopen("conftestval", "w");
3301  if (!f) exit(1);
3302  fprintf(f, "%d\n", sizeof(double));
3303  exit(0);
3304}
3305EOF
3306if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3307then
3308  ac_cv_sizeof_double=`cat conftestval`
3309else
3310  echo "configure: failed program was:" >&5
3311  cat conftest.$ac_ext >&5
3312  rm -fr conftest*
3313  ac_cv_sizeof_double=0
3314fi
3315rm -fr conftest*
3316fi
3317
3318fi
3319echo "$ac_t""$ac_cv_sizeof_double" 1>&6
3320cat >> confdefs.h <<EOF
3321#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3322EOF
3323
3324
3325echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3326echo "configure:3327: checking whether byte ordering is bigendian" >&5
3327if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3328  echo $ac_n "(cached) $ac_c" 1>&6
3329else
3330  ac_cv_c_bigendian=unknown
3331# See if sys/param.h defines the BYTE_ORDER macro.
3332cat > conftest.$ac_ext <<EOF
3333#line 3334 "configure"
3334#include "confdefs.h"
3335#include <sys/types.h>
3336#include <sys/param.h>
3337int main() {
3338
3339#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3340 bogus endian macros
3341#endif
3342; return 0; }
3343EOF
3344if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3345  rm -rf conftest*
3346  # It does; now see whether it defined to BIG_ENDIAN or not.
3347cat > conftest.$ac_ext <<EOF
3348#line 3349 "configure"
3349#include "confdefs.h"
3350#include <sys/types.h>
3351#include <sys/param.h>
3352int main() {
3353
3354#if BYTE_ORDER != BIG_ENDIAN
3355 not big endian
3356#endif
3357; return 0; }
3358EOF
3359if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3360  rm -rf conftest*
3361  ac_cv_c_bigendian=yes
3362else
3363  echo "configure: failed program was:" >&5
3364  cat conftest.$ac_ext >&5
3365  rm -rf conftest*
3366  ac_cv_c_bigendian=no
3367fi
3368rm -f conftest*
3369else
3370  echo "configure: failed program was:" >&5
3371  cat conftest.$ac_ext >&5
3372fi
3373rm -f conftest*
3374if test $ac_cv_c_bigendian = unknown; then
3375if test "$cross_compiling" = yes; then
3376    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3377else
3378  cat > conftest.$ac_ext <<EOF
3379#line 3380 "configure"
3380#include "confdefs.h"
3381main () {
3382  /* Are we little or big endian?  From Harbison&Steele.  */
3383  union
3384  {
3385    long l;
3386    char c[sizeof (long)];
3387  } u;
3388  u.l = 1;
3389  exit (u.c[sizeof (long) - 1] == 1);
3390}
3391EOF
3392if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3393then
3394  ac_cv_c_bigendian=no
3395else
3396  echo "configure: failed program was:" >&5
3397  cat conftest.$ac_ext >&5
3398  rm -fr conftest*
3399  ac_cv_c_bigendian=yes
3400fi
3401rm -fr conftest*
3402fi
3403
3404fi
3405fi
3406
3407echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3408if test $ac_cv_c_bigendian = yes; then
3409  cat >> confdefs.h <<\EOF
3410#define WORDS_BIGENDIAN 1
3411EOF
3412
3413fi
3414
3415if test "$ac_cv_sizeof_int" != 4; then
3416  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3417fi
3418if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
3419  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3420fi
3421if test "$ac_cv_sizeof_double" != 8; then
3422  { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; }
3423fi
3424if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
3425  { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; }
3426fi
3427
3428# Check whether --with-rootdir or --without-rootdir was given.
3429if test "${with_rootdir+set}" = set; then
3430  withval="$with_rootdir"
3431  :
3432fi
3433
3434# Check whether --with-lex or --without-lex was given.
3435if test "${with_lex+set}" = set; then
3436  withval="$with_lex"
3437  :
3438fi
3439
3440# Check whether --with-readline or --without-readline was given.
3441if test "${with_readline+set}" = set; then
3442  withval="$with_readline"
3443  :
3444fi
3445
3446# Check whether --with-MP or --without-MP was given.
3447if test "${with_MP+set}" = set; then
3448  withval="$with_MP"
3449  :
3450fi
3451
3452# Check whether --with-dbm or --without-dbm was given.
3453if test "${with_dbm+set}" = set; then
3454  withval="$with_dbm"
3455  :
3456fi
3457
3458# Check whether --with-factory or --without-factory was given.
3459if test "${with_factory+set}" = set; then
3460  withval="$with_factory"
3461  :
3462fi
3463
3464# Check whether --with-libfac or --without-libfac was given.
3465if test "${with_libfac+set}" = set; then
3466  withval="$with_libfac"
3467  :
3468fi
3469
3470# Check whether --with-namespaces or --without-namespaces was given.
3471if test "${with_namespaces+set}" = set; then
3472  withval="$with_namespaces"
3473  :
3474fi
3475
3476# Check whether --with-dl or --without-dl was given.
3477if test "${with_dl+set}" = set; then
3478  withval="$with_dl"
3479  :
3480fi
3481
3482# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
3483if test "${with_dynamic_modules+set}" = set; then
3484  withval="$with_dynamic_modules"
3485  :
3486fi
3487 
3488# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
3489if test "${with_dynamic_kernel+set}" = set; then
3490  withval="$with_dynamic_kernel"
3491  :
3492fi
3493
3494# Check whether --with-apint or --without-apint was given.
3495if test "${with_apint+set}" = set; then
3496  withval="$with_apint"
3497  :
3498fi
3499
3500# Check whether --with-plural or --without-plural was given.
3501if test "${with_plural+set}" = set; then
3502  withval="$with_plural"
3503  :
3504fi
3505
3506
3507
3508
3509echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
3510echo "configure:3511: checking whether to use dynamic linking" >&5
3511if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
3512  cat >> confdefs.h <<\EOF
3513#define HAVE_DL 1
3514EOF
3515
3516  ac_have_dl=yes
3517  echo "$ac_t""yes" 1>&6
3518else
3519  echo "$ac_t""no" 1>&6
3520fi
3521
3522echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3523echo "configure:3524: checking for tgetent in -lncurses" >&5
3524ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3525if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3526  echo $ac_n "(cached) $ac_c" 1>&6
3527else
3528  ac_save_LIBS="$LIBS"
3529LIBS="-lncurses  $LIBS"
3530cat > conftest.$ac_ext <<EOF
3531#line 3532 "configure"
3532#include "confdefs.h"
3533/* Override any gcc2 internal prototype to avoid an error.  */
3534/* We use char because int might match the return type of a gcc2
3535    builtin and then its argument prototype would still apply.  */
3536char tgetent();
3537
3538int main() {
3539tgetent()
3540; return 0; }
3541EOF
3542if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3543  rm -rf conftest*
3544  eval "ac_cv_lib_$ac_lib_var=yes"
3545else
3546  echo "configure: failed program was:" >&5
3547  cat conftest.$ac_ext >&5
3548  rm -rf conftest*
3549  eval "ac_cv_lib_$ac_lib_var=no"
3550fi
3551rm -f conftest*
3552LIBS="$ac_save_LIBS"
3553
3554fi
3555if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3556  echo "$ac_t""yes" 1>&6
3557    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3558    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3559  cat >> confdefs.h <<EOF
3560#define $ac_tr_lib 1
3561EOF
3562
3563  LIBS="-lncurses $LIBS"
3564
3565else
3566  echo "$ac_t""no" 1>&6
3567\
3568 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
3569echo "configure:3570: checking for tgetent in -lcurses" >&5
3570ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
3571if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3572  echo $ac_n "(cached) $ac_c" 1>&6
3573else
3574  ac_save_LIBS="$LIBS"
3575LIBS="-lcurses  $LIBS"
3576cat > conftest.$ac_ext <<EOF
3577#line 3578 "configure"
3578#include "confdefs.h"
3579/* Override any gcc2 internal prototype to avoid an error.  */
3580/* We use char because int might match the return type of a gcc2
3581    builtin and then its argument prototype would still apply.  */
3582char tgetent();
3583
3584int main() {
3585tgetent()
3586; return 0; }
3587EOF
3588if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3589  rm -rf conftest*
3590  eval "ac_cv_lib_$ac_lib_var=yes"
3591else
3592  echo "configure: failed program was:" >&5
3593  cat conftest.$ac_ext >&5
3594  rm -rf conftest*
3595  eval "ac_cv_lib_$ac_lib_var=no"
3596fi
3597rm -f conftest*
3598LIBS="$ac_save_LIBS"
3599
3600fi
3601if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3602  echo "$ac_t""yes" 1>&6
3603    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
3604    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3605  cat >> confdefs.h <<EOF
3606#define $ac_tr_lib 1
3607EOF
3608
3609  LIBS="-lcurses $LIBS"
3610
3611else
3612  echo "$ac_t""no" 1>&6
3613\
3614  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3615echo "configure:3616: checking for tgetent in -ltermcap" >&5
3616ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3617if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3618  echo $ac_n "(cached) $ac_c" 1>&6
3619else
3620  ac_save_LIBS="$LIBS"
3621LIBS="-ltermcap  $LIBS"
3622cat > conftest.$ac_ext <<EOF
3623#line 3624 "configure"
3624#include "confdefs.h"
3625/* Override any gcc2 internal prototype to avoid an error.  */
3626/* We use char because int might match the return type of a gcc2
3627    builtin and then its argument prototype would still apply.  */
3628char tgetent();
3629
3630int main() {
3631tgetent()
3632; return 0; }
3633EOF
3634if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3635  rm -rf conftest*
3636  eval "ac_cv_lib_$ac_lib_var=yes"
3637else
3638  echo "configure: failed program was:" >&5
3639  cat conftest.$ac_ext >&5
3640  rm -rf conftest*
3641  eval "ac_cv_lib_$ac_lib_var=no"
3642fi
3643rm -f conftest*
3644LIBS="$ac_save_LIBS"
3645
3646fi
3647if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3648  echo "$ac_t""yes" 1>&6
3649    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
3650    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3651  cat >> confdefs.h <<EOF
3652#define $ac_tr_lib 1
3653EOF
3654
3655  LIBS="-ltermcap $LIBS"
3656
3657else
3658  echo "$ac_t""no" 1>&6
3659fi
3660
3661fi
3662
3663fi
3664
3665
3666# readline
3667if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
3668  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
3669  with_readline=static
3670fi
3671
3672
3673if test "$with_readline" != dynamic && test "$with_readline" != no; then
3674
3675ac_ext=C
3676# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3677ac_cpp='$CXXCPP $CPPFLAGS'
3678ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3679ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3680cross_compiling=$ac_cv_prog_cxx_cross
3681
3682   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
3683echo "configure:3684: checking for rl_abort in -lreadline" >&5
3684ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
3685if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3686  echo $ac_n "(cached) $ac_c" 1>&6
3687else
3688  ac_save_LIBS="$LIBS"
3689LIBS="-lreadline  $LIBS"
3690cat > conftest.$ac_ext <<EOF
3691#line 3692 "configure"
3692#include "confdefs.h"
3693/* Override any gcc2 internal prototype to avoid an error.  */
3694#ifdef __cplusplus
3695extern "C"
3696#endif
3697/* We use char because int might match the return type of a gcc2
3698    builtin and then its argument prototype would still apply.  */
3699char rl_abort();
3700
3701int main() {
3702rl_abort()
3703; return 0; }
3704EOF
3705if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3706  rm -rf conftest*
3707  eval "ac_cv_lib_$ac_lib_var=yes"
3708else
3709  echo "configure: failed program was:" >&5
3710  cat conftest.$ac_ext >&5
3711  rm -rf conftest*
3712  eval "ac_cv_lib_$ac_lib_var=no"
3713fi
3714rm -f conftest*
3715LIBS="$ac_save_LIBS"
3716
3717fi
3718if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3719  echo "$ac_t""yes" 1>&6
3720    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3721    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3722  cat >> confdefs.h <<EOF
3723#define $ac_tr_lib 1
3724EOF
3725
3726  LIBS="-lreadline $LIBS"
3727
3728else
3729  echo "$ac_t""no" 1>&6
3730fi
3731
3732   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
3733echo "configure:3734: checking how to run the C++ preprocessor" >&5
3734if test -z "$CXXCPP"; then
3735if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
3736  echo $ac_n "(cached) $ac_c" 1>&6
3737else
3738  ac_ext=C
3739# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3740ac_cpp='$CXXCPP $CPPFLAGS'
3741ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3742ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3743cross_compiling=$ac_cv_prog_cxx_cross
3744  CXXCPP="${CXX-g++} -E"
3745  cat > conftest.$ac_ext <<EOF
3746#line 3747 "configure"
3747#include "confdefs.h"
3748#include <stdlib.h>
3749EOF
3750ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3751{ (eval echo configure:3752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3752ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3753if test -z "$ac_err"; then
3754  :
3755else
3756  echo "$ac_err" >&5
3757  echo "configure: failed program was:" >&5
3758  cat conftest.$ac_ext >&5
3759  rm -rf conftest*
3760  CXXCPP=/lib/cpp
3761fi
3762rm -f conftest*
3763  ac_cv_prog_CXXCPP="$CXXCPP"
3764ac_ext=C
3765# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3766ac_cpp='$CXXCPP $CPPFLAGS'
3767ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3768ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3769cross_compiling=$ac_cv_prog_cxx_cross
3770fi
3771fi
3772CXXCPP="$ac_cv_prog_CXXCPP"
3773echo "$ac_t""$CXXCPP" 1>&6
3774
3775for ac_hdr in readline/readline.h readline/history.h
3776do
3777ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3778echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3779echo "configure:3780: checking for $ac_hdr" >&5
3780if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3781  echo $ac_n "(cached) $ac_c" 1>&6
3782else
3783  cat > conftest.$ac_ext <<EOF
3784#line 3785 "configure"
3785#include "confdefs.h"
3786#include <$ac_hdr>
3787EOF
3788ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3789{ (eval echo configure:3790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3790ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3791if test -z "$ac_err"; then
3792  rm -rf conftest*
3793  eval "ac_cv_header_$ac_safe=yes"
3794else
3795  echo "$ac_err" >&5
3796  echo "configure: failed program was:" >&5
3797  cat conftest.$ac_ext >&5
3798  rm -rf conftest*
3799  eval "ac_cv_header_$ac_safe=no"
3800fi
3801rm -f conftest*
3802fi
3803if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3804  echo "$ac_t""yes" 1>&6
3805    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3806  cat >> confdefs.h <<EOF
3807#define $ac_tr_hdr 1
3808EOF
3809 
3810else
3811  echo "$ac_t""no" 1>&6
3812fi
3813done
3814
3815   if test "$ac_cv_lib_readline_rl_abort" = yes && \
3816      test "$ac_cv_header_readline_readline_h" = yes; then
3817     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
3818echo "configure:3819: checking whether readline.h is ok" >&5
3819     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
3820  echo $ac_n "(cached) $ac_c" 1>&6
3821else
3822  cat > conftest.$ac_ext <<EOF
3823#line 3824 "configure"
3824#include "confdefs.h"
3825#include<unistd.h>
3826#include<stdio.h>
3827#include<readline/readline.h>
3828#ifdef HAVE_READLINE_HISTORY_H
3829#include<readline/history.h>
3830#endif
3831
3832int main() {
3833#ifndef NULL
3834#define NULL 0
3835#endif
3836rl_readline_name=NULL;
3837*rl_line_buffer=1;
3838completion_matches(NULL, filename_completion_function);
3839rl_attempted_completion_function = (CPPFunction *) NULL;
3840rl_outstream=NULL;
3841readline(NULL);
3842add_history(NULL);
3843read_history(NULL);
3844write_history(NULL);
3845
3846; return 0; }
3847EOF
3848if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3849  rm -rf conftest*
3850  ac_cv_header_readline_readline_h_ok="yes"
3851else
3852  echo "configure: failed program was:" >&5
3853  cat conftest.$ac_ext >&5
3854  rm -rf conftest*
3855  ac_cv_header_readline_readline_h_ok="no"
3856fi
3857rm -f conftest*
3858fi
3859
3860    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
3861    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
3862#not ok -- try once more with explicitly declaring everything
3863      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
3864echo "configure:3865: checking whether or not we nevertheless can use readline" >&5
3865      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
3866  echo $ac_n "(cached) $ac_c" 1>&6
3867else
3868  cat > conftest.$ac_ext <<EOF
3869#line 3870 "configure"
3870#include "confdefs.h"
3871#include <stdio.h>
3872extern "C"
3873{
3874extern char * rl_readline_name;
3875extern char *rl_line_buffer;
3876char *filename_completion_function();
3877typedef char **CPPFunction ();
3878extern char ** completion_matches ();
3879extern CPPFunction * rl_attempted_completion_function;
3880extern FILE * rl_outstream;
3881char * readline ();
3882void add_history ();
3883int write_history ();
3884int read_history();
3885}
3886#ifndef NULL
3887#define NULL 0
3888#endif
3889
3890int main() {
3891rl_readline_name=NULL;
3892*rl_line_buffer=1;
3893completion_matches(NULL, filename_completion_function);
3894rl_attempted_completion_function = (CPPFunction *) NULL;
3895rl_outstream=NULL;
3896readline(NULL);
3897add_history(NULL);
3898read_history(NULL);
3899write_history(NULL);
3900
3901; return 0; }
3902EOF
3903if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3904  rm -rf conftest*
3905  ac_cv_have_readline="yes"
3906
3907else
3908  echo "configure: failed program was:" >&5
3909  cat conftest.$ac_ext >&5
3910  rm -rf conftest*
3911  ac_cv_have_readline="no"
3912
3913fi
3914rm -f conftest*
3915fi
3916
3917      echo "$ac_t""$ac_cv_have_readline" 1>&6
3918    else
3919      cat >> confdefs.h <<\EOF
3920#define READLINE_READLINE_H_OK 1
3921EOF
3922
3923      ac_cv_have_readline="yes"
3924    fi
3925  fi
3926  if test "$ac_cv_have_readline" = yes; then
3927    cat >> confdefs.h <<\EOF
3928#define HAVE_READLINE 1
3929EOF
3930
3931  fi
3932ac_ext=c
3933# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3934ac_cpp='$CPP $CPPFLAGS'
3935ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3936ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3937cross_compiling=$ac_cv_prog_cc_cross
3938
3939fi
3940
3941echo $ac_n "checking which readline to use""... $ac_c" 1>&6
3942echo "configure:3943: checking which readline to use" >&5
3943if test "$ac_cv_with_readline" = dynamic; then
3944  echo "$ac_t""dynamic" 1>&6
3945  cat >> confdefs.h <<\EOF
3946#define HAVE_DYN_RL 1
3947EOF
3948
3949elif test "$ac_cv_have_readline" = yes; then
3950  echo "$ac_t""static" 1>&6
3951else
3952  echo "$ac_t""none" 1>&6
3953  echo "configure: warning: building without readline: disabling fancy display" 1>&2
3954fi
3955 
3956NEED_LIBS=$LIBS
3957
3958# gmp, smallgmp, MP, MPT, factory, libfac
3959echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
3960echo "configure:3961: checking for main in -lgmp" >&5
3961ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
3962if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3963  echo $ac_n "(cached) $ac_c" 1>&6
3964else
3965  ac_save_LIBS="$LIBS"
3966LIBS="-lgmp  $LIBS"
3967cat > conftest.$ac_ext <<EOF
3968#line 3969 "configure"
3969#include "confdefs.h"
3970
3971int main() {
3972main()
3973; return 0; }
3974EOF
3975if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976  rm -rf conftest*
3977  eval "ac_cv_lib_$ac_lib_var=yes"
3978else
3979  echo "configure: failed program was:" >&5
3980  cat conftest.$ac_ext >&5
3981  rm -rf conftest*
3982  eval "ac_cv_lib_$ac_lib_var=no"
3983fi
3984rm -f conftest*
3985LIBS="$ac_save_LIBS"
3986
3987fi
3988if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3989  echo "$ac_t""yes" 1>&6
3990    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3991    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3992  cat >> confdefs.h <<EOF
3993#define $ac_tr_lib 1
3994EOF
3995
3996  LIBS="-lgmp $LIBS"
3997
3998else
3999  echo "$ac_t""no" 1>&6
4000fi
4001
4002if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then
4003  LIBS=${NEED_LIBS}
4004fi
4005echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6
4006echo "configure:4007: checking for main in -lsmallgmp" >&5
4007ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'`
4008if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4009  echo $ac_n "(cached) $ac_c" 1>&6
4010else
4011  ac_save_LIBS="$LIBS"
4012LIBS="-lsmallgmp  $LIBS"
4013cat > conftest.$ac_ext <<EOF
4014#line 4015 "configure"
4015#include "confdefs.h"
4016
4017int main() {
4018main()
4019; return 0; }
4020EOF
4021if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4022  rm -rf conftest*
4023  eval "ac_cv_lib_$ac_lib_var=yes"
4024else
4025  echo "configure: failed program was:" >&5
4026  cat conftest.$ac_ext >&5
4027  rm -rf conftest*
4028  eval "ac_cv_lib_$ac_lib_var=no"
4029fi
4030rm -f conftest*
4031LIBS="$ac_save_LIBS"
4032
4033fi
4034if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4035  echo "$ac_t""yes" 1>&6
4036    ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4037    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4038  cat >> confdefs.h <<EOF
4039#define $ac_tr_lib 1
4040EOF
4041
4042  LIBS="-lsmallgmp $LIBS"
4043
4044else
4045  echo "$ac_t""no" 1>&6
4046fi
4047
4048SAVE_LIBS=$LIBS
4049echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4050echo "configure:4051: checking for IMP_PutGmpInt in -lMP" >&5
4051ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4052if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4053  echo $ac_n "(cached) $ac_c" 1>&6
4054else
4055  ac_save_LIBS="$LIBS"
4056LIBS="-lMP $MP_LIBS $LIBS"
4057cat > conftest.$ac_ext <<EOF
4058#line 4059 "configure"
4059#include "confdefs.h"
4060/* Override any gcc2 internal prototype to avoid an error.  */
4061/* We use char because int might match the return type of a gcc2
4062    builtin and then its argument prototype would still apply.  */
4063char IMP_PutGmpInt();
4064
4065int main() {
4066IMP_PutGmpInt()
4067; return 0; }
4068EOF
4069if { (eval echo configure:4070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4070  rm -rf conftest*
4071  eval "ac_cv_lib_$ac_lib_var=yes"
4072else
4073  echo "configure: failed program was:" >&5
4074  cat conftest.$ac_ext >&5
4075  rm -rf conftest*
4076  eval "ac_cv_lib_$ac_lib_var=no"
4077fi
4078rm -f conftest*
4079LIBS="$ac_save_LIBS"
4080
4081fi
4082if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4083  echo "$ac_t""yes" 1>&6
4084    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4085    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4086  cat >> confdefs.h <<EOF
4087#define $ac_tr_lib 1
4088EOF
4089
4090  LIBS="-lMP $LIBS"
4091
4092else
4093  echo "$ac_t""no" 1>&6
4094fi
4095
4096echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4097echo "configure:4098: checking for MPT_GetTree in -lMPT" >&5
4098ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4099if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4100  echo $ac_n "(cached) $ac_c" 1>&6
4101else
4102  ac_save_LIBS="$LIBS"
4103LIBS="-lMPT $MP_LIBS $LIBS"
4104cat > conftest.$ac_ext <<EOF
4105#line 4106 "configure"
4106#include "confdefs.h"
4107/* Override any gcc2 internal prototype to avoid an error.  */
4108/* We use char because int might match the return type of a gcc2
4109    builtin and then its argument prototype would still apply.  */
4110char MPT_GetTree();
4111
4112int main() {
4113MPT_GetTree()
4114; return 0; }
4115EOF
4116if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4117  rm -rf conftest*
4118  eval "ac_cv_lib_$ac_lib_var=yes"
4119else
4120  echo "configure: failed program was:" >&5
4121  cat conftest.$ac_ext >&5
4122  rm -rf conftest*
4123  eval "ac_cv_lib_$ac_lib_var=no"
4124fi
4125rm -f conftest*
4126LIBS="$ac_save_LIBS"
4127
4128fi
4129if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4130  echo "$ac_t""yes" 1>&6
4131    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4132    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4133  cat >> confdefs.h <<EOF
4134#define $ac_tr_lib 1
4135EOF
4136
4137  LIBS="-lMPT $LIBS"
4138
4139else
4140  echo "$ac_t""no" 1>&6
4141fi
4142
4143LIBS=$SAVE_LIBS
4144echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4145echo "configure:4146: checking for atof in -lsingcf" >&5
4146ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4147if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4148  echo $ac_n "(cached) $ac_c" 1>&6
4149else
4150  ac_save_LIBS="$LIBS"
4151LIBS="-lsingcf  $LIBS"
4152cat > conftest.$ac_ext <<EOF
4153#line 4154 "configure"
4154#include "confdefs.h"
4155/* Override any gcc2 internal prototype to avoid an error.  */
4156/* We use char because int might match the return type of a gcc2
4157    builtin and then its argument prototype would still apply.  */
4158char atof();
4159
4160int main() {
4161atof()
4162; return 0; }
4163EOF
4164if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4165  rm -rf conftest*
4166  eval "ac_cv_lib_$ac_lib_var=yes"
4167else
4168  echo "configure: failed program was:" >&5
4169  cat conftest.$ac_ext >&5
4170  rm -rf conftest*
4171  eval "ac_cv_lib_$ac_lib_var=no"
4172fi
4173rm -f conftest*
4174LIBS="$ac_save_LIBS"
4175
4176fi
4177if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4178  echo "$ac_t""yes" 1>&6
4179    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4180    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4181  cat >> confdefs.h <<EOF
4182#define $ac_tr_lib 1
4183EOF
4184
4185  LIBS="-lsingcf $LIBS"
4186
4187else
4188  echo "$ac_t""no" 1>&6
4189fi
4190
4191echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4192echo "configure:4193: checking for atof in -lsingfac" >&5
4193ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4194if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4195  echo $ac_n "(cached) $ac_c" 1>&6
4196else
4197  ac_save_LIBS="$LIBS"
4198LIBS="-lsingfac  $LIBS"
4199cat > conftest.$ac_ext <<EOF
4200#line 4201 "configure"
4201#include "confdefs.h"
4202/* Override any gcc2 internal prototype to avoid an error.  */
4203/* We use char because int might match the return type of a gcc2
4204    builtin and then its argument prototype would still apply.  */
4205char atof();
4206
4207int main() {
4208atof()
4209; return 0; }
4210EOF
4211if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4212  rm -rf conftest*
4213  eval "ac_cv_lib_$ac_lib_var=yes"
4214else
4215  echo "configure: failed program was:" >&5
4216  cat conftest.$ac_ext >&5
4217  rm -rf conftest*
4218  eval "ac_cv_lib_$ac_lib_var=no"
4219fi
4220rm -f conftest*
4221LIBS="$ac_save_LIBS"
4222
4223fi
4224if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4225  echo "$ac_t""yes" 1>&6
4226    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4227    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4228  cat >> confdefs.h <<EOF
4229#define $ac_tr_lib 1
4230EOF
4231
4232  LIBS="-lsingfac $LIBS"
4233
4234else
4235  echo "$ac_t""no" 1>&6
4236fi
4237
4238echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
4239echo "configure:4240: checking for omTestAddr in -lomalloc" >&5
4240ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
4241if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4242  echo $ac_n "(cached) $ac_c" 1>&6
4243else
4244  ac_save_LIBS="$LIBS"
4245LIBS="-lomalloc  $LIBS"
4246cat > conftest.$ac_ext <<EOF
4247#line 4248 "configure"
4248#include "confdefs.h"
4249/* Override any gcc2 internal prototype to avoid an error.  */
4250/* We use char because int might match the return type of a gcc2
4251    builtin and then its argument prototype would still apply.  */
4252char omTestAddr();
4253
4254int main() {
4255omTestAddr()
4256; return 0; }
4257EOF
4258if { (eval echo configure:4259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4259  rm -rf conftest*
4260  eval "ac_cv_lib_$ac_lib_var=yes"
4261else
4262  echo "configure: failed program was:" >&5
4263  cat conftest.$ac_ext >&5
4264  rm -rf conftest*
4265  eval "ac_cv_lib_$ac_lib_var=no"
4266fi
4267rm -f conftest*
4268LIBS="$ac_save_LIBS"
4269
4270fi
4271if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4272  echo "$ac_t""yes" 1>&6
4273    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4274    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4275  cat >> confdefs.h <<EOF
4276#define $ac_tr_lib 1
4277EOF
4278
4279  LIBS="-lomalloc $LIBS"
4280
4281else
4282  echo "$ac_t""no" 1>&6
4283fi
4284
4285echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
4286echo "configure:4287: checking for main in -lomalloc_ndebug" >&5
4287ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
4288if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4289  echo $ac_n "(cached) $ac_c" 1>&6
4290else
4291  ac_save_LIBS="$LIBS"
4292LIBS="-lomalloc_ndebug  $LIBS"
4293cat > conftest.$ac_ext <<EOF
4294#line 4295 "configure"
4295#include "confdefs.h"
4296
4297int main() {
4298main()
4299; return 0; }
4300EOF
4301if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4302  rm -rf conftest*
4303  eval "ac_cv_lib_$ac_lib_var=yes"
4304else
4305  echo "configure: failed program was:" >&5
4306  cat conftest.$ac_ext >&5
4307  rm -rf conftest*
4308  eval "ac_cv_lib_$ac_lib_var=no"
4309fi
4310rm -f conftest*
4311LIBS="$ac_save_LIBS"
4312
4313fi
4314if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4315  echo "$ac_t""yes" 1>&6
4316    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4317    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4318  cat >> confdefs.h <<EOF
4319#define $ac_tr_lib 1
4320EOF
4321
4322  LIBS="-lomalloc_ndebug $LIBS"
4323
4324else
4325  echo "$ac_t""no" 1>&6
4326fi
4327
4328
4329for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h omalloc.h omalloc.c
4330do
4331ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4332echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4333echo "configure:4334: checking for $ac_hdr" >&5
4334if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4335  echo $ac_n "(cached) $ac_c" 1>&6
4336else
4337  cat > conftest.$ac_ext <<EOF
4338#line 4339 "configure"
4339#include "confdefs.h"
4340#include <$ac_hdr>
4341EOF
4342ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4343{ (eval echo configure:4344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4344ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4345if test -z "$ac_err"; then
4346  rm -rf conftest*
4347  eval "ac_cv_header_$ac_safe=yes"
4348else
4349  echo "$ac_err" >&5
4350  echo "configure: failed program was:" >&5
4351  cat conftest.$ac_ext >&5
4352  rm -rf conftest*
4353  eval "ac_cv_header_$ac_safe=no"
4354fi
4355rm -f conftest*
4356fi
4357if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4358  echo "$ac_t""yes" 1>&6
4359    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4360  cat >> confdefs.h <<EOF
4361#define $ac_tr_hdr 1
4362EOF
4363 
4364else
4365  echo "$ac_t""no" 1>&6
4366fi
4367done
4368
4369
4370if test "$ac_cv_lib_gmp_main" = yes && \
4371 test "$ac_cv_header_gmp_h" = yes; then
4372    ac_gmp_ok=yes
4373fi
4374
4375if test "$ac_cv_lib_smallgmp_main" = yes && \
4376 test "$ac_cv_header_smallgmp_h" = yes && \
4377 test "$ac_cv_header_gmp_h" = yes; then
4378    ac_smallgmp_ok=yes
4379fi
4380
4381if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
4382 test "$ac_cv_lib_MPT_MPT_GetTree" && \
4383 test "$ac_cv_header_MP_h" = yes && \
4384 test "$ac_cv_header_MPT_h" = yes; then
4385  ac_MP_ok=yes
4386fi
4387
4388if test "$ac_cv_lib_singcf_atof" = yes && \
4389 test "$ac_cv_header_factory_h" = yes; then
4390  ac_factory_ok=yes
4391fi
4392
4393if test "$ac_cv_lib_singfac_atof" = yes && \
4394 test "$ac_cv_header_factor_h" = yes; then
4395  ac_libfac_ok=yes
4396fi
4397
4398if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
4399   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
4400   test "$ac_cv_header_omalloc_c" = yes && \
4401   test "$ac_cv_header_omalloc_h" = yes; then
4402  ac_cv_omalloc_ok=yes
4403fi
4404
4405
4406# evaluate results
4407if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
4408  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
4409fi
4410
4411echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
4412echo "configure:4413: checking which apint package to use" >&5
4413if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
4414  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4415    echo "$ac_t""gmp" 1>&6
4416    will_have_gmp=yes
4417    NEED_LIBS="-lgmp ${NEED_LIBS}"
4418  elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4419    echo "$ac_t""smallgmp" 1>&6
4420    cat >> confdefs.h <<\EOF
4421#define HAVE_SMALLGMP 1
4422EOF
4423
4424    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4425  else
4426    echo "$ac_t""none" 1>&6
4427    { echo "configure: error: can not build without gmp or smallgmp" 1>&2; exit 1; }
4428  fi
4429elif test "${with_apint}" = gmp; then
4430  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4431    echo "$ac_t""gmp" 1>&6
4432    will_have_gmp=yes
4433    NEED_LIBS="-lgmp ${NEED_LIBS}"
4434  else
4435    echo "$ac_t""none" 1>&6
4436    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
4437  fi
4438else
4439  if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4440    echo "$ac_t""smallgmp" 1>&6
4441    cat >> confdefs.h <<\EOF
4442#define HAVE_SMALLGMP 1
4443EOF
4444
4445    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4446  else
4447    echo "$ac_t""none" 1>&6
4448    { echo "configure: error: can not build with smallgmp" 1>&2; exit 1; }
4449  fi
4450fi
4451
4452#
4453echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
4454echo "configure:4455: checking whether to have MP" >&5
4455if test "${with_MP}" != yes && test "${with_MP}" != no; then
4456  if (test "${will_have_gmp}" = yes) && \
4457     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4458    echo "$ac_t""yes" 1>&6
4459    cat >> confdefs.h <<\EOF
4460#define HAVE_MPSR 1
4461EOF
4462
4463    HAVE_MPSR=1
4464    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4465  else
4466    echo "$ac_t""no" 1>&6
4467  fi
4468elif  test "${with_MP}" = yes; then
4469  if (test "${will_have_gmp}" = yes) && \
4470     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4471    echo "$ac_t""yes" 1>&6
4472    cat >> confdefs.h <<\EOF
4473#define HAVE_MPSR 1
4474EOF
4475
4476    HAVE_MPSR=1
4477    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4478  else
4479    echo "$ac_t""no" 1>&6
4480    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
4481  fi
4482else
4483  echo "$ac_t""no" 1>&6
4484fi
4485
4486
4487
4488echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
4489echo "configure:4490: checking whether to have factory" >&5
4490if test "${with_factory}" != yes && test "${with_factory}" != no; then
4491  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4492    echo "$ac_t""yes" 1>&6
4493    cat >> confdefs.h <<\EOF
4494#define HAVE_FACTORY 1
4495EOF
4496
4497    will_have_factory=yes
4498    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4499  else
4500    echo "$ac_t""no" 1>&6
4501  fi
4502elif  test "${with_factory}" = yes; then
4503  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4504    echo "$ac_t""yes" 1>&6
4505    cat >> confdefs.h <<\EOF
4506#define HAVE_FACTORY 1
4507EOF
4508
4509    will_have_factory=yes
4510    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4511  else
4512    echo "$ac_t""no" 1>&6
4513    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
4514  fi
4515else
4516  echo "$ac_t""no" 1>&6
4517fi
4518
4519echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
4520echo "configure:4521: checking whether to have libfac" >&5
4521if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
4522  if (test "${will_have_factory}" = yes) && \
4523     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4524    echo "$ac_t""yes" 1>&6
4525    cat >> confdefs.h <<\EOF
4526#define HAVE_LIBFAC_P 1
4527EOF
4528
4529    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4530  else
4531    echo "$ac_t""no" 1>&6
4532  fi
4533elif  test "${with_libfac}" = yes; then
4534  if (test "${will_have_factory}" = yes) && \
4535     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4536    echo "$ac_t""yes" 1>&6
4537    cat >> confdefs.h <<\EOF
4538#define HAVE_LIBFAC_P 1
4539EOF
4540
4541    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4542  else
4543    echo "$ac_t""no" 1>&6
4544    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
4545  fi
4546else
4547  echo "$ac_t""no" 1>&6
4548fi
4549
4550
4551
4552
4553echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
4554echo "configure:4555: checking whether to have dbm links" >&5
4555if test "$with_dbm" != no; then
4556  cat >> confdefs.h <<\EOF
4557#define HAVE_DBM 1
4558EOF
4559
4560  echo "$ac_t""yes" 1>&6
4561else
4562  echo "$ac_t""no" 1>&6
4563fi
4564
4565echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
4566echo "configure:4567: checking whether to have namespaces" >&5
4567if test "$with_namespaces" != yes; then
4568  echo "$ac_t""no" 1>&6
4569else
4570  cat >> confdefs.h <<\EOF
4571#define HAVE_NAMESPACES 1
4572EOF
4573
4574  echo "$ac_t""yes" 1>&6
4575fi
4576
4577echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
4578echo "configure:4579: checking whether to have dynamic modules" >&5
4579if test "$with_dynamic_modules" != yes || test "$ac_have_dl" != yes; then
4580  echo "$ac_t""no" 1>&6
4581else
4582  cat >> confdefs.h <<\EOF
4583#define HAVE_DYNAMIC_LOADING 1
4584EOF
4585
4586  echo "$ac_t""yes" 1>&6
4587fi
4588
4589echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
4590echo "configure:4591: checking whether to have dynamic kernel" >&5
4591if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
4592  DL_KERNEL=1
4593 
4594  echo "$ac_t""yes" 1>&6
4595fi
4596
4597echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
4598echo "configure:4599: checking whether to have Plural" >&5
4599if test "$with_plural" != yes; then
4600  echo "$ac_t""no" 1>&6
4601else
4602  cat >> confdefs.h <<\EOF
4603#define HAVE_PLURAL 1
4604EOF
4605
4606  echo "$ac_t""yes" 1>&6
4607fi
4608
4609
4610OUTPUT_MAKEFILES=Makefile
4611
4612if test "$ac_cv_singuname" = "ix86-Win"; then
4613  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
4614fi
4615
4616trap '' 1 2 15
4617cat > confcache <<\EOF
4618# This file is a shell script that caches the results of configure
4619# tests run on this system so they can be shared between configure
4620# scripts and configure runs.  It is not useful on other systems.
4621# If it contains results you don't want to keep, you may remove or edit it.
4622#
4623# By default, configure uses ./config.cache as the cache file,
4624# creating it if it does not exist already.  You can give configure
4625# the --cache-file=FILE option to use a different cache file; that is
4626# what configure does when it calls configure scripts in
4627# subdirectories, so they share the cache.
4628# Giving --cache-file=/dev/null disables caching, for debugging configure.
4629# config.status only pays attention to the cache file if you give it the
4630# --recheck option to rerun configure.
4631#
4632EOF
4633# The following way of writing the cache mishandles newlines in values,
4634# but we know of no workaround that is simple, portable, and efficient.
4635# So, don't put newlines in cache variables' values.
4636# Ultrix sh set writes to stderr and can't be redirected directly,
4637# and sets the high bit in the cache file unless we assign to the vars.
4638(set) 2>&1 |
4639  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4640  *ac_space=\ *)
4641    # `set' does not quote correctly, so add quotes (double-quote substitution
4642    # turns \\\\ into \\, and sed turns \\ into \).
4643    sed -n \
4644      -e "s/'/'\\\\''/g" \
4645      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4646    ;;
4647  *)
4648    # `set' quotes correctly as required by POSIX, so do not add quotes.
4649    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4650    ;;
4651  esac >> confcache
4652if cmp -s $cache_file confcache; then
4653  :
4654else
4655  if test -w $cache_file; then
4656    echo "updating cache $cache_file"
4657    cat confcache > $cache_file
4658  else
4659    echo "not updating unwritable cache $cache_file"
4660  fi
4661fi
4662rm -f confcache
4663
4664trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4665
4666test "x$prefix" = xNONE && prefix=$ac_default_prefix
4667# Let make expand exec_prefix.
4668test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4669
4670# Any assignment to VPATH causes Sun make to only execute
4671# the first set of double-colon rules, so remove it if not needed.
4672# If there is a colon in the path, we need to keep it.
4673if test "x$srcdir" = x.; then
4674  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4675fi
4676
4677trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4678
4679DEFS=-DHAVE_CONFIG_H
4680
4681# Without the "./", some shells look in PATH for config.status.
4682: ${CONFIG_STATUS=./config.status}
4683
4684echo creating $CONFIG_STATUS
4685rm -f $CONFIG_STATUS
4686cat > $CONFIG_STATUS <<EOF
4687#! /bin/sh
4688# Generated automatically by configure.
4689# Run this file to recreate the current configuration.
4690# This directory was configured as follows,
4691# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4692#
4693# $0 $ac_configure_args
4694#
4695# Compiler output produced by configure, useful for debugging
4696# configure, is in ./config.log if it exists.
4697
4698ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4699for ac_option
4700do
4701  case "\$ac_option" in
4702  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4703    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4704    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4705  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4706    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4707    exit 0 ;;
4708  -help | --help | --hel | --he | --h)
4709    echo "\$ac_cs_usage"; exit 0 ;;
4710  *) echo "\$ac_cs_usage"; exit 1 ;;
4711  esac
4712done
4713
4714ac_given_srcdir=$srcdir
4715ac_given_INSTALL="$INSTALL"
4716
4717trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4718EOF
4719cat >> $CONFIG_STATUS <<EOF
4720
4721# Protect against being on the right side of a sed subst in config.status.
4722sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4723 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4724$ac_vpsub
4725$extrasub
4726s%@SHELL@%$SHELL%g
4727s%@CFLAGS@%$CFLAGS%g
4728s%@CPPFLAGS@%$CPPFLAGS%g
4729s%@CXXFLAGS@%$CXXFLAGS%g
4730s%@FFLAGS@%$FFLAGS%g
4731s%@DEFS@%$DEFS%g
4732s%@LDFLAGS@%$LDFLAGS%g
4733s%@LIBS@%$LIBS%g
4734s%@exec_prefix@%$exec_prefix%g
4735s%@prefix@%$prefix%g
4736s%@program_transform_name@%$program_transform_name%g
4737s%@bindir@%$bindir%g
4738s%@sbindir@%$sbindir%g
4739s%@libexecdir@%$libexecdir%g
4740s%@datadir@%$datadir%g
4741s%@sysconfdir@%$sysconfdir%g
4742s%@sharedstatedir@%$sharedstatedir%g
4743s%@localstatedir@%$localstatedir%g
4744s%@libdir@%$libdir%g
4745s%@includedir@%$includedir%g
4746s%@oldincludedir@%$oldincludedir%g
4747s%@infodir@%$infodir%g
4748s%@mandir@%$mandir%g
4749s%@SINGUNAME@%$SINGUNAME%g
4750s%@EXEC_EXT@%$EXEC_EXT%g
4751s%@SING_UNAME@%$SING_UNAME%g
4752s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
4753s%@VERSION_DATE@%$VERSION_DATE%g
4754s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
4755s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
4756s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
4757s%@CC@%$CC%g
4758s%@CPP@%$CPP%g
4759s%@CXX@%$CXX%g
4760s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4761s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4762s%@INSTALL_DATA@%$INSTALL_DATA%g
4763s%@PIPE@%$PIPE%g
4764s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
4765s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
4766s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
4767s%@SET_MAKE@%$SET_MAKE%g
4768s%@SINGULAR@%$SINGULAR%g
4769s%@LEX@%$LEX%g
4770s%@BISON@%$BISON%g
4771s%@LN_S@%$LN_S%g
4772s%@PERL@%$PERL%g
4773s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
4774s%@SFLAGS@%$SFLAGS%g
4775s%@SLDFLAGS@%$SLDFLAGS%g
4776s%@ALLOCA@%$ALLOCA%g
4777s%@CXXCPP@%$CXXCPP%g
4778s%@HAVE_MPSR@%$HAVE_MPSR%g
4779s%@MP_LIBS@%$MP_LIBS%g
4780s%@NEED_LIBS@%$NEED_LIBS%g
4781s%@DL_KERNEL@%$DL_KERNEL%g
4782
4783CEOF
4784EOF
4785
4786cat >> $CONFIG_STATUS <<\EOF
4787
4788# Split the substitutions into bite-sized pieces for seds with
4789# small command number limits, like on Digital OSF/1 and HP-UX.
4790ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4791ac_file=1 # Number of current file.
4792ac_beg=1 # First line for current file.
4793ac_end=$ac_max_sed_cmds # Line after last line for current file.
4794ac_more_lines=:
4795ac_sed_cmds=""
4796while $ac_more_lines; do
4797  if test $ac_beg -gt 1; then
4798    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4799  else
4800    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4801  fi
4802  if test ! -s conftest.s$ac_file; then
4803    ac_more_lines=false
4804    rm -f conftest.s$ac_file
4805  else
4806    if test -z "$ac_sed_cmds"; then
4807      ac_sed_cmds="sed -f conftest.s$ac_file"
4808    else
4809      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4810    fi
4811    ac_file=`expr $ac_file + 1`
4812    ac_beg=$ac_end
4813    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4814  fi
4815done
4816if test -z "$ac_sed_cmds"; then
4817  ac_sed_cmds=cat
4818fi
4819EOF
4820
4821cat >> $CONFIG_STATUS <<EOF
4822
4823CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
4824EOF
4825cat >> $CONFIG_STATUS <<\EOF
4826for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4827  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4828  case "$ac_file" in
4829  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4830       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4831  *) ac_file_in="${ac_file}.in" ;;
4832  esac
4833
4834  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4835
4836  # Remove last slash and all that follows it.  Not all systems have dirname.
4837  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4838  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4839    # The file is in a subdirectory.
4840    test ! -d "$ac_dir" && mkdir "$ac_dir"
4841    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4842    # A "../" for each directory in $ac_dir_suffix.
4843    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4844  else
4845    ac_dir_suffix= ac_dots=
4846  fi
4847
4848  case "$ac_given_srcdir" in
4849  .)  srcdir=.
4850      if test -z "$ac_dots"; then top_srcdir=.
4851      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4852  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4853  *) # Relative path.
4854    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4855    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4856  esac
4857
4858  case "$ac_given_INSTALL" in
4859  [/$]*) INSTALL="$ac_given_INSTALL" ;;
4860  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4861  esac
4862
4863  echo creating "$ac_file"
4864  rm -f "$ac_file"
4865  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4866  case "$ac_file" in
4867  *Makefile*) ac_comsub="1i\\
4868# $configure_input" ;;
4869  *) ac_comsub= ;;
4870  esac
4871
4872  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4873  sed -e "$ac_comsub
4874s%@configure_input@%$configure_input%g
4875s%@srcdir@%$srcdir%g
4876s%@top_srcdir@%$top_srcdir%g
4877s%@INSTALL@%$INSTALL%g
4878" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4879fi; done
4880rm -f conftest.s*
4881
4882# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4883# NAME is the cpp macro being defined and VALUE is the value it is being given.
4884#
4885# ac_d sets the value in "#define NAME VALUE" lines.
4886ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4887ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4888ac_dC='\3'
4889ac_dD='%g'
4890# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4891ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4892ac_uB='\([      ]\)%\1#\2define\3'
4893ac_uC=' '
4894ac_uD='\4%g'
4895# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4896ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4897ac_eB='$%\1#\2define\3'
4898ac_eC=' '
4899ac_eD='%g'
4900
4901if test "${CONFIG_HEADERS+set}" != set; then
4902EOF
4903cat >> $CONFIG_STATUS <<EOF
4904  CONFIG_HEADERS="mod2.h"
4905EOF
4906cat >> $CONFIG_STATUS <<\EOF
4907fi
4908for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4909  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4910  case "$ac_file" in
4911  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4912       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4913  *) ac_file_in="${ac_file}.in" ;;
4914  esac
4915
4916  echo creating $ac_file
4917
4918  rm -f conftest.frag conftest.in conftest.out
4919  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4920  cat $ac_file_inputs > conftest.in
4921
4922EOF
4923
4924# Transform confdefs.h into a sed script conftest.vals that substitutes
4925# the proper values into config.h.in to produce config.h.  And first:
4926# Protect against being on the right side of a sed subst in config.status.
4927# Protect against being in an unquoted here document in config.status.
4928rm -f conftest.vals
4929cat > conftest.hdr <<\EOF
4930s/[\\&%]/\\&/g
4931s%[\\$`]%\\&%g
4932s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4933s%ac_d%ac_u%gp
4934s%ac_u%ac_e%gp
4935EOF
4936sed -n -f conftest.hdr confdefs.h > conftest.vals
4937rm -f conftest.hdr
4938
4939# This sed command replaces #undef with comments.  This is necessary, for
4940# example, in the case of _POSIX_SOURCE, which is predefined and required
4941# on some systems where configure will not decide to define it.
4942cat >> conftest.vals <<\EOF
4943s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4944EOF
4945
4946# Break up conftest.vals because some shells have a limit on
4947# the size of here documents, and old seds have small limits too.
4948
4949rm -f conftest.tail
4950while :
4951do
4952  ac_lines=`grep -c . conftest.vals`
4953  # grep -c gives empty output for an empty file on some AIX systems.
4954  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4955  # Write a limited-size here document to conftest.frag.
4956  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4957  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4958  echo 'CEOF
4959  sed -f conftest.frag conftest.in > conftest.out
4960  rm -f conftest.in
4961  mv conftest.out conftest.in
4962' >> $CONFIG_STATUS
4963  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4964  rm -f conftest.vals
4965  mv conftest.tail conftest.vals
4966done
4967rm -f conftest.vals
4968
4969cat >> $CONFIG_STATUS <<\EOF
4970  rm -f conftest.frag conftest.h
4971  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4972  cat conftest.in >> conftest.h
4973  rm -f conftest.in
4974  if cmp -s $ac_file conftest.h 2>/dev/null; then
4975    echo "$ac_file is unchanged"
4976    rm -f conftest.h
4977  else
4978    # Remove last slash and all that follows it.  Not all systems have dirname.
4979      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4980      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4981      # The file is in a subdirectory.
4982      test ! -d "$ac_dir" && mkdir "$ac_dir"
4983    fi
4984    rm -f $ac_file
4985    mv conftest.h $ac_file
4986  fi
4987fi; done
4988
4989EOF
4990cat >> $CONFIG_STATUS <<EOF
4991
4992EOF
4993cat >> $CONFIG_STATUS <<\EOF
4994\
4995 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
4996exit 0
4997EOF
4998chmod +x $CONFIG_STATUS
4999rm -fr confdefs* $ac_clean_files
5000test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5001
Note: See TracBrowser for help on using the repository browser.