source: git/Singular/configure @ d7952be

spielwiese
Last change on this file since d7952be was ecce503, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes: 64-bit DEFS git-svn-id: file:///usr/local/Singular/svn/trunk@7732 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 143.6 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=`pwd`/..
15ac_help="$ac_help
16  --with-rootdir=DIR      use DIR ass compiled-in root directory
17                             (default is PREFIX)"
18ac_help="$ac_help
19  --with-lex=[LEX,no]     uses LEX as lex program, default is flex"
20ac_help="$ac_help
21  --with-readline=[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
3607if test "$ac_cv_sizeof_voidp" != 4; then
3608  DEFS="-UOM_NDEBUG"
3609 
3610fi
3611
3612# Check whether --with-rootdir or --without-rootdir was given.
3613if test "${with_rootdir+set}" = set; then
3614  withval="$with_rootdir"
3615  :
3616fi
3617
3618# Check whether --with-lex or --without-lex was given.
3619if test "${with_lex+set}" = set; then
3620  withval="$with_lex"
3621  :
3622fi
3623
3624# Check whether --with-readline or --without-readline was given.
3625if test "${with_readline+set}" = set; then
3626  withval="$with_readline"
3627  :
3628fi
3629
3630# Check whether --with-MP or --without-MP was given.
3631if test "${with_MP+set}" = set; then
3632  withval="$with_MP"
3633  :
3634fi
3635
3636# Check whether --with-dbm or --without-dbm was given.
3637if test "${with_dbm+set}" = set; then
3638  withval="$with_dbm"
3639  :
3640fi
3641
3642# Check whether --with-factory or --without-factory was given.
3643if test "${with_factory+set}" = set; then
3644  withval="$with_factory"
3645  :
3646fi
3647
3648# Check whether --with-libfac or --without-libfac was given.
3649if test "${with_libfac+set}" = set; then
3650  withval="$with_libfac"
3651  :
3652fi
3653
3654# Check whether --with-namespaces or --without-namespaces was given.
3655if test "${with_namespaces+set}" = set; then
3656  withval="$with_namespaces"
3657  :
3658fi
3659
3660# Check whether --with-dl or --without-dl was given.
3661if test "${with_dl+set}" = set; then
3662  withval="$with_dl"
3663  :
3664fi
3665
3666# Check whether --with-dynamic-modules or --without-dynamic-modules was given.
3667if test "${with_dynamic_modules+set}" = set; then
3668  withval="$with_dynamic_modules"
3669  :
3670fi
3671 
3672# Check whether --with-dynamic-kernel or --without-dynamic-kernel was given.
3673if test "${with_dynamic_kernel+set}" = set; then
3674  withval="$with_dynamic_kernel"
3675  :
3676fi
3677
3678# Check whether --with-apint or --without-apint was given.
3679if test "${with_apint+set}" = set; then
3680  withval="$with_apint"
3681  :
3682fi
3683
3684# Check whether --with-Plural or --without-Plural was given.
3685if test "${with_Plural+set}" = set; then
3686  withval="$with_Plural"
3687  :
3688fi
3689
3690# Check whether --with-NTL or --without-NTL was given.
3691if test "${with_NTL+set}" = set; then
3692  withval="$with_NTL"
3693  :
3694else
3695  with_NTL=yes
3696fi
3697
3698
3699
3700
3701echo $ac_n "checking whether to use dynamic linking""... $ac_c" 1>&6
3702echo "configure:3703: checking whether to use dynamic linking" >&5
3703if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
3704  cat >> confdefs.h <<\EOF
3705#define HAVE_DL 1
3706EOF
3707
3708  ac_have_dl=yes
3709  echo "$ac_t""yes" 1>&6
3710else
3711  echo "$ac_t""no" 1>&6
3712fi
3713
3714echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3715echo "configure:3716: checking for tgetent in -lncurses" >&5
3716ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3717if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3718  echo $ac_n "(cached) $ac_c" 1>&6
3719else
3720  ac_save_LIBS="$LIBS"
3721LIBS="-lncurses  $LIBS"
3722cat > conftest.$ac_ext <<EOF
3723#line 3724 "configure"
3724#include "confdefs.h"
3725/* Override any gcc2 internal prototype to avoid an error.  */
3726/* We use char because int might match the return type of a gcc2
3727    builtin and then its argument prototype would still apply.  */
3728char tgetent();
3729
3730int main() {
3731tgetent()
3732; return 0; }
3733EOF
3734if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3735  rm -rf conftest*
3736  eval "ac_cv_lib_$ac_lib_var=yes"
3737else
3738  echo "configure: failed program was:" >&5
3739  cat conftest.$ac_ext >&5
3740  rm -rf conftest*
3741  eval "ac_cv_lib_$ac_lib_var=no"
3742fi
3743rm -f conftest*
3744LIBS="$ac_save_LIBS"
3745
3746fi
3747if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3748  echo "$ac_t""yes" 1>&6
3749    ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3750    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3751  cat >> confdefs.h <<EOF
3752#define $ac_tr_lib 1
3753EOF
3754
3755  LIBS="-lncurses $LIBS"
3756
3757else
3758  echo "$ac_t""no" 1>&6
3759\
3760 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
3761echo "configure:3762: checking for tgetent in -lcurses" >&5
3762ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
3763if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3764  echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766  ac_save_LIBS="$LIBS"
3767LIBS="-lcurses  $LIBS"
3768cat > conftest.$ac_ext <<EOF
3769#line 3770 "configure"
3770#include "confdefs.h"
3771/* Override any gcc2 internal prototype to avoid an error.  */
3772/* We use char because int might match the return type of a gcc2
3773    builtin and then its argument prototype would still apply.  */
3774char tgetent();
3775
3776int main() {
3777tgetent()
3778; return 0; }
3779EOF
3780if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3781  rm -rf conftest*
3782  eval "ac_cv_lib_$ac_lib_var=yes"
3783else
3784  echo "configure: failed program was:" >&5
3785  cat conftest.$ac_ext >&5
3786  rm -rf conftest*
3787  eval "ac_cv_lib_$ac_lib_var=no"
3788fi
3789rm -f conftest*
3790LIBS="$ac_save_LIBS"
3791
3792fi
3793if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3794  echo "$ac_t""yes" 1>&6
3795    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \
3796    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3797  cat >> confdefs.h <<EOF
3798#define $ac_tr_lib 1
3799EOF
3800
3801  LIBS="-lcurses $LIBS"
3802
3803else
3804  echo "$ac_t""no" 1>&6
3805\
3806  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3807echo "configure:3808: checking for tgetent in -ltermcap" >&5
3808ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3809if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3810  echo $ac_n "(cached) $ac_c" 1>&6
3811else
3812  ac_save_LIBS="$LIBS"
3813LIBS="-ltermcap  $LIBS"
3814cat > conftest.$ac_ext <<EOF
3815#line 3816 "configure"
3816#include "confdefs.h"
3817/* Override any gcc2 internal prototype to avoid an error.  */
3818/* We use char because int might match the return type of a gcc2
3819    builtin and then its argument prototype would still apply.  */
3820char tgetent();
3821
3822int main() {
3823tgetent()
3824; return 0; }
3825EOF
3826if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827  rm -rf conftest*
3828  eval "ac_cv_lib_$ac_lib_var=yes"
3829else
3830  echo "configure: failed program was:" >&5
3831  cat conftest.$ac_ext >&5
3832  rm -rf conftest*
3833  eval "ac_cv_lib_$ac_lib_var=no"
3834fi
3835rm -f conftest*
3836LIBS="$ac_save_LIBS"
3837
3838fi
3839if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3840  echo "$ac_t""yes" 1>&6
3841    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \
3842    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3843  cat >> confdefs.h <<EOF
3844#define $ac_tr_lib 1
3845EOF
3846
3847  LIBS="-ltermcap $LIBS"
3848
3849else
3850  echo "$ac_t""no" 1>&6
3851fi
3852
3853fi
3854
3855fi
3856
3857
3858# readline
3859if test "$with_readline" = dynamic && test "$ac_have_dl" != yes; then
3860  echo "configure: warning: can not build dynamic readline without dynamic linking" 1>&2
3861  with_readline=static
3862fi
3863
3864
3865if test "$with_readline" != dynamic && test "$with_readline" != no; then
3866
3867ac_ext=C
3868# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3869ac_cpp='$CXXCPP $CPPFLAGS'
3870ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3871ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3872cross_compiling=$ac_cv_prog_cxx_cross
3873
3874   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
3875echo "configure:3876: checking for rl_abort in -lreadline" >&5
3876ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
3877if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3878  echo $ac_n "(cached) $ac_c" 1>&6
3879else
3880  ac_save_LIBS="$LIBS"
3881LIBS="-lreadline  $LIBS"
3882cat > conftest.$ac_ext <<EOF
3883#line 3884 "configure"
3884#include "confdefs.h"
3885/* Override any gcc2 internal prototype to avoid an error.  */
3886#ifdef __cplusplus
3887extern "C"
3888#endif
3889/* We use char because int might match the return type of a gcc2
3890    builtin and then its argument prototype would still apply.  */
3891char rl_abort();
3892
3893int main() {
3894rl_abort()
3895; return 0; }
3896EOF
3897if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3898  rm -rf conftest*
3899  eval "ac_cv_lib_$ac_lib_var=yes"
3900else
3901  echo "configure: failed program was:" >&5
3902  cat conftest.$ac_ext >&5
3903  rm -rf conftest*
3904  eval "ac_cv_lib_$ac_lib_var=no"
3905fi
3906rm -f conftest*
3907LIBS="$ac_save_LIBS"
3908
3909fi
3910if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3911  echo "$ac_t""yes" 1>&6
3912    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3913    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3914  cat >> confdefs.h <<EOF
3915#define $ac_tr_lib 1
3916EOF
3917
3918  LIBS="-lreadline $LIBS"
3919
3920else
3921  echo "$ac_t""no" 1>&6
3922fi
3923
3924   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
3925echo "configure:3926: checking how to run the C++ preprocessor" >&5
3926if test -z "$CXXCPP"; then
3927if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
3928  echo $ac_n "(cached) $ac_c" 1>&6
3929else
3930  ac_ext=C
3931# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3932ac_cpp='$CXXCPP $CPPFLAGS'
3933ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3934ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3935cross_compiling=$ac_cv_prog_cxx_cross
3936  CXXCPP="${CXX-g++} -E"
3937  cat > conftest.$ac_ext <<EOF
3938#line 3939 "configure"
3939#include "confdefs.h"
3940#include <stdlib.h>
3941EOF
3942ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3943{ (eval echo configure:3944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3944ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3945if test -z "$ac_err"; then
3946  :
3947else
3948  echo "$ac_err" >&5
3949  echo "configure: failed program was:" >&5
3950  cat conftest.$ac_ext >&5
3951  rm -rf conftest*
3952  CXXCPP=/lib/cpp
3953fi
3954rm -f conftest*
3955  ac_cv_prog_CXXCPP="$CXXCPP"
3956ac_ext=C
3957# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3958ac_cpp='$CXXCPP $CPPFLAGS'
3959ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3960ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3961cross_compiling=$ac_cv_prog_cxx_cross
3962fi
3963fi
3964CXXCPP="$ac_cv_prog_CXXCPP"
3965echo "$ac_t""$CXXCPP" 1>&6
3966
3967for ac_hdr in readline/readline.h readline/history.h
3968do
3969ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3970echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3971echo "configure:3972: checking for $ac_hdr" >&5
3972if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3973  echo $ac_n "(cached) $ac_c" 1>&6
3974else
3975  cat > conftest.$ac_ext <<EOF
3976#line 3977 "configure"
3977#include "confdefs.h"
3978#include <$ac_hdr>
3979EOF
3980ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3981{ (eval echo configure:3982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3982ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3983if test -z "$ac_err"; then
3984  rm -rf conftest*
3985  eval "ac_cv_header_$ac_safe=yes"
3986else
3987  echo "$ac_err" >&5
3988  echo "configure: failed program was:" >&5
3989  cat conftest.$ac_ext >&5
3990  rm -rf conftest*
3991  eval "ac_cv_header_$ac_safe=no"
3992fi
3993rm -f conftest*
3994fi
3995if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3996  echo "$ac_t""yes" 1>&6
3997    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3998  cat >> confdefs.h <<EOF
3999#define $ac_tr_hdr 1
4000EOF
4001 
4002else
4003  echo "$ac_t""no" 1>&6
4004fi
4005done
4006
4007   if test "$ac_cv_lib_readline_rl_abort" = yes && \
4008      test "$ac_cv_header_readline_readline_h" = yes; then
4009     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
4010echo "configure:4011: checking whether readline.h is ok" >&5
4011     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
4012  echo $ac_n "(cached) $ac_c" 1>&6
4013else
4014  cat > conftest.$ac_ext <<EOF
4015#line 4016 "configure"
4016#include "confdefs.h"
4017#include<unistd.h>
4018#include<stdio.h>
4019#include<readline/readline.h>
4020#ifdef HAVE_READLINE_HISTORY_H
4021#include<readline/history.h>
4022#endif
4023
4024int main() {
4025
4026; return 0; }
4027EOF
4028if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4029  rm -rf conftest*
4030  ac_cv_header_readline_readline_h_ok="yes"
4031else
4032  echo "configure: failed program was:" >&5
4033  cat conftest.$ac_ext >&5
4034  rm -rf conftest*
4035  ac_cv_header_readline_readline_h_ok="no"
4036fi
4037rm -f conftest*
4038fi
4039
4040    echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6
4041    if test "$ac_cv_header_readline_readline_h_ok" != yes; then
4042#not ok -- try once more with explicitly declaring everything
4043      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
4044echo "configure:4045: checking whether or not we nevertheless can use readline" >&5
4045      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
4046  echo $ac_n "(cached) $ac_c" 1>&6
4047else
4048  cat > conftest.$ac_ext <<EOF
4049#line 4050 "configure"
4050#include "confdefs.h"
4051#include <stdio.h>
4052extern "C"
4053{
4054extern char * rl_readline_name;
4055extern char *rl_line_buffer;
4056char *filename_completion_function();
4057typedef char **CPPFunction ();
4058extern char ** completion_matches ();
4059extern CPPFunction * rl_attempted_completion_function;
4060extern FILE * rl_outstream;
4061char * readline ();
4062void add_history ();
4063int write_history ();
4064int read_history();
4065}
4066#ifndef NULL
4067#define NULL 0
4068#endif
4069
4070int main() {
4071rl_readline_name=NULL;
4072*rl_line_buffer=1;
4073completion_matches(NULL, filename_completion_function);
4074rl_attempted_completion_function = (CPPFunction *) NULL;
4075rl_outstream=NULL;
4076readline(NULL);
4077add_history(NULL);
4078read_history(NULL);
4079write_history(NULL);
4080
4081; return 0; }
4082EOF
4083if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4084  rm -rf conftest*
4085  ac_cv_have_readline="yes"
4086
4087else
4088  echo "configure: failed program was:" >&5
4089  cat conftest.$ac_ext >&5
4090  rm -rf conftest*
4091  ac_cv_have_readline="no"
4092
4093fi
4094rm -f conftest*
4095fi
4096
4097      echo "$ac_t""$ac_cv_have_readline" 1>&6
4098    else
4099      cat >> confdefs.h <<\EOF
4100#define READLINE_READLINE_H_OK 1
4101EOF
4102
4103      ac_cv_have_readline="yes"
4104    fi
4105  fi
4106  if test "$ac_cv_have_readline" = yes; then
4107    cat >> confdefs.h <<\EOF
4108#define HAVE_READLINE 1
4109EOF
4110
4111  fi
4112ac_ext=c
4113# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4114ac_cpp='$CPP $CPPFLAGS'
4115ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4116ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4117cross_compiling=$ac_cv_prog_cc_cross
4118
4119fi
4120
4121echo $ac_n "checking which readline to use""... $ac_c" 1>&6
4122echo "configure:4123: checking which readline to use" >&5
4123if test "$ac_cv_with_readline" = dynamic; then
4124  echo "$ac_t""dynamic" 1>&6
4125  cat >> confdefs.h <<\EOF
4126#define HAVE_DYN_RL 1
4127EOF
4128
4129elif test "$ac_cv_have_readline" = yes; then
4130  echo "$ac_t""static" 1>&6
4131elif test "$ac_cv_singuname" = PowerMacintosh-darwin; then
4132  { echo "configure: error: building without readline impossible on PowerMacintosh-darwin" 1>&2; exit 1; }
4133else
4134  echo "$ac_t""none" 1>&6
4135  echo "configure: warning: building without readline: disabling fancy display" 1>&2
4136fi
4137 
4138NEED_LIBS=$LIBS
4139
4140# gmp, smallgmp, MP, MPT, factory, libfac
4141echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
4142echo "configure:4143: checking for main in -lgmp" >&5
4143ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
4144if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4145  echo $ac_n "(cached) $ac_c" 1>&6
4146else
4147  ac_save_LIBS="$LIBS"
4148LIBS="-lgmp  $LIBS"
4149cat > conftest.$ac_ext <<EOF
4150#line 4151 "configure"
4151#include "confdefs.h"
4152
4153int main() {
4154main()
4155; return 0; }
4156EOF
4157if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4158  rm -rf conftest*
4159  eval "ac_cv_lib_$ac_lib_var=yes"
4160else
4161  echo "configure: failed program was:" >&5
4162  cat conftest.$ac_ext >&5
4163  rm -rf conftest*
4164  eval "ac_cv_lib_$ac_lib_var=no"
4165fi
4166rm -f conftest*
4167LIBS="$ac_save_LIBS"
4168
4169fi
4170if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4171  echo "$ac_t""yes" 1>&6
4172    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4173    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4174  cat >> confdefs.h <<EOF
4175#define $ac_tr_lib 1
4176EOF
4177
4178  LIBS="-lgmp $LIBS"
4179
4180else
4181  echo "$ac_t""no" 1>&6
4182fi
4183
4184if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then
4185  LIBS=${NEED_LIBS}
4186fi
4187echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6
4188echo "configure:4189: checking for main in -lsmallgmp" >&5
4189ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'`
4190if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4191  echo $ac_n "(cached) $ac_c" 1>&6
4192else
4193  ac_save_LIBS="$LIBS"
4194LIBS="-lsmallgmp  $LIBS"
4195cat > conftest.$ac_ext <<EOF
4196#line 4197 "configure"
4197#include "confdefs.h"
4198
4199int main() {
4200main()
4201; return 0; }
4202EOF
4203if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4204  rm -rf conftest*
4205  eval "ac_cv_lib_$ac_lib_var=yes"
4206else
4207  echo "configure: failed program was:" >&5
4208  cat conftest.$ac_ext >&5
4209  rm -rf conftest*
4210  eval "ac_cv_lib_$ac_lib_var=no"
4211fi
4212rm -f conftest*
4213LIBS="$ac_save_LIBS"
4214
4215fi
4216if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4217  echo "$ac_t""yes" 1>&6
4218    ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4219    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4220  cat >> confdefs.h <<EOF
4221#define $ac_tr_lib 1
4222EOF
4223
4224  LIBS="-lsmallgmp $LIBS"
4225
4226else
4227  echo "$ac_t""no" 1>&6
4228fi
4229
4230SAVE_LIBS=$LIBS
4231echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
4232echo "configure:4233: checking for IMP_PutGmpInt in -lMP" >&5
4233ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
4234if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4235  echo $ac_n "(cached) $ac_c" 1>&6
4236else
4237  ac_save_LIBS="$LIBS"
4238LIBS="-lMP $MP_LIBS $LIBS"
4239cat > conftest.$ac_ext <<EOF
4240#line 4241 "configure"
4241#include "confdefs.h"
4242/* Override any gcc2 internal prototype to avoid an error.  */
4243/* We use char because int might match the return type of a gcc2
4244    builtin and then its argument prototype would still apply.  */
4245char IMP_PutGmpInt();
4246
4247int main() {
4248IMP_PutGmpInt()
4249; return 0; }
4250EOF
4251if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4252  rm -rf conftest*
4253  eval "ac_cv_lib_$ac_lib_var=yes"
4254else
4255  echo "configure: failed program was:" >&5
4256  cat conftest.$ac_ext >&5
4257  rm -rf conftest*
4258  eval "ac_cv_lib_$ac_lib_var=no"
4259fi
4260rm -f conftest*
4261LIBS="$ac_save_LIBS"
4262
4263fi
4264if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4265  echo "$ac_t""yes" 1>&6
4266    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4267    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4268  cat >> confdefs.h <<EOF
4269#define $ac_tr_lib 1
4270EOF
4271
4272  LIBS="-lMP $LIBS"
4273
4274else
4275  echo "$ac_t""no" 1>&6
4276fi
4277
4278echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
4279echo "configure:4280: checking for MPT_GetTree in -lMPT" >&5
4280ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
4281if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4282  echo $ac_n "(cached) $ac_c" 1>&6
4283else
4284  ac_save_LIBS="$LIBS"
4285LIBS="-lMPT $MP_LIBS $LIBS"
4286cat > conftest.$ac_ext <<EOF
4287#line 4288 "configure"
4288#include "confdefs.h"
4289/* Override any gcc2 internal prototype to avoid an error.  */
4290/* We use char because int might match the return type of a gcc2
4291    builtin and then its argument prototype would still apply.  */
4292char MPT_GetTree();
4293
4294int main() {
4295MPT_GetTree()
4296; return 0; }
4297EOF
4298if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4299  rm -rf conftest*
4300  eval "ac_cv_lib_$ac_lib_var=yes"
4301else
4302  echo "configure: failed program was:" >&5
4303  cat conftest.$ac_ext >&5
4304  rm -rf conftest*
4305  eval "ac_cv_lib_$ac_lib_var=no"
4306fi
4307rm -f conftest*
4308LIBS="$ac_save_LIBS"
4309
4310fi
4311if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4312  echo "$ac_t""yes" 1>&6
4313    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4314    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4315  cat >> confdefs.h <<EOF
4316#define $ac_tr_lib 1
4317EOF
4318
4319  LIBS="-lMPT $LIBS"
4320
4321else
4322  echo "$ac_t""no" 1>&6
4323fi
4324
4325LIBS=$SAVE_LIBS
4326echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
4327echo "configure:4328: checking for atof in -lsingcf" >&5
4328ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
4329if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4330  echo $ac_n "(cached) $ac_c" 1>&6
4331else
4332  ac_save_LIBS="$LIBS"
4333LIBS="-lsingcf  $LIBS"
4334cat > conftest.$ac_ext <<EOF
4335#line 4336 "configure"
4336#include "confdefs.h"
4337/* Override any gcc2 internal prototype to avoid an error.  */
4338/* We use char because int might match the return type of a gcc2
4339    builtin and then its argument prototype would still apply.  */
4340char atof();
4341
4342int main() {
4343atof()
4344; return 0; }
4345EOF
4346if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4347  rm -rf conftest*
4348  eval "ac_cv_lib_$ac_lib_var=yes"
4349else
4350  echo "configure: failed program was:" >&5
4351  cat conftest.$ac_ext >&5
4352  rm -rf conftest*
4353  eval "ac_cv_lib_$ac_lib_var=no"
4354fi
4355rm -f conftest*
4356LIBS="$ac_save_LIBS"
4357
4358fi
4359if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4360  echo "$ac_t""yes" 1>&6
4361    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4362    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4363  cat >> confdefs.h <<EOF
4364#define $ac_tr_lib 1
4365EOF
4366
4367  LIBS="-lsingcf $LIBS"
4368
4369else
4370  echo "$ac_t""no" 1>&6
4371fi
4372
4373echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
4374echo "configure:4375: checking for atof in -lsingfac" >&5
4375ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
4376if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4377  echo $ac_n "(cached) $ac_c" 1>&6
4378else
4379  ac_save_LIBS="$LIBS"
4380LIBS="-lsingfac  $LIBS"
4381cat > conftest.$ac_ext <<EOF
4382#line 4383 "configure"
4383#include "confdefs.h"
4384/* Override any gcc2 internal prototype to avoid an error.  */
4385/* We use char because int might match the return type of a gcc2
4386    builtin and then its argument prototype would still apply.  */
4387char atof();
4388
4389int main() {
4390atof()
4391; return 0; }
4392EOF
4393if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394  rm -rf conftest*
4395  eval "ac_cv_lib_$ac_lib_var=yes"
4396else
4397  echo "configure: failed program was:" >&5
4398  cat conftest.$ac_ext >&5
4399  rm -rf conftest*
4400  eval "ac_cv_lib_$ac_lib_var=no"
4401fi
4402rm -f conftest*
4403LIBS="$ac_save_LIBS"
4404
4405fi
4406if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407  echo "$ac_t""yes" 1>&6
4408    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4409    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4410  cat >> confdefs.h <<EOF
4411#define $ac_tr_lib 1
4412EOF
4413
4414  LIBS="-lsingfac $LIBS"
4415
4416else
4417  echo "$ac_t""no" 1>&6
4418fi
4419
4420echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
4421echo "configure:4422: checking for omTestAddr in -lomalloc" >&5
4422ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
4423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4424  echo $ac_n "(cached) $ac_c" 1>&6
4425else
4426  ac_save_LIBS="$LIBS"
4427LIBS="-lomalloc  $LIBS"
4428cat > conftest.$ac_ext <<EOF
4429#line 4430 "configure"
4430#include "confdefs.h"
4431/* Override any gcc2 internal prototype to avoid an error.  */
4432/* We use char because int might match the return type of a gcc2
4433    builtin and then its argument prototype would still apply.  */
4434char omTestAddr();
4435
4436int main() {
4437omTestAddr()
4438; return 0; }
4439EOF
4440if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441  rm -rf conftest*
4442  eval "ac_cv_lib_$ac_lib_var=yes"
4443else
4444  echo "configure: failed program was:" >&5
4445  cat conftest.$ac_ext >&5
4446  rm -rf conftest*
4447  eval "ac_cv_lib_$ac_lib_var=no"
4448fi
4449rm -f conftest*
4450LIBS="$ac_save_LIBS"
4451
4452fi
4453if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4454  echo "$ac_t""yes" 1>&6
4455    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4456    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4457  cat >> confdefs.h <<EOF
4458#define $ac_tr_lib 1
4459EOF
4460
4461  LIBS="-lomalloc $LIBS"
4462
4463else
4464  echo "$ac_t""no" 1>&6
4465fi
4466
4467echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
4468echo "configure:4469: checking for main in -lomalloc_ndebug" >&5
4469ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
4470if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4471  echo $ac_n "(cached) $ac_c" 1>&6
4472else
4473  ac_save_LIBS="$LIBS"
4474LIBS="-lomalloc_ndebug  $LIBS"
4475cat > conftest.$ac_ext <<EOF
4476#line 4477 "configure"
4477#include "confdefs.h"
4478
4479int main() {
4480main()
4481; return 0; }
4482EOF
4483if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484  rm -rf conftest*
4485  eval "ac_cv_lib_$ac_lib_var=yes"
4486else
4487  echo "configure: failed program was:" >&5
4488  cat conftest.$ac_ext >&5
4489  rm -rf conftest*
4490  eval "ac_cv_lib_$ac_lib_var=no"
4491fi
4492rm -f conftest*
4493LIBS="$ac_save_LIBS"
4494
4495fi
4496if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4497  echo "$ac_t""yes" 1>&6
4498    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4499    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4500  cat >> confdefs.h <<EOF
4501#define $ac_tr_lib 1
4502EOF
4503
4504  LIBS="-lomalloc_ndebug $LIBS"
4505
4506else
4507  echo "$ac_t""no" 1>&6
4508fi
4509
4510echo $ac_n "checking for main in -lntl""... $ac_c" 1>&6
4511echo "configure:4512: checking for main in -lntl" >&5
4512ac_lib_var=`echo ntl'_'main | sed 'y%./+-%__p_%'`
4513if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4514  echo $ac_n "(cached) $ac_c" 1>&6
4515else
4516  ac_save_LIBS="$LIBS"
4517LIBS="-lntl  $LIBS"
4518cat > conftest.$ac_ext <<EOF
4519#line 4520 "configure"
4520#include "confdefs.h"
4521
4522int main() {
4523main()
4524; return 0; }
4525EOF
4526if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4527  rm -rf conftest*
4528  eval "ac_cv_lib_$ac_lib_var=yes"
4529else
4530  echo "configure: failed program was:" >&5
4531  cat conftest.$ac_ext >&5
4532  rm -rf conftest*
4533  eval "ac_cv_lib_$ac_lib_var=no"
4534fi
4535rm -f conftest*
4536LIBS="$ac_save_LIBS"
4537
4538fi
4539if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4540  echo "$ac_t""yes" 1>&6
4541    ac_tr_lib=HAVE_LIB`echo ntl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4542    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4543  cat >> confdefs.h <<EOF
4544#define $ac_tr_lib 1
4545EOF
4546
4547  LIBS="-lntl $LIBS"
4548
4549else
4550  echo "$ac_t""no" 1>&6
4551fi
4552
4553
4554for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h omalloc.h \
4555 omalloc.c
4556do
4557ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4558echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4559echo "configure:4560: checking for $ac_hdr" >&5
4560if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4561  echo $ac_n "(cached) $ac_c" 1>&6
4562else
4563  cat > conftest.$ac_ext <<EOF
4564#line 4565 "configure"
4565#include "confdefs.h"
4566#include <$ac_hdr>
4567EOF
4568ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4569{ (eval echo configure:4570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4570ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4571if test -z "$ac_err"; then
4572  rm -rf conftest*
4573  eval "ac_cv_header_$ac_safe=yes"
4574else
4575  echo "$ac_err" >&5
4576  echo "configure: failed program was:" >&5
4577  cat conftest.$ac_ext >&5
4578  rm -rf conftest*
4579  eval "ac_cv_header_$ac_safe=no"
4580fi
4581rm -f conftest*
4582fi
4583if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4584  echo "$ac_t""yes" 1>&6
4585    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4586  cat >> confdefs.h <<EOF
4587#define $ac_tr_hdr 1
4588EOF
4589 
4590else
4591  echo "$ac_t""no" 1>&6
4592fi
4593done
4594
4595
4596if test "$ac_cv_lib_gmp_main" = yes && \
4597 test "$ac_cv_header_gmp_h" = yes; then
4598    ac_gmp_ok=yes
4599fi
4600
4601if test "$ac_cv_lib_smallgmp_main" = yes && \
4602 test "$ac_cv_header_smallgmp_h" = yes && \
4603 test "$ac_cv_header_gmp_h" = yes; then
4604    ac_smallgmp_ok=yes
4605fi
4606
4607if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
4608 test "$ac_cv_lib_MPT_MPT_GetTree" && \
4609 test "$ac_cv_header_MP_h" = yes && \
4610 test "$ac_cv_header_MPT_h" = yes; then
4611  ac_MP_ok=yes
4612fi
4613
4614if test "$ac_cv_lib_singcf_atof" = yes && \
4615 test "$ac_cv_header_factory_h" = yes; then
4616  ac_factory_ok=yes
4617fi
4618
4619if test "$ac_cv_lib_singfac_atof" = yes && \
4620 test "$ac_cv_header_factor_h" = yes; then
4621  ac_libfac_ok=yes
4622fi
4623
4624if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
4625   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
4626   test "$ac_cv_header_omalloc_c" = yes && \
4627   test "$ac_cv_header_omalloc_h" = yes; then
4628  ac_cv_omalloc_ok=yes
4629fi
4630
4631if test "$ac_cv_lib_ntl_main" = yes; then
4632  ac_cv_ntl_ok=yes
4633fi
4634
4635# evaluate results
4636if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
4637  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
4638fi
4639
4640echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
4641echo "configure:4642: checking which apint package to use" >&5
4642if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
4643  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4644    echo "$ac_t""gmp" 1>&6
4645    will_have_gmp=yes
4646    NEED_LIBS="-lgmp ${NEED_LIBS}"
4647  elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4648    echo "$ac_t""smallgmp" 1>&6
4649    cat >> confdefs.h <<\EOF
4650#define HAVE_SMALLGMP 1
4651EOF
4652
4653    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4654  else
4655    echo "$ac_t""none" 1>&6
4656    { echo "configure: error: can not build without gmp or smallgmp" 1>&2; exit 1; }
4657  fi
4658elif test "${with_apint}" = gmp; then
4659  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
4660    echo "$ac_t""gmp" 1>&6
4661    will_have_gmp=yes
4662    NEED_LIBS="-lgmp ${NEED_LIBS}"
4663  else
4664    echo "$ac_t""none" 1>&6
4665    { echo "configure: error: can not build with gmp" 1>&2; exit 1; }
4666  fi
4667else
4668  if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then
4669    echo "$ac_t""smallgmp" 1>&6
4670    cat >> confdefs.h <<\EOF
4671#define HAVE_SMALLGMP 1
4672EOF
4673
4674    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
4675  else
4676    echo "$ac_t""none" 1>&6
4677    { echo "configure: error: can not build with smallgmp" 1>&2; exit 1; }
4678  fi
4679fi
4680
4681#
4682echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
4683echo "configure:4684: checking whether to have MP" >&5
4684if test "${with_MP}" != yes && test "${with_MP}" != no; then
4685  if (test "${will_have_gmp}" = yes) && \
4686     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4687    echo "$ac_t""yes" 1>&6
4688    cat >> confdefs.h <<\EOF
4689#define HAVE_MPSR 1
4690EOF
4691
4692    HAVE_MPSR=1
4693    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4694  else
4695    echo "$ac_t""no" 1>&6
4696  fi
4697elif  test "${with_MP}" = yes; then
4698  if (test "${will_have_gmp}" = yes) && \
4699     (test "$ac_MP_ok" =  yes || test "$enable_MP" = yes); then
4700    echo "$ac_t""yes" 1>&6
4701    cat >> confdefs.h <<\EOF
4702#define HAVE_MPSR 1
4703EOF
4704
4705    HAVE_MPSR=1
4706    MP_LIBS="-lMPT -lMP ${MP_LIBS}"
4707  else
4708    echo "$ac_t""no" 1>&6
4709    { echo "configure: error: can not build with MP" 1>&2; exit 1; }
4710  fi
4711else
4712  echo "$ac_t""no" 1>&6
4713fi
4714
4715
4716
4717echo $ac_n "checking whether to have NTL""... $ac_c" 1>&6
4718echo "configure:4719: checking whether to have NTL" >&5
4719if test "${with_NTL}" = yes ; then
4720  echo "$ac_t""yes" 1>&6
4721  NEED_LIBS="-lntl ${NEED_LIBS}"
4722else
4723  echo "$ac_t""no" 1>&6
4724fi
4725
4726echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
4727echo "configure:4728: checking whether to have factory" >&5
4728if test "${with_factory}" != yes && test "${with_factory}" != no; then
4729  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4730    echo "$ac_t""yes" 1>&6
4731    cat >> confdefs.h <<\EOF
4732#define HAVE_FACTORY 1
4733EOF
4734
4735    will_have_factory=yes
4736    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4737  else
4738    echo "$ac_t""no" 1>&6
4739  fi
4740elif  test "${with_factory}" = yes; then
4741  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
4742    echo "$ac_t""yes" 1>&6
4743    cat >> confdefs.h <<\EOF
4744#define HAVE_FACTORY 1
4745EOF
4746
4747    will_have_factory=yes
4748    NEED_LIBS="-lsingcf ${NEED_LIBS}"
4749  else
4750    echo "$ac_t""no" 1>&6
4751    { echo "configure: error: can not build with factory" 1>&2; exit 1; }
4752  fi
4753else
4754  echo "$ac_t""no" 1>&6
4755fi
4756
4757echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
4758echo "configure:4759: checking whether to have libfac" >&5
4759if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
4760  if (test "${will_have_factory}" = yes) && \
4761     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4762    echo "$ac_t""yes" 1>&6
4763    cat >> confdefs.h <<\EOF
4764#define HAVE_LIBFAC_P 1
4765EOF
4766
4767    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4768  else
4769    echo "$ac_t""no" 1>&6
4770  fi
4771elif  test "${with_libfac}" = yes; then
4772  if (test "${will_have_factory}" = yes) && \
4773     (test "$ac_libfac_ok" =  yes || test "$enable_libfac" = yes); then
4774    echo "$ac_t""yes" 1>&6
4775    cat >> confdefs.h <<\EOF
4776#define HAVE_LIBFAC_P 1
4777EOF
4778
4779    NEED_LIBS="-lsingfac ${NEED_LIBS}"
4780  else
4781    echo "$ac_t""no" 1>&6
4782    { echo "configure: error: can not build with libfac" 1>&2; exit 1; }
4783  fi
4784else
4785  echo "$ac_t""no" 1>&6
4786fi
4787
4788
4789
4790
4791echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
4792echo "configure:4793: checking whether to have dbm links" >&5
4793if test "$with_dbm" != no; then
4794  cat >> confdefs.h <<\EOF
4795#define HAVE_DBM 1
4796EOF
4797
4798  echo "$ac_t""yes" 1>&6
4799else
4800  echo "$ac_t""no" 1>&6
4801fi
4802
4803echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
4804echo "configure:4805: checking whether to have namespaces" >&5
4805if test "$with_namespaces" != no; then
4806  echo "$ac_t""yes" 1>&6
4807  cat >> confdefs.h <<\EOF
4808#define HAVE_NS 1
4809EOF
4810
4811else
4812  echo "$ac_t""no" 1>&6
4813fi
4814
4815echo $ac_n "checking whether to have dynamic modules""... $ac_c" 1>&6
4816echo "configure:4817: checking whether to have dynamic modules" >&5
4817if test "$with_dynamic_modules" = no || test "$ac_have_dl" != yes; then
4818  echo "$ac_t""no" 1>&6
4819else
4820  cat >> confdefs.h <<\EOF
4821#define HAVE_DYNAMIC_LOADING 1
4822EOF
4823
4824  echo "$ac_t""yes" 1>&6
4825fi
4826
4827echo $ac_n "checking whether to have dynamic kernel""... $ac_c" 1>&6
4828echo "configure:4829: checking whether to have dynamic kernel" >&5
4829if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
4830  DL_KERNEL=1
4831 
4832  echo "$ac_t""yes" 1>&6
4833else
4834  echo "$ac_t""no" 1>&6
4835fi
4836
4837echo $ac_n "checking whether to have Plural""... $ac_c" 1>&6
4838echo "configure:4839: checking whether to have Plural" >&5
4839if test "$with_Plural" != yes && test "$enable_Plural" != yes; then
4840  echo "$ac_t""no" 1>&6
4841else
4842  cat >> confdefs.h <<\EOF
4843#define HAVE_PLURAL 1
4844EOF
4845
4846  echo "$ac_t""yes" 1>&6
4847  PLURAL=1
4848 
4849fi
4850
4851
4852OUTPUT_MAKEFILES="Makefile ../kernel/Makefile"
4853
4854if test "$ac_cv_singuname" = "ix86-Win"; then
4855  OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc"
4856fi
4857
4858trap '' 1 2 15
4859cat > confcache <<\EOF
4860# This file is a shell script that caches the results of configure
4861# tests run on this system so they can be shared between configure
4862# scripts and configure runs.  It is not useful on other systems.
4863# If it contains results you don't want to keep, you may remove or edit it.
4864#
4865# By default, configure uses ./config.cache as the cache file,
4866# creating it if it does not exist already.  You can give configure
4867# the --cache-file=FILE option to use a different cache file; that is
4868# what configure does when it calls configure scripts in
4869# subdirectories, so they share the cache.
4870# Giving --cache-file=/dev/null disables caching, for debugging configure.
4871# config.status only pays attention to the cache file if you give it the
4872# --recheck option to rerun configure.
4873#
4874EOF
4875# The following way of writing the cache mishandles newlines in values,
4876# but we know of no workaround that is simple, portable, and efficient.
4877# So, don't put newlines in cache variables' values.
4878# Ultrix sh set writes to stderr and can't be redirected directly,
4879# and sets the high bit in the cache file unless we assign to the vars.
4880(set) 2>&1 |
4881  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4882  *ac_space=\ *)
4883    # `set' does not quote correctly, so add quotes (double-quote substitution
4884    # turns \\\\ into \\, and sed turns \\ into \).
4885    sed -n \
4886      -e "s/'/'\\\\''/g" \
4887      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4888    ;;
4889  *)
4890    # `set' quotes correctly as required by POSIX, so do not add quotes.
4891    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4892    ;;
4893  esac >> confcache
4894if cmp -s $cache_file confcache; then
4895  :
4896else
4897  if test -w $cache_file; then
4898    echo "updating cache $cache_file"
4899    cat confcache > $cache_file
4900  else
4901    echo "not updating unwritable cache $cache_file"
4902  fi
4903fi
4904rm -f confcache
4905
4906trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4907
4908test "x$prefix" = xNONE && prefix=$ac_default_prefix
4909# Let make expand exec_prefix.
4910test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4911
4912# Any assignment to VPATH causes Sun make to only execute
4913# the first set of double-colon rules, so remove it if not needed.
4914# If there is a colon in the path, we need to keep it.
4915if test "x$srcdir" = x.; then
4916  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4917fi
4918
4919trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4920
4921DEFS=-DHAVE_CONFIG_H
4922
4923# Without the "./", some shells look in PATH for config.status.
4924: ${CONFIG_STATUS=./config.status}
4925
4926echo creating $CONFIG_STATUS
4927rm -f $CONFIG_STATUS
4928cat > $CONFIG_STATUS <<EOF
4929#! /bin/sh
4930# Generated automatically by configure.
4931# Run this file to recreate the current configuration.
4932# This directory was configured as follows,
4933# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4934#
4935# $0 $ac_configure_args
4936#
4937# Compiler output produced by configure, useful for debugging
4938# configure, is in ./config.log if it exists.
4939
4940ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4941for ac_option
4942do
4943  case "\$ac_option" in
4944  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4945    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4946    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4947  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4948    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4949    exit 0 ;;
4950  -help | --help | --hel | --he | --h)
4951    echo "\$ac_cs_usage"; exit 0 ;;
4952  *) echo "\$ac_cs_usage"; exit 1 ;;
4953  esac
4954done
4955
4956ac_given_srcdir=$srcdir
4957ac_given_INSTALL="$INSTALL"
4958
4959trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4960EOF
4961cat >> $CONFIG_STATUS <<EOF
4962
4963# Protect against being on the right side of a sed subst in config.status.
4964sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4965 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4966$ac_vpsub
4967$extrasub
4968s%@SHELL@%$SHELL%g
4969s%@CFLAGS@%$CFLAGS%g
4970s%@CPPFLAGS@%$CPPFLAGS%g
4971s%@CXXFLAGS@%$CXXFLAGS%g
4972s%@FFLAGS@%$FFLAGS%g
4973s%@DEFS@%$DEFS%g
4974s%@LDFLAGS@%$LDFLAGS%g
4975s%@LIBS@%$LIBS%g
4976s%@exec_prefix@%$exec_prefix%g
4977s%@prefix@%$prefix%g
4978s%@program_transform_name@%$program_transform_name%g
4979s%@bindir@%$bindir%g
4980s%@sbindir@%$sbindir%g
4981s%@libexecdir@%$libexecdir%g
4982s%@datadir@%$datadir%g
4983s%@sysconfdir@%$sysconfdir%g
4984s%@sharedstatedir@%$sharedstatedir%g
4985s%@localstatedir@%$localstatedir%g
4986s%@libdir@%$libdir%g
4987s%@includedir@%$includedir%g
4988s%@oldincludedir@%$oldincludedir%g
4989s%@infodir@%$infodir%g
4990s%@mandir@%$mandir%g
4991s%@SINGUNAME@%$SINGUNAME%g
4992s%@EXEC_EXT@%$EXEC_EXT%g
4993s%@SING_UNAME@%$SING_UNAME%g
4994s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
4995s%@VERSION_DATE@%$VERSION_DATE%g
4996s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
4997s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
4998s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
4999s%@CC@%$CC%g
5000s%@CPP@%$CPP%g
5001s%@CXX@%$CXX%g
5002s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5003s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5004s%@INSTALL_DATA@%$INSTALL_DATA%g
5005s%@PIPE@%$PIPE%g
5006s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
5007s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
5008s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
5009s%@SET_MAKE@%$SET_MAKE%g
5010s%@SINGULAR@%$SINGULAR%g
5011s%@LEX@%$LEX%g
5012s%@BISON@%$BISON%g
5013s%@LN_S@%$LN_S%g
5014s%@PERL@%$PERL%g
5015s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
5016s%@SFLAGS@%$SFLAGS%g
5017s%@SLDFLAGS@%$SLDFLAGS%g
5018s%@LD@%$LD%g
5019s%@ALLOCA@%$ALLOCA%g
5020s%@CXXCPP@%$CXXCPP%g
5021s%@HAVE_MPSR@%$HAVE_MPSR%g
5022s%@MP_LIBS@%$MP_LIBS%g
5023s%@NEED_LIBS@%$NEED_LIBS%g
5024s%@DL_KERNEL@%$DL_KERNEL%g
5025s%@PLURAL@%$PLURAL%g
5026
5027CEOF
5028EOF
5029
5030cat >> $CONFIG_STATUS <<\EOF
5031
5032# Split the substitutions into bite-sized pieces for seds with
5033# small command number limits, like on Digital OSF/1 and HP-UX.
5034ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5035ac_file=1 # Number of current file.
5036ac_beg=1 # First line for current file.
5037ac_end=$ac_max_sed_cmds # Line after last line for current file.
5038ac_more_lines=:
5039ac_sed_cmds=""
5040while $ac_more_lines; do
5041  if test $ac_beg -gt 1; then
5042    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5043  else
5044    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5045  fi
5046  if test ! -s conftest.s$ac_file; then
5047    ac_more_lines=false
5048    rm -f conftest.s$ac_file
5049  else
5050    if test -z "$ac_sed_cmds"; then
5051      ac_sed_cmds="sed -f conftest.s$ac_file"
5052    else
5053      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5054    fi
5055    ac_file=`expr $ac_file + 1`
5056    ac_beg=$ac_end
5057    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5058  fi
5059done
5060if test -z "$ac_sed_cmds"; then
5061  ac_sed_cmds=cat
5062fi
5063EOF
5064
5065cat >> $CONFIG_STATUS <<EOF
5066
5067CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
5068EOF
5069cat >> $CONFIG_STATUS <<\EOF
5070for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5071  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5072  case "$ac_file" in
5073  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5074       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5075  *) ac_file_in="${ac_file}.in" ;;
5076  esac
5077
5078  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5079
5080  # Remove last slash and all that follows it.  Not all systems have dirname.
5081  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5082  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5083    # The file is in a subdirectory.
5084    test ! -d "$ac_dir" && mkdir "$ac_dir"
5085    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5086    # A "../" for each directory in $ac_dir_suffix.
5087    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5088  else
5089    ac_dir_suffix= ac_dots=
5090  fi
5091
5092  case "$ac_given_srcdir" in
5093  .)  srcdir=.
5094      if test -z "$ac_dots"; then top_srcdir=.
5095      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5096  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5097  *) # Relative path.
5098    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5099    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5100  esac
5101
5102  case "$ac_given_INSTALL" in
5103  [/$]*) INSTALL="$ac_given_INSTALL" ;;
5104  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5105  esac
5106
5107  echo creating "$ac_file"
5108  rm -f "$ac_file"
5109  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5110  case "$ac_file" in
5111  *Makefile*) ac_comsub="1i\\
5112# $configure_input" ;;
5113  *) ac_comsub= ;;
5114  esac
5115
5116  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5117  sed -e "$ac_comsub
5118s%@configure_input@%$configure_input%g
5119s%@srcdir@%$srcdir%g
5120s%@top_srcdir@%$top_srcdir%g
5121s%@INSTALL@%$INSTALL%g
5122" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5123fi; done
5124rm -f conftest.s*
5125
5126# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5127# NAME is the cpp macro being defined and VALUE is the value it is being given.
5128#
5129# ac_d sets the value in "#define NAME VALUE" lines.
5130ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5131ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5132ac_dC='\3'
5133ac_dD='%g'
5134# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5135ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5136ac_uB='\([      ]\)%\1#\2define\3'
5137ac_uC=' '
5138ac_uD='\4%g'
5139# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5140ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5141ac_eB='$%\1#\2define\3'
5142ac_eC=' '
5143ac_eD='%g'
5144
5145if test "${CONFIG_HEADERS+set}" != set; then
5146EOF
5147cat >> $CONFIG_STATUS <<EOF
5148  CONFIG_HEADERS="mod2.h"
5149EOF
5150cat >> $CONFIG_STATUS <<\EOF
5151fi
5152for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5153  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5154  case "$ac_file" in
5155  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5156       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5157  *) ac_file_in="${ac_file}.in" ;;
5158  esac
5159
5160  echo creating $ac_file
5161
5162  rm -f conftest.frag conftest.in conftest.out
5163  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5164  cat $ac_file_inputs > conftest.in
5165
5166EOF
5167
5168# Transform confdefs.h into a sed script conftest.vals that substitutes
5169# the proper values into config.h.in to produce config.h.  And first:
5170# Protect against being on the right side of a sed subst in config.status.
5171# Protect against being in an unquoted here document in config.status.
5172rm -f conftest.vals
5173cat > conftest.hdr <<\EOF
5174s/[\\&%]/\\&/g
5175s%[\\$`]%\\&%g
5176s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5177s%ac_d%ac_u%gp
5178s%ac_u%ac_e%gp
5179EOF
5180sed -n -f conftest.hdr confdefs.h > conftest.vals
5181rm -f conftest.hdr
5182
5183# This sed command replaces #undef with comments.  This is necessary, for
5184# example, in the case of _POSIX_SOURCE, which is predefined and required
5185# on some systems where configure will not decide to define it.
5186cat >> conftest.vals <<\EOF
5187s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5188EOF
5189
5190# Break up conftest.vals because some shells have a limit on
5191# the size of here documents, and old seds have small limits too.
5192
5193rm -f conftest.tail
5194while :
5195do
5196  ac_lines=`grep -c . conftest.vals`
5197  # grep -c gives empty output for an empty file on some AIX systems.
5198  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5199  # Write a limited-size here document to conftest.frag.
5200  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5201  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5202  echo 'CEOF
5203  sed -f conftest.frag conftest.in > conftest.out
5204  rm -f conftest.in
5205  mv conftest.out conftest.in
5206' >> $CONFIG_STATUS
5207  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5208  rm -f conftest.vals
5209  mv conftest.tail conftest.vals
5210done
5211rm -f conftest.vals
5212
5213cat >> $CONFIG_STATUS <<\EOF
5214  rm -f conftest.frag conftest.h
5215  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5216  cat conftest.in >> conftest.h
5217  rm -f conftest.in
5218  if cmp -s $ac_file conftest.h 2>/dev/null; then
5219    echo "$ac_file is unchanged"
5220    rm -f conftest.h
5221  else
5222    # Remove last slash and all that follows it.  Not all systems have dirname.
5223      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5224      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5225      # The file is in a subdirectory.
5226      test ! -d "$ac_dir" && mkdir "$ac_dir"
5227    fi
5228    rm -f $ac_file
5229    mv conftest.h $ac_file
5230  fi
5231fi; done
5232
5233EOF
5234cat >> $CONFIG_STATUS <<EOF
5235
5236EOF
5237cat >> $CONFIG_STATUS <<\EOF
5238\
5239 cp mod2.h ../kernel/mod2.h; \
5240 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
5241exit 0
5242EOF
5243chmod +x $CONFIG_STATUS
5244rm -fr confdefs* $ac_clean_files
5245test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5246
Note: See TracBrowser for help on using the repository browser.