source: git/Singular/configure @ 7eab1f

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