source: git/Singular/configure @ 138f0c

spielwiese
Last change on this file since 138f0c was 138f0c, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* feFopen: recognize "~obachman/..." git-svn-id: file:///usr/local/Singular/svn/trunk@3823 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 138.0 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=`pwd`/..
15ac_help="$ac_help
16  --with-rootdir=DIR      use DIR ass compiled-in root directory
17                             (default is PREFIX)"
18ac_help="$ac_help
19  --with-lex=[LEX,no]     uses LEX as lex program, default is flex"
20ac_help="$ac_help
21  --with-perl5=[PERL5,no] uses PERL5 as perl5 program, default is perl5"
22ac_help="$ac_help
23  --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# readline
3587if test "$with_readline" != no; then
3588  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3589echo "configure:3590: checking for tgetent in -lncurses" >&5
3590ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3591if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3592  echo $ac_n "(cached) $ac_c" 1>&6
3593else
3594  ac_save_LIBS="$LIBS"
3595LIBS="-lncurses  $LIBS"
3596cat > conftest.$ac_ext <<EOF
3597#line 3598 "configure"
3598#include "confdefs.h"
3599/* Override any gcc2 internal prototype to avoid an error.  */
3600/* We use char because int might match the return type of a gcc2
3601    builtin and then its argument prototype would still apply.  */
3602char tgetent();
3603
3604int main() {
3605tgetent()
3606; return 0; }
3607EOF
3608if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3609  rm -rf conftest*
3610  eval "ac_cv_lib_$ac_lib_var=yes"
3611else
3612  echo "configure: failed program was:" >&5
3613  cat conftest.$ac_ext >&5
3614  rm -rf conftest*
3615  eval "ac_cv_lib_$ac_lib_var=no"
3616fi
3617rm -f conftest*
3618LIBS="$ac_save_LIBS"
3619
3620fi
3621if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3622  echo "$ac_t""yes" 1>&6
3623    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3624    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3625  cat >> confdefs.h <<EOF
3626#define $ac_tr_lib 1
3627EOF
3628
3629  LIBS="-lncurses $LIBS"
3630
3631else
3632  echo "$ac_t""no" 1>&6
3633\
3634   echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
3635echo "configure:3636: checking for tgetent in -lcurses" >&5
3636ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
3637if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3638  echo $ac_n "(cached) $ac_c" 1>&6
3639else
3640  ac_save_LIBS="$LIBS"
3641LIBS="-lcurses  $LIBS"
3642cat > conftest.$ac_ext <<EOF
3643#line 3644 "configure"
3644#include "confdefs.h"
3645/* Override any gcc2 internal prototype to avoid an error.  */
3646/* We use char because int might match the return type of a gcc2
3647    builtin and then its argument prototype would still apply.  */
3648char tgetent();
3649
3650int main() {
3651tgetent()
3652; return 0; }
3653EOF
3654if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3655  rm -rf conftest*
3656  eval "ac_cv_lib_$ac_lib_var=yes"
3657else
3658  echo "configure: failed program was:" >&5
3659  cat conftest.$ac_ext >&5
3660  rm -rf conftest*
3661  eval "ac_cv_lib_$ac_lib_var=no"
3662fi
3663rm -f conftest*
3664LIBS="$ac_save_LIBS"
3665
3666fi
3667if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3668  echo "$ac_t""yes" 1>&6
3669    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
3670    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3671  cat >> confdefs.h <<EOF
3672#define $ac_tr_lib 1
3673EOF
3674
3675  LIBS="-lcurses $LIBS"
3676
3677else
3678  echo "$ac_t""no" 1>&6
3679\
3680   echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3681echo "configure:3682: checking for tgetent in -ltermcap" >&5
3682ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3683if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3684  echo $ac_n "(cached) $ac_c" 1>&6
3685else
3686  ac_save_LIBS="$LIBS"
3687LIBS="-ltermcap  $LIBS"
3688cat > conftest.$ac_ext <<EOF
3689#line 3690 "configure"
3690#include "confdefs.h"
3691/* Override any gcc2 internal prototype to avoid an error.  */
3692/* We use char because int might match the return type of a gcc2
3693    builtin and then its argument prototype would still apply.  */
3694char tgetent();
3695
3696int main() {
3697tgetent()
3698; return 0; }
3699EOF
3700if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3701  rm -rf conftest*
3702  eval "ac_cv_lib_$ac_lib_var=yes"
3703else
3704  echo "configure: failed program was:" >&5
3705  cat conftest.$ac_ext >&5
3706  rm -rf conftest*
3707  eval "ac_cv_lib_$ac_lib_var=no"
3708fi
3709rm -f conftest*
3710LIBS="$ac_save_LIBS"
3711
3712fi
3713if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3714  echo "$ac_t""yes" 1>&6
3715    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
3716    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3717  cat >> confdefs.h <<EOF
3718#define $ac_tr_lib 1
3719EOF
3720
3721  LIBS="-ltermcap $LIBS"
3722
3723else
3724  echo "$ac_t""no" 1>&6
3725fi
3726
3727fi
3728
3729fi
3730
3731   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
3732echo "configure:3733: checking for rl_abort in -lreadline" >&5
3733ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
3734if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3735  echo $ac_n "(cached) $ac_c" 1>&6
3736else
3737  ac_save_LIBS="$LIBS"
3738LIBS="-lreadline  $LIBS"
3739cat > conftest.$ac_ext <<EOF
3740#line 3741 "configure"
3741#include "confdefs.h"
3742/* Override any gcc2 internal prototype to avoid an error.  */
3743/* We use char because int might match the return type of a gcc2
3744    builtin and then its argument prototype would still apply.  */
3745char rl_abort();
3746
3747int main() {
3748rl_abort()
3749; return 0; }
3750EOF
3751if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3752  rm -rf conftest*
3753  eval "ac_cv_lib_$ac_lib_var=yes"
3754else
3755  echo "configure: failed program was:" >&5
3756  cat conftest.$ac_ext >&5
3757  rm -rf conftest*
3758  eval "ac_cv_lib_$ac_lib_var=no"
3759fi
3760rm -f conftest*
3761LIBS="$ac_save_LIBS"
3762
3763fi
3764if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3765  echo "$ac_t""yes" 1>&6
3766    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3767    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3768  cat >> confdefs.h <<EOF
3769#define $ac_tr_lib 1
3770EOF
3771
3772  LIBS="-lreadline $LIBS"
3773
3774else
3775  echo "$ac_t""no" 1>&6
3776fi
3777
3778   for ac_hdr in readline/readline.h readline/history.h
3779do
3780ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3781echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3782echo "configure:3783: checking for $ac_hdr" >&5
3783if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3784  echo $ac_n "(cached) $ac_c" 1>&6
3785else
3786  cat > conftest.$ac_ext <<EOF
3787#line 3788 "configure"
3788#include "confdefs.h"
3789#include <$ac_hdr>
3790EOF
3791ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3792{ (eval echo configure:3793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3793ac_err=`grep -v '^ *+' conftest.out`
3794if test -z "$ac_err"; then
3795  rm -rf conftest*
3796  eval "ac_cv_header_$ac_safe=yes"
3797else
3798  echo "$ac_err" >&5
3799  echo "configure: failed program was:" >&5
3800  cat conftest.$ac_ext >&5
3801  rm -rf conftest*
3802  eval "ac_cv_header_$ac_safe=no"
3803fi
3804rm -f conftest*
3805fi
3806if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3807  echo "$ac_t""yes" 1>&6
3808    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3809  cat >> confdefs.h <<EOF
3810#define $ac_tr_hdr 1
3811EOF
3812 
3813else
3814  echo "$ac_t""no" 1>&6
3815fi
3816done
3817
3818   if test "$ac_cv_lib_readline_rl_abort" = yes && \
3819      test "$ac_cv_header_readline_readline_h" = yes; then
3820     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
3821echo "configure:3822: checking whether readline.h is ok" >&5
3822     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
3823  echo $ac_n "(cached) $ac_c" 1>&6
3824else
3825  cat > conftest.$ac_ext <<EOF
3826#line 3827 "configure"
3827#include "confdefs.h"
3828#include<unistd.h>
3829#include<stdio.h>
3830#include<readline/readline.h>
3831#ifdef HAVE_READLINE_HISTORY_H
3832#include<readline/history.h>
3833#endif
3834
3835int main() {
3836#ifndef NULL
3837#define NULL 0
3838#endif
3839rl_readline_name=NULL;
3840*rl_line_buffer=1;
3841completion_matches(NULL, filename_completion_function);
3842rl_attempted_completion_function = (CPPFunction *) NULL;
3843rl_outstream=NULL;
3844readline(NULL);
3845add_history(NULL);
3846read_history(NULL);
3847write_history(NULL);
3848
3849; return 0; }
3850EOF
3851if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3852  rm -rf conftest*
3853  ac_cv_header_readline_readline_h_ok="yes"
3854else
3855  echo "configure: failed program was:" >&5
3856  cat conftest.$ac_ext >&5
3857  rm -rf conftest*
3858  ac_cv_header_readline_readline_h_ok="no"
3859fi
3860rm -f conftest*
3861fi
3862
3863    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
3864    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
3865#not ok -- try once more with explicitly declaring everything
3866      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
3867echo "configure:3868: checking whether or not we nevertheless can use readline" >&5
3868      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
3869  echo $ac_n "(cached) $ac_c" 1>&6
3870else
3871  cat > conftest.$ac_ext <<EOF
3872#line 3873 "configure"
3873#include "confdefs.h"
3874#include <stdio.h>
3875
3876int main() {
3877extern char * rl_readline_name;
3878extern char *rl_line_buffer;
3879char *filename_completion_function();
3880typedef char **CPPFunction ();
3881extern char ** completion_matches ();
3882extern CPPFunction * rl_attempted_completion_function;
3883extern FILE * rl_outstream;
3884char * readline ();
3885void add_history ();
3886int write_history ();
3887#ifndef NULL
3888#define NULL 0
3889#endif
3890 rl_readline_name=NULL;
3891*rl_line_buffer=1;
3892completion_matches(NULL, filename_completion_function);
3893rl_attempted_completion_function = (CPPFunction *) NULL;
3894rl_outstream=NULL;
3895readline(NULL);
3896add_history(NULL);
3897read_history(NULL);
3898write_history(NULL);
3899
3900; return 0; }
3901EOF
3902if { (eval echo configure:3903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3903  rm -rf conftest*
3904  ac_cv_have_readline="yes"
3905
3906else
3907  echo "configure: failed program was:" >&5
3908  cat conftest.$ac_ext >&5
3909  rm -rf conftest*
3910  ac_cv_have_readline="no"
3911
3912fi
3913rm -f conftest*
3914fi
3915
3916      echo "$ac_t""$ac_cv_have_readline" 1>&6
3917    else
3918      cat >> confdefs.h <<\EOF
3919#define READLINE_READLINE_H_OK 1
3920EOF
3921
3922      ac_cv_have_readline="yes"
3923    fi
3924  fi
3925  if test "$ac_cv_have_readline" = yes; then
3926    cat >> confdefs.h <<\EOF
3927#define HAVE_READLINE 1
3928EOF
3929
3930  else
3931    echo "configure: warning: building without readline: disabling fancy display" 1>&2
3932    cat >> confdefs.h <<\EOF
3933#define HAVE_FEREAD 1
3934EOF
3935
3936  fi
3937else
3938  cat >> confdefs.h <<\EOF
3939#define HAVE_FEREAD 1
3940EOF
3941
3942fi
3943
3944NEED_LIBS=$LIBS
3945
3946# gmp, smallgmp, MP, MPT, factory, libfac
3947echo $ac_n "checking for mpq_init in -lgmp""... $ac_c" 1>&6
3948echo "configure:3949: checking for mpq_init in -lgmp" >&5
3949ac_lib_var=`echo gmp'_'mpq_init | sed 'y%./+-%__p_%'`
3950if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3951  echo $ac_n "(cached) $ac_c" 1>&6
3952else
3953  ac_save_LIBS="$LIBS"
3954LIBS="-lgmp  $LIBS"
3955cat > conftest.$ac_ext <<EOF
3956#line 3957 "configure"
3957#include "confdefs.h"
3958/* Override any gcc2 internal prototype to avoid an error.  */
3959/* We use char because int might match the return type of a gcc2
3960    builtin and then its argument prototype would still apply.  */
3961char mpq_init();
3962
3963int main() {
3964mpq_init()
3965; return 0; }
3966EOF
3967if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3968  rm -rf conftest*
3969  eval "ac_cv_lib_$ac_lib_var=yes"
3970else
3971  echo "configure: failed program was:" >&5
3972  cat conftest.$ac_ext >&5
3973  rm -rf conftest*
3974  eval "ac_cv_lib_$ac_lib_var=no"
3975fi
3976rm -f conftest*
3977LIBS="$ac_save_LIBS"
3978
3979fi
3980if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3981  echo "$ac_t""yes" 1>&6
3982    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3983    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3984  cat >> confdefs.h <<EOF
3985#define $ac_tr_lib 1
3986EOF
3987
3988  LIBS="-lgmp $LIBS"
3989
3990else
3991  echo "$ac_t""no" 1>&6
3992fi
3993
3994if test "ac_cv_lib_gmp_mpq_init" = yes && test "$with-apint" = smallgmp; then
3995  LIBS=NEED_LIBS
3996fi
3997echo $ac_n "checking for mpz_init in -lsmallgmp""... $ac_c" 1>&6
3998echo "configure:3999: checking for mpz_init in -lsmallgmp" >&5
3999ac_lib_var=`echo smallgmp'_'mpz_init | sed 'y%./+-%__p_%'`
4000if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4001  echo $ac_n "(cached) $ac_c" 1>&6
4002else
4003  ac_save_LIBS="$LIBS"
4004LIBS="-lsmallgmp  $LIBS"
4005cat > conftest.$ac_ext <<EOF
4006#line 4007 "configure"
4007#include "confdefs.h"
4008/* Override any gcc2 internal prototype to avoid an error.  */
4009/* We use char because int might match the return type of a gcc2
4010    builtin and then its argument prototype would still apply.  */
4011char mpz_init();
4012
4013int main() {
4014mpz_init()
4015; return 0; }
4016EOF
4017if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4018  rm -rf conftest*
4019  eval "ac_cv_lib_$ac_lib_var=yes"
4020else
4021  echo "configure: failed program was:" >&5
4022  cat conftest.$ac_ext >&5
4023  rm -rf conftest*
4024  eval "ac_cv_lib_$ac_lib_var=no"
4025fi
4026rm -f conftest*
4027LIBS="$ac_save_LIBS"
4028
4029fi
4030if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4031  echo "$ac_t""yes" 1>&6
4032    ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4033    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4034  cat >> confdefs.h <<EOF
4035#define $ac_tr_lib 1
4036EOF
4037
4038  LIBS="-lsmallgmp $LIBS"
4039
4040else
4041  echo "$ac_t""no" 1>&6
4042fi
4043
4044echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4045echo "configure:4046: checking for IMP_PutGmpInt in -lMP" >&5
4046ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4047if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4048  echo $ac_n "(cached) $ac_c" 1>&6
4049else
4050  ac_save_LIBS="$LIBS"
4051LIBS="-lMP  $LIBS"
4052cat > conftest.$ac_ext <<EOF
4053#line 4054 "configure"
4054#include "confdefs.h"
4055/* Override any gcc2 internal prototype to avoid an error.  */
4056/* We use char because int might match the return type of a gcc2
4057    builtin and then its argument prototype would still apply.  */
4058char IMP_PutGmpInt();
4059
4060int main() {
4061IMP_PutGmpInt()
4062; return 0; }
4063EOF
4064if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4065  rm -rf conftest*
4066  eval "ac_cv_lib_$ac_lib_var=yes"
4067else
4068  echo "configure: failed program was:" >&5
4069  cat conftest.$ac_ext >&5
4070  rm -rf conftest*
4071  eval "ac_cv_lib_$ac_lib_var=no"
4072fi
4073rm -f conftest*
4074LIBS="$ac_save_LIBS"
4075
4076fi
4077if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4078  echo "$ac_t""yes" 1>&6
4079    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4080    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4081  cat >> confdefs.h <<EOF
4082#define $ac_tr_lib 1
4083EOF
4084
4085  LIBS="-lMP $LIBS"
4086
4087else
4088  echo "$ac_t""no" 1>&6
4089fi
4090
4091echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4092echo "configure:4093: checking for MPT_GetTree in -lMPT" >&5
4093ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4094if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4095  echo $ac_n "(cached) $ac_c" 1>&6
4096else
4097  ac_save_LIBS="$LIBS"
4098LIBS="-lMPT  $LIBS"
4099cat > conftest.$ac_ext <<EOF
4100#line 4101 "configure"
4101#include "confdefs.h"
4102/* Override any gcc2 internal prototype to avoid an error.  */
4103/* We use char because int might match the return type of a gcc2
4104    builtin and then its argument prototype would still apply.  */
4105char MPT_GetTree();
4106
4107int main() {
4108MPT_GetTree()
4109; return 0; }
4110EOF
4111if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4112  rm -rf conftest*
4113  eval "ac_cv_lib_$ac_lib_var=yes"
4114else
4115  echo "configure: failed program was:" >&5
4116  cat conftest.$ac_ext >&5
4117  rm -rf conftest*
4118  eval "ac_cv_lib_$ac_lib_var=no"
4119fi
4120rm -f conftest*
4121LIBS="$ac_save_LIBS"
4122
4123fi
4124if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4125  echo "$ac_t""yes" 1>&6
4126    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4127    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4128  cat >> confdefs.h <<EOF
4129#define $ac_tr_lib 1
4130EOF
4131
4132  LIBS="-lMPT $LIBS"
4133
4134else
4135  echo "$ac_t""no" 1>&6
4136fi
4137
4138echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4139echo "configure:4140: checking for atof in -lsingcf" >&5
4140ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4141if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4142  echo $ac_n "(cached) $ac_c" 1>&6
4143else
4144  ac_save_LIBS="$LIBS"
4145LIBS="-lsingcf  $LIBS"
4146cat > conftest.$ac_ext <<EOF
4147#line 4148 "configure"
4148#include "confdefs.h"
4149/* Override any gcc2 internal prototype to avoid an error.  */
4150/* We use char because int might match the return type of a gcc2
4151    builtin and then its argument prototype would still apply.  */
4152char atof();
4153
4154int main() {
4155atof()
4156; return 0; }
4157EOF
4158if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4159  rm -rf conftest*
4160  eval "ac_cv_lib_$ac_lib_var=yes"
4161else
4162  echo "configure: failed program was:" >&5
4163  cat conftest.$ac_ext >&5
4164  rm -rf conftest*
4165  eval "ac_cv_lib_$ac_lib_var=no"
4166fi
4167rm -f conftest*
4168LIBS="$ac_save_LIBS"
4169
4170fi
4171if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4172  echo "$ac_t""yes" 1>&6
4173    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4174    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4175  cat >> confdefs.h <<EOF
4176#define $ac_tr_lib 1
4177EOF
4178
4179  LIBS="-lsingcf $LIBS"
4180
4181else
4182  echo "$ac_t""no" 1>&6
4183fi
4184
4185echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4186echo "configure:4187: checking for atof in -lsingfac" >&5
4187ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4188if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4189  echo $ac_n "(cached) $ac_c" 1>&6
4190else
4191  ac_save_LIBS="$LIBS"
4192LIBS="-lsingfac  $LIBS"
4193cat > conftest.$ac_ext <<EOF
4194#line 4195 "configure"
4195#include "confdefs.h"
4196/* Override any gcc2 internal prototype to avoid an error.  */
4197/* We use char because int might match the return type of a gcc2
4198    builtin and then its argument prototype would still apply.  */
4199char atof();
4200
4201int main() {
4202atof()
4203; return 0; }
4204EOF
4205if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4206  rm -rf conftest*
4207  eval "ac_cv_lib_$ac_lib_var=yes"
4208else
4209  echo "configure: failed program was:" >&5
4210  cat conftest.$ac_ext >&5
4211  rm -rf conftest*
4212  eval "ac_cv_lib_$ac_lib_var=no"
4213fi
4214rm -f conftest*
4215LIBS="$ac_save_LIBS"
4216
4217fi
4218if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4219  echo "$ac_t""yes" 1>&6
4220    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4221    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4222  cat >> confdefs.h <<EOF
4223#define $ac_tr_lib 1
4224EOF
4225
4226  LIBS="-lsingfac $LIBS"
4227
4228else
4229  echo "$ac_t""no" 1>&6
4230fi
4231
4232
4233for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h
4234do
4235ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4236echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4237echo "configure:4238: checking for $ac_hdr" >&5
4238if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4239  echo $ac_n "(cached) $ac_c" 1>&6
4240else
4241  cat > conftest.$ac_ext <<EOF
4242#line 4243 "configure"
4243#include "confdefs.h"
4244#include <$ac_hdr>
4245EOF
4246ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4247{ (eval echo configure:4248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4248ac_err=`grep -v '^ *+' conftest.out`
4249if test -z "$ac_err"; then
4250  rm -rf conftest*
4251  eval "ac_cv_header_$ac_safe=yes"
4252else
4253  echo "$ac_err" >&5
4254  echo "configure: failed program was:" >&5
4255  cat conftest.$ac_ext >&5
4256  rm -rf conftest*
4257  eval "ac_cv_header_$ac_safe=no"
4258fi
4259rm -f conftest*
4260fi
4261if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4262  echo "$ac_t""yes" 1>&6
4263    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4264  cat >> confdefs.h <<EOF
4265#define $ac_tr_hdr 1
4266EOF
4267 
4268else
4269  echo "$ac_t""no" 1>&6
4270fi
4271done
4272
4273
4274if test "$ac_cv_lib_gmp_mpq_init" = yes && \
4275 test "$ac_cv_header_gmp_h" = yes; then
4276    ac_gmp_ok=yes
4277fi
4278
4279if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
4280 test "$ac_cv_header_smallgmp_h" = yes && \
4281 test "$ac_cv_header_gmp_h" = yes; then
4282    ac_smallgmp_ok=yes
4283fi
4284
4285if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
4286 test "$ac_cv_lib_MPT_MPT_GetTree" && \
4287 test "$ac_cv_header_MP_h" = yes && \
4288 test "$ac_cv_header_MPT_h" = yes; then
4289  ac_MP_ok=yes
4290fi
4291
4292if test "$ac_cv_lib_singcf_atof" = yes && \
4293 test "$ac_cv_header_factory_h" = yes; then
4294  ac_factory_ok=yes
4295fi
4296
4297if test "$ac_cv_lib_singfac_atof" = yes && \
4298 test "$ac_cv_header_factor_h" = yes; then
4299  ac_libfac_ok=yes
4300fi
4301
4302# evaluate results
4303echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
4304echo "configure:4305: checking which apint package to use" >&5
4305if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
4306  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4307    echo "$ac_t""gmp" 1>&6
4308    will_have_gmp=yes
4309    NEED_LIBS="-lgmp ${NEED_LIBS}"
4310  elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4311    echo "$ac_t""smallgmp" 1>&6
4312    cat >> confdefs.h <<\EOF
4313#define HAVE_SMALLGMP 1
4314EOF
4315
4316    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4317  else
4318    echo "$ac_t""none" 1>&6
4319    { echo "configure: error: can not build without gmp or smallgmp" 1>&2; exit 1; }
4320  fi
4321elif test "${with_apint}" = gmp; then
4322  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4323    echo "$ac_t""gmp" 1>&6
4324    will_have_gmp=yes
4325    NEED_LIBS="-lgmp ${NEED_LIBS}"
4326  else
4327    echo "$ac_t""none" 1>&6
4328    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
4329  fi
4330else
4331  if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4332    echo "$ac_t""smallgmp" 1>&6
4333    cat >> confdefs.h <<\EOF
4334#define HAVE_SMALLGMP 1
4335EOF
4336
4337    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4338  else
4339    echo "$ac_t""none" 1>&6
4340    { echo "configure: error: can not build with smallgmp" 1>&2; exit 1; }
4341  fi
4342fi
4343
4344#
4345# dl
4346if test "$with_dl" != no; then
4347  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4348echo "configure:4349: checking for dlopen in -ldl" >&5
4349ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4350if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4351  echo $ac_n "(cached) $ac_c" 1>&6
4352else
4353  ac_save_LIBS="$LIBS"
4354LIBS="-ldl  $LIBS"
4355cat > conftest.$ac_ext <<EOF
4356#line 4357 "configure"
4357#include "confdefs.h"
4358/* Override any gcc2 internal prototype to avoid an error.  */
4359/* We use char because int might match the return type of a gcc2
4360    builtin and then its argument prototype would still apply.  */
4361char dlopen();
4362
4363int main() {
4364dlopen()
4365; return 0; }
4366EOF
4367if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4368  rm -rf conftest*
4369  eval "ac_cv_lib_$ac_lib_var=yes"
4370else
4371  echo "configure: failed program was:" >&5
4372  cat conftest.$ac_ext >&5
4373  rm -rf conftest*
4374  eval "ac_cv_lib_$ac_lib_var=no"
4375fi
4376rm -f conftest*
4377LIBS="$ac_save_LIBS"
4378
4379fi
4380if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4381  echo "$ac_t""yes" 1>&6
4382    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4383    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4384  cat >> confdefs.h <<EOF
4385#define $ac_tr_lib 1
4386EOF
4387
4388  LIBS="-ldl $LIBS"
4389
4390else
4391  echo "$ac_t""no" 1>&6
4392fi
4393
4394  if test "$ac_cv_lib_dl_dlopen" = yes; then
4395    NEED_LIBS="-ldl ${NEED_LIBS}"
4396    LD_DYN_FLAGS="-Xlinker -E"
4397    LD_LIBC="-lc"
4398   
4399    cat >> confdefs.h <<\EOF
4400#define HAVE_DL 1
4401EOF
4402
4403  fi
4404  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4405echo "configure:4406: checking for shl_load in -ldld" >&5
4406ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4407if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4408  echo $ac_n "(cached) $ac_c" 1>&6
4409else
4410  ac_save_LIBS="$LIBS"
4411LIBS="-ldld  $LIBS"
4412cat > conftest.$ac_ext <<EOF
4413#line 4414 "configure"
4414#include "confdefs.h"
4415/* Override any gcc2 internal prototype to avoid an error.  */
4416/* We use char because int might match the return type of a gcc2
4417    builtin and then its argument prototype would still apply.  */
4418char shl_load();
4419
4420int main() {
4421shl_load()
4422; return 0; }
4423EOF
4424if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4425  rm -rf conftest*
4426  eval "ac_cv_lib_$ac_lib_var=yes"
4427else
4428  echo "configure: failed program was:" >&5
4429  cat conftest.$ac_ext >&5
4430  rm -rf conftest*
4431  eval "ac_cv_lib_$ac_lib_var=no"
4432fi
4433rm -f conftest*
4434LIBS="$ac_save_LIBS"
4435
4436fi
4437if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4438  echo "$ac_t""yes" 1>&6
4439    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4440    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4441  cat >> confdefs.h <<EOF
4442#define $ac_tr_lib 1
4443EOF
4444
4445  LIBS="-ldld $LIBS"
4446
4447else
4448  echo "$ac_t""no" 1>&6
4449fi
4450
4451  if test "$ac_cv_lib_dld_shl_load" = yes; then
4452    NEED_LIBS="-ldld ${NEED_LIBS}"
4453    LD_DYN_FLAGS="-Xlinker -E"
4454    LD_LIBC="-lc"
4455   
4456    cat >> confdefs.h <<\EOF
4457#define HAVE_DL 1
4458EOF
4459
4460  fi
4461fi
4462
4463echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
4464echo "configure:4465: checking whether to have MP" >&5
4465if test "${with_MP}" != yes && test "${with_MP}" != no; then
4466  if (test "${will_have_gmp}" = yes) && \
4467     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4468    echo "$ac_t""yes" 1>&6
4469    cat >> confdefs.h <<\EOF
4470#define HAVE_MPSR 1
4471EOF
4472
4473    NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
4474  else
4475    echo "$ac_t""no" 1>&6
4476  fi
4477elif  test "${with_MP}" = yes; then
4478  if (test "${will_have_gmp}" = yes) && \
4479     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4480    echo "$ac_t""yes" 1>&6
4481    cat >> confdefs.h <<\EOF
4482#define HAVE_MPSR 1
4483EOF
4484
4485    NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
4486  else
4487    echo "$ac_t""no" 1>&6
4488    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
4489  fi
4490else
4491  echo "$ac_t""no" 1>&6
4492fi
4493
4494echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
4495echo "configure:4496: checking whether to have factory" >&5
4496if test "${with_factory}" != yes && test "${with_factory}" != no; then
4497  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4498    echo "$ac_t""yes" 1>&6
4499    cat >> confdefs.h <<\EOF
4500#define HAVE_FACTORY 1
4501EOF
4502
4503    will_have_factory=yes
4504    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4505  else
4506    echo "$ac_t""no" 1>&6
4507  fi
4508elif  test "${with_factory}" = yes; then
4509  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4510    echo "$ac_t""yes" 1>&6
4511    cat >> confdefs.h <<\EOF
4512#define HAVE_FACTORY 1
4513EOF
4514
4515    will_have_factory=yes
4516    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4517  else
4518    echo "$ac_t""no" 1>&6
4519    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
4520  fi
4521else
4522  echo "$ac_t""no" 1>&6
4523fi
4524
4525echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
4526echo "configure:4527: checking whether to have libfac" >&5
4527if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
4528  if (test "${will_have_factory}" = yes) && \
4529     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4530    echo "$ac_t""yes" 1>&6
4531    cat >> confdefs.h <<\EOF
4532#define HAVE_LIBFAC_P 1
4533EOF
4534
4535    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4536  else
4537    echo "$ac_t""no" 1>&6
4538  fi
4539elif  test "${with_libfac}" = yes; then
4540  if (test "${will_have_factory}" = yes) && \
4541     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4542    echo "$ac_t""yes" 1>&6
4543    cat >> confdefs.h <<\EOF
4544#define HAVE_LIBFAC_P 1
4545EOF
4546
4547    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4548  else
4549    echo "$ac_t""no" 1>&6
4550    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
4551  fi
4552else
4553  echo "$ac_t""no" 1>&6
4554fi
4555
4556
4557echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
4558echo "configure:4559: checking whether to have dbm links" >&5
4559if test "$with_dbm" != no; then
4560  cat >> confdefs.h <<\EOF
4561#define HAVE_DBM 1
4562EOF
4563
4564  echo "$ac_t""yes" 1>&6
4565else
4566  echo "$ac_t""no" 1>&6
4567fi
4568
4569echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
4570echo "configure:4571: checking whether to have namespaces" >&5
4571if test "$with_namespaces" != yes; then
4572  echo "$ac_t""no" 1>&6
4573else
4574  cat >> confdefs.h <<\EOF
4575#define HAVE_NAMESPACES 1
4576EOF
4577
4578  echo "$ac_t""yes" 1>&6
4579fi
4580
4581echo $ac_n "checking whether to have dynamic loading""... $ac_c" 1>&6
4582echo "configure:4583: checking whether to have dynamic loading" >&5
4583if test "$with_dl" != yes; then
4584  echo "$ac_t""no" 1>&6
4585else
4586  cat >> confdefs.h <<\EOF
4587#define HAVE_DYNAMIC_LOADING 1
4588EOF
4589
4590  echo "$ac_t""yes" 1>&6
4591  case "$ac_cv_singuname" in
4592        unknown) ;;
4593        HPUX-9)
4594          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4595echo "configure:4596: checking for shl_load in -ldld" >&5
4596ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4597if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4598  echo $ac_n "(cached) $ac_c" 1>&6
4599else
4600  ac_save_LIBS="$LIBS"
4601LIBS="-ldld  $LIBS"
4602cat > conftest.$ac_ext <<EOF
4603#line 4604 "configure"
4604#include "confdefs.h"
4605/* Override any gcc2 internal prototype to avoid an error.  */
4606/* We use char because int might match the return type of a gcc2
4607    builtin and then its argument prototype would still apply.  */
4608char shl_load();
4609
4610int main() {
4611shl_load()
4612; return 0; }
4613EOF
4614if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4615  rm -rf conftest*
4616  eval "ac_cv_lib_$ac_lib_var=yes"
4617else
4618  echo "configure: failed program was:" >&5
4619  cat conftest.$ac_ext >&5
4620  rm -rf conftest*
4621  eval "ac_cv_lib_$ac_lib_var=no"
4622fi
4623rm -f conftest*
4624LIBS="$ac_save_LIBS"
4625
4626fi
4627if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4628  echo "$ac_t""yes" 1>&6
4629    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4630    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4631  cat >> confdefs.h <<EOF
4632#define $ac_tr_lib 1
4633EOF
4634
4635  LIBS="-ldld $LIBS"
4636
4637else
4638  echo "$ac_t""no" 1>&6
4639fi
4640
4641          NEED_LIBS="-ldld ${NEED_LIBS}"
4642          LD_DYN_FLAGS="-Xlinker -E"
4643        ;;
4644        HPUX-10)
4645          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4646echo "configure:4647: checking for shl_load in -ldld" >&5
4647ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4648if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4649  echo $ac_n "(cached) $ac_c" 1>&6
4650else
4651  ac_save_LIBS="$LIBS"
4652LIBS="-ldld  $LIBS"
4653cat > conftest.$ac_ext <<EOF
4654#line 4655 "configure"
4655#include "confdefs.h"
4656/* Override any gcc2 internal prototype to avoid an error.  */
4657/* We use char because int might match the return type of a gcc2
4658    builtin and then its argument prototype would still apply.  */
4659char shl_load();
4660
4661int main() {
4662shl_load()
4663; return 0; }
4664EOF
4665if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4666  rm -rf conftest*
4667  eval "ac_cv_lib_$ac_lib_var=yes"
4668else
4669  echo "configure: failed program was:" >&5
4670  cat conftest.$ac_ext >&5
4671  rm -rf conftest*
4672  eval "ac_cv_lib_$ac_lib_var=no"
4673fi
4674rm -f conftest*
4675LIBS="$ac_save_LIBS"
4676
4677fi
4678if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4679  echo "$ac_t""yes" 1>&6
4680    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4681    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4682  cat >> confdefs.h <<EOF
4683#define $ac_tr_lib 1
4684EOF
4685
4686  LIBS="-ldld $LIBS"
4687
4688else
4689  echo "$ac_t""no" 1>&6
4690fi
4691
4692          NEED_LIBS="-ldld ${NEED_LIBS}"
4693          LD_DYN_FLAGS="-Xlinker -E"
4694        ;;
4695        ix86-Linux)
4696          NEED_LIBS="-ldl ${NEED_LIBS}"
4697          LD_DYN_FLAGS="-rdynamic"
4698        ;;
4699  esac
4700 
4701fi
4702
4703echo $ac_n "checking whether to use mtrack""... $ac_c" 1>&6
4704echo "configure:4705: checking whether to use mtrack" >&5
4705if test "$with_mtrack" = yes && test "$ac_cv_singuname" = ix86-Linux; then
4706  echo "$ac_t""yes" 1>&6
4707  cat >> confdefs.h <<\EOF
4708#define HAVE_MTRACK 1
4709EOF
4710
4711else
4712  echo "$ac_t""no" 1>&6
4713fi
4714
4715
4716
4717echo $ac_n "checking which exponent type to use""... $ac_c" 1>&6
4718echo "configure:4719: checking which exponent type to use" >&5
4719if test "$with_exp_type" = "char"; then
4720  echo "$ac_t""char" 1>&6
4721  cat >> confdefs.h <<\EOF
4722#define EXPONENT_TYPE char
4723EOF
4724
4725  cat >> confdefs.h <<\EOF
4726#define SIZEOF_EXPONENT SIZEOF_CHAR
4727EOF
4728
4729elif test "with_exp_type" = "int"; then
4730  echo "$ac_t""int" 1>&6
4731  cat >> confdefs.h <<\EOF
4732#define EXPONENT_TYPE int
4733EOF
4734
4735  cat >> confdefs.h <<\EOF
4736#define SIZEOF_EXPONENT SIZEOF_INT
4737EOF
4738
4739else
4740  echo "$ac_t""short" 1>&6
4741  cat >> confdefs.h <<\EOF
4742#define EXPONENT_TYPE short
4743EOF
4744
4745  cat >> confdefs.h <<\EOF
4746#define SIZEOF_TYPE SIZEOF_SHORT
4747EOF
4748
4749fi
4750
4751trap '' 1 2 15
4752cat > confcache <<\EOF
4753# This file is a shell script that caches the results of configure
4754# tests run on this system so they can be shared between configure
4755# scripts and configure runs.  It is not useful on other systems.
4756# If it contains results you don't want to keep, you may remove or edit it.
4757#
4758# By default, configure uses ./config.cache as the cache file,
4759# creating it if it does not exist already.  You can give configure
4760# the --cache-file=FILE option to use a different cache file; that is
4761# what configure does when it calls configure scripts in
4762# subdirectories, so they share the cache.
4763# Giving --cache-file=/dev/null disables caching, for debugging configure.
4764# config.status only pays attention to the cache file if you give it the
4765# --recheck option to rerun configure.
4766#
4767EOF
4768# The following way of writing the cache mishandles newlines in values,
4769# but we know of no workaround that is simple, portable, and efficient.
4770# So, don't put newlines in cache variables' values.
4771# Ultrix sh set writes to stderr and can't be redirected directly,
4772# and sets the high bit in the cache file unless we assign to the vars.
4773(set) 2>&1 |
4774  case `(ac_space=' '; set) 2>&1` in
4775  *ac_space=\ *)
4776    # `set' does not quote correctly, so add quotes (double-quote substitution
4777    # turns \\\\ into \\, and sed turns \\ into \).
4778    sed -n \
4779      -e "s/'/'\\\\''/g" \
4780      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4781    ;;
4782  *)
4783    # `set' quotes correctly as required by POSIX, so do not add quotes.
4784    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4785    ;;
4786  esac >> confcache
4787if cmp -s $cache_file confcache; then
4788  :
4789else
4790  if test -w $cache_file; then
4791    echo "updating cache $cache_file"
4792    cat confcache > $cache_file
4793  else
4794    echo "not updating unwritable cache $cache_file"
4795  fi
4796fi
4797rm -f confcache
4798
4799trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4800
4801test "x$prefix" = xNONE && prefix=$ac_default_prefix
4802# Let make expand exec_prefix.
4803test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4804
4805# Any assignment to VPATH causes Sun make to only execute
4806# the first set of double-colon rules, so remove it if not needed.
4807# If there is a colon in the path, we need to keep it.
4808if test "x$srcdir" = x.; then
4809  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4810fi
4811
4812trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4813
4814DEFS=-DHAVE_CONFIG_H
4815
4816# Without the "./", some shells look in PATH for config.status.
4817: ${CONFIG_STATUS=./config.status}
4818
4819echo creating $CONFIG_STATUS
4820rm -f $CONFIG_STATUS
4821cat > $CONFIG_STATUS <<EOF
4822#! /bin/sh
4823# Generated automatically by configure.
4824# Run this file to recreate the current configuration.
4825# This directory was configured as follows,
4826# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4827#
4828# $0 $ac_configure_args
4829#
4830# Compiler output produced by configure, useful for debugging
4831# configure, is in ./config.log if it exists.
4832
4833ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4834for ac_option
4835do
4836  case "\$ac_option" in
4837  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4838    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4839    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4840  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4841    echo "$CONFIG_STATUS generated by autoconf version 2.12"
4842    exit 0 ;;
4843  -help | --help | --hel | --he | --h)
4844    echo "\$ac_cs_usage"; exit 0 ;;
4845  *) echo "\$ac_cs_usage"; exit 1 ;;
4846  esac
4847done
4848
4849ac_given_srcdir=$srcdir
4850
4851trap 'rm -fr `echo "Makefile mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4852EOF
4853cat >> $CONFIG_STATUS <<EOF
4854
4855# Protect against being on the right side of a sed subst in config.status.
4856sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4857 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4858$ac_vpsub
4859$extrasub
4860s%@CFLAGS@%$CFLAGS%g
4861s%@CPPFLAGS@%$CPPFLAGS%g
4862s%@CXXFLAGS@%$CXXFLAGS%g
4863s%@DEFS@%$DEFS%g
4864s%@LDFLAGS@%$LDFLAGS%g
4865s%@LIBS@%$LIBS%g
4866s%@exec_prefix@%$exec_prefix%g
4867s%@prefix@%$prefix%g
4868s%@program_transform_name@%$program_transform_name%g
4869s%@bindir@%$bindir%g
4870s%@sbindir@%$sbindir%g
4871s%@libexecdir@%$libexecdir%g
4872s%@datadir@%$datadir%g
4873s%@sysconfdir@%$sysconfdir%g
4874s%@sharedstatedir@%$sharedstatedir%g
4875s%@localstatedir@%$localstatedir%g
4876s%@libdir@%$libdir%g
4877s%@includedir@%$includedir%g
4878s%@oldincludedir@%$oldincludedir%g
4879s%@infodir@%$infodir%g
4880s%@mandir@%$mandir%g
4881s%@SINGUNAME@%$SINGUNAME%g
4882s%@SING_UNAME@%$SING_UNAME%g
4883s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
4884s%@CC@%$CC%g
4885s%@CPP@%$CPP%g
4886s%@CXX@%$CXX%g
4887s%@PIPE@%$PIPE%g
4888s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
4889s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
4890s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
4891s%@SET_MAKE@%$SET_MAKE%g
4892s%@SINGULAR@%$SINGULAR%g
4893s%@LEX@%$LEX%g
4894s%@BISON@%$BISON%g
4895s%@LN_S@%$LN_S%g
4896s%@ALLOCA@%$ALLOCA%g
4897s%@PERL5@%$PERL5%g
4898s%@LD_LIBC@%$LD_LIBC%g
4899s%@NEED_LIBS@%$NEED_LIBS%g
4900s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
4901
4902CEOF
4903EOF
4904
4905cat >> $CONFIG_STATUS <<\EOF
4906
4907# Split the substitutions into bite-sized pieces for seds with
4908# small command number limits, like on Digital OSF/1 and HP-UX.
4909ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4910ac_file=1 # Number of current file.
4911ac_beg=1 # First line for current file.
4912ac_end=$ac_max_sed_cmds # Line after last line for current file.
4913ac_more_lines=:
4914ac_sed_cmds=""
4915while $ac_more_lines; do
4916  if test $ac_beg -gt 1; then
4917    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4918  else
4919    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4920  fi
4921  if test ! -s conftest.s$ac_file; then
4922    ac_more_lines=false
4923    rm -f conftest.s$ac_file
4924  else
4925    if test -z "$ac_sed_cmds"; then
4926      ac_sed_cmds="sed -f conftest.s$ac_file"
4927    else
4928      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4929    fi
4930    ac_file=`expr $ac_file + 1`
4931    ac_beg=$ac_end
4932    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4933  fi
4934done
4935if test -z "$ac_sed_cmds"; then
4936  ac_sed_cmds=cat
4937fi
4938EOF
4939
4940cat >> $CONFIG_STATUS <<EOF
4941
4942CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4943EOF
4944cat >> $CONFIG_STATUS <<\EOF
4945for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4946  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4947  case "$ac_file" in
4948  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4949       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4950  *) ac_file_in="${ac_file}.in" ;;
4951  esac
4952
4953  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4954
4955  # Remove last slash and all that follows it.  Not all systems have dirname.
4956  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4957  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4958    # The file is in a subdirectory.
4959    test ! -d "$ac_dir" && mkdir "$ac_dir"
4960    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4961    # A "../" for each directory in $ac_dir_suffix.
4962    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4963  else
4964    ac_dir_suffix= ac_dots=
4965  fi
4966
4967  case "$ac_given_srcdir" in
4968  .)  srcdir=.
4969      if test -z "$ac_dots"; then top_srcdir=.
4970      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4971  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4972  *) # Relative path.
4973    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4974    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4975  esac
4976
4977
4978  echo creating "$ac_file"
4979  rm -f "$ac_file"
4980  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4981  case "$ac_file" in
4982  *Makefile*) ac_comsub="1i\\
4983# $configure_input" ;;
4984  *) ac_comsub= ;;
4985  esac
4986
4987  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4988  sed -e "$ac_comsub
4989s%@configure_input@%$configure_input%g
4990s%@srcdir@%$srcdir%g
4991s%@top_srcdir@%$top_srcdir%g
4992" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4993fi; done
4994rm -f conftest.s*
4995
4996# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4997# NAME is the cpp macro being defined and VALUE is the value it is being given.
4998#
4999# ac_d sets the value in "#define NAME VALUE" lines.
5000ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5001ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5002ac_dC='\3'
5003ac_dD='%g'
5004# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5005ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5006ac_uB='\([      ]\)%\1#\2define\3'
5007ac_uC=' '
5008ac_uD='\4%g'
5009# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5010ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5011ac_eB='$%\1#\2define\3'
5012ac_eC=' '
5013ac_eD='%g'
5014
5015if test "${CONFIG_HEADERS+set}" != set; then
5016EOF
5017cat >> $CONFIG_STATUS <<EOF
5018  CONFIG_HEADERS="mod2.h"
5019EOF
5020cat >> $CONFIG_STATUS <<\EOF
5021fi
5022for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5023  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5024  case "$ac_file" in
5025  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5026       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5027  *) ac_file_in="${ac_file}.in" ;;
5028  esac
5029
5030  echo creating $ac_file
5031
5032  rm -f conftest.frag conftest.in conftest.out
5033  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5034  cat $ac_file_inputs > conftest.in
5035
5036EOF
5037
5038# Transform confdefs.h into a sed script conftest.vals that substitutes
5039# the proper values into config.h.in to produce config.h.  And first:
5040# Protect against being on the right side of a sed subst in config.status.
5041# Protect against being in an unquoted here document in config.status.
5042rm -f conftest.vals
5043cat > conftest.hdr <<\EOF
5044s/[\\&%]/\\&/g
5045s%[\\$`]%\\&%g
5046s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5047s%ac_d%ac_u%gp
5048s%ac_u%ac_e%gp
5049EOF
5050sed -n -f conftest.hdr confdefs.h > conftest.vals
5051rm -f conftest.hdr
5052
5053# This sed command replaces #undef with comments.  This is necessary, for
5054# example, in the case of _POSIX_SOURCE, which is predefined and required
5055# on some systems where configure will not decide to define it.
5056cat >> conftest.vals <<\EOF
5057s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5058EOF
5059
5060# Break up conftest.vals because some shells have a limit on
5061# the size of here documents, and old seds have small limits too.
5062
5063rm -f conftest.tail
5064while :
5065do
5066  ac_lines=`grep -c . conftest.vals`
5067  # grep -c gives empty output for an empty file on some AIX systems.
5068  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5069  # Write a limited-size here document to conftest.frag.
5070  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5071  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5072  echo 'CEOF
5073  sed -f conftest.frag conftest.in > conftest.out
5074  rm -f conftest.in
5075  mv conftest.out conftest.in
5076' >> $CONFIG_STATUS
5077  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5078  rm -f conftest.vals
5079  mv conftest.tail conftest.vals
5080done
5081rm -f conftest.vals
5082
5083cat >> $CONFIG_STATUS <<\EOF
5084  rm -f conftest.frag conftest.h
5085  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5086  cat conftest.in >> conftest.h
5087  rm -f conftest.in
5088  if cmp -s $ac_file conftest.h 2>/dev/null; then
5089    echo "$ac_file is unchanged"
5090    rm -f conftest.h
5091  else
5092    # Remove last slash and all that follows it.  Not all systems have dirname.
5093      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5094      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5095      # The file is in a subdirectory.
5096      test ! -d "$ac_dir" && mkdir "$ac_dir"
5097    fi
5098    rm -f $ac_file
5099    mv conftest.h $ac_file
5100  fi
5101fi; done
5102
5103EOF
5104cat >> $CONFIG_STATUS <<EOF
5105
5106EOF
5107cat >> $CONFIG_STATUS <<\EOF
5108\
5109 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
5110exit 0
5111EOF
5112chmod +x $CONFIG_STATUS
5113rm -fr confdefs* $ac_clean_files
5114test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5115
5116
5117
5118
5119
Note: See TracBrowser for help on using the repository browser.