source: git/Singular/configure @ 907274

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