source: git/Singular/configure @ ef0124

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