source: git/Singular/configure @ 416465

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