source: git/Singular/configure @ d4f80c

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