source: git/Singular/configure @ c232af

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