source: git/Singular/configure @ 79370c5

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