source: git/Singular/configure @ 20ac44

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