source: git/Singular/configure @ 013557

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