source: git/Singular/configure @ 1cb879

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