source: git/Singular/configure @ 551fd7

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