source: git/Singular/configure @ 7e5a38

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