source: git/kernel/configure @ 5fdd0f

spielwiese
Last change on this file since 5fdd0f was 35aab3, checked in by Hans Schönemann <hannes@…>, 21 years ago
This commit was generated by cvs2svn to compensate for changes in r6879, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@6880 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 143.4 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=[dynamic,static,no]         
22                          do use dynamic/static/no readline for fancy display"
23ac_help="$ac_help
24  --without-MP            do not use MP (no MP links)"
25ac_help="$ac_help
26  --without-dbm           do not use dbm (no DBM links)"
27ac_help="$ac_help
28  --without-factory       do not use factory (no poly factorization)"
29ac_help="$ac_help
30  --without-libfac        do not use libfac (no primary decompositions)"
31ac_help="$ac_help
32  --with-namespaces       do compile namespace support"
33ac_help="$ac_help
34  --without-dl            do not use dynamic linking, modules, and kernel"
35ac_help="$ac_help
36  --with-dynamic-modules  do compile with dynamic modules support"
37ac_help="$ac_help
38  --without-dynamic-kernel               
39                          do not compile with dynamic kernel parts"
40ac_help="$ac_help
41  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic"
42ac_help="$ac_help
43  --with-Plural           do compile with Plural support"
44ac_help="$ac_help
45  --with-NTL              build for use with NTL."
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=mmalloc.cc
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:-2}
603SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-1}
604SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-2}
605SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
606VERSION_DATE=${VERSION_DATE:-"August 2001"}
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# test for gcc-version: gcc2: prefer CC=gcc, CXX=gcc
1208#                       gcc3:        CC=gcc  CXX=g++
1209#                       other:       CC=cc   CXX=c++
1210echo $ac_n "checking gcc version""... $ac_c" 1>&6
1211echo "configure:1212: checking gcc version" >&5
1212if eval "test \"`echo '$''{'ac_cv_c_cpp'+set}'`\" = set"; then
1213  echo $ac_n "(cached) $ac_c" 1>&6
1214else
1215  ac_cv_c_cp="unknown"
1216if test -r "gccversion.sh"; then
1217  ac_cv_c_cpp=`/bin/sh gccversion.sh`
1218fi
1219
1220fi
1221
1222echo "$ac_t""$ac_cv_c_cpp" 1>&6
1223
1224# we prefer using gcc for compiling C++ files, provided the user did
1225# not overwrite it explicitely
1226if test "${GXX}" = yes && test "${ac_cxx_set}" = no; then
1227  if test "${ac_cv_c_cpp}" = gcc2; then
1228    CXX=gcc
1229  elif test "${ac_cv_c_cpp}" = gcc3; then
1230    CXX=g++
1231  fi
1232  temp_cflags=${CXXFLAGS}
1233 
1234  ac_ext=C
1235# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1236ac_cpp='$CXXCPP $CPPFLAGS'
1237ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1238ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1239cross_compiling=$ac_cv_prog_cxx_cross
1240
1241  # check whether gcc accepts --no-rtti
1242  echo $ac_n "checking whether gcc accepts --no-rtti""... $ac_c" 1>&6
1243echo "configure:1244: checking whether gcc accepts --no-rtti" >&5
1244  CXXFLAGS="${CXXFLAGS} --no-rtti"
1245  if eval "test \"`echo '$''{'ac_cv_cxx_have_rtti'+set}'`\" = set"; then
1246  echo $ac_n "(cached) $ac_c" 1>&6
1247else
1248  cat > conftest.$ac_ext <<EOF
1249#line 1250 "configure"
1250#include "confdefs.h"
1251
1252int main() {
1253
1254; return 0; }
1255EOF
1256if { (eval echo configure:1257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1257  rm -rf conftest*
1258  ac_cv_cxx_have_rtti=yes
1259else
1260  echo "configure: failed program was:" >&5
1261  cat conftest.$ac_ext >&5
1262  rm -rf conftest*
1263  ac_cv_cxx_have_rtti=no
1264fi
1265rm -f conftest*
1266 
1267fi
1268
1269  echo "$ac_t""${ac_cv_cxx_have_rtti}" 1>&6
1270  if test "${ac_cv_cxx_have_rtti}" != yes; then
1271  CXXFLAGS=$temp_flags
1272  else
1273  CXX="${CXX} --no-rtti"
1274  fi
1275
1276# check whether gcc accepts --no-exceptions
1277  echo $ac_n "checking whether gcc accepts --no-exceptions""... $ac_c" 1>&6
1278echo "configure:1279: checking whether gcc accepts --no-exceptions" >&5
1279  CXXFLAGS="${CXXFLAGS} --no-exceptions"
1280  if eval "test \"`echo '$''{'ac_cv_cxx_have_exceptions'+set}'`\" = set"; then
1281  echo $ac_n "(cached) $ac_c" 1>&6
1282else
1283  cat > conftest.$ac_ext <<EOF
1284#line 1285 "configure"
1285#include "confdefs.h"
1286
1287int main() {
1288
1289; return 0; }
1290EOF
1291if { (eval echo configure:1292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1292  rm -rf conftest*
1293  ac_cv_cxx_have_exceptions=yes
1294else
1295  echo "configure: failed program was:" >&5
1296  cat conftest.$ac_ext >&5
1297  rm -rf conftest*
1298  ac_cv_cxx_have_exceptions=no
1299fi
1300rm -f conftest*
1301 
1302fi
1303
1304  echo "$ac_t""${ac_cv_cxx_have_exceptions}" 1>&6
1305  if test "${ac_cv_cxx_have_exceptions}" != yes; then
1306  CXXFLAGS=$temp_flags
1307  else
1308  CXX="${CXX} --no-exceptions"
1309  fi
1310
1311  ac_ext=c
1312# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1313ac_cpp='$CPP $CPPFLAGS'
1314ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1315ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1316cross_compiling=$ac_cv_prog_cc_cross
1317
1318  CXXFLAGS=$temp_flags
1319
1320fi
1321
1322# check whether the compiler accepts -pipe
1323echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
1324echo "configure:1325: checking whether compiler accepts -pipe" >&5
1325temp_cflags=${CFLAGS}
1326CFLAGS="${CFLAGS} -pipe"
1327if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then
1328  echo $ac_n "(cached) $ac_c" 1>&6
1329else
1330  cat > conftest.$ac_ext <<EOF
1331#line 1332 "configure"
1332#include "confdefs.h"
1333
1334int main() {
1335
1336; return 0; }
1337EOF
1338if { (eval echo configure:1339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1339  rm -rf conftest*
1340  ac_cv_cxx_have_pipe=yes
1341else
1342  echo "configure: failed program was:" >&5
1343  cat conftest.$ac_ext >&5
1344  rm -rf conftest*
1345  ac_cv_cxx_have_pipe=no
1346fi
1347rm -f conftest*
1348
1349fi
1350
1351echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6
1352CFLAGS=${temp_cflags}
1353if test "${ac_cv_cxx_have_pipe}" != yes; then
1354  PIPE=
1355else
1356  PIPE="-pipe"
1357fi
1358
1359
1360# Customize CFLAGS
1361echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
1362echo "configure:1363: checking whether _AIX is defined" >&5
1363if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
1364  echo $ac_n "(cached) $ac_c" 1>&6
1365else
1366  cat > conftest.$ac_ext <<EOF
1367#line 1368 "configure"
1368#include "confdefs.h"
1369#ifdef _AIX
1370    yes
1371#endif
1372
1373EOF
1374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1375  egrep "yes" >/dev/null 2>&1; then
1376  rm -rf conftest*
1377  ac_cv_is_aix=yes
1378else
1379  rm -rf conftest*
1380  ac_cv_is_aix=no
1381fi
1382rm -f conftest*
1383
1384fi
1385
1386if test "$ac_cv_is_aix" = yes; then
1387  echo "$ac_t""yes" 1>&6
1388else
1389  echo "$ac_t""no" 1>&6
1390fi
1391
1392# we know best when compiling with gcc
1393if test "${GXX}" = yes; then
1394  if test "$ac_cxxflags_set" = no; then
1395    CXXFLAGS="-O3 -w -fomit-frame-pointer"
1396  fi
1397  CXXTEMPLFLAGS="-fno-implicit-templates"
1398  if test "$ac_cv_is_aix" = yes; then
1399    CXXNOOPTFLAGS="-w"
1400  else
1401    CXXNOOPTFLAGS=$CXXFLAGS
1402  fi
1403  STATIC_LDFLAGS="-static"
1404else
1405  CXXTEMPFLAGS=""
1406  CXXNOOPTFLAGS=$CXXFLAGS
1407  STATIC_LDFLAGS=""
1408fi
1409
1410
1411
1412
1413if test "${GCC}" = yes && test "$ac_cflags_set" = no ; then
1414  CFLAGS="-O3 -w -fomit-frame-pointer"
1415fi
1416
1417echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1418echo "configure:1419: checking whether ${MAKE-make} sets \${MAKE}" >&5
1419set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1420if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1421  echo $ac_n "(cached) $ac_c" 1>&6
1422else
1423  cat > conftestmake <<\EOF
1424all:
1425        @echo 'ac_maketemp="${MAKE}"'
1426EOF
1427# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1428eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1429if test -n "$ac_maketemp"; then
1430  eval ac_cv_prog_make_${ac_make}_set=yes
1431else
1432  eval ac_cv_prog_make_${ac_make}_set=no
1433fi
1434rm -f conftestmake
1435fi
1436if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1437  echo "$ac_t""yes" 1>&6
1438  SET_MAKE=
1439else
1440  echo "$ac_t""no" 1>&6
1441  SET_MAKE="MAKE=${MAKE-make}"
1442fi
1443
1444
1445
1446
1447
1448# expand prefix
1449test "x$prefix" = xNONE && prefix=$ac_default_prefix
1450if test "${with_rootdir+set}" != set; then
1451  cat >> confdefs.h <<EOF
1452#define S_ROOT_DIR "${prefix}"
1453EOF
1454
1455else
1456  cat >> confdefs.h <<EOF
1457#define S_ROOT_DIR "${with_rootdir}"
1458EOF
1459
1460fi
1461
1462# expand exec_prefixad
1463if test "x$exec_prefix" = xNONE; then
1464 exec_prefix=${prefix}/${ac_cv_singuname}
1465fi
1466
1467# expand bindir
1468test "x$bindir" = 'x${exec_prefix}/bin' && bindir="${exec_prefix}"
1469SINGULAR=${SINGULAR:-$bindir/Singular-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}
1470
1471cat >> confdefs.h <<EOF
1472#define S_BIN_DIR "${bindir}"
1473EOF
1474
1475
1476# expand libdir
1477test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib"
1478
1479# expand includedir
1480test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include"
1481
1482# add to -I to CPPFLAGS and and -L to LDFLAGS, just to be sure
1483if test "$ac_cv_c_cpp" = gcc3 ; then
1484  LDFLAGS="-L${libdir} ${LDFLAGS}"
1485  CPPFLAGS="-I${includedir} ${CPPFLAGS}"
1486else
1487  LDFLAGS="-L${libdir} ${LDFLAGS} -L/usr/local/lib"
1488  CPPFLAGS="-I${includedir} ${CPPFLAGS} -I/usr/local/include"
1489fi
1490
1491# this is a work-around to include the right term.h
1492if test "$ac_cv_singuname" = SunOS-5; then
1493CPPFLAGS="-I/usr/xpg4/include ${CPPFLAGS}"
1494fi
1495
1496
1497
1498# lex
1499if test "${with_lex+set}" != set; then
1500  echo $ac_n "checking for flex""... $ac_c" 1>&6
1501echo "configure:1502: checking for flex" >&5
1502    cmd="egrep [2-9]\.[5-9]"
1503    if eval "test \"`echo '$''{'ac_cv_prog_flex'+set}'`\" = set"; then
1504  echo $ac_n "(cached) $ac_c" 1>&6
1505else
1506  if (flex --version >/dev/null 2>&1)
1507    then
1508    if (flex --version | $cmd >/dev/null 2>&1 )
1509    then
1510        ac_cv_prog_flex=flex
1511    fi
1512  fi
1513 
1514fi
1515
1516    if test "${ac_cv_prog_flex+set}" = set; then
1517    echo "$ac_t""flex" 1>&6
1518    LEX=flex
1519   
1520  else
1521    { echo "configure: error: can not find flex with version greater 2.4" 1>&2; exit 1; }
1522  fi
1523elif test "${with_lex}" = no; then
1524  echo "configure: warning: building without lex -- make might fail" 1>&2
1525else
1526  unset LEX
1527  unset ac_cv_prog_LEX
1528  for ac_prog in ${with_lex}
1529do
1530# Extract the first word of "$ac_prog", so it can be a program name with args.
1531set dummy $ac_prog; ac_word=$2
1532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1533echo "configure:1534: checking for $ac_word" >&5
1534if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1535  echo $ac_n "(cached) $ac_c" 1>&6
1536else
1537  if test -n "$LEX"; then
1538  ac_cv_prog_LEX="$LEX" # Let the user override the test.
1539else
1540  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1541  ac_dummy="$PATH"
1542  for ac_dir in $ac_dummy; do
1543    test -z "$ac_dir" && ac_dir=.
1544    if test -f $ac_dir/$ac_word; then
1545      ac_cv_prog_LEX="$ac_prog"
1546      break
1547    fi
1548  done
1549  IFS="$ac_save_ifs"
1550fi
1551fi
1552LEX="$ac_cv_prog_LEX"
1553if test -n "$LEX"; then
1554  echo "$ac_t""$LEX" 1>&6
1555else
1556  echo "$ac_t""no" 1>&6
1557fi
1558
1559test -n "$LEX" && break
1560done
1561
1562  if test "x${LEX}" = x; then
1563    echo "configure: warning: building without lex -- make might fail" 1>&2
1564  fi
1565fi
1566
1567# bison
1568for ac_prog in bison
1569do
1570# Extract the first word of "$ac_prog", so it can be a program name with args.
1571set dummy $ac_prog; ac_word=$2
1572echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1573echo "configure:1574: checking for $ac_word" >&5
1574if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
1575  echo $ac_n "(cached) $ac_c" 1>&6
1576else
1577  if test -n "$BISON"; then
1578  ac_cv_prog_BISON="$BISON" # Let the user override the test.
1579else
1580  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1581  ac_dummy="$PATH"
1582  for ac_dir in $ac_dummy; do
1583    test -z "$ac_dir" && ac_dir=.
1584    if test -f $ac_dir/$ac_word; then
1585      ac_cv_prog_BISON="$ac_prog"
1586      break
1587    fi
1588  done
1589  IFS="$ac_save_ifs"
1590fi
1591fi
1592BISON="$ac_cv_prog_BISON"
1593if test -n "$BISON"; then
1594  echo "$ac_t""$BISON" 1>&6
1595else
1596  echo "$ac_t""no" 1>&6
1597fi
1598
1599test -n "$BISON" && break
1600done
1601
1602if test "${BISON+set}" != set; then
1603  echo "configure: warning: did not find bison -- make might fail" 1>&2
1604fi
1605
1606# ln -s
1607echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1608echo "configure:1609: checking whether ln -s works" >&5
1609if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1610  echo $ac_n "(cached) $ac_c" 1>&6
1611else
1612  rm -f conftestdata
1613if ln -s X conftestdata 2>/dev/null
1614then
1615  rm -f conftestdata
1616  ac_cv_prog_LN_S="ln -s"
1617else
1618  ac_cv_prog_LN_S=ln
1619fi
1620fi
1621LN_S="$ac_cv_prog_LN_S"
1622if test "$ac_cv_prog_LN_S" = "ln -s"; then
1623  echo "$ac_t""yes" 1>&6
1624else
1625  echo "$ac_t""no" 1>&6
1626fi
1627
1628
1629for ac_prog in perl5 perl
1630do
1631# Extract the first word of "$ac_prog", so it can be a program name with args.
1632set dummy $ac_prog; ac_word=$2
1633echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1634echo "configure:1635: checking for $ac_word" >&5
1635if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
1636  echo $ac_n "(cached) $ac_c" 1>&6
1637else
1638  if test -n "$PERL"; then
1639  ac_cv_prog_PERL="$PERL" # Let the user override the test.
1640else
1641  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1642  ac_dummy="$PATH"
1643  for ac_dir in $ac_dummy; do
1644    test -z "$ac_dir" && ac_dir=.
1645    if test -f $ac_dir/$ac_word; then
1646      ac_cv_prog_PERL="$ac_prog"
1647      break
1648    fi
1649  done
1650  IFS="$ac_save_ifs"
1651fi
1652fi
1653PERL="$ac_cv_prog_PERL"
1654if test -n "$PERL"; then
1655  echo "$ac_t""$PERL" 1>&6
1656else
1657  echo "$ac_t""no" 1>&6
1658fi
1659
1660test -n "$PERL" && break
1661done
1662
1663
1664# lib checks
1665# under cygwin, we should not explicitly link with -lm, except for
1666# it really is the last thing to link with
1667if test "$ac_cv_singuname" != ix86-Win; then
1668echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
1669echo "configure:1670: checking for atof in -lm" >&5
1670ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
1671if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1672  echo $ac_n "(cached) $ac_c" 1>&6
1673else
1674  ac_save_LIBS="$LIBS"
1675LIBS="-lm  $LIBS"
1676cat > conftest.$ac_ext <<EOF
1677#line 1678 "configure"
1678#include "confdefs.h"
1679/* Override any gcc2 internal prototype to avoid an error.  */
1680/* We use char because int might match the return type of a gcc2
1681    builtin and then its argument prototype would still apply.  */
1682char atof();
1683
1684int main() {
1685atof()
1686; return 0; }
1687EOF
1688if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1689  rm -rf conftest*
1690  eval "ac_cv_lib_$ac_lib_var=yes"
1691else
1692  echo "configure: failed program was:" >&5
1693  cat conftest.$ac_ext >&5
1694  rm -rf conftest*
1695  eval "ac_cv_lib_$ac_lib_var=no"
1696fi
1697rm -f conftest*
1698LIBS="$ac_save_LIBS"
1699
1700fi
1701if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1702  echo "$ac_t""yes" 1>&6
1703    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1704    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1705  cat >> confdefs.h <<EOF
1706#define $ac_tr_lib 1
1707EOF
1708
1709  LIBS="-lm $LIBS"
1710
1711else
1712  echo "$ac_t""no" 1>&6
1713fi
1714
1715fi
1716SAVE_LIBS=${LIBS}
1717LIBS=
1718
1719# check for dl lib
1720case "$ac_cv_singuname" in
1721        HPUX*)
1722          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1723echo "configure:1724: checking for shl_load in -ldld" >&5
1724ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1725if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1726  echo $ac_n "(cached) $ac_c" 1>&6
1727else
1728  ac_save_LIBS="$LIBS"
1729LIBS="-ldld  $LIBS"
1730cat > conftest.$ac_ext <<EOF
1731#line 1732 "configure"
1732#include "confdefs.h"
1733/* Override any gcc2 internal prototype to avoid an error.  */
1734/* We use char because int might match the return type of a gcc2
1735    builtin and then its argument prototype would still apply.  */
1736char shl_load();
1737
1738int main() {
1739shl_load()
1740; return 0; }
1741EOF
1742if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1743  rm -rf conftest*
1744  eval "ac_cv_lib_$ac_lib_var=yes"
1745else
1746  echo "configure: failed program was:" >&5
1747  cat conftest.$ac_ext >&5
1748  rm -rf conftest*
1749  eval "ac_cv_lib_$ac_lib_var=no"
1750fi
1751rm -f conftest*
1752LIBS="$ac_save_LIBS"
1753
1754fi
1755if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1756  echo "$ac_t""yes" 1>&6
1757    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1758    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1759  cat >> confdefs.h <<EOF
1760#define $ac_tr_lib 1
1761EOF
1762
1763  LIBS="-ldld $LIBS"
1764
1765else
1766  echo "$ac_t""no" 1>&6
1767fi
1768
1769          if test "$ac_cv_lib_dld_shl_load" = yes; then
1770                LD_DYN_FLAGS="-ldld -Xlinker -E"
1771                SFLAGS="-fpic -fPIC -DPIC"
1772                SLDFLAGS="-fPIC -DPIC -shared"
1773                LD=gcc
1774                ac_lib_dl=yes
1775          fi
1776        ;;
1777        *Linux*)
1778          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1779echo "configure:1780: checking for dlopen in -ldl" >&5
1780ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1781if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1782  echo $ac_n "(cached) $ac_c" 1>&6
1783else
1784  ac_save_LIBS="$LIBS"
1785LIBS="-ldl  $LIBS"
1786cat > conftest.$ac_ext <<EOF
1787#line 1788 "configure"
1788#include "confdefs.h"
1789/* Override any gcc2 internal prototype to avoid an error.  */
1790/* We use char because int might match the return type of a gcc2
1791    builtin and then its argument prototype would still apply.  */
1792char dlopen();
1793
1794int main() {
1795dlopen()
1796; return 0; }
1797EOF
1798if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1799  rm -rf conftest*
1800  eval "ac_cv_lib_$ac_lib_var=yes"
1801else
1802  echo "configure: failed program was:" >&5
1803  cat conftest.$ac_ext >&5
1804  rm -rf conftest*
1805  eval "ac_cv_lib_$ac_lib_var=no"
1806fi
1807rm -f conftest*
1808LIBS="$ac_save_LIBS"
1809
1810fi
1811if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1812  echo "$ac_t""yes" 1>&6
1813    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1814    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1815  cat >> confdefs.h <<EOF
1816#define $ac_tr_lib 1
1817EOF
1818
1819  LIBS="-ldl $LIBS"
1820
1821else
1822  echo "$ac_t""no" 1>&6
1823fi
1824
1825          if test "$ac_cv_lib_dl_dlopen" = yes; then
1826                LD_DYN_FLAGS="-ldl -rdynamic"
1827                SFLAGS="-fpic -DPIC"
1828                SLDFLAGS=-shared
1829                LD=ld
1830                ac_lib_dl=yes
1831          fi
1832        ;;
1833        IRIX-6)
1834          LD_DYN_FLAGS="-lc"
1835          SFLAGS="-fPIC -DPIC"
1836          SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared"
1837          LD=ld
1838          ac_lib_dl=yes
1839        ;;
1840        SunOS-5)
1841          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1842echo "configure:1843: checking for dlopen in -ldl" >&5
1843ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1844if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1845  echo $ac_n "(cached) $ac_c" 1>&6
1846else
1847  ac_save_LIBS="$LIBS"
1848LIBS="-ldl  $LIBS"
1849cat > conftest.$ac_ext <<EOF
1850#line 1851 "configure"
1851#include "confdefs.h"
1852/* Override any gcc2 internal prototype to avoid an error.  */
1853/* We use char because int might match the return type of a gcc2
1854    builtin and then its argument prototype would still apply.  */
1855char dlopen();
1856
1857int main() {
1858dlopen()
1859; return 0; }
1860EOF
1861if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1862  rm -rf conftest*
1863  eval "ac_cv_lib_$ac_lib_var=yes"
1864else
1865  echo "configure: failed program was:" >&5
1866  cat conftest.$ac_ext >&5
1867  rm -rf conftest*
1868  eval "ac_cv_lib_$ac_lib_var=no"
1869fi
1870rm -f conftest*
1871LIBS="$ac_save_LIBS"
1872
1873fi
1874if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1875  echo "$ac_t""yes" 1>&6
1876    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1877    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1878  cat >> confdefs.h <<EOF
1879#define $ac_tr_lib 1
1880EOF
1881
1882  LIBS="-ldl $LIBS"
1883
1884else
1885  echo "$ac_t""no" 1>&6
1886fi
1887
1888          if test "$ac_cv_lib_dl_dlopen" = yes; then
1889                LD_DYN_FLAGS="-ldl -Xlinker -E"
1890                SFLAGS="-fpic -DPIC"
1891                SLDFLAGS=-shared
1892                LD=ld
1893                ac_lib_dl=yes
1894          fi
1895        ;;
1896esac
1897
1898
1899
1900
1901LIBS=${SAVE_LIBS}
1902
1903
1904# heder file checks
1905echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1906echo "configure:1907: checking for ANSI C header files" >&5
1907if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1908  echo $ac_n "(cached) $ac_c" 1>&6
1909else
1910  cat > conftest.$ac_ext <<EOF
1911#line 1912 "configure"
1912#include "confdefs.h"
1913#include <stdlib.h>
1914#include <stdarg.h>
1915#include <string.h>
1916#include <float.h>
1917EOF
1918ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1919{ (eval echo configure:1920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1920ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1921if test -z "$ac_err"; then
1922  rm -rf conftest*
1923  ac_cv_header_stdc=yes
1924else
1925  echo "$ac_err" >&5
1926  echo "configure: failed program was:" >&5
1927  cat conftest.$ac_ext >&5
1928  rm -rf conftest*
1929  ac_cv_header_stdc=no
1930fi
1931rm -f conftest*
1932
1933if test $ac_cv_header_stdc = yes; then
1934  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1935cat > conftest.$ac_ext <<EOF
1936#line 1937 "configure"
1937#include "confdefs.h"
1938#include <string.h>
1939EOF
1940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1941  egrep "memchr" >/dev/null 2>&1; then
1942  :
1943else
1944  rm -rf conftest*
1945  ac_cv_header_stdc=no
1946fi
1947rm -f conftest*
1948
1949fi
1950
1951if test $ac_cv_header_stdc = yes; then
1952  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1953cat > conftest.$ac_ext <<EOF
1954#line 1955 "configure"
1955#include "confdefs.h"
1956#include <stdlib.h>
1957EOF
1958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1959  egrep "free" >/dev/null 2>&1; then
1960  :
1961else
1962  rm -rf conftest*
1963  ac_cv_header_stdc=no
1964fi
1965rm -f conftest*
1966
1967fi
1968
1969if test $ac_cv_header_stdc = yes; then
1970  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1971if test "$cross_compiling" = yes; then
1972  :
1973else
1974  cat > conftest.$ac_ext <<EOF
1975#line 1976 "configure"
1976#include "confdefs.h"
1977#include <ctype.h>
1978#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1979#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1980#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1981int main () { int i; for (i = 0; i < 256; i++)
1982if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1983exit (0); }
1984
1985EOF
1986if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1987then
1988  :
1989else
1990  echo "configure: failed program was:" >&5
1991  cat conftest.$ac_ext >&5
1992  rm -fr conftest*
1993  ac_cv_header_stdc=no
1994fi
1995rm -fr conftest*
1996fi
1997
1998fi
1999fi
2000
2001echo "$ac_t""$ac_cv_header_stdc" 1>&6
2002if test $ac_cv_header_stdc = yes; then
2003  cat >> confdefs.h <<\EOF
2004#define STDC_HEADERS 1
2005EOF
2006
2007fi
2008
2009for ac_hdr in limits.h unistd.h
2010do
2011ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2012echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2013echo "configure:2014: checking for $ac_hdr" >&5
2014if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2015  echo $ac_n "(cached) $ac_c" 1>&6
2016else
2017  cat > conftest.$ac_ext <<EOF
2018#line 2019 "configure"
2019#include "confdefs.h"
2020#include <$ac_hdr>
2021EOF
2022ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2023{ (eval echo configure:2024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2024ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2025if test -z "$ac_err"; then
2026  rm -rf conftest*
2027  eval "ac_cv_header_$ac_safe=yes"
2028else
2029  echo "$ac_err" >&5
2030  echo "configure: failed program was:" >&5
2031  cat conftest.$ac_ext >&5
2032  rm -rf conftest*
2033  eval "ac_cv_header_$ac_safe=no"
2034fi
2035rm -f conftest*
2036fi
2037if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2038  echo "$ac_t""yes" 1>&6
2039    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2040  cat >> confdefs.h <<EOF
2041#define $ac_tr_hdr 1
2042EOF
2043 
2044else
2045  echo "$ac_t""no" 1>&6
2046{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2047fi
2048done
2049
2050
2051for ac_hdr in sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h \
2052 sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h \
2053 termios.h term.h readline/readline.h
2054do
2055ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2056echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2057echo "configure:2058: checking for $ac_hdr" >&5
2058if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2059  echo $ac_n "(cached) $ac_c" 1>&6
2060else
2061  cat > conftest.$ac_ext <<EOF
2062#line 2063 "configure"
2063#include "confdefs.h"
2064#include <$ac_hdr>
2065EOF
2066ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2067{ (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2068ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2069if test -z "$ac_err"; then
2070  rm -rf conftest*
2071  eval "ac_cv_header_$ac_safe=yes"
2072else
2073  echo "$ac_err" >&5
2074  echo "configure: failed program was:" >&5
2075  cat conftest.$ac_ext >&5
2076  rm -rf conftest*
2077  eval "ac_cv_header_$ac_safe=no"
2078fi
2079rm -f conftest*
2080fi
2081if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2082  echo "$ac_t""yes" 1>&6
2083    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2084  cat >> confdefs.h <<EOF
2085#define $ac_tr_hdr 1
2086EOF
2087 
2088else
2089  echo "$ac_t""no" 1>&6
2090fi
2091done
2092
2093
2094# typedefs, structures
2095echo $ac_n "checking for working const""... $ac_c" 1>&6
2096echo "configure:2097: checking for working const" >&5
2097if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2098  echo $ac_n "(cached) $ac_c" 1>&6
2099else
2100  cat > conftest.$ac_ext <<EOF
2101#line 2102 "configure"
2102#include "confdefs.h"
2103
2104int main() {
2105
2106/* Ultrix mips cc rejects this.  */
2107typedef int charset[2]; const charset x;
2108/* SunOS 4.1.1 cc rejects this.  */
2109char const *const *ccp;
2110char **p;
2111/* NEC SVR4.0.2 mips cc rejects this.  */
2112struct point {int x, y;};
2113static struct point const zero = {0,0};
2114/* AIX XL C 1.02.0.0 rejects this.
2115   It does not let you subtract one const X* pointer from another in an arm
2116   of an if-expression whose if-part is not a constant expression */
2117const char *g = "string";
2118ccp = &g + (g ? g-g : 0);
2119/* HPUX 7.0 cc rejects these. */
2120++ccp;
2121p = (char**) ccp;
2122ccp = (char const *const *) p;
2123{ /* SCO 3.2v4 cc rejects this.  */
2124  char *t;
2125  char const *s = 0 ? (char *) 0 : (char const *) 0;
2126
2127  *t++ = 0;
2128}
2129{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2130  int x[] = {25, 17};
2131  const int *foo = &x[0];
2132  ++foo;
2133}
2134{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2135  typedef const int *iptr;
2136  iptr p = 0;
2137  ++p;
2138}
2139{ /* AIX XL C 1.02.0.0 rejects this saying
2140     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2141  struct s { int j; const int *ap[3]; };
2142  struct s *b; b->j = 5;
2143}
2144{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2145  const int foo = 10;
2146}
2147
2148; return 0; }
2149EOF
2150if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2151  rm -rf conftest*
2152  ac_cv_c_const=yes
2153else
2154  echo "configure: failed program was:" >&5
2155  cat conftest.$ac_ext >&5
2156  rm -rf conftest*
2157  ac_cv_c_const=no
2158fi
2159rm -f conftest*
2160fi
2161
2162echo "$ac_t""$ac_cv_c_const" 1>&6
2163if test $ac_cv_c_const = no; then
2164  cat >> confdefs.h <<\EOF
2165#define const
2166EOF
2167
2168fi
2169
2170echo $ac_n "checking for inline""... $ac_c" 1>&6
2171echo "configure:2172: checking for inline" >&5
2172if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2173  echo $ac_n "(cached) $ac_c" 1>&6
2174else
2175  ac_cv_c_inline=no
2176for ac_kw in inline __inline__ __inline; do
2177  cat > conftest.$ac_ext <<EOF
2178#line 2179 "configure"
2179#include "confdefs.h"
2180
2181int main() {
2182} $ac_kw foo() {
2183; return 0; }
2184EOF
2185if { (eval echo configure:2186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2186  rm -rf conftest*
2187  ac_cv_c_inline=$ac_kw; break
2188else
2189  echo "configure: failed program was:" >&5
2190  cat conftest.$ac_ext >&5
2191fi
2192rm -f conftest*
2193done
2194
2195fi
2196
2197echo "$ac_t""$ac_cv_c_inline" 1>&6
2198case "$ac_cv_c_inline" in
2199  inline | yes) ;;
2200  no) cat >> confdefs.h <<\EOF
2201#define inline
2202EOF
2203 ;;
2204  *)  cat >> confdefs.h <<EOF
2205#define inline $ac_cv_c_inline
2206EOF
2207 ;;
2208esac
2209
2210echo $ac_n "checking for size_t""... $ac_c" 1>&6
2211echo "configure:2212: checking for size_t" >&5
2212if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2213  echo $ac_n "(cached) $ac_c" 1>&6
2214else
2215  cat > conftest.$ac_ext <<EOF
2216#line 2217 "configure"
2217#include "confdefs.h"
2218#include <sys/types.h>
2219#if STDC_HEADERS
2220#include <stdlib.h>
2221#include <stddef.h>
2222#endif
2223EOF
2224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2225  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2226  rm -rf conftest*
2227  ac_cv_type_size_t=yes
2228else
2229  rm -rf conftest*
2230  ac_cv_type_size_t=no
2231fi
2232rm -f conftest*
2233
2234fi
2235echo "$ac_t""$ac_cv_type_size_t" 1>&6
2236if test $ac_cv_type_size_t = no; then
2237  cat >> confdefs.h <<\EOF
2238#define size_t unsigned
2239EOF
2240
2241fi
2242
2243echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2244echo "configure:2245: checking whether struct tm is in sys/time.h or time.h" >&5
2245if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2246  echo $ac_n "(cached) $ac_c" 1>&6
2247else
2248  cat > conftest.$ac_ext <<EOF
2249#line 2250 "configure"
2250#include "confdefs.h"
2251#include <sys/types.h>
2252#include <time.h>
2253int main() {
2254struct tm *tp; tp->tm_sec;
2255; return 0; }
2256EOF
2257if { (eval echo configure:2258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2258  rm -rf conftest*
2259  ac_cv_struct_tm=time.h
2260else
2261  echo "configure: failed program was:" >&5
2262  cat conftest.$ac_ext >&5
2263  rm -rf conftest*
2264  ac_cv_struct_tm=sys/time.h
2265fi
2266rm -f conftest*
2267fi
2268
2269echo "$ac_t""$ac_cv_struct_tm" 1>&6
2270if test $ac_cv_struct_tm = sys/time.h; then
2271  cat >> confdefs.h <<\EOF
2272#define TM_IN_SYS_TIME 1
2273EOF
2274
2275fi
2276
2277echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2278echo "configure:2279: checking whether time.h and sys/time.h may both be included" >&5
2279if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2280  echo $ac_n "(cached) $ac_c" 1>&6
2281else
2282  cat > conftest.$ac_ext <<EOF
2283#line 2284 "configure"
2284#include "confdefs.h"
2285#include <sys/types.h>
2286#include <sys/time.h>
2287#include <time.h>
2288int main() {
2289struct tm *tp;
2290; return 0; }
2291EOF
2292if { (eval echo configure:2293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2293  rm -rf conftest*
2294  ac_cv_header_time=yes
2295else
2296  echo "configure: failed program was:" >&5
2297  cat conftest.$ac_ext >&5
2298  rm -rf conftest*
2299  ac_cv_header_time=no
2300fi
2301rm -f conftest*
2302fi
2303
2304echo "$ac_t""$ac_cv_header_time" 1>&6
2305if test $ac_cv_header_time = yes; then
2306  cat >> confdefs.h <<\EOF
2307#define TIME_WITH_SYS_TIME 1
2308EOF
2309
2310fi
2311
2312
2313# library functions.
2314# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2315# for constant arguments.  Useless!
2316echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2317echo "configure:2318: checking for working alloca.h" >&5
2318if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2319  echo $ac_n "(cached) $ac_c" 1>&6
2320else
2321  cat > conftest.$ac_ext <<EOF
2322#line 2323 "configure"
2323#include "confdefs.h"
2324#include <alloca.h>
2325int main() {
2326char *p = alloca(2 * sizeof(int));
2327; return 0; }
2328EOF
2329if { (eval echo configure:2330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2330  rm -rf conftest*
2331  ac_cv_header_alloca_h=yes
2332else
2333  echo "configure: failed program was:" >&5
2334  cat conftest.$ac_ext >&5
2335  rm -rf conftest*
2336  ac_cv_header_alloca_h=no
2337fi
2338rm -f conftest*
2339fi
2340
2341echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2342if test $ac_cv_header_alloca_h = yes; then
2343  cat >> confdefs.h <<\EOF
2344#define HAVE_ALLOCA_H 1
2345EOF
2346
2347fi
2348
2349echo $ac_n "checking for alloca""... $ac_c" 1>&6
2350echo "configure:2351: checking for alloca" >&5
2351if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2352  echo $ac_n "(cached) $ac_c" 1>&6
2353else
2354  cat > conftest.$ac_ext <<EOF
2355#line 2356 "configure"
2356#include "confdefs.h"
2357
2358#ifdef __GNUC__
2359# define alloca __builtin_alloca
2360#else
2361# ifdef _MSC_VER
2362#  include <malloc.h>
2363#  define alloca _alloca
2364# else
2365#  if HAVE_ALLOCA_H
2366#   include <alloca.h>
2367#  else
2368#   ifdef _AIX
2369 #pragma alloca
2370#   else
2371#    ifndef alloca /* predefined by HP cc +Olibcalls */
2372char *alloca ();
2373#    endif
2374#   endif
2375#  endif
2376# endif
2377#endif
2378
2379int main() {
2380char *p = (char *) alloca(1);
2381; return 0; }
2382EOF
2383if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2384  rm -rf conftest*
2385  ac_cv_func_alloca_works=yes
2386else
2387  echo "configure: failed program was:" >&5
2388  cat conftest.$ac_ext >&5
2389  rm -rf conftest*
2390  ac_cv_func_alloca_works=no
2391fi
2392rm -f conftest*
2393fi
2394
2395echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2396if test $ac_cv_func_alloca_works = yes; then
2397  cat >> confdefs.h <<\EOF
2398#define HAVE_ALLOCA 1
2399EOF
2400
2401fi
2402
2403if test $ac_cv_func_alloca_works = no; then
2404  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2405  # that cause trouble.  Some versions do not even contain alloca or
2406  # contain a buggy version.  If you still want to use their alloca,
2407  # use ar to extract alloca.o from them instead of compiling alloca.c.
2408  ALLOCA=alloca.${ac_objext}
2409  cat >> confdefs.h <<\EOF
2410#define C_ALLOCA 1
2411EOF
2412
2413
2414echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2415echo "configure:2416: checking whether alloca needs Cray hooks" >&5
2416if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2417  echo $ac_n "(cached) $ac_c" 1>&6
2418else
2419  cat > conftest.$ac_ext <<EOF
2420#line 2421 "configure"
2421#include "confdefs.h"
2422#if defined(CRAY) && ! defined(CRAY2)
2423webecray
2424#else
2425wenotbecray
2426#endif
2427
2428EOF
2429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2430  egrep "webecray" >/dev/null 2>&1; then
2431  rm -rf conftest*
2432  ac_cv_os_cray=yes
2433else
2434  rm -rf conftest*
2435  ac_cv_os_cray=no
2436fi
2437rm -f conftest*
2438
2439fi
2440
2441echo "$ac_t""$ac_cv_os_cray" 1>&6
2442if test $ac_cv_os_cray = yes; then
2443for ac_func in _getb67 GETB67 getb67; do
2444  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2445echo "configure:2446: checking for $ac_func" >&5
2446if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2447  echo $ac_n "(cached) $ac_c" 1>&6
2448else
2449  cat > conftest.$ac_ext <<EOF
2450#line 2451 "configure"
2451#include "confdefs.h"
2452/* System header to define __stub macros and hopefully few prototypes,
2453    which can conflict with char $ac_func(); below.  */
2454#include <assert.h>
2455/* Override any gcc2 internal prototype to avoid an error.  */
2456/* We use char because int might match the return type of a gcc2
2457    builtin and then its argument prototype would still apply.  */
2458char $ac_func();
2459
2460int main() {
2461
2462/* The GNU C library defines this for functions which it implements
2463    to always fail with ENOSYS.  Some functions are actually named
2464    something starting with __ and the normal name is an alias.  */
2465#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2466choke me
2467#else
2468$ac_func();
2469#endif
2470
2471; return 0; }
2472EOF
2473if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2474  rm -rf conftest*
2475  eval "ac_cv_func_$ac_func=yes"
2476else
2477  echo "configure: failed program was:" >&5
2478  cat conftest.$ac_ext >&5
2479  rm -rf conftest*
2480  eval "ac_cv_func_$ac_func=no"
2481fi
2482rm -f conftest*
2483fi
2484
2485if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2486  echo "$ac_t""yes" 1>&6
2487  cat >> confdefs.h <<EOF
2488#define CRAY_STACKSEG_END $ac_func
2489EOF
2490
2491  break
2492else
2493  echo "$ac_t""no" 1>&6
2494fi
2495
2496done
2497fi
2498
2499echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2500echo "configure:2501: checking stack direction for C alloca" >&5
2501if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2502  echo $ac_n "(cached) $ac_c" 1>&6
2503else
2504  if test "$cross_compiling" = yes; then
2505  ac_cv_c_stack_direction=0
2506else
2507  cat > conftest.$ac_ext <<EOF
2508#line 2509 "configure"
2509#include "confdefs.h"
2510find_stack_direction ()
2511{
2512  static char *addr = 0;
2513  auto char dummy;
2514  if (addr == 0)
2515    {
2516      addr = &dummy;
2517      return find_stack_direction ();
2518    }
2519  else
2520    return (&dummy > addr) ? 1 : -1;
2521}
2522main ()
2523{
2524  exit (find_stack_direction() < 0);
2525}
2526EOF
2527if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2528then
2529  ac_cv_c_stack_direction=1
2530else
2531  echo "configure: failed program was:" >&5
2532  cat conftest.$ac_ext >&5
2533  rm -fr conftest*
2534  ac_cv_c_stack_direction=-1
2535fi
2536rm -fr conftest*
2537fi
2538
2539fi
2540
2541echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2542cat >> confdefs.h <<EOF
2543#define STACK_DIRECTION $ac_cv_c_stack_direction
2544EOF
2545
2546fi
2547
2548if test $ac_cv_prog_gcc = yes; then
2549    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2550echo "configure:2551: checking whether ${CC-cc} needs -traditional" >&5
2551if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2552  echo $ac_n "(cached) $ac_c" 1>&6
2553else
2554    ac_pattern="Autoconf.*'x'"
2555  cat > conftest.$ac_ext <<EOF
2556#line 2557 "configure"
2557#include "confdefs.h"
2558#include <sgtty.h>
2559Autoconf TIOCGETP
2560EOF
2561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2562  egrep "$ac_pattern" >/dev/null 2>&1; then
2563  rm -rf conftest*
2564  ac_cv_prog_gcc_traditional=yes
2565else
2566  rm -rf conftest*
2567  ac_cv_prog_gcc_traditional=no
2568fi
2569rm -f conftest*
2570
2571
2572  if test $ac_cv_prog_gcc_traditional = no; then
2573    cat > conftest.$ac_ext <<EOF
2574#line 2575 "configure"
2575#include "confdefs.h"
2576#include <termio.h>
2577Autoconf TCGETA
2578EOF
2579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2580  egrep "$ac_pattern" >/dev/null 2>&1; then
2581  rm -rf conftest*
2582  ac_cv_prog_gcc_traditional=yes
2583fi
2584rm -f conftest*
2585
2586  fi
2587fi
2588
2589echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2590  if test $ac_cv_prog_gcc_traditional = yes; then
2591    CC="$CC -traditional"
2592  fi
2593fi
2594
2595for ac_hdr in unistd.h
2596do
2597ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2598echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2599echo "configure:2600: checking for $ac_hdr" >&5
2600if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2601  echo $ac_n "(cached) $ac_c" 1>&6
2602else
2603  cat > conftest.$ac_ext <<EOF
2604#line 2605 "configure"
2605#include "confdefs.h"
2606#include <$ac_hdr>
2607EOF
2608ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2609{ (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2610ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2611if test -z "$ac_err"; then
2612  rm -rf conftest*
2613  eval "ac_cv_header_$ac_safe=yes"
2614else
2615  echo "$ac_err" >&5
2616  echo "configure: failed program was:" >&5
2617  cat conftest.$ac_ext >&5
2618  rm -rf conftest*
2619  eval "ac_cv_header_$ac_safe=no"
2620fi
2621rm -f conftest*
2622fi
2623if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2624  echo "$ac_t""yes" 1>&6
2625    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2626  cat >> confdefs.h <<EOF
2627#define $ac_tr_hdr 1
2628EOF
2629 
2630else
2631  echo "$ac_t""no" 1>&6
2632fi
2633done
2634
2635for ac_func in getpagesize
2636do
2637echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2638echo "configure:2639: checking for $ac_func" >&5
2639if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2640  echo $ac_n "(cached) $ac_c" 1>&6
2641else
2642  cat > conftest.$ac_ext <<EOF
2643#line 2644 "configure"
2644#include "confdefs.h"
2645/* System header to define __stub macros and hopefully few prototypes,
2646    which can conflict with char $ac_func(); below.  */
2647#include <assert.h>
2648/* Override any gcc2 internal prototype to avoid an error.  */
2649/* We use char because int might match the return type of a gcc2
2650    builtin and then its argument prototype would still apply.  */
2651char $ac_func();
2652
2653int main() {
2654
2655/* The GNU C library defines this for functions which it implements
2656    to always fail with ENOSYS.  Some functions are actually named
2657    something starting with __ and the normal name is an alias.  */
2658#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2659choke me
2660#else
2661$ac_func();
2662#endif
2663
2664; return 0; }
2665EOF
2666if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2667  rm -rf conftest*
2668  eval "ac_cv_func_$ac_func=yes"
2669else
2670  echo "configure: failed program was:" >&5
2671  cat conftest.$ac_ext >&5
2672  rm -rf conftest*
2673  eval "ac_cv_func_$ac_func=no"
2674fi
2675rm -f conftest*
2676fi
2677
2678if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2679  echo "$ac_t""yes" 1>&6
2680    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2681  cat >> confdefs.h <<EOF
2682#define $ac_tr_func 1
2683EOF
2684 
2685else
2686  echo "$ac_t""no" 1>&6
2687fi
2688done
2689
2690echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2691echo "configure:2692: checking for working mmap" >&5
2692if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2693  echo $ac_n "(cached) $ac_c" 1>&6
2694else
2695  if test "$cross_compiling" = yes; then
2696  ac_cv_func_mmap_fixed_mapped=no
2697else
2698  cat > conftest.$ac_ext <<EOF
2699#line 2700 "configure"
2700#include "confdefs.h"
2701
2702/* Thanks to Mike Haertel and Jim Avera for this test.
2703   Here is a matrix of mmap possibilities:
2704        mmap private not fixed
2705        mmap private fixed at somewhere currently unmapped
2706        mmap private fixed at somewhere already mapped
2707        mmap shared not fixed
2708        mmap shared fixed at somewhere currently unmapped
2709        mmap shared fixed at somewhere already mapped
2710   For private mappings, we should verify that changes cannot be read()
2711   back from the file, nor mmap's back from the file at a different
2712   address.  (There have been systems where private was not correctly
2713   implemented like the infamous i386 svr4.0, and systems where the
2714   VM page cache was not coherent with the filesystem buffer cache
2715   like early versions of FreeBSD and possibly contemporary NetBSD.)
2716   For shared mappings, we should conversely verify that changes get
2717   propogated back to all the places they're supposed to be.
2718
2719   Grep wants private fixed already mapped.
2720   The main things grep needs to know about mmap are:
2721   * does it exist and is it safe to write into the mmap'd area
2722   * how to use it (BSD variants)  */
2723#include <sys/types.h>
2724#include <fcntl.h>
2725#include <sys/mman.h>
2726
2727/* This mess was copied from the GNU getpagesize.h.  */
2728#ifndef HAVE_GETPAGESIZE
2729# ifdef HAVE_UNISTD_H
2730#  include <unistd.h>
2731# endif
2732
2733/* Assume that all systems that can run configure have sys/param.h.  */
2734# ifndef HAVE_SYS_PARAM_H
2735#  define HAVE_SYS_PARAM_H 1
2736# endif
2737
2738# ifdef _SC_PAGESIZE
2739#  define getpagesize() sysconf(_SC_PAGESIZE)
2740# else /* no _SC_PAGESIZE */
2741#  ifdef HAVE_SYS_PARAM_H
2742#   include <sys/param.h>
2743#   ifdef EXEC_PAGESIZE
2744#    define getpagesize() EXEC_PAGESIZE
2745#   else /* no EXEC_PAGESIZE */
2746#    ifdef NBPG
2747#     define getpagesize() NBPG * CLSIZE
2748#     ifndef CLSIZE
2749#      define CLSIZE 1
2750#     endif /* no CLSIZE */
2751#    else /* no NBPG */
2752#     ifdef NBPC
2753#      define getpagesize() NBPC
2754#     else /* no NBPC */
2755#      ifdef PAGESIZE
2756#       define getpagesize() PAGESIZE
2757#      endif /* PAGESIZE */
2758#     endif /* no NBPC */
2759#    endif /* no NBPG */
2760#   endif /* no EXEC_PAGESIZE */
2761#  else /* no HAVE_SYS_PARAM_H */
2762#   define getpagesize() 8192   /* punt totally */
2763#  endif /* no HAVE_SYS_PARAM_H */
2764# endif /* no _SC_PAGESIZE */
2765
2766#endif /* no HAVE_GETPAGESIZE */
2767
2768#ifdef __cplusplus
2769extern "C" { void *malloc(unsigned); }
2770#else
2771char *malloc();
2772#endif
2773
2774int
2775main()
2776{
2777        char *data, *data2, *data3;
2778        int i, pagesize;
2779        int fd;
2780
2781        pagesize = getpagesize();
2782
2783        /*
2784         * First, make a file with some known garbage in it.
2785         */
2786        data = malloc(pagesize);
2787        if (!data)
2788                exit(1);
2789        for (i = 0; i < pagesize; ++i)
2790                *(data + i) = rand();
2791        umask(0);
2792        fd = creat("conftestmmap", 0600);
2793        if (fd < 0)
2794                exit(1);
2795        if (write(fd, data, pagesize) != pagesize)
2796                exit(1);
2797        close(fd);
2798
2799        /*
2800         * Next, try to mmap the file at a fixed address which
2801         * already has something else allocated at it.  If we can,
2802         * also make sure that we see the same garbage.
2803         */
2804        fd = open("conftestmmap", O_RDWR);
2805        if (fd < 0)
2806                exit(1);
2807        data2 = malloc(2 * pagesize);
2808        if (!data2)
2809                exit(1);
2810        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2811        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2812            MAP_PRIVATE | MAP_FIXED, fd, 0L))
2813                exit(1);
2814        for (i = 0; i < pagesize; ++i)
2815                if (*(data + i) != *(data2 + i))
2816                        exit(1);
2817
2818        /*
2819         * Finally, make sure that changes to the mapped area
2820         * do not percolate back to the file as seen by read().
2821         * (This is a bug on some variants of i386 svr4.0.)
2822         */
2823        for (i = 0; i < pagesize; ++i)
2824                *(data2 + i) = *(data2 + i) + 1;
2825        data3 = malloc(pagesize);
2826        if (!data3)
2827                exit(1);
2828        if (read(fd, data3, pagesize) != pagesize)
2829                exit(1);
2830        for (i = 0; i < pagesize; ++i)
2831                if (*(data + i) != *(data3 + i))
2832                        exit(1);
2833        close(fd);
2834        unlink("conftestmmap");
2835        exit(0);
2836}
2837
2838EOF
2839if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2840then
2841  ac_cv_func_mmap_fixed_mapped=yes
2842else
2843  echo "configure: failed program was:" >&5
2844  cat conftest.$ac_ext >&5
2845  rm -fr conftest*
2846  ac_cv_func_mmap_fixed_mapped=no
2847fi
2848rm -fr conftest*
2849fi
2850
2851fi
2852
2853echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2854if test $ac_cv_func_mmap_fixed_mapped = yes; then
2855  cat >> confdefs.h <<\EOF
2856#define HAVE_MMAP 1
2857EOF
2858
2859fi
2860
2861echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2862echo "configure:2863: checking return type of signal handlers" >&5
2863if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2864  echo $ac_n "(cached) $ac_c" 1>&6
2865else
2866  cat > conftest.$ac_ext <<EOF
2867#line 2868 "configure"
2868#include "confdefs.h"
2869#include <sys/types.h>
2870#include <signal.h>
2871#ifdef signal
2872#undef signal
2873#endif
2874#ifdef __cplusplus
2875extern "C" void (*signal (int, void (*)(int)))(int);
2876#else
2877void (*signal ()) ();
2878#endif
2879
2880int main() {
2881int i;
2882; return 0; }
2883EOF
2884if { (eval echo configure:2885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2885  rm -rf conftest*
2886  ac_cv_type_signal=void
2887else
2888  echo "configure: failed program was:" >&5
2889  cat conftest.$ac_ext >&5
2890  rm -rf conftest*
2891  ac_cv_type_signal=int
2892fi
2893rm -f conftest*
2894fi
2895
2896echo "$ac_t""$ac_cv_type_signal" 1>&6
2897cat >> confdefs.h <<EOF
2898#define RETSIGTYPE $ac_cv_type_signal
2899EOF
2900
2901
2902echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2903echo "configure:2904: checking for vprintf" >&5
2904if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2905  echo $ac_n "(cached) $ac_c" 1>&6
2906else
2907  cat > conftest.$ac_ext <<EOF
2908#line 2909 "configure"
2909#include "confdefs.h"
2910/* System header to define __stub macros and hopefully few prototypes,
2911    which can conflict with char vprintf(); below.  */
2912#include <assert.h>
2913/* Override any gcc2 internal prototype to avoid an error.  */
2914/* We use char because int might match the return type of a gcc2
2915    builtin and then its argument prototype would still apply.  */
2916char vprintf();
2917
2918int main() {
2919
2920/* The GNU C library defines this for functions which it implements
2921    to always fail with ENOSYS.  Some functions are actually named
2922    something starting with __ and the normal name is an alias.  */
2923#if defined (__stub_vprintf) || defined (__stub___vprintf)
2924choke me
2925#else
2926vprintf();
2927#endif
2928
2929; return 0; }
2930EOF
2931if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2932  rm -rf conftest*
2933  eval "ac_cv_func_vprintf=yes"
2934else
2935  echo "configure: failed program was:" >&5
2936  cat conftest.$ac_ext >&5
2937  rm -rf conftest*
2938  eval "ac_cv_func_vprintf=no"
2939fi
2940rm -f conftest*
2941fi
2942
2943if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2944  echo "$ac_t""yes" 1>&6
2945  cat >> confdefs.h <<\EOF
2946#define HAVE_VPRINTF 1
2947EOF
2948
2949else
2950  echo "$ac_t""no" 1>&6
2951fi
2952
2953if test "$ac_cv_func_vprintf" != yes; then
2954echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2955echo "configure:2956: checking for _doprnt" >&5
2956if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2957  echo $ac_n "(cached) $ac_c" 1>&6
2958else
2959  cat > conftest.$ac_ext <<EOF
2960#line 2961 "configure"
2961#include "confdefs.h"
2962/* System header to define __stub macros and hopefully few prototypes,
2963    which can conflict with char _doprnt(); below.  */
2964#include <assert.h>
2965/* Override any gcc2 internal prototype to avoid an error.  */
2966/* We use char because int might match the return type of a gcc2
2967    builtin and then its argument prototype would still apply.  */
2968char _doprnt();
2969
2970int main() {
2971
2972/* The GNU C library defines this for functions which it implements
2973    to always fail with ENOSYS.  Some functions are actually named
2974    something starting with __ and the normal name is an alias.  */
2975#if defined (__stub__doprnt) || defined (__stub____doprnt)
2976choke me
2977#else
2978_doprnt();
2979#endif
2980
2981; return 0; }
2982EOF
2983if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2984  rm -rf conftest*
2985  eval "ac_cv_func__doprnt=yes"
2986else
2987  echo "configure: failed program was:" >&5
2988  cat conftest.$ac_ext >&5
2989  rm -rf conftest*
2990  eval "ac_cv_func__doprnt=no"
2991fi
2992rm -f conftest*
2993fi
2994
2995if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2996  echo "$ac_t""yes" 1>&6
2997  cat >> confdefs.h <<\EOF
2998#define HAVE_DOPRNT 1
2999EOF
3000
3001else
3002  echo "$ac_t""no" 1>&6
3003fi
3004
3005fi
3006
3007
3008echo $ac_n "checking for library containing setenv""... $ac_c" 1>&6
3009echo "configure:3010: checking for library containing setenv" >&5
3010if eval "test \"`echo '$''{'ac_cv_search_setenv'+set}'`\" = set"; then
3011  echo $ac_n "(cached) $ac_c" 1>&6
3012else
3013  ac_func_search_save_LIBS="$LIBS"
3014ac_cv_search_setenv="no"
3015cat > conftest.$ac_ext <<EOF
3016#line 3017 "configure"
3017#include "confdefs.h"
3018/* Override any gcc2 internal prototype to avoid an error.  */
3019/* We use char because int might match the return type of a gcc2
3020    builtin and then its argument prototype would still apply.  */
3021char setenv();
3022
3023int main() {
3024setenv()
3025; return 0; }
3026EOF
3027if { (eval echo configure:3028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3028  rm -rf conftest*
3029  ac_cv_search_setenv="none required"
3030else
3031  echo "configure: failed program was:" >&5
3032  cat conftest.$ac_ext >&5
3033fi
3034rm -f conftest*
3035test "$ac_cv_search_setenv" = "no" && for i in bsd; do
3036LIBS="-l$i  $ac_func_search_save_LIBS"
3037cat > conftest.$ac_ext <<EOF
3038#line 3039 "configure"
3039#include "confdefs.h"
3040/* Override any gcc2 internal prototype to avoid an error.  */
3041/* We use char because int might match the return type of a gcc2
3042    builtin and then its argument prototype would still apply.  */
3043char setenv();
3044
3045int main() {
3046setenv()
3047; return 0; }
3048EOF
3049if { (eval echo configure:3050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3050  rm -rf conftest*
3051  ac_cv_search_setenv="-l$i"
3052break
3053else
3054  echo "configure: failed program was:" >&5
3055  cat conftest.$ac_ext >&5
3056fi
3057rm -f conftest*
3058done
3059LIBS="$ac_func_search_save_LIBS"
3060fi
3061
3062echo "$ac_t""$ac_cv_search_setenv" 1>&6
3063if test "$ac_cv_search_setenv" != "no"; then
3064  test "$ac_cv_search_setenv" = "none required" || LIBS="$ac_cv_search_setenv $LIBS"
3065 
3066else :
3067 
3068fi
3069for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink \
3070 sleep usleep getpwnam popen setenv
3071do
3072echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3073echo "configure:3074: checking for $ac_func" >&5
3074if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3075  echo $ac_n "(cached) $ac_c" 1>&6
3076else
3077  cat > conftest.$ac_ext <<EOF
3078#line 3079 "configure"
3079#include "confdefs.h"
3080/* System header to define __stub macros and hopefully few prototypes,
3081    which can conflict with char $ac_func(); below.  */
3082#include <assert.h>
3083/* Override any gcc2 internal prototype to avoid an error.  */
3084/* We use char because int might match the return type of a gcc2
3085    builtin and then its argument prototype would still apply.  */
3086char $ac_func();
3087
3088int main() {
3089
3090/* The GNU C library defines this for functions which it implements
3091    to always fail with ENOSYS.  Some functions are actually named
3092    something starting with __ and the normal name is an alias.  */
3093#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3094choke me
3095#else
3096$ac_func();
3097#endif
3098
3099; return 0; }
3100EOF
3101if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3102  rm -rf conftest*
3103  eval "ac_cv_func_$ac_func=yes"
3104else
3105  echo "configure: failed program was:" >&5
3106  cat conftest.$ac_ext >&5
3107  rm -rf conftest*
3108  eval "ac_cv_func_$ac_func=no"
3109fi
3110rm -f conftest*
3111fi
3112
3113if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3114  echo "$ac_t""yes" 1>&6
3115    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3116  cat >> confdefs.h <<EOF
3117#define $ac_tr_func 1
3118EOF
3119 
3120else
3121  echo "$ac_t""no" 1>&6
3122fi
3123done
3124
3125
3126
3127
3128# arithmetic shifts
3129echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3130echo "configure:3131: checking whether your machine has correct arithmetic shifts" >&5
3131if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3132  echo $ac_n "(cached) $ac_c" 1>&6
3133else
3134  if test "$cross_compiling" = yes; then
3135  if test "$ac_c_cross_dos" = yes; then
3136     ac_cv_shift=yes;
3137   else
3138     echo "$ac_t""no" 1>&6
3139     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
3140   fi
3141else
3142  cat > conftest.$ac_ext <<EOF
3143#line 3144 "configure"
3144#include "confdefs.h"
3145 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
3146EOF
3147if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3148then
3149  ac_cv_shift=yes
3150else
3151  echo "configure: failed program was:" >&5
3152  cat conftest.$ac_ext >&5
3153  rm -fr conftest*
3154  ac_cv_shift=no
3155fi
3156rm -fr conftest*
3157fi
3158
3159fi
3160
3161
3162if test "$ac_cv_shift" = yes; then
3163  echo "$ac_t""yes" 1>&6
3164else
3165  echo "$ac_t""no" 1>&6
3166  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3167fi
3168
3169
3170# check for a peculiar constructor initialization
3171echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
3172echo "configure:3173: checking whether explicit C++ constructor calls are allowed" >&5
3173
3174ac_ext=C
3175# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3176ac_cpp='$CXXCPP $CPPFLAGS'
3177ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3178ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3179cross_compiling=$ac_cv_prog_cxx_cross
3180
3181if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then
3182  echo $ac_n "(cached) $ac_c" 1>&6
3183else
3184  cat > conftest.$ac_ext <<EOF
3185#line 3186 "configure"
3186#include "confdefs.h"
3187
3188int main() {
3189class testclass
3190  {
3191  public:
3192    int value;
3193    testclass() : value(0) {}
3194    testclass( int i ) : value(i) {}
3195    ~testclass() { value = 0; }
3196  };
3197
3198  testclass ptr;
3199  ptr.testclass(1);
3200
3201; return 0; }
3202EOF
3203if { (eval echo configure:3204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3204  rm -rf conftest*
3205  ac_cv_explicit_const=yes
3206else
3207  echo "configure: failed program was:" >&5
3208  cat conftest.$ac_ext >&5
3209  rm -rf conftest*
3210  ac_cv_explicit_const=no
3211fi
3212rm -f conftest*
3213fi
3214
3215ac_ext=c
3216# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3217ac_cpp='$CPP $CPPFLAGS'
3218ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3219ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3220cross_compiling=$ac_cv_prog_cc_cross
3221
3222echo "$ac_t""$ac_cv_explicit_const" 1>&6
3223if test "$ac_cv_explicit_const" = yes; then
3224  cat >> confdefs.h <<\EOF
3225#define HAVE_EXPLICIT_CONSTR 1
3226EOF
3227
3228fi
3229
3230# sprintf returns number of printed chars
3231echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3232echo "configure:3233: checking whether vsprintf returns number of printed chars" >&5
3233if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3234  echo $ac_n "(cached) $ac_c" 1>&6
3235else
3236  if test "$cross_compiling" = yes; then
3237  ac_cv_returns_n_of_chars=no
3238else
3239  cat > conftest.$ac_ext <<EOF
3240#line 3241 "configure"
3241#include "confdefs.h"
3242#include <stdio.h>
3243 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3244EOF
3245if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3246then
3247  ac_cv_returns_n_of_chars=yes
3248else
3249  echo "configure: failed program was:" >&5
3250  cat conftest.$ac_ext >&5
3251  rm -fr conftest*
3252  ac_cv_returns_n_of_chars=no
3253fi
3254rm -fr conftest*
3255fi
3256
3257fi
3258
3259if test "$ac_cv_returns_n_of_chars" = yes; then
3260  echo "$ac_t""yes" 1>&6
3261else
3262  echo "$ac_t""no" 1>&6
3263  cat >> confdefs.h <<\EOF
3264#define BSD_SPRINTF 1
3265EOF
3266
3267fi
3268
3269# determine ALIGN_8
3270echo $ac_n "checking size of char""... $ac_c" 1>&6
3271echo "configure:3272: checking size of char" >&5
3272if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3273  echo $ac_n "(cached) $ac_c" 1>&6
3274else
3275  if test "$cross_compiling" = yes; then
3276  ac_cv_sizeof_char=1
3277else
3278  cat > conftest.$ac_ext <<EOF
3279#line 3280 "configure"
3280#include "confdefs.h"
3281#include <stdio.h>
3282main()
3283{
3284  FILE *f=fopen("conftestval", "w");
3285  if (!f) exit(1);
3286  fprintf(f, "%d\n", sizeof(char));
3287  exit(0);
3288}
3289EOF
3290if { (eval echo configure:3291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3291then
3292  ac_cv_sizeof_char=`cat conftestval`
3293else
3294  echo "configure: failed program was:" >&5
3295  cat conftest.$ac_ext >&5
3296  rm -fr conftest*
3297  ac_cv_sizeof_char=0
3298fi
3299rm -fr conftest*
3300fi
3301
3302fi
3303echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3304cat >> confdefs.h <<EOF
3305#define SIZEOF_CHAR $ac_cv_sizeof_char
3306EOF
3307
3308
3309echo $ac_n "checking size of short""... $ac_c" 1>&6
3310echo "configure:3311: checking size of short" >&5
3311if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3312  echo $ac_n "(cached) $ac_c" 1>&6
3313else
3314  if test "$cross_compiling" = yes; then
3315  ac_cv_sizeof_short=2
3316else
3317  cat > conftest.$ac_ext <<EOF
3318#line 3319 "configure"
3319#include "confdefs.h"
3320#include <stdio.h>
3321main()
3322{
3323  FILE *f=fopen("conftestval", "w");
3324  if (!f) exit(1);
3325  fprintf(f, "%d\n", sizeof(short));
3326  exit(0);
3327}
3328EOF
3329if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3330then
3331  ac_cv_sizeof_short=`cat conftestval`
3332else
3333  echo "configure: failed program was:" >&5
3334  cat conftest.$ac_ext >&5
3335  rm -fr conftest*
3336  ac_cv_sizeof_short=0
3337fi
3338rm -fr conftest*
3339fi
3340
3341fi
3342echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3343cat >> confdefs.h <<EOF
3344#define SIZEOF_SHORT $ac_cv_sizeof_short
3345EOF
3346
3347
3348echo $ac_n "checking size of int""... $ac_c" 1>&6
3349echo "configure:3350: checking size of int" >&5
3350if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3351  echo $ac_n "(cached) $ac_c" 1>&6
3352else
3353  if test "$cross_compiling" = yes; then
3354  ac_cv_sizeof_int=4
3355else
3356  cat > conftest.$ac_ext <<EOF
3357#line 3358 "configure"
3358#include "confdefs.h"
3359#include <stdio.h>
3360main()
3361{
3362  FILE *f=fopen("conftestval", "w");
3363  if (!f) exit(1);
3364  fprintf(f, "%d\n", sizeof(int));
3365  exit(0);
3366}
3367EOF
3368if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3369then
3370  ac_cv_sizeof_int=`cat conftestval`
3371else
3372  echo "configure: failed program was:" >&5
3373  cat conftest.$ac_ext >&5
3374  rm -fr conftest*
3375  ac_cv_sizeof_int=0
3376fi
3377rm -fr conftest*
3378fi
3379
3380fi
3381echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3382cat >> confdefs.h <<EOF
3383#define SIZEOF_INT $ac_cv_sizeof_int
3384EOF
3385
3386
3387echo $ac_n "checking size of long""... $ac_c" 1>&6
3388echo "configure:3389: checking size of long" >&5
3389if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3390  echo $ac_n "(cached) $ac_c" 1>&6
3391else
3392  if test "$cross_compiling" = yes; then
3393  ac_cv_sizeof_long=4
3394else
3395  cat > conftest.$ac_ext <<EOF
3396#line 3397 "configure"
3397#include "confdefs.h"
3398#include <stdio.h>
3399main()
3400{
3401  FILE *f=fopen("conftestval", "w");
3402  if (!f) exit(1);
3403  fprintf(f, "%d\n", sizeof(long));
3404  exit(0);
3405}
3406EOF
3407if { (eval echo configure:3408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3408then
3409  ac_cv_sizeof_long=`cat conftestval`
3410else
3411  echo "configure: failed program was:" >&5
3412  cat conftest.$ac_ext >&5
3413  rm -fr conftest*
3414  ac_cv_sizeof_long=0
3415fi
3416rm -fr conftest*
3417fi
3418
3419fi
3420echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3421cat >> confdefs.h <<EOF
3422#define SIZEOF_LONG $ac_cv_sizeof_long
3423EOF
3424
3425
3426echo $ac_n "checking size of void*""... $ac_c" 1>&6
3427echo "configure:3428: checking size of void*" >&5
3428if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3429  echo $ac_n "(cached) $ac_c" 1>&6
3430else
3431  if test "$cross_compiling" = yes; then
3432  ac_cv_sizeof_voidp=4
3433else
3434  cat > conftest.$ac_ext <<EOF
3435#line 3436 "configure"
3436#include "confdefs.h"
3437#include <stdio.h>
3438main()
3439{
3440  FILE *f=fopen("conftestval", "w");
3441  if (!f) exit(1);
3442  fprintf(f, "%d\n", sizeof(void*));
3443  exit(0);
3444}
3445EOF
3446if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3447then
3448  ac_cv_sizeof_voidp=`cat conftestval`
3449else
3450  echo "configure: failed program was:" >&5
3451  cat conftest.$ac_ext >&5
3452  rm -fr conftest*
3453  ac_cv_sizeof_voidp=0
3454fi
3455rm -fr conftest*
3456fi
3457
3458fi
3459echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3460cat >> confdefs.h <<EOF
3461#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3462EOF
3463
3464
3465echo $ac_n "checking size of double""... $ac_c" 1>&6
3466echo "configure:3467: checking size of double" >&5
3467if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3468  echo $ac_n "(cached) $ac_c" 1>&6
3469else
3470  if test "$cross_compiling" = yes; then
3471  ac_cv_sizeof_double=8
3472else
3473  cat > conftest.$ac_ext <<EOF
3474#line 3475 "configure"
3475#include "confdefs.h"
3476#include <stdio.h>
3477main()
3478{
3479  FILE *f=fopen("conftestval", "w");
3480  if (!f) exit(1);
3481  fprintf(f, "%d\n", sizeof(double));
3482  exit(0);
3483}
3484EOF
3485if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3486then
3487  ac_cv_sizeof_double=`cat conftestval`
3488else
3489  echo "configure: failed program was:" >&5
3490  cat conftest.$ac_ext >&5
3491  rm -fr conftest*
3492  ac_cv_sizeof_double=0
3493fi
3494rm -fr conftest*
3495fi
3496
3497fi
3498echo "$ac_t""$ac_cv_sizeof_double" 1>&6
3499cat >> confdefs.h <<EOF
3500#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3501EOF
3502
3503
3504echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3505echo "configure:3506: checking whether byte ordering is bigendian" >&5
3506if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3507  echo $ac_n "(cached) $ac_c" 1>&6
3508else
3509  ac_cv_c_bigendian=unknown
3510# See if sys/param.h defines the BYTE_ORDER macro.
3511cat > conftest.$ac_ext <<EOF
3512#line 3513 "configure"
3513#include "confdefs.h"
3514#include <sys/types.h>
3515#include <sys/param.h>
3516int main() {
3517
3518#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3519 bogus endian macros
3520#endif
3521; return 0; }
3522EOF
3523if { (eval echo configure:3524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3524  rm -rf conftest*
3525  # It does; now see whether it defined to BIG_ENDIAN or not.
3526cat > conftest.$ac_ext <<EOF
3527#line 3528 "configure"
3528#include "confdefs.h"
3529#include <sys/types.h>
3530#include <sys/param.h>
3531int main() {
3532
3533#if BYTE_ORDER != BIG_ENDIAN
3534 not big endian
3535#endif
3536; return 0; }
3537EOF
3538if { (eval echo configure:3539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3539  rm -rf conftest*
3540  ac_cv_c_bigendian=yes
3541else
3542  echo "configure: failed program was:" >&5
3543  cat conftest.$ac_ext >&5
3544  rm -rf conftest*
3545  ac_cv_c_bigendian=no
3546fi
3547rm -f conftest*
3548else
3549  echo "configure: failed program was:" >&5
3550  cat conftest.$ac_ext >&5
3551fi
3552rm -f conftest*
3553if test $ac_cv_c_bigendian = unknown; then
3554if test "$cross_compiling" = yes; then
3555    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3556else
3557  cat > conftest.$ac_ext <<EOF
3558#line 3559 "configure"
3559#include "confdefs.h"
3560main () {
3561  /* Are we little or big endian?  From Harbison&Steele.  */
3562  union
3563  {
3564    long l;
3565    char c[sizeof (long)];
3566  } u;
3567  u.l = 1;
3568  exit (u.c[sizeof (long) - 1] == 1);
3569}
3570EOF
3571if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3572then
3573  ac_cv_c_bigendian=no
3574else
3575  echo "configure: failed program was:" >&5
3576  cat conftest.$ac_ext >&5
3577  rm -fr conftest*
3578  ac_cv_c_bigendian=yes
3579fi
3580rm -fr conftest*
3581fi
3582
3583fi
3584fi
3585
3586echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3587if test $ac_cv_c_bigendian = yes; then
3588  cat >> confdefs.h <<\EOF
3589#define WORDS_BIGENDIAN 1
3590EOF
3591
3592fi
3593
3594if test "$ac_cv_sizeof_int" != 4; then
3595  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3596fi
3597if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
3598  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3599fi
3600if test "$ac_cv_sizeof_double" != 8; then
3601  { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; }
3602fi
3603if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
3604  { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; }
3605fi
3606
3607# Check whether --with-rootdir or --without-rootdir was given.
3608if test "${with_rootdir+set}" = set; then
3609  withval="$with_rootdir"
3610  :
3611fi
3612
3613# Check whether --with-lex or --without-lex was given.
3614if test "${with_lex+set}" = set; then
3615  withval="$with_lex"
3616  :
3617fi
3618
3619# Check whether --with-readline or --without-readline was given.
3620if test "${with_readline+set}" = set; then
3621  withval="$with_readline"
3622  :
3623fi
3624
3625# Check whether --with-MP or --without-MP was given.
3626if test "${with_MP+set}" = set; then
3627  withval="$with_MP"
3628  :
3629fi
3630
3631# Check whether --with-dbm or --without-dbm was given.
3632if test "${with_dbm+set}" = set; then
3633  withval="$with_dbm"
3634  :
3635fi
3636
3637# Check whether --with-factory or --without-factory was given.
3638if test "${with_factory+set}" = set; then
3639  withval="$with_factory"
3640  :
3641fi
3642
3643# Check whether --with-libfac or --without-libfac was given.
3644if test "${with_libfac+set}" = set; then
3645  withval="$with_libfac"
3646  :
3647fi
3648
3649# Check whether --with-namespaces or --without-namespaces was given.
3650if test "${with_namespaces+set}" = set; then
3651  withval="$with_namespaces"
3652  :
3653fi
3654
3655# Check whether --with-dl or --without-dl was given.
3656if test "${with_dl+set}" = set; then
3657  withval="$with_dl"
3658  :
3659fi
3660
3661# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
3662if test "${with_dynamic_modules+set}" = set; then
3663  withval="$with_dynamic_modules"
3664  :
3665fi
3666 
3667# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
3668if test "${with_dynamic_kernel+set}" = set; then
3669  withval="$with_dynamic_kernel"
3670  :
3671fi
3672
3673# Check whether --with-apint or --without-apint was given.
3674if test "${with_apint+set}" = set; then
3675  withval="$with_apint"
3676  :
3677fi
3678
3679# Check whether --with-Plural or --without-Plural was given.
3680if test "${with_Plural+set}" = set; then
3681  withval="$with_Plural"
3682  :
3683fi
3684
3685# Check whether --with-NTL or --without-NTL was given.
3686if test "${with_NTL+set}" = set; then
3687  withval="$with_NTL"
3688  :
3689else
3690  with_NTL=yes
3691fi
3692
3693
3694
3695
3696echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
3697echo "configure:3698: checking whether to use dynamic linking" >&5
3698if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
3699  cat >> confdefs.h <<\EOF
3700#define HAVE_DL 1
3701EOF
3702
3703  ac_have_dl=yes
3704  echo "$ac_t""yes" 1>&6
3705else
3706  echo "$ac_t""no" 1>&6
3707fi
3708
3709echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3710echo "configure:3711: checking for tgetent in -lncurses" >&5
3711ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3712if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3713  echo $ac_n "(cached) $ac_c" 1>&6
3714else
3715  ac_save_LIBS="$LIBS"
3716LIBS="-lncurses  $LIBS"
3717cat > conftest.$ac_ext <<EOF
3718#line 3719 "configure"
3719#include "confdefs.h"
3720/* Override any gcc2 internal prototype to avoid an error.  */
3721/* We use char because int might match the return type of a gcc2
3722    builtin and then its argument prototype would still apply.  */
3723char tgetent();
3724
3725int main() {
3726tgetent()
3727; return 0; }
3728EOF
3729if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3730  rm -rf conftest*
3731  eval "ac_cv_lib_$ac_lib_var=yes"
3732else
3733  echo "configure: failed program was:" >&5
3734  cat conftest.$ac_ext >&5
3735  rm -rf conftest*
3736  eval "ac_cv_lib_$ac_lib_var=no"
3737fi
3738rm -f conftest*
3739LIBS="$ac_save_LIBS"
3740
3741fi
3742if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3743  echo "$ac_t""yes" 1>&6
3744    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3745    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3746  cat >> confdefs.h <<EOF
3747#define $ac_tr_lib 1
3748EOF
3749
3750  LIBS="-lncurses $LIBS"
3751
3752else
3753  echo "$ac_t""no" 1>&6
3754\
3755 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
3756echo "configure:3757: checking for tgetent in -lcurses" >&5
3757ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
3758if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3759  echo $ac_n "(cached) $ac_c" 1>&6
3760else
3761  ac_save_LIBS="$LIBS"
3762LIBS="-lcurses  $LIBS"
3763cat > conftest.$ac_ext <<EOF
3764#line 3765 "configure"
3765#include "confdefs.h"
3766/* Override any gcc2 internal prototype to avoid an error.  */
3767/* We use char because int might match the return type of a gcc2
3768    builtin and then its argument prototype would still apply.  */
3769char tgetent();
3770
3771int main() {
3772tgetent()
3773; return 0; }
3774EOF
3775if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3776  rm -rf conftest*
3777  eval "ac_cv_lib_$ac_lib_var=yes"
3778else
3779  echo "configure: failed program was:" >&5
3780  cat conftest.$ac_ext >&5
3781  rm -rf conftest*
3782  eval "ac_cv_lib_$ac_lib_var=no"
3783fi
3784rm -f conftest*
3785LIBS="$ac_save_LIBS"
3786
3787fi
3788if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3789  echo "$ac_t""yes" 1>&6
3790    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
3791    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3792  cat >> confdefs.h <<EOF
3793#define $ac_tr_lib 1
3794EOF
3795
3796  LIBS="-lcurses $LIBS"
3797
3798else
3799  echo "$ac_t""no" 1>&6
3800\
3801  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3802echo "configure:3803: checking for tgetent in -ltermcap" >&5
3803ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3804if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3805  echo $ac_n "(cached) $ac_c" 1>&6
3806else
3807  ac_save_LIBS="$LIBS"
3808LIBS="-ltermcap  $LIBS"
3809cat > conftest.$ac_ext <<EOF
3810#line 3811 "configure"
3811#include "confdefs.h"
3812/* Override any gcc2 internal prototype to avoid an error.  */
3813/* We use char because int might match the return type of a gcc2
3814    builtin and then its argument prototype would still apply.  */
3815char tgetent();
3816
3817int main() {
3818tgetent()
3819; return 0; }
3820EOF
3821if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3822  rm -rf conftest*
3823  eval "ac_cv_lib_$ac_lib_var=yes"
3824else
3825  echo "configure: failed program was:" >&5
3826  cat conftest.$ac_ext >&5
3827  rm -rf conftest*
3828  eval "ac_cv_lib_$ac_lib_var=no"
3829fi
3830rm -f conftest*
3831LIBS="$ac_save_LIBS"
3832
3833fi
3834if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3835  echo "$ac_t""yes" 1>&6
3836    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
3837    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3838  cat >> confdefs.h <<EOF
3839#define $ac_tr_lib 1
3840EOF
3841
3842  LIBS="-ltermcap $LIBS"
3843
3844else
3845  echo "$ac_t""no" 1>&6
3846fi
3847
3848fi
3849
3850fi
3851
3852
3853# readline
3854if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
3855  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
3856  with_readline=static
3857fi
3858
3859
3860if test "$with_readline" != dynamic && test "$with_readline" != no; then
3861
3862ac_ext=C
3863# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3864ac_cpp='$CXXCPP $CPPFLAGS'
3865ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3866ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3867cross_compiling=$ac_cv_prog_cxx_cross
3868
3869   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
3870echo "configure:3871: checking for rl_abort in -lreadline" >&5
3871ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
3872if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3873  echo $ac_n "(cached) $ac_c" 1>&6
3874else
3875  ac_save_LIBS="$LIBS"
3876LIBS="-lreadline  $LIBS"
3877cat > conftest.$ac_ext <<EOF
3878#line 3879 "configure"
3879#include "confdefs.h"
3880/* Override any gcc2 internal prototype to avoid an error.  */
3881#ifdef __cplusplus
3882extern "C"
3883#endif
3884/* We use char because int might match the return type of a gcc2
3885    builtin and then its argument prototype would still apply.  */
3886char rl_abort();
3887
3888int main() {
3889rl_abort()
3890; return 0; }
3891EOF
3892if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3893  rm -rf conftest*
3894  eval "ac_cv_lib_$ac_lib_var=yes"
3895else
3896  echo "configure: failed program was:" >&5
3897  cat conftest.$ac_ext >&5
3898  rm -rf conftest*
3899  eval "ac_cv_lib_$ac_lib_var=no"
3900fi
3901rm -f conftest*
3902LIBS="$ac_save_LIBS"
3903
3904fi
3905if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3906  echo "$ac_t""yes" 1>&6
3907    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3908    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3909  cat >> confdefs.h <<EOF
3910#define $ac_tr_lib 1
3911EOF
3912
3913  LIBS="-lreadline $LIBS"
3914
3915else
3916  echo "$ac_t""no" 1>&6
3917fi
3918
3919   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
3920echo "configure:3921: checking how to run the C++ preprocessor" >&5
3921if test -z "$CXXCPP"; then
3922if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
3923  echo $ac_n "(cached) $ac_c" 1>&6
3924else
3925  ac_ext=C
3926# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3927ac_cpp='$CXXCPP $CPPFLAGS'
3928ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3929ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3930cross_compiling=$ac_cv_prog_cxx_cross
3931  CXXCPP="${CXX-g++} -E"
3932  cat > conftest.$ac_ext <<EOF
3933#line 3934 "configure"
3934#include "confdefs.h"
3935#include <stdlib.h>
3936EOF
3937ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3938{ (eval echo configure:3939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3939ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3940if test -z "$ac_err"; then
3941  :
3942else
3943  echo "$ac_err" >&5
3944  echo "configure: failed program was:" >&5
3945  cat conftest.$ac_ext >&5
3946  rm -rf conftest*
3947  CXXCPP=/lib/cpp
3948fi
3949rm -f conftest*
3950  ac_cv_prog_CXXCPP="$CXXCPP"
3951ac_ext=C
3952# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3953ac_cpp='$CXXCPP $CPPFLAGS'
3954ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3955ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3956cross_compiling=$ac_cv_prog_cxx_cross
3957fi
3958fi
3959CXXCPP="$ac_cv_prog_CXXCPP"
3960echo "$ac_t""$CXXCPP" 1>&6
3961
3962for ac_hdr in readline/readline.h readline/history.h
3963do
3964ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3965echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3966echo "configure:3967: checking for $ac_hdr" >&5
3967if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3968  echo $ac_n "(cached) $ac_c" 1>&6
3969else
3970  cat > conftest.$ac_ext <<EOF
3971#line 3972 "configure"
3972#include "confdefs.h"
3973#include <$ac_hdr>
3974EOF
3975ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3976{ (eval echo configure:3977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3977ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3978if test -z "$ac_err"; then
3979  rm -rf conftest*
3980  eval "ac_cv_header_$ac_safe=yes"
3981else
3982  echo "$ac_err" >&5
3983  echo "configure: failed program was:" >&5
3984  cat conftest.$ac_ext >&5
3985  rm -rf conftest*
3986  eval "ac_cv_header_$ac_safe=no"
3987fi
3988rm -f conftest*
3989fi
3990if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3991  echo "$ac_t""yes" 1>&6
3992    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3993  cat >> confdefs.h <<EOF
3994#define $ac_tr_hdr 1
3995EOF
3996 
3997else
3998  echo "$ac_t""no" 1>&6
3999fi
4000done
4001
4002   if test "$ac_cv_lib_readline_rl_abort" = yes && \
4003      test "$ac_cv_header_readline_readline_h" = yes; then
4004     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
4005echo "configure:4006: checking whether readline.h is ok" >&5
4006     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
4007  echo $ac_n "(cached) $ac_c" 1>&6
4008else
4009  cat > conftest.$ac_ext <<EOF
4010#line 4011 "configure"
4011#include "confdefs.h"
4012#include<unistd.h>
4013#include<stdio.h>
4014#include<readline/readline.h>
4015#ifdef HAVE_READLINE_HISTORY_H
4016#include<readline/history.h>
4017#endif
4018
4019int main() {
4020
4021; return 0; }
4022EOF
4023if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4024  rm -rf conftest*
4025  ac_cv_header_readline_readline_h_ok="yes"
4026else
4027  echo "configure: failed program was:" >&5
4028  cat conftest.$ac_ext >&5
4029  rm -rf conftest*
4030  ac_cv_header_readline_readline_h_ok="no"
4031fi
4032rm -f conftest*
4033fi
4034
4035    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
4036    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
4037#not ok -- try once more with explicitly declaring everything
4038      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
4039echo "configure:4040: checking whether or not we nevertheless can use readline" >&5
4040      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
4041  echo $ac_n "(cached) $ac_c" 1>&6
4042else
4043  cat > conftest.$ac_ext <<EOF
4044#line 4045 "configure"
4045#include "confdefs.h"
4046#include <stdio.h>
4047extern "C"
4048{
4049extern char * rl_readline_name;
4050extern char *rl_line_buffer;
4051char *filename_completion_function();
4052typedef char **CPPFunction ();
4053extern char ** completion_matches ();
4054extern CPPFunction * rl_attempted_completion_function;
4055extern FILE * rl_outstream;
4056char * readline ();
4057void add_history ();
4058int write_history ();
4059int read_history();
4060}
4061#ifndef NULL
4062#define NULL 0
4063#endif
4064
4065int main() {
4066rl_readline_name=NULL;
4067*rl_line_buffer=1;
4068completion_matches(NULL, filename_completion_function);
4069rl_attempted_completion_function = (CPPFunction *) NULL;
4070rl_outstream=NULL;
4071readline(NULL);
4072add_history(NULL);
4073read_history(NULL);
4074write_history(NULL);
4075
4076; return 0; }
4077EOF
4078if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4079  rm -rf conftest*
4080  ac_cv_have_readline="yes"
4081
4082else
4083  echo "configure: failed program was:" >&5
4084  cat conftest.$ac_ext >&5
4085  rm -rf conftest*
4086  ac_cv_have_readline="no"
4087
4088fi
4089rm -f conftest*
4090fi
4091
4092      echo "$ac_t""$ac_cv_have_readline" 1>&6
4093    else
4094      cat >> confdefs.h <<\EOF
4095#define READLINE_READLINE_H_OK 1
4096EOF
4097
4098      ac_cv_have_readline="yes"
4099    fi
4100  fi
4101  if test "$ac_cv_have_readline" = yes; then
4102    cat >> confdefs.h <<\EOF
4103#define HAVE_READLINE 1
4104EOF
4105
4106  fi
4107ac_ext=c
4108# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4109ac_cpp='$CPP $CPPFLAGS'
4110ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4111ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4112cross_compiling=$ac_cv_prog_cc_cross
4113
4114fi
4115
4116echo $ac_n "checking which readline to use""... $ac_c" 1>&6
4117echo "configure:4118: checking which readline to use" >&5
4118if test "$ac_cv_with_readline" = dynamic; then
4119  echo "$ac_t""dynamic" 1>&6
4120  cat >> confdefs.h <<\EOF
4121#define HAVE_DYN_RL 1
4122EOF
4123
4124elif test "$ac_cv_have_readline" = yes; then
4125  echo "$ac_t""static" 1>&6
4126elif test "$ac_cv_singuname" = PowerMacintosh-darwin; then
4127  { echo "configure: error: building without readline impossible on PowerMacintosh-darwin" 1>&2; exit 1; }
4128else
4129  echo "$ac_t""none" 1>&6
4130  echo "configure: warning: building without readline: disabling fancy display" 1>&2
4131fi
4132 
4133NEED_LIBS=$LIBS
4134
4135# gmp, smallgmp, MP, MPT, factory, libfac
4136echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
4137echo "configure:4138: checking for main in -lgmp" >&5
4138ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
4139if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4140  echo $ac_n "(cached) $ac_c" 1>&6
4141else
4142  ac_save_LIBS="$LIBS"
4143LIBS="-lgmp  $LIBS"
4144cat > conftest.$ac_ext <<EOF
4145#line 4146 "configure"
4146#include "confdefs.h"
4147
4148int main() {
4149main()
4150; return 0; }
4151EOF
4152if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4153  rm -rf conftest*
4154  eval "ac_cv_lib_$ac_lib_var=yes"
4155else
4156  echo "configure: failed program was:" >&5
4157  cat conftest.$ac_ext >&5
4158  rm -rf conftest*
4159  eval "ac_cv_lib_$ac_lib_var=no"
4160fi
4161rm -f conftest*
4162LIBS="$ac_save_LIBS"
4163
4164fi
4165if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4166  echo "$ac_t""yes" 1>&6
4167    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4168    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4169  cat >> confdefs.h <<EOF
4170#define $ac_tr_lib 1
4171EOF
4172
4173  LIBS="-lgmp $LIBS"
4174
4175else
4176  echo "$ac_t""no" 1>&6
4177fi
4178
4179if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then
4180  LIBS=${NEED_LIBS}
4181fi
4182echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6
4183echo "configure:4184: checking for main in -lsmallgmp" >&5
4184ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'`
4185if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4186  echo $ac_n "(cached) $ac_c" 1>&6
4187else
4188  ac_save_LIBS="$LIBS"
4189LIBS="-lsmallgmp  $LIBS"
4190cat > conftest.$ac_ext <<EOF
4191#line 4192 "configure"
4192#include "confdefs.h"
4193
4194int main() {
4195main()
4196; return 0; }
4197EOF
4198if { (eval echo configure:4199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4199  rm -rf conftest*
4200  eval "ac_cv_lib_$ac_lib_var=yes"
4201else
4202  echo "configure: failed program was:" >&5
4203  cat conftest.$ac_ext >&5
4204  rm -rf conftest*
4205  eval "ac_cv_lib_$ac_lib_var=no"
4206fi
4207rm -f conftest*
4208LIBS="$ac_save_LIBS"
4209
4210fi
4211if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4212  echo "$ac_t""yes" 1>&6
4213    ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4214    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4215  cat >> confdefs.h <<EOF
4216#define $ac_tr_lib 1
4217EOF
4218
4219  LIBS="-lsmallgmp $LIBS"
4220
4221else
4222  echo "$ac_t""no" 1>&6
4223fi
4224
4225SAVE_LIBS=$LIBS
4226echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4227echo "configure:4228: checking for IMP_PutGmpInt in -lMP" >&5
4228ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4229if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4230  echo $ac_n "(cached) $ac_c" 1>&6
4231else
4232  ac_save_LIBS="$LIBS"
4233LIBS="-lMP $MP_LIBS $LIBS"
4234cat > conftest.$ac_ext <<EOF
4235#line 4236 "configure"
4236#include "confdefs.h"
4237/* Override any gcc2 internal prototype to avoid an error.  */
4238/* We use char because int might match the return type of a gcc2
4239    builtin and then its argument prototype would still apply.  */
4240char IMP_PutGmpInt();
4241
4242int main() {
4243IMP_PutGmpInt()
4244; return 0; }
4245EOF
4246if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4247  rm -rf conftest*
4248  eval "ac_cv_lib_$ac_lib_var=yes"
4249else
4250  echo "configure: failed program was:" >&5
4251  cat conftest.$ac_ext >&5
4252  rm -rf conftest*
4253  eval "ac_cv_lib_$ac_lib_var=no"
4254fi
4255rm -f conftest*
4256LIBS="$ac_save_LIBS"
4257
4258fi
4259if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4260  echo "$ac_t""yes" 1>&6
4261    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4262    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4263  cat >> confdefs.h <<EOF
4264#define $ac_tr_lib 1
4265EOF
4266
4267  LIBS="-lMP $LIBS"
4268
4269else
4270  echo "$ac_t""no" 1>&6
4271fi
4272
4273echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4274echo "configure:4275: checking for MPT_GetTree in -lMPT" >&5
4275ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4276if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4277  echo $ac_n "(cached) $ac_c" 1>&6
4278else
4279  ac_save_LIBS="$LIBS"
4280LIBS="-lMPT $MP_LIBS $LIBS"
4281cat > conftest.$ac_ext <<EOF
4282#line 4283 "configure"
4283#include "confdefs.h"
4284/* Override any gcc2 internal prototype to avoid an error.  */
4285/* We use char because int might match the return type of a gcc2
4286    builtin and then its argument prototype would still apply.  */
4287char MPT_GetTree();
4288
4289int main() {
4290MPT_GetTree()
4291; return 0; }
4292EOF
4293if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4294  rm -rf conftest*
4295  eval "ac_cv_lib_$ac_lib_var=yes"
4296else
4297  echo "configure: failed program was:" >&5
4298  cat conftest.$ac_ext >&5
4299  rm -rf conftest*
4300  eval "ac_cv_lib_$ac_lib_var=no"
4301fi
4302rm -f conftest*
4303LIBS="$ac_save_LIBS"
4304
4305fi
4306if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4307  echo "$ac_t""yes" 1>&6
4308    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4309    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4310  cat >> confdefs.h <<EOF
4311#define $ac_tr_lib 1
4312EOF
4313
4314  LIBS="-lMPT $LIBS"
4315
4316else
4317  echo "$ac_t""no" 1>&6
4318fi
4319
4320LIBS=$SAVE_LIBS
4321echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4322echo "configure:4323: checking for atof in -lsingcf" >&5
4323ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4324if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4325  echo $ac_n "(cached) $ac_c" 1>&6
4326else
4327  ac_save_LIBS="$LIBS"
4328LIBS="-lsingcf  $LIBS"
4329cat > conftest.$ac_ext <<EOF
4330#line 4331 "configure"
4331#include "confdefs.h"
4332/* Override any gcc2 internal prototype to avoid an error.  */
4333/* We use char because int might match the return type of a gcc2
4334    builtin and then its argument prototype would still apply.  */
4335char atof();
4336
4337int main() {
4338atof()
4339; return 0; }
4340EOF
4341if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4342  rm -rf conftest*
4343  eval "ac_cv_lib_$ac_lib_var=yes"
4344else
4345  echo "configure: failed program was:" >&5
4346  cat conftest.$ac_ext >&5
4347  rm -rf conftest*
4348  eval "ac_cv_lib_$ac_lib_var=no"
4349fi
4350rm -f conftest*
4351LIBS="$ac_save_LIBS"
4352
4353fi
4354if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4355  echo "$ac_t""yes" 1>&6
4356    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4357    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4358  cat >> confdefs.h <<EOF
4359#define $ac_tr_lib 1
4360EOF
4361
4362  LIBS="-lsingcf $LIBS"
4363
4364else
4365  echo "$ac_t""no" 1>&6
4366fi
4367
4368echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4369echo "configure:4370: checking for atof in -lsingfac" >&5
4370ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4372  echo $ac_n "(cached) $ac_c" 1>&6
4373else
4374  ac_save_LIBS="$LIBS"
4375LIBS="-lsingfac  $LIBS"
4376cat > conftest.$ac_ext <<EOF
4377#line 4378 "configure"
4378#include "confdefs.h"
4379/* Override any gcc2 internal prototype to avoid an error.  */
4380/* We use char because int might match the return type of a gcc2
4381    builtin and then its argument prototype would still apply.  */
4382char atof();
4383
4384int main() {
4385atof()
4386; return 0; }
4387EOF
4388if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4389  rm -rf conftest*
4390  eval "ac_cv_lib_$ac_lib_var=yes"
4391else
4392  echo "configure: failed program was:" >&5
4393  cat conftest.$ac_ext >&5
4394  rm -rf conftest*
4395  eval "ac_cv_lib_$ac_lib_var=no"
4396fi
4397rm -f conftest*
4398LIBS="$ac_save_LIBS"
4399
4400fi
4401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4402  echo "$ac_t""yes" 1>&6
4403    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4404    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4405  cat >> confdefs.h <<EOF
4406#define $ac_tr_lib 1
4407EOF
4408
4409  LIBS="-lsingfac $LIBS"
4410
4411else
4412  echo "$ac_t""no" 1>&6
4413fi
4414
4415echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
4416echo "configure:4417: checking for omTestAddr in -lomalloc" >&5
4417ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
4418if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4419  echo $ac_n "(cached) $ac_c" 1>&6
4420else
4421  ac_save_LIBS="$LIBS"
4422LIBS="-lomalloc  $LIBS"
4423cat > conftest.$ac_ext <<EOF
4424#line 4425 "configure"
4425#include "confdefs.h"
4426/* Override any gcc2 internal prototype to avoid an error.  */
4427/* We use char because int might match the return type of a gcc2
4428    builtin and then its argument prototype would still apply.  */
4429char omTestAddr();
4430
4431int main() {
4432omTestAddr()
4433; return 0; }
4434EOF
4435if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436  rm -rf conftest*
4437  eval "ac_cv_lib_$ac_lib_var=yes"
4438else
4439  echo "configure: failed program was:" >&5
4440  cat conftest.$ac_ext >&5
4441  rm -rf conftest*
4442  eval "ac_cv_lib_$ac_lib_var=no"
4443fi
4444rm -f conftest*
4445LIBS="$ac_save_LIBS"
4446
4447fi
4448if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449  echo "$ac_t""yes" 1>&6
4450    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4451    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4452  cat >> confdefs.h <<EOF
4453#define $ac_tr_lib 1
4454EOF
4455
4456  LIBS="-lomalloc $LIBS"
4457
4458else
4459  echo "$ac_t""no" 1>&6
4460fi
4461
4462echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
4463echo "configure:4464: checking for main in -lomalloc_ndebug" >&5
4464ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
4465if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4466  echo $ac_n "(cached) $ac_c" 1>&6
4467else
4468  ac_save_LIBS="$LIBS"
4469LIBS="-lomalloc_ndebug  $LIBS"
4470cat > conftest.$ac_ext <<EOF
4471#line 4472 "configure"
4472#include "confdefs.h"
4473
4474int main() {
4475main()
4476; return 0; }
4477EOF
4478if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479  rm -rf conftest*
4480  eval "ac_cv_lib_$ac_lib_var=yes"
4481else
4482  echo "configure: failed program was:" >&5
4483  cat conftest.$ac_ext >&5
4484  rm -rf conftest*
4485  eval "ac_cv_lib_$ac_lib_var=no"
4486fi
4487rm -f conftest*
4488LIBS="$ac_save_LIBS"
4489
4490fi
4491if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4492  echo "$ac_t""yes" 1>&6
4493    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4494    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4495  cat >> confdefs.h <<EOF
4496#define $ac_tr_lib 1
4497EOF
4498
4499  LIBS="-lomalloc_ndebug $LIBS"
4500
4501else
4502  echo "$ac_t""no" 1>&6
4503fi
4504
4505echo $ac_n "checking for main in -lntl""... $ac_c" 1>&6
4506echo "configure:4507: checking for main in -lntl" >&5
4507ac_lib_var=`echo ntl'_'main | sed 'y%./+-%__p_%'`
4508if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4509  echo $ac_n "(cached) $ac_c" 1>&6
4510else
4511  ac_save_LIBS="$LIBS"
4512LIBS="-lntl  $LIBS"
4513cat > conftest.$ac_ext <<EOF
4514#line 4515 "configure"
4515#include "confdefs.h"
4516
4517int main() {
4518main()
4519; return 0; }
4520EOF
4521if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4522  rm -rf conftest*
4523  eval "ac_cv_lib_$ac_lib_var=yes"
4524else
4525  echo "configure: failed program was:" >&5
4526  cat conftest.$ac_ext >&5
4527  rm -rf conftest*
4528  eval "ac_cv_lib_$ac_lib_var=no"
4529fi
4530rm -f conftest*
4531LIBS="$ac_save_LIBS"
4532
4533fi
4534if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4535  echo "$ac_t""yes" 1>&6
4536    ac_tr_lib=HAVE_LIB`echo ntl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4537    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4538  cat >> confdefs.h <<EOF
4539#define $ac_tr_lib 1
4540EOF
4541
4542  LIBS="-lntl $LIBS"
4543
4544else
4545  echo "$ac_t""no" 1>&6
4546fi
4547
4548
4549for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h omalloc.h \
4550 omalloc.c
4551do
4552ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4553echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4554echo "configure:4555: checking for $ac_hdr" >&5
4555if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4556  echo $ac_n "(cached) $ac_c" 1>&6
4557else
4558  cat > conftest.$ac_ext <<EOF
4559#line 4560 "configure"
4560#include "confdefs.h"
4561#include <$ac_hdr>
4562EOF
4563ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4564{ (eval echo configure:4565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4565ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4566if test -z "$ac_err"; then
4567  rm -rf conftest*
4568  eval "ac_cv_header_$ac_safe=yes"
4569else
4570  echo "$ac_err" >&5
4571  echo "configure: failed program was:" >&5
4572  cat conftest.$ac_ext >&5
4573  rm -rf conftest*
4574  eval "ac_cv_header_$ac_safe=no"
4575fi
4576rm -f conftest*
4577fi
4578if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4579  echo "$ac_t""yes" 1>&6
4580    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4581  cat >> confdefs.h <<EOF
4582#define $ac_tr_hdr 1
4583EOF
4584 
4585else
4586  echo "$ac_t""no" 1>&6
4587fi
4588done
4589
4590
4591if test "$ac_cv_lib_gmp_main" = yes && \
4592 test "$ac_cv_header_gmp_h" = yes; then
4593    ac_gmp_ok=yes
4594fi
4595
4596if test "$ac_cv_lib_smallgmp_main" = yes && \
4597 test "$ac_cv_header_smallgmp_h" = yes && \
4598 test "$ac_cv_header_gmp_h" = yes; then
4599    ac_smallgmp_ok=yes
4600fi
4601
4602if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
4603 test "$ac_cv_lib_MPT_MPT_GetTree" && \
4604 test "$ac_cv_header_MP_h" = yes && \
4605 test "$ac_cv_header_MPT_h" = yes; then
4606  ac_MP_ok=yes
4607fi
4608
4609if test "$ac_cv_lib_singcf_atof" = yes && \
4610 test "$ac_cv_header_factory_h" = yes; then
4611  ac_factory_ok=yes
4612fi
4613
4614if test "$ac_cv_lib_singfac_atof" = yes && \
4615 test "$ac_cv_header_factor_h" = yes; then
4616  ac_libfac_ok=yes
4617fi
4618
4619if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
4620   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
4621   test "$ac_cv_header_omalloc_c" = yes && \
4622   test "$ac_cv_header_omalloc_h" = yes; then
4623  ac_cv_omalloc_ok=yes
4624fi
4625
4626if test "$ac_cv_lib_ntl_main" = yes; then
4627  ac_cv_ntl_ok=yes
4628fi
4629
4630# evaluate results
4631if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
4632  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
4633fi
4634
4635echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
4636echo "configure:4637: checking which apint package to use" >&5
4637if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
4638  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4639    echo "$ac_t""gmp" 1>&6
4640    will_have_gmp=yes
4641    NEED_LIBS="-lgmp ${NEED_LIBS}"
4642  elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4643    echo "$ac_t""smallgmp" 1>&6
4644    cat >> confdefs.h <<\EOF
4645#define HAVE_SMALLGMP 1
4646EOF
4647
4648    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4649  else
4650    echo "$ac_t""none" 1>&6
4651    { echo "configure: error: can not build without gmp or smallgmp" 1>&2; exit 1; }
4652  fi
4653elif test "${with_apint}" = gmp; then
4654  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4655    echo "$ac_t""gmp" 1>&6
4656    will_have_gmp=yes
4657    NEED_LIBS="-lgmp ${NEED_LIBS}"
4658  else
4659    echo "$ac_t""none" 1>&6
4660    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
4661  fi
4662else
4663  if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4664    echo "$ac_t""smallgmp" 1>&6
4665    cat >> confdefs.h <<\EOF
4666#define HAVE_SMALLGMP 1
4667EOF
4668
4669    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4670  else
4671    echo "$ac_t""none" 1>&6
4672    { echo "configure: error: can not build with smallgmp" 1>&2; exit 1; }
4673  fi
4674fi
4675
4676#
4677echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
4678echo "configure:4679: checking whether to have MP" >&5
4679if test "${with_MP}" != yes && test "${with_MP}" != no; then
4680  if (test "${will_have_gmp}" = yes) && \
4681     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4682    echo "$ac_t""yes" 1>&6
4683    cat >> confdefs.h <<\EOF
4684#define HAVE_MPSR 1
4685EOF
4686
4687    HAVE_MPSR=1
4688    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4689  else
4690    echo "$ac_t""no" 1>&6
4691  fi
4692elif  test "${with_MP}" = yes; then
4693  if (test "${will_have_gmp}" = yes) && \
4694     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4695    echo "$ac_t""yes" 1>&6
4696    cat >> confdefs.h <<\EOF
4697#define HAVE_MPSR 1
4698EOF
4699
4700    HAVE_MPSR=1
4701    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4702  else
4703    echo "$ac_t""no" 1>&6
4704    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
4705  fi
4706else
4707  echo "$ac_t""no" 1>&6
4708fi
4709
4710
4711
4712echo $ac_n "checking whether to have NTL""... $ac_c" 1>&6
4713echo "configure:4714: checking whether to have NTL" >&5
4714if test "${with_NTL}" = yes ; then
4715  echo "$ac_t""yes" 1>&6
4716  NEED_LIBS="-lntl ${NEED_LIBS}"
4717else
4718  echo "$ac_t""no" 1>&6
4719fi
4720
4721echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
4722echo "configure:4723: checking whether to have factory" >&5
4723if test "${with_factory}" != yes && test "${with_factory}" != no; then
4724  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4725    echo "$ac_t""yes" 1>&6
4726    cat >> confdefs.h <<\EOF
4727#define HAVE_FACTORY 1
4728EOF
4729
4730    will_have_factory=yes
4731    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4732  else
4733    echo "$ac_t""no" 1>&6
4734  fi
4735elif  test "${with_factory}" = yes; then
4736  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4737    echo "$ac_t""yes" 1>&6
4738    cat >> confdefs.h <<\EOF
4739#define HAVE_FACTORY 1
4740EOF
4741
4742    will_have_factory=yes
4743    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4744  else
4745    echo "$ac_t""no" 1>&6
4746    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
4747  fi
4748else
4749  echo "$ac_t""no" 1>&6
4750fi
4751
4752echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
4753echo "configure:4754: checking whether to have libfac" >&5
4754if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
4755  if (test "${will_have_factory}" = yes) && \
4756     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4757    echo "$ac_t""yes" 1>&6
4758    cat >> confdefs.h <<\EOF
4759#define HAVE_LIBFAC_P 1
4760EOF
4761
4762    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4763  else
4764    echo "$ac_t""no" 1>&6
4765  fi
4766elif  test "${with_libfac}" = yes; then
4767  if (test "${will_have_factory}" = yes) && \
4768     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4769    echo "$ac_t""yes" 1>&6
4770    cat >> confdefs.h <<\EOF
4771#define HAVE_LIBFAC_P 1
4772EOF
4773
4774    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4775  else
4776    echo "$ac_t""no" 1>&6
4777    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
4778  fi
4779else
4780  echo "$ac_t""no" 1>&6
4781fi
4782
4783
4784
4785
4786echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
4787echo "configure:4788: checking whether to have dbm links" >&5
4788if test "$with_dbm" != no; then
4789  cat >> confdefs.h <<\EOF
4790#define HAVE_DBM 1
4791EOF
4792
4793  echo "$ac_t""yes" 1>&6
4794else
4795  echo "$ac_t""no" 1>&6
4796fi
4797
4798echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
4799echo "configure:4800: checking whether to have namespaces" >&5
4800if test "$with_namespaces" != no; then
4801  echo "$ac_t""yes" 1>&6
4802  cat >> confdefs.h <<\EOF
4803#define HAVE_NS 1
4804EOF
4805
4806else
4807  echo "$ac_t""no" 1>&6
4808fi
4809
4810echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
4811echo "configure:4812: checking whether to have dynamic modules" >&5
4812if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then
4813  echo "$ac_t""no" 1>&6
4814else
4815  cat >> confdefs.h <<\EOF
4816#define HAVE_DYNAMIC_LOADING 1
4817EOF
4818
4819  echo "$ac_t""yes" 1>&6
4820fi
4821
4822echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
4823echo "configure:4824: checking whether to have dynamic kernel" >&5
4824if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
4825  DL_KERNEL=1
4826 
4827  echo "$ac_t""yes" 1>&6
4828else
4829  echo "$ac_t""no" 1>&6
4830fi
4831
4832echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
4833echo "configure:4834: checking whether to have Plural" >&5
4834if test "$with_Plural" != yes && test "$enable_Plural" != yes; then
4835  echo "$ac_t""no" 1>&6
4836else
4837  cat >> confdefs.h <<\EOF
4838#define HAVE_PLURAL 1
4839EOF
4840
4841  echo "$ac_t""yes" 1>&6
4842fi
4843
4844
4845OUTPUT_MAKEFILES=Makefile
4846
4847if test "$ac_cv_singuname" = "ix86-Win"; then
4848  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
4849fi
4850
4851trap '' 1 2 15
4852cat > confcache <<\EOF
4853# This file is a shell script that caches the results of configure
4854# tests run on this system so they can be shared between configure
4855# scripts and configure runs.  It is not useful on other systems.
4856# If it contains results you don't want to keep, you may remove or edit it.
4857#
4858# By default, configure uses ./config.cache as the cache file,
4859# creating it if it does not exist already.  You can give configure
4860# the --cache-file=FILE option to use a different cache file; that is
4861# what configure does when it calls configure scripts in
4862# subdirectories, so they share the cache.
4863# Giving --cache-file=/dev/null disables caching, for debugging configure.
4864# config.status only pays attention to the cache file if you give it the
4865# --recheck option to rerun configure.
4866#
4867EOF
4868# The following way of writing the cache mishandles newlines in values,
4869# but we know of no workaround that is simple, portable, and efficient.
4870# So, don't put newlines in cache variables' values.
4871# Ultrix sh set writes to stderr and can't be redirected directly,
4872# and sets the high bit in the cache file unless we assign to the vars.
4873(set) 2>&1 |
4874  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4875  *ac_space=\ *)
4876    # `set' does not quote correctly, so add quotes (double-quote substitution
4877    # turns \\\\ into \\, and sed turns \\ into \).
4878    sed -n \
4879      -e "s/'/'\\\\''/g" \
4880      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4881    ;;
4882  *)
4883    # `set' quotes correctly as required by POSIX, so do not add quotes.
4884    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4885    ;;
4886  esac >> confcache
4887if cmp -s $cache_file confcache; then
4888  :
4889else
4890  if test -w $cache_file; then
4891    echo "updating cache $cache_file"
4892    cat confcache > $cache_file
4893  else
4894    echo "not updating unwritable cache $cache_file"
4895  fi
4896fi
4897rm -f confcache
4898
4899trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4900
4901test "x$prefix" = xNONE && prefix=$ac_default_prefix
4902# Let make expand exec_prefix.
4903test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4904
4905# Any assignment to VPATH causes Sun make to only execute
4906# the first set of double-colon rules, so remove it if not needed.
4907# If there is a colon in the path, we need to keep it.
4908if test "x$srcdir" = x.; then
4909  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4910fi
4911
4912trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4913
4914DEFS=-DHAVE_CONFIG_H
4915
4916# Without the "./", some shells look in PATH for config.status.
4917: ${CONFIG_STATUS=./config.status}
4918
4919echo creating $CONFIG_STATUS
4920rm -f $CONFIG_STATUS
4921cat > $CONFIG_STATUS <<EOF
4922#! /bin/sh
4923# Generated automatically by configure.
4924# Run this file to recreate the current configuration.
4925# This directory was configured as follows,
4926# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4927#
4928# $0 $ac_configure_args
4929#
4930# Compiler output produced by configure, useful for debugging
4931# configure, is in ./config.log if it exists.
4932
4933ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4934for ac_option
4935do
4936  case "\$ac_option" in
4937  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4938    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4939    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4940  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4941    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4942    exit 0 ;;
4943  -help | --help | --hel | --he | --h)
4944    echo "\$ac_cs_usage"; exit 0 ;;
4945  *) echo "\$ac_cs_usage"; exit 1 ;;
4946  esac
4947done
4948
4949ac_given_srcdir=$srcdir
4950ac_given_INSTALL="$INSTALL"
4951
4952trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4953EOF
4954cat >> $CONFIG_STATUS <<EOF
4955
4956# Protect against being on the right side of a sed subst in config.status.
4957sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4958 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4959$ac_vpsub
4960$extrasub
4961s%@SHELL@%$SHELL%g
4962s%@CFLAGS@%$CFLAGS%g
4963s%@CPPFLAGS@%$CPPFLAGS%g
4964s%@CXXFLAGS@%$CXXFLAGS%g
4965s%@FFLAGS@%$FFLAGS%g
4966s%@DEFS@%$DEFS%g
4967s%@LDFLAGS@%$LDFLAGS%g
4968s%@LIBS@%$LIBS%g
4969s%@exec_prefix@%$exec_prefix%g
4970s%@prefix@%$prefix%g
4971s%@program_transform_name@%$program_transform_name%g
4972s%@bindir@%$bindir%g
4973s%@sbindir@%$sbindir%g
4974s%@libexecdir@%$libexecdir%g
4975s%@datadir@%$datadir%g
4976s%@sysconfdir@%$sysconfdir%g
4977s%@sharedstatedir@%$sharedstatedir%g
4978s%@localstatedir@%$localstatedir%g
4979s%@libdir@%$libdir%g
4980s%@includedir@%$includedir%g
4981s%@oldincludedir@%$oldincludedir%g
4982s%@infodir@%$infodir%g
4983s%@mandir@%$mandir%g
4984s%@SINGUNAME@%$SINGUNAME%g
4985s%@EXEC_EXT@%$EXEC_EXT%g
4986s%@SING_UNAME@%$SING_UNAME%g
4987s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
4988s%@VERSION_DATE@%$VERSION_DATE%g
4989s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
4990s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
4991s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
4992s%@CC@%$CC%g
4993s%@CPP@%$CPP%g
4994s%@CXX@%$CXX%g
4995s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4996s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4997s%@INSTALL_DATA@%$INSTALL_DATA%g
4998s%@PIPE@%$PIPE%g
4999s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
5000s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
5001s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
5002s%@SET_MAKE@%$SET_MAKE%g
5003s%@SINGULAR@%$SINGULAR%g
5004s%@LEX@%$LEX%g
5005s%@BISON@%$BISON%g
5006s%@LN_S@%$LN_S%g
5007s%@PERL@%$PERL%g
5008s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
5009s%@SFLAGS@%$SFLAGS%g
5010s%@SLDFLAGS@%$SLDFLAGS%g
5011s%@LD@%$LD%g
5012s%@ALLOCA@%$ALLOCA%g
5013s%@CXXCPP@%$CXXCPP%g
5014s%@HAVE_MPSR@%$HAVE_MPSR%g
5015s%@MP_LIBS@%$MP_LIBS%g
5016s%@NEED_LIBS@%$NEED_LIBS%g
5017s%@DL_KERNEL@%$DL_KERNEL%g
5018
5019CEOF
5020EOF
5021
5022cat >> $CONFIG_STATUS <<\EOF
5023
5024# Split the substitutions into bite-sized pieces for seds with
5025# small command number limits, like on Digital OSF/1 and HP-UX.
5026ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5027ac_file=1 # Number of current file.
5028ac_beg=1 # First line for current file.
5029ac_end=$ac_max_sed_cmds # Line after last line for current file.
5030ac_more_lines=:
5031ac_sed_cmds=""
5032while $ac_more_lines; do
5033  if test $ac_beg -gt 1; then
5034    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5035  else
5036    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5037  fi
5038  if test ! -s conftest.s$ac_file; then
5039    ac_more_lines=false
5040    rm -f conftest.s$ac_file
5041  else
5042    if test -z "$ac_sed_cmds"; then
5043      ac_sed_cmds="sed -f conftest.s$ac_file"
5044    else
5045      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5046    fi
5047    ac_file=`expr $ac_file + 1`
5048    ac_beg=$ac_end
5049    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5050  fi
5051done
5052if test -z "$ac_sed_cmds"; then
5053  ac_sed_cmds=cat
5054fi
5055EOF
5056
5057cat >> $CONFIG_STATUS <<EOF
5058
5059CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
5060EOF
5061cat >> $CONFIG_STATUS <<\EOF
5062for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5063  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5064  case "$ac_file" in
5065  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5066       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5067  *) ac_file_in="${ac_file}.in" ;;
5068  esac
5069
5070  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5071
5072  # Remove last slash and all that follows it.  Not all systems have dirname.
5073  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5074  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5075    # The file is in a subdirectory.
5076    test ! -d "$ac_dir" && mkdir "$ac_dir"
5077    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5078    # A "../" for each directory in $ac_dir_suffix.
5079    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5080  else
5081    ac_dir_suffix= ac_dots=
5082  fi
5083
5084  case "$ac_given_srcdir" in
5085  .)  srcdir=.
5086      if test -z "$ac_dots"; then top_srcdir=.
5087      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5088  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5089  *) # Relative path.
5090    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5091    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5092  esac
5093
5094  case "$ac_given_INSTALL" in
5095  [/$]*) INSTALL="$ac_given_INSTALL" ;;
5096  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5097  esac
5098
5099  echo creating "$ac_file"
5100  rm -f "$ac_file"
5101  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5102  case "$ac_file" in
5103  *Makefile*) ac_comsub="1i\\
5104# $configure_input" ;;
5105  *) ac_comsub= ;;
5106  esac
5107
5108  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5109  sed -e "$ac_comsub
5110s%@configure_input@%$configure_input%g
5111s%@srcdir@%$srcdir%g
5112s%@top_srcdir@%$top_srcdir%g
5113s%@INSTALL@%$INSTALL%g
5114" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5115fi; done
5116rm -f conftest.s*
5117
5118# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5119# NAME is the cpp macro being defined and VALUE is the value it is being given.
5120#
5121# ac_d sets the value in "#define NAME VALUE" lines.
5122ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5123ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5124ac_dC='\3'
5125ac_dD='%g'
5126# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5127ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5128ac_uB='\([      ]\)%\1#\2define\3'
5129ac_uC=' '
5130ac_uD='\4%g'
5131# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5132ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5133ac_eB='$%\1#\2define\3'
5134ac_eC=' '
5135ac_eD='%g'
5136
5137if test "${CONFIG_HEADERS+set}" != set; then
5138EOF
5139cat >> $CONFIG_STATUS <<EOF
5140  CONFIG_HEADERS="mod2.h"
5141EOF
5142cat >> $CONFIG_STATUS <<\EOF
5143fi
5144for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5145  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5146  case "$ac_file" in
5147  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5148       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5149  *) ac_file_in="${ac_file}.in" ;;
5150  esac
5151
5152  echo creating $ac_file
5153
5154  rm -f conftest.frag conftest.in conftest.out
5155  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5156  cat $ac_file_inputs > conftest.in
5157
5158EOF
5159
5160# Transform confdefs.h into a sed script conftest.vals that substitutes
5161# the proper values into config.h.in to produce config.h.  And first:
5162# Protect against being on the right side of a sed subst in config.status.
5163# Protect against being in an unquoted here document in config.status.
5164rm -f conftest.vals
5165cat > conftest.hdr <<\EOF
5166s/[\\&%]/\\&/g
5167s%[\\$`]%\\&%g
5168s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5169s%ac_d%ac_u%gp
5170s%ac_u%ac_e%gp
5171EOF
5172sed -n -f conftest.hdr confdefs.h > conftest.vals
5173rm -f conftest.hdr
5174
5175# This sed command replaces #undef with comments.  This is necessary, for
5176# example, in the case of _POSIX_SOURCE, which is predefined and required
5177# on some systems where configure will not decide to define it.
5178cat >> conftest.vals <<\EOF
5179s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5180EOF
5181
5182# Break up conftest.vals because some shells have a limit on
5183# the size of here documents, and old seds have small limits too.
5184
5185rm -f conftest.tail
5186while :
5187do
5188  ac_lines=`grep -c . conftest.vals`
5189  # grep -c gives empty output for an empty file on some AIX systems.
5190  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5191  # Write a limited-size here document to conftest.frag.
5192  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5193  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5194  echo 'CEOF
5195  sed -f conftest.frag conftest.in > conftest.out
5196  rm -f conftest.in
5197  mv conftest.out conftest.in
5198' >> $CONFIG_STATUS
5199  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5200  rm -f conftest.vals
5201  mv conftest.tail conftest.vals
5202done
5203rm -f conftest.vals
5204
5205cat >> $CONFIG_STATUS <<\EOF
5206  rm -f conftest.frag conftest.h
5207  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5208  cat conftest.in >> conftest.h
5209  rm -f conftest.in
5210  if cmp -s $ac_file conftest.h 2>/dev/null; then
5211    echo "$ac_file is unchanged"
5212    rm -f conftest.h
5213  else
5214    # Remove last slash and all that follows it.  Not all systems have dirname.
5215      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5216      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5217      # The file is in a subdirectory.
5218      test ! -d "$ac_dir" && mkdir "$ac_dir"
5219    fi
5220    rm -f $ac_file
5221    mv conftest.h $ac_file
5222  fi
5223fi; done
5224
5225EOF
5226cat >> $CONFIG_STATUS <<EOF
5227
5228EOF
5229cat >> $CONFIG_STATUS <<\EOF
5230\
5231 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
5232exit 0
5233EOF
5234chmod +x $CONFIG_STATUS
5235rm -fr confdefs* $ac_clean_files
5236test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5237
Note: See TracBrowser for help on using the repository browser.