source: git/Singular/configure @ 65546eb

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