source: git/Singular/configure @ 409be3

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