source: git/Singular/configure @ ae2a51

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