source: git/Singular/configure @ b07a6d9

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