source: git/Singular/configure @ 6e04b1

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