source: git/Singular/configure @ 250362

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