source: git/Singular/configure @ af6a6b

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