source: git/Singular/configure @ f003a9

spielwiese
Last change on this file since f003a9 was f003a9, checked in by Olaf Bachmann <obachman@…>, 26 years ago
* polys-impl.cc, polys.cc: No COMP_FAST any more * Makefile.in: Introduced variable PERL, set by configure * kstdfac.cc (kStratCopy): kModW iv is not copied, but just the pointer is set 1998-03-18 Olaf Bachmann <obachman@mathematik.uni-kl.de> * Makefile.in: added Singularb target for bprof * polys-impl.h, polys-comp.h: Cleaned up COMP_FAST and related #defines 1998-03-16 Olaf Bachmann <obachman@mathematik.uni-kl.de> * polys-impl.h: no #define COMP_FAST * configure.in,Makefile.in: check for flex -P; increased version number to 1.1.7 git-svn-id: file:///usr/local/Singular/svn/trunk@1268 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 97.7 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.9
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  --without-readline   do not use readline for fancy display"
17ac_help="$ac_help
18  --without-MP         do not use MP (disables MP links)"
19ac_help="$ac_help
20  --without-dbm        do not use dbm (disables DBM links)"
21ac_help="$ac_help
22  --without-info       do not use info for help (use buildin help, instead)"
23ac_help="$ac_help
24  --without-dld        do not use dld (disables dynamic linking)"
25ac_help="$ac_help
26  --without-factory    do not use factory (disables poly factorization)"
27ac_help="$ac_help
28  --without-libfac     do not use libfac (disables primary decompositions)"
29ac_help="$ac_help
30\
31  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
32                          where PACKAGE can be gmp, smallgmp, or buildin"
33ac_help="$ac_help
34  --with-exp_type=TYPE uses TYPE as type of exponents in polynomials
35                          -- default type is short
36                          -- possible other types are char and int"
37
38# Initialize some variables set by options.
39# The variables have the same names as the options, with
40# dashes changed to underlines.
41build=NONE
42cache_file=./config.cache
43exec_prefix=NONE
44host=NONE
45no_create=
46nonopt=NONE
47no_recursion=
48prefix=NONE
49program_prefix=NONE
50program_suffix=NONE
51program_transform_name=s,x,x,
52silent=
53site=
54srcdir=
55target=NONE
56verbose=
57x_includes=NONE
58x_libraries=NONE
59bindir='${exec_prefix}/bin'
60sbindir='${exec_prefix}/sbin'
61libexecdir='${exec_prefix}/libexec'
62datadir='${prefix}/share'
63sysconfdir='${prefix}/etc'
64sharedstatedir='${prefix}/com'
65localstatedir='${prefix}/var'
66libdir='${exec_prefix}/lib'
67includedir='${prefix}/include'
68oldincludedir='/usr/include'
69infodir='${prefix}/info'
70mandir='${prefix}/man'
71
72# Initialize some other variables.
73subdirs=
74MFLAGS= MAKEFLAGS=
75
76ac_prev=
77for ac_option
78do
79
80  # If the previous option needs an argument, assign it.
81  if test -n "$ac_prev"; then
82    eval "$ac_prev=\$ac_option"
83    ac_prev=
84    continue
85  fi
86
87  case "$ac_option" in
88  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89  *) ac_optarg= ;;
90  esac
91
92  # Accept the important Cygnus configure options, so we can diagnose typos.
93
94  case "$ac_option" in
95
96  -bindir | --bindir | --bindi | --bind | --bin | --bi)
97    ac_prev=bindir ;;
98  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
99    bindir="$ac_optarg" ;;
100
101  -build | --build | --buil | --bui | --bu)
102    ac_prev=build ;;
103  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
104    build="$ac_optarg" ;;
105
106  -cache-file | --cache-file | --cache-fil | --cache-fi \
107  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
108    ac_prev=cache_file ;;
109  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
110  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
111    cache_file="$ac_optarg" ;;
112
113  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
114    ac_prev=datadir ;;
115  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
116  | --da=*)
117    datadir="$ac_optarg" ;;
118
119  -disable-* | --disable-*)
120    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
121    # Reject names that are not valid shell variable names.
122    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
123      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124    fi
125    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
126    eval "enable_${ac_feature}=no" ;;
127
128  -enable-* | --enable-*)
129    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
130    # Reject names that are not valid shell variable names.
131    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
132      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133    fi
134    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135    case "$ac_option" in
136      *=*) ;;
137      *) ac_optarg=yes ;;
138    esac
139    eval "enable_${ac_feature}='$ac_optarg'" ;;
140
141  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
142  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
143  | --exec | --exe | --ex)
144    ac_prev=exec_prefix ;;
145  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
146  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
147  | --exec=* | --exe=* | --ex=*)
148    exec_prefix="$ac_optarg" ;;
149
150  -gas | --gas | --ga | --g)
151    # Obsolete; use --with-gas.
152    with_gas=yes ;;
153
154  -help | --help | --hel | --he)
155    # Omit some internal or obsolete options to make the list less imposing.
156    # This message is too long to be a string in the A/UX 3.1 sh.
157    cat << EOF
158Usage: configure [options] [host]
159Options: [defaults in brackets after descriptions]
160Configuration:
161  --cache-file=FILE       cache test results in FILE
162  --help                  print this message
163  --no-create             do not create output files
164  --quiet, --silent       do not print \`checking...' messages
165  --version               print the version of autoconf that created configure
166Directory and file names:
167  --prefix=PREFIX         install architecture-independent files in PREFIX
168                          [$ac_default_prefix]
169  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
170                          [same as prefix]
171  --bindir=DIR            user executables in DIR [EPREFIX/bin]
172  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
173  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
174  --datadir=DIR           read-only architecture-independent data in DIR
175                          [PREFIX/share]
176  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
177  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
178                          [PREFIX/com]
179  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
180  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
181  --includedir=DIR        C header files in DIR [PREFIX/include]
182  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
183  --infodir=DIR           info documentation in DIR [PREFIX/info]
184  --mandir=DIR            man documentation in DIR [PREFIX/man]
185  --srcdir=DIR            find the sources in DIR [configure dir or ..]
186  --program-prefix=PREFIX prepend PREFIX to installed program names
187  --program-suffix=SUFFIX append SUFFIX to installed program names
188  --program-transform-name=PROGRAM
189                          run sed PROGRAM on installed program names
190EOF
191    cat << EOF
192Host type:
193  --build=BUILD           configure for building on BUILD [BUILD=HOST]
194  --host=HOST             configure for HOST [guessed]
195  --target=TARGET         configure for TARGET [TARGET=HOST]
196Features and packages:
197  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
198  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
199  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
200  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
201  --x-includes=DIR        X include files are in DIR
202  --x-libraries=DIR       X library files are in DIR
203EOF
204    if test -n "$ac_help"; then
205      echo "--enable and --with options recognized:$ac_help"
206    fi
207    exit 0 ;;
208
209  -host | --host | --hos | --ho)
210    ac_prev=host ;;
211  -host=* | --host=* | --hos=* | --ho=*)
212    host="$ac_optarg" ;;
213
214  -includedir | --includedir | --includedi | --included | --include \
215  | --includ | --inclu | --incl | --inc)
216    ac_prev=includedir ;;
217  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
218  | --includ=* | --inclu=* | --incl=* | --inc=*)
219    includedir="$ac_optarg" ;;
220
221  -infodir | --infodir | --infodi | --infod | --info | --inf)
222    ac_prev=infodir ;;
223  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
224    infodir="$ac_optarg" ;;
225
226  -libdir | --libdir | --libdi | --libd)
227    ac_prev=libdir ;;
228  -libdir=* | --libdir=* | --libdi=* | --libd=*)
229    libdir="$ac_optarg" ;;
230
231  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
232  | --libexe | --libex | --libe)
233    ac_prev=libexecdir ;;
234  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
235  | --libexe=* | --libex=* | --libe=*)
236    libexecdir="$ac_optarg" ;;
237
238  -localstatedir | --localstatedir | --localstatedi | --localstated \
239  | --localstate | --localstat | --localsta | --localst \
240  | --locals | --local | --loca | --loc | --lo)
241    ac_prev=localstatedir ;;
242  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
243  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
244  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
245    localstatedir="$ac_optarg" ;;
246
247  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
248    ac_prev=mandir ;;
249  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
250    mandir="$ac_optarg" ;;
251
252  -nfp | --nfp | --nf)
253    # Obsolete; use --without-fp.
254    with_fp=no ;;
255
256  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
257  | --no-cr | --no-c)
258    no_create=yes ;;
259
260  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
261  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
262    no_recursion=yes ;;
263
264  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
265  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
266  | --oldin | --oldi | --old | --ol | --o)
267    ac_prev=oldincludedir ;;
268  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
269  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
270  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
271    oldincludedir="$ac_optarg" ;;
272
273  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
274    ac_prev=prefix ;;
275  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
276    prefix="$ac_optarg" ;;
277
278  -program-prefix | --program-prefix | --program-prefi | --program-pref \
279  | --program-pre | --program-pr | --program-p)
280    ac_prev=program_prefix ;;
281  -program-prefix=* | --program-prefix=* | --program-prefi=* \
282  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
283    program_prefix="$ac_optarg" ;;
284
285  -program-suffix | --program-suffix | --program-suffi | --program-suff \
286  | --program-suf | --program-su | --program-s)
287    ac_prev=program_suffix ;;
288  -program-suffix=* | --program-suffix=* | --program-suffi=* \
289  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
290    program_suffix="$ac_optarg" ;;
291
292  -program-transform-name | --program-transform-name \
293  | --program-transform-nam | --program-transform-na \
294  | --program-transform-n | --program-transform- \
295  | --program-transform | --program-transfor \
296  | --program-transfo | --program-transf \
297  | --program-trans | --program-tran \
298  | --progr-tra | --program-tr | --program-t)
299    ac_prev=program_transform_name ;;
300  -program-transform-name=* | --program-transform-name=* \
301  | --program-transform-nam=* | --program-transform-na=* \
302  | --program-transform-n=* | --program-transform-=* \
303  | --program-transform=* | --program-transfor=* \
304  | --program-transfo=* | --program-transf=* \
305  | --program-trans=* | --program-tran=* \
306  | --progr-tra=* | --program-tr=* | --program-t=*)
307    program_transform_name="$ac_optarg" ;;
308
309  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
310  | -silent | --silent | --silen | --sile | --sil)
311    silent=yes ;;
312
313  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
314    ac_prev=sbindir ;;
315  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
316  | --sbi=* | --sb=*)
317    sbindir="$ac_optarg" ;;
318
319  -sharedstatedir | --sharedstatedir | --sharedstatedi \
320  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
321  | --sharedst | --shareds | --shared | --share | --shar \
322  | --sha | --sh)
323    ac_prev=sharedstatedir ;;
324  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
325  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
326  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
327  | --sha=* | --sh=*)
328    sharedstatedir="$ac_optarg" ;;
329
330  -site | --site | --sit)
331    ac_prev=site ;;
332  -site=* | --site=* | --sit=*)
333    site="$ac_optarg" ;;
334
335  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
336    ac_prev=srcdir ;;
337  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
338    srcdir="$ac_optarg" ;;
339
340  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
341  | --syscon | --sysco | --sysc | --sys | --sy)
342    ac_prev=sysconfdir ;;
343  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
344  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
345    sysconfdir="$ac_optarg" ;;
346
347  -target | --target | --targe | --targ | --tar | --ta | --t)
348    ac_prev=target ;;
349  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
350    target="$ac_optarg" ;;
351
352  -v | -verbose | --verbose | --verbos | --verbo | --verb)
353    verbose=yes ;;
354
355  -version | --version | --versio | --versi | --vers)
356    echo "configure generated by autoconf version 2.9"
357    exit 0 ;;
358
359  -with-* | --with-*)
360    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
361    # Reject names that are not valid shell variable names.
362    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
363      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364    fi
365    ac_package=`echo $ac_package| sed 's/-/_/g'`
366    case "$ac_option" in
367      *=*) ;;
368      *) ac_optarg=yes ;;
369    esac
370    eval "with_${ac_package}='$ac_optarg'" ;;
371
372  -without-* | --without-*)
373    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
374    # Reject names that are not valid shell variable names.
375    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
376      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377    fi
378    ac_package=`echo $ac_package| sed 's/-/_/g'`
379    eval "with_${ac_package}=no" ;;
380
381  --x)
382    # Obsolete; use --with-x.
383    with_x=yes ;;
384
385  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
386  | --x-incl | --x-inc | --x-in | --x-i)
387    ac_prev=x_includes ;;
388  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
389  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
390    x_includes="$ac_optarg" ;;
391
392  -x-libraries | --x-libraries | --x-librarie | --x-librari \
393  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
394    ac_prev=x_libraries ;;
395  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
396  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
397    x_libraries="$ac_optarg" ;;
398
399  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
400    ;;
401
402  *)
403    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
404      echo "configure: warning: $ac_option: invalid host type" 1>&2
405    fi
406    if test "x$nonopt" != xNONE; then
407      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
408    fi
409    nonopt="$ac_option"
410    ;;
411
412  esac
413done
414
415if test -n "$ac_prev"; then
416  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
417fi
418
419trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
420
421# File descriptor usage:
422# 0 standard input
423# 1 file creation
424# 2 errors and warnings
425# 3 some systems may open it to /dev/tty
426# 4 used on the Kubota Titan
427# 6 checking for... messages and results
428# 5 compiler messages saved in config.log
429if test "$silent" = yes; then
430  exec 6>/dev/null
431else
432  exec 6>&1
433fi
434exec 5>./config.log
435
436echo "\
437This file contains any messages produced by compilers while
438running configure, to aid debugging if configure makes a mistake.
439" 1>&5
440
441# Strip out --no-create and --no-recursion so they do not pile up.
442# Also quote any args containing shell metacharacters.
443ac_configure_args=
444for ac_arg
445do
446  case "$ac_arg" in
447  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
448  | --no-cr | --no-c) ;;
449  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
450  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
451  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
452  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
453  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
454  esac
455done
456
457# NLS nuisances.
458# Only set LANG and LC_ALL to C if already set.
459# These must not be set unconditionally because not all systems understand
460# e.g. LANG=C (notably SCO).
461if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
463
464# confdefs.h avoids OS command line length limits that DEFS can exceed.
465rm -rf conftest* confdefs.h
466# AIX cpp loses on an empty file, so make sure it contains at least a newline.
467echo > confdefs.h
468
469# A filename unique to this package, relative to the directory that
470# configure is in, which we can look for to find out if srcdir is correct.
471ac_unique_file=matpol.h
472
473# Find the source files, if location was not specified.
474if test -z "$srcdir"; then
475  ac_srcdir_defaulted=yes
476  # Try the directory containing this script, then its parent.
477  ac_prog=$0
478  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
479  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480  srcdir=$ac_confdir
481  if test ! -r $srcdir/$ac_unique_file; then
482    srcdir=..
483  fi
484else
485  ac_srcdir_defaulted=no
486fi
487if test ! -r $srcdir/$ac_unique_file; then
488  if test "$ac_srcdir_defaulted" = yes; then
489    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490  else
491    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492  fi
493fi
494srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
495
496# Prefer explicitly selected file to automatically selected ones.
497if test -z "$CONFIG_SITE"; then
498  if test "x$prefix" != xNONE; then
499    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500  else
501    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502  fi
503fi
504for ac_site_file in $CONFIG_SITE; do
505  if test -r "$ac_site_file"; then
506    echo "loading site script $ac_site_file"
507    . "$ac_site_file"
508  fi
509done
510
511if test -r "$cache_file"; then
512  echo "loading cache $cache_file"
513  . $cache_file
514else
515  echo "creating cache $cache_file"
516  > $cache_file
517fi
518
519ac_ext=c
520# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
521ac_cpp='$CPP $CPPFLAGS'
522ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
524
525if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
526  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
527  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528    ac_n= ac_c='
529' ac_t='        '
530  else
531    ac_n=-n ac_c= ac_t=
532  fi
533else
534  ac_n= ac_c='\c' ac_t=
535fi
536
537
538
539
540SINGULAR_MAJOR_VERSION=1
541SINGULAR_MINOR_VERSION=1
542SINGULAR_SUB_VERSION=7
543VERSION_DATE="March 1998"
544
545
546
547cat >> confdefs.h <<EOF
548#define SINGULAR_MAJOR_VERSION ${SINGULAR_MAJOR_VERSION}
549EOF
550
551cat >> confdefs.h <<EOF
552#define SINGULAR_MINOR_VERSION ${SINGULAR_MINOR_VERSION}
553EOF
554
555cat >> confdefs.h <<EOF
556#define S_VERSION1 "version: ${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION}"
557EOF
558
559cat >> confdefs.h <<EOF
560#define S_VERSION2 "${VERSION_DATE}"
561EOF
562
563cat >> confdefs.h <<EOF
564#define SINGULAR_SUB_VERSION ${SINGULAR_SUB_VERSION}
565EOF
566
567
568
569
570if test "x$datadir" = 'x${prefix}/share'; then
571  if test "x${prefix}" = xNONE; then
572    singulardatadir=${ac_default_prefix}/share/Singular;
573  else
574    singulardatadir=${prefix}/share/Singular;
575  fi
576else
577  singulardatadir=${datadir}/Singular;
578fi
579
580if test "x$infodir" = 'x${prefix}/info'; then
581  if test "x${prefix}" = xNONE; then
582    singularinfodir=${ac_default_prefix}/info;
583  else
584    singularinfodir=${prefix}/info;
585  fi
586else
587  singularinfodir=$infodir;
588fi
589
590
591if test "${CXXFLAGS+set}" != set; then
592  ac_cxxflags_set=no
593  CXXFLAGS="-O"
594fi
595if test "${CFLAGS+set}" != set; then
596  CFLAGS="-O"
597  ac_cflags_set=no
598fi
599
600# check whether CXX was set by user as env variable
601if test "${CXX+set}" != set; then
602  ac_cxx_set=no
603else
604  ac_cxx_set=yes
605fi
606
607# Extract the first word of "flex", so it can be a program name with args.
608set dummy flex; ac_word=$2
609echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
610if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
611  echo $ac_n "(cached) $ac_c" 1>&6
612else
613  if test -n "$LEX"; then
614  ac_cv_prog_LEX="$LEX" # Let the user override the test.
615else
616  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
617  for ac_dir in $PATH; do
618    test -z "$ac_dir" && ac_dir=.
619    if test -f $ac_dir/$ac_word; then
620      ac_cv_prog_LEX="flex"
621      break
622    fi
623  done
624  IFS="$ac_save_ifs"
625  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
626fi
627fi
628LEX="$ac_cv_prog_LEX"
629if test -n "$LEX"; then
630  echo "$ac_t""$LEX" 1>&6
631else
632  echo "$ac_t""no" 1>&6
633fi
634
635if test -z "$LEXLIB"
636then
637  case "$LEX" in
638  flex*) ac_lib=fl ;;
639  *) ac_lib=l ;;
640  esac
641  echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
642ac_lib_var=`echo $ac_lib_yywrap | tr '.-/+' '___p'`
643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
644  echo $ac_n "(cached) $ac_c" 1>&6
645else
646  ac_save_LIBS="$LIBS"
647LIBS="-l$ac_lib  $LIBS"
648cat > conftest.$ac_ext <<EOF
649#line 650 "configure"
650#include "confdefs.h"
651/* Override any gcc2 internal prototype to avoid an error.  */
652char yywrap();
653
654int main() { return 0; }
655int t() {
656yywrap()
657; return 0; }
658EOF
659if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
660  rm -rf conftest*
661  eval "ac_cv_lib_$ac_lib_var=yes"
662else
663  rm -rf conftest*
664  eval "ac_cv_lib_$ac_lib_var=no"
665fi
666rm -f conftest*
667LIBS="$ac_save_LIBS"
668
669fi
670if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
671  echo "$ac_t""yes" 1>&6
672  LEXLIB="-l$ac_lib"
673else
674  echo "$ac_t""no" 1>&6
675fi
676
677fi
678
679# make sure lex accepts -P option
680if test "${ac_cv_prog_LEX+set}" = set; then
681  echo $ac_n "checking whether ${ac_cv_prog_LEX} accepts -P""... $ac_c" 1>&6
682  if ${ac_cv_prog_LEX} -P < /dev/null 2>&1| grep flag > /dev/null 2>&1; then
683    echo "$ac_t""no" 1>&6
684    echo "configure: warning: Can not run ${ac_cv_prog_LEX} with -P; make might fail" 1>&2
685    LEXP=touch
686  else
687    echo "$ac_t""yes" 1>&6
688    LEXP=${ac_cv_prog_LEX}
689  fi
690fi
691
692# Extract the first word of "gcc", so it can be a program name with args.
693set dummy gcc; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
696  echo $ac_n "(cached) $ac_c" 1>&6
697else
698  if test -n "$CC"; then
699  ac_cv_prog_CC="$CC" # Let the user override the test.
700else
701  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
702  for ac_dir in $PATH; do
703    test -z "$ac_dir" && ac_dir=.
704    if test -f $ac_dir/$ac_word; then
705      ac_cv_prog_CC="gcc"
706      break
707    fi
708  done
709  IFS="$ac_save_ifs"
710fi
711fi
712CC="$ac_cv_prog_CC"
713if test -n "$CC"; then
714  echo "$ac_t""$CC" 1>&6
715else
716  echo "$ac_t""no" 1>&6
717fi
718
719if test -z "$CC"; then
720  # Extract the first word of "cc", so it can be a program name with args.
721set dummy cc; ac_word=$2
722echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
723if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
724  echo $ac_n "(cached) $ac_c" 1>&6
725else
726  if test -n "$CC"; then
727  ac_cv_prog_CC="$CC" # Let the user override the test.
728else
729  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
730  ac_prog_rejected=no
731  for ac_dir in $PATH; do
732    test -z "$ac_dir" && ac_dir=.
733    if test -f $ac_dir/$ac_word; then
734      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
735        ac_prog_rejected=yes
736        continue
737      fi
738      ac_cv_prog_CC="cc"
739      break
740    fi
741  done
742  IFS="$ac_save_ifs"
743if test $ac_prog_rejected = yes; then
744  # We found a bogon in the path, so make sure we never use it.
745  set dummy $ac_cv_prog_CC
746  shift
747  if test $# -gt 0; then
748    # We chose a different compiler from the bogus one.
749    # However, it has the same basename, so the bogon will be chosen
750    # first if we set CC to just the basename; use the full file name.
751    shift
752    set dummy "$ac_dir/$ac_word" "$@"
753    shift
754    ac_cv_prog_CC="$@"
755  fi
756fi
757fi
758fi
759CC="$ac_cv_prog_CC"
760if test -n "$CC"; then
761  echo "$ac_t""$CC" 1>&6
762else
763  echo "$ac_t""no" 1>&6
764fi
765
766  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
767fi
768
769echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
770if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
771  echo $ac_n "(cached) $ac_c" 1>&6
772else
773  cat > conftest.c <<EOF
774#ifdef __GNUC__
775  yes;
776#endif
777EOF
778if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
779  ac_cv_prog_gcc=yes
780else
781  ac_cv_prog_gcc=no
782fi
783fi
784
785echo "$ac_t""$ac_cv_prog_gcc" 1>&6
786if test $ac_cv_prog_gcc = yes; then
787  GCC=yes
788  if test "${CFLAGS+set}" != set; then
789    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
790if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
791  echo $ac_n "(cached) $ac_c" 1>&6
792else
793  echo 'void f(){}' > conftest.c
794if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
795  ac_cv_prog_gcc_g=yes
796else
797  ac_cv_prog_gcc_g=no
798fi
799rm -f conftest*
800
801fi
802
803echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
804    if test $ac_cv_prog_gcc_g = yes; then
805      CFLAGS="-g -O"
806    else
807      CFLAGS="-O"
808    fi
809  fi
810else
811  GCC=
812  test "${CFLAGS+set}" = set || CFLAGS="-g"
813fi
814
815echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
816# On Suns, sometimes $CPP names a directory.
817if test -n "$CPP" && test -d "$CPP"; then
818  CPP=
819fi
820if test -z "$CPP"; then
821if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
822  echo $ac_n "(cached) $ac_c" 1>&6
823else
824    # This must be in double quotes, not single quotes, because CPP may get
825  # substituted into the Makefile and "${CC-cc}" will confuse make.
826  CPP="${CC-cc} -E"
827  # On the NeXT, cc -E runs the code through the compiler's parser,
828  # not just through cpp.
829  cat > conftest.$ac_ext <<EOF
830#line 831 "configure"
831#include "confdefs.h"
832#include <assert.h>
833Syntax Error
834EOF
835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
836{ (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
837ac_err=`grep -v '^ *+' conftest.out`
838if test -z "$ac_err"; then
839  :
840else
841  echo "$ac_err" >&5
842  rm -rf conftest*
843  CPP="${CC-cc} -E -traditional-cpp"
844  cat > conftest.$ac_ext <<EOF
845#line 846 "configure"
846#include "confdefs.h"
847#include <assert.h>
848Syntax Error
849EOF
850ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
851{ (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
852ac_err=`grep -v '^ *+' conftest.out`
853if test -z "$ac_err"; then
854  :
855else
856  echo "$ac_err" >&5
857  rm -rf conftest*
858  CPP=/lib/cpp
859fi
860rm -f conftest*
861fi
862rm -f conftest*
863  ac_cv_prog_CPP="$CPP"
864fi
865  CPP="$ac_cv_prog_CPP"
866else
867  ac_cv_prog_CPP="$CPP"
868fi
869echo "$ac_t""$CPP" 1>&6
870
871for ac_prog in $CCC c++ g++ gcc CC cxx
872do
873# Extract the first word of "$ac_prog", so it can be a program name with args.
874set dummy $ac_prog; ac_word=$2
875echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
876if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
877  echo $ac_n "(cached) $ac_c" 1>&6
878else
879  if test -n "$CXX"; then
880  ac_cv_prog_CXX="$CXX" # Let the user override the test.
881else
882  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
883  for ac_dir in $PATH; do
884    test -z "$ac_dir" && ac_dir=.
885    if test -f $ac_dir/$ac_word; then
886      ac_cv_prog_CXX="$ac_prog"
887      break
888    fi
889  done
890  IFS="$ac_save_ifs"
891fi
892fi
893CXX="$ac_cv_prog_CXX"
894if test -n "$CXX"; then
895  echo "$ac_t""$CXX" 1>&6
896else
897  echo "$ac_t""no" 1>&6
898fi
899
900test -n "$CXX" && break
901done
902test -n "$CXX" || CXX="gcc"
903
904
905echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
906if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
907  echo $ac_n "(cached) $ac_c" 1>&6
908else
909  cat > conftest.C <<EOF
910#ifdef __GNUC__
911  yes;
912#endif
913EOF
914if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
915  ac_cv_prog_gxx=yes
916else
917  ac_cv_prog_gxx=no
918fi
919fi
920
921echo "$ac_t""$ac_cv_prog_gxx" 1>&6
922if test $ac_cv_prog_gxx = yes; then
923  GXX=yes
924  if test "${CXXFLAGS+set}" != set; then
925    echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
926if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
927  echo $ac_n "(cached) $ac_c" 1>&6
928else
929  echo 'void f(){}' > conftest.cc
930if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
931  ac_cv_prog_gxx_g=yes
932else
933  ac_cv_prog_gxx_g=no
934fi
935rm -f conftest*
936
937fi
938
939echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6
940    if test $ac_cv_prog_gxx_g = yes; then
941      CXXFLAGS="-g -O"
942    else
943      CXXFLAGS="-O"
944    fi
945  fi
946else
947  GXX=
948  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
949fi
950
951echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
952set dummy ${MAKE-make}; ac_make=$2
953if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
954  echo $ac_n "(cached) $ac_c" 1>&6
955else
956  cat > conftestmake <<\EOF
957all:
958        @echo 'ac_maketemp="${MAKE}"'
959EOF
960# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
961eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
962if test -n "$ac_maketemp"; then
963  eval ac_cv_prog_make_${ac_make}_set=yes
964else
965  eval ac_cv_prog_make_${ac_make}_set=no
966fi
967rm -f conftestmake
968fi
969if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
970  echo "$ac_t""yes" 1>&6
971  SET_MAKE=
972else
973  echo "$ac_t""no" 1>&6
974  SET_MAKE="MAKE=${MAKE-make}"
975fi
976
977# If we cannot run a trivial program, we must be cross compiling.
978echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
979if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
980  echo $ac_n "(cached) $ac_c" 1>&6
981else
982  if test "$cross_compiling" = yes; then
983  ac_cv_c_cross=yes
984else
985cat > conftest.$ac_ext <<EOF
986#line 987 "configure"
987#include "confdefs.h"
988main(){return(0);}
989EOF
990{ (eval echo configure:991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
991if test -s conftest && (./conftest; exit) 2>/dev/null; then
992  ac_cv_c_cross=no
993else
994  ac_cv_c_cross=yes
995fi
996fi
997rm -fr conftest*
998fi
999
1000echo "$ac_t""$ac_cv_c_cross" 1>&6
1001cross_compiling=$ac_cv_c_cross
1002
1003
1004if test "$ac_cv_c_cross" = yes && test "$target" = "i386-unknown-msdos"; then
1005  ac_c_cross_dos=yes
1006  DOS_CROSS=yes
1007else
1008  ac_c_cross_dos=no
1009  DOS_CROSS=no
1010fi
1011
1012
1013if test "$ac_c_cross_dos" = yes; then
1014  cat >> confdefs.h <<\EOF
1015#define SINGULAR_DATADIR "share\\Singular"
1016EOF
1017
1018  cat >> confdefs.h <<\EOF
1019#define SINGULAR_INFODIR "info"
1020EOF
1021
1022else
1023  cat >> confdefs.h <<EOF
1024#define SINGULAR_DATADIR "${singulardatadir}"
1025EOF
1026
1027  cat >> confdefs.h <<EOF
1028#define SINGULAR_INFODIR "${singularinfodir}"
1029EOF
1030
1031fi
1032
1033
1034
1035if test ${GXX} = yes && test "${ac_cxx_set}" = no; then
1036  CXX=gcc
1037fi 
1038
1039if test "$libdir" = '${exec_prefix}/lib'; then
1040  if test "x$exec_prefix" = xNONE; then
1041    if test "x$prefix" = xNONE; then
1042      LDFLAGS="-L${ac_default_prefix}/lib ${LDFLAGS}"
1043    else
1044      LDFLAGS="-L${prefix}/lib ${LDFLAGS}"
1045    fi
1046  else
1047    LDFLAGS="-L${exec_prefix}/lib ${LDFLAGS}"
1048  fi
1049else
1050  LDFLAGS="-L${libdir} ${LDFLAGS}"
1051fi
1052
1053if test "$includedir" = '${prefix}/include'; then
1054  if test "x$prefix" = xNONE; then
1055    CPPFLAGS="-I${ac_default_prefix}/include ${CPPFLAGS}"
1056  else
1057    CPPFLAGS="-I${prefix}/include ${CPPFLAGS}"
1058  fi
1059else
1060  CPPFLAGS="-I${includedir} ${CPPFLAGS}"
1061fi
1062
1063if test "$with_info" != no; then
1064  # Extract the first word of "info", so it can be a program name with args.
1065set dummy info; ac_word=$2
1066echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1067if eval "test \"`echo '$''{'ac_cv_prog_INFO'+set}'`\" = set"; then
1068  echo $ac_n "(cached) $ac_c" 1>&6
1069else
1070  if test -n "$INFO"; then
1071  ac_cv_prog_INFO="$INFO" # Let the user override the test.
1072else
1073  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1074  for ac_dir in $PATH; do
1075    test -z "$ac_dir" && ac_dir=.
1076    if test -f $ac_dir/$ac_word; then
1077      ac_cv_prog_INFO="info"
1078      break
1079    fi
1080  done
1081  IFS="$ac_save_ifs"
1082fi
1083fi
1084INFO="$ac_cv_prog_INFO"
1085if test -n "$INFO"; then
1086  echo "$ac_t""$INFO" 1>&6
1087else
1088  echo "$ac_t""no" 1>&6
1089fi
1090
1091  if test -n "$INFO"; then
1092    cat >> confdefs.h <<\EOF
1093#define HAVE_INFO 1
1094EOF
1095
1096  fi
1097fi
1098
1099# Extract the first word of "perl5", so it can be a program name with args.
1100set dummy perl5; ac_word=$2
1101echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1102if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
1103  echo $ac_n "(cached) $ac_c" 1>&6
1104else
1105  if test -n "$PERL"; then
1106  ac_cv_prog_PERL="$PERL" # Let the user override the test.
1107else
1108  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1109  for ac_dir in $PATH; do
1110    test -z "$ac_dir" && ac_dir=.
1111    if test -f $ac_dir/$ac_word; then
1112      ac_cv_prog_PERL="perl"
1113      break
1114    fi
1115  done
1116  IFS="$ac_save_ifs"
1117fi
1118fi
1119PERL="$ac_cv_prog_PERL"
1120if test -n "$PERL"; then
1121  echo "$ac_t""$PERL" 1>&6
1122else
1123  echo "$ac_t""no" 1>&6
1124fi
1125
1126 
1127# Check whether --with-readline or --without-readline was given.
1128if test "${with_readline+set}" = set; then
1129  withval="$with_readline"
1130  :
1131fi
1132
1133
1134# Check whether --with-MP or --without-MP was given.
1135if test "${with_MP+set}" = set; then
1136  withval="$with_MP"
1137  :
1138fi
1139
1140
1141# Check whether --with-dbm or --without-dbm was given.
1142if test "${with_dbm+set}" = set; then
1143  withval="$with_dbm"
1144  :
1145fi
1146
1147# Check whether --with-info or --without-info was given.
1148if test "${with_info+set}" = set; then
1149  withval="$with_info"
1150  :
1151fi
1152
1153# Check whether --with-dld or --without-dld was given.
1154if test "${with_dld+set}" = set; then
1155  withval="$with_dld"
1156  :
1157fi
1158
1159
1160# Check whether --with-factory or --without-factory was given.
1161if test "${with_factory+set}" = set; then
1162  withval="$with_factory"
1163  :
1164fi
1165
1166
1167# Check whether --with-libfac or --without-libfac was given.
1168if test "${with_libfac+set}" = set; then
1169  withval="$with_libfac"
1170  :
1171fi
1172
1173# Check whether --with-apint or --without-apint was given.
1174if test "${with_apint+set}" = set; then
1175  withval="$with_apint"
1176  :
1177fi
1178
1179# Check whether --with-exp_type or --without-exp_type was given.
1180if test "${with_exp_type+set}" = set; then
1181  withval="$with_exp_type"
1182  :
1183fi
1184
1185
1186 
1187echo $ac_n "checking for -lm""... $ac_c" 1>&6
1188ac_lib_var=`echo m_atof | tr '.-/+' '___p'`
1189if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1190  echo $ac_n "(cached) $ac_c" 1>&6
1191else
1192  ac_save_LIBS="$LIBS"
1193LIBS="-lm  $LIBS"
1194cat > conftest.$ac_ext <<EOF
1195#line 1196 "configure"
1196#include "confdefs.h"
1197/* Override any gcc2 internal prototype to avoid an error.  */
1198char atof();
1199
1200int main() { return 0; }
1201int t() {
1202atof()
1203; return 0; }
1204EOF
1205if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1206  rm -rf conftest*
1207  eval "ac_cv_lib_$ac_lib_var=yes"
1208else
1209  rm -rf conftest*
1210  eval "ac_cv_lib_$ac_lib_var=no"
1211fi
1212rm -f conftest*
1213LIBS="$ac_save_LIBS"
1214
1215fi
1216if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1217  echo "$ac_t""yes" 1>&6
1218    ac_tr_lib=HAVE_LIB`echo m | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1219  cat >> confdefs.h <<EOF
1220#define $ac_tr_lib 1
1221EOF
1222
1223  LIBS="-lm $LIBS"
1224
1225else
1226  echo "$ac_t""no" 1>&6
1227fi
1228
1229echo $ac_n "checking for -lbsd""... $ac_c" 1>&6
1230ac_lib_var=`echo bsd_socket | tr '.-/+' '___p'`
1231if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1232  echo $ac_n "(cached) $ac_c" 1>&6
1233else
1234  ac_save_LIBS="$LIBS"
1235LIBS="-lbsd  $LIBS"
1236cat > conftest.$ac_ext <<EOF
1237#line 1238 "configure"
1238#include "confdefs.h"
1239/* Override any gcc2 internal prototype to avoid an error.  */
1240char socket();
1241
1242int main() { return 0; }
1243int t() {
1244socket()
1245; return 0; }
1246EOF
1247if { (eval echo configure:1248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1248  rm -rf conftest*
1249  eval "ac_cv_lib_$ac_lib_var=yes"
1250else
1251  rm -rf conftest*
1252  eval "ac_cv_lib_$ac_lib_var=no"
1253fi
1254rm -f conftest*
1255LIBS="$ac_save_LIBS"
1256
1257fi
1258if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1259  echo "$ac_t""yes" 1>&6
1260    ac_tr_lib=HAVE_LIB`echo bsd | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1261  cat >> confdefs.h <<EOF
1262#define $ac_tr_lib 1
1263EOF
1264
1265  LIBS="-lbsd $LIBS"
1266
1267else
1268  echo "$ac_t""no" 1>&6
1269fi
1270
1271echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1272ac_lib_var=`echo socket_listen | tr '.-/+' '___p'`
1273if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1274  echo $ac_n "(cached) $ac_c" 1>&6
1275else
1276  ac_save_LIBS="$LIBS"
1277LIBS="-lsocket  $LIBS"
1278cat > conftest.$ac_ext <<EOF
1279#line 1280 "configure"
1280#include "confdefs.h"
1281/* Override any gcc2 internal prototype to avoid an error.  */
1282char listen();
1283
1284int main() { return 0; }
1285int t() {
1286listen()
1287; return 0; }
1288EOF
1289if { (eval echo configure:1290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1290  rm -rf conftest*
1291  eval "ac_cv_lib_$ac_lib_var=yes"
1292else
1293  rm -rf conftest*
1294  eval "ac_cv_lib_$ac_lib_var=no"
1295fi
1296rm -f conftest*
1297LIBS="$ac_save_LIBS"
1298
1299fi
1300if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1301  echo "$ac_t""yes" 1>&6
1302    ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1303  cat >> confdefs.h <<EOF
1304#define $ac_tr_lib 1
1305EOF
1306
1307  LIBS="-lsocket $LIBS"
1308
1309else
1310  echo "$ac_t""no" 1>&6
1311fi
1312
1313echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1314ac_lib_var=`echo nsl_gethostbyname | tr '.-/+' '___p'`
1315if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1316  echo $ac_n "(cached) $ac_c" 1>&6
1317else
1318  ac_save_LIBS="$LIBS"
1319LIBS="-lnsl  $LIBS"
1320cat > conftest.$ac_ext <<EOF
1321#line 1322 "configure"
1322#include "confdefs.h"
1323/* Override any gcc2 internal prototype to avoid an error.  */
1324char gethostbyname();
1325
1326int main() { return 0; }
1327int t() {
1328gethostbyname()
1329; return 0; }
1330EOF
1331if { (eval echo configure:1332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1332  rm -rf conftest*
1333  eval "ac_cv_lib_$ac_lib_var=yes"
1334else
1335  rm -rf conftest*
1336  eval "ac_cv_lib_$ac_lib_var=no"
1337fi
1338rm -f conftest*
1339LIBS="$ac_save_LIBS"
1340
1341fi
1342if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1343  echo "$ac_t""yes" 1>&6
1344    ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1345  cat >> confdefs.h <<EOF
1346#define $ac_tr_lib 1
1347EOF
1348
1349  LIBS="-lnsl $LIBS"
1350
1351else
1352  echo "$ac_t""no" 1>&6
1353fi
1354
1355echo $ac_n "checking for -lucb""... $ac_c" 1>&6
1356ac_lib_var=`echo ucb_index | tr '.-/+' '___p'`
1357if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1358  echo $ac_n "(cached) $ac_c" 1>&6
1359else
1360  ac_save_LIBS="$LIBS"
1361LIBS="-lucb  $LIBS"
1362cat > conftest.$ac_ext <<EOF
1363#line 1364 "configure"
1364#include "confdefs.h"
1365/* Override any gcc2 internal prototype to avoid an error.  */
1366char index();
1367
1368int main() { return 0; }
1369int t() {
1370index()
1371; return 0; }
1372EOF
1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1374  rm -rf conftest*
1375  eval "ac_cv_lib_$ac_lib_var=yes"
1376else
1377  rm -rf conftest*
1378  eval "ac_cv_lib_$ac_lib_var=no"
1379fi
1380rm -f conftest*
1381LIBS="$ac_save_LIBS"
1382
1383fi
1384if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1385  echo "$ac_t""yes" 1>&6
1386    ac_tr_lib=HAVE_LIB`echo ucb | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1387  cat >> confdefs.h <<EOF
1388#define $ac_tr_lib 1
1389EOF
1390
1391  LIBS="-lucb $LIBS"
1392
1393else
1394  echo "$ac_t""no" 1>&6
1395fi
1396
1397
1398if test "$with_readline" != no; then
1399  echo $ac_n "checking for -lncurses""... $ac_c" 1>&6
1400ac_lib_var=`echo ncurses_tgetent | tr '.-/+' '___p'`
1401if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1402  echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404  ac_save_LIBS="$LIBS"
1405LIBS="-lncurses  $LIBS"
1406cat > conftest.$ac_ext <<EOF
1407#line 1408 "configure"
1408#include "confdefs.h"
1409/* Override any gcc2 internal prototype to avoid an error.  */
1410char tgetent();
1411
1412int main() { return 0; }
1413int t() {
1414tgetent()
1415; return 0; }
1416EOF
1417if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1418  rm -rf conftest*
1419  eval "ac_cv_lib_$ac_lib_var=yes"
1420else
1421  rm -rf conftest*
1422  eval "ac_cv_lib_$ac_lib_var=no"
1423fi
1424rm -f conftest*
1425LIBS="$ac_save_LIBS"
1426
1427fi
1428if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1429  echo "$ac_t""yes" 1>&6
1430    ac_tr_lib=HAVE_LIB`echo ncurses | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1431  cat >> confdefs.h <<EOF
1432#define $ac_tr_lib 1
1433EOF
1434
1435  LIBS="-lncurses $LIBS"
1436
1437else
1438  echo "$ac_t""no" 1>&6
1439\
1440   echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
1441ac_lib_var=`echo curses_tgetent | tr '.-/+' '___p'`
1442if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1443  echo $ac_n "(cached) $ac_c" 1>&6
1444else
1445  ac_save_LIBS="$LIBS"
1446LIBS="-lcurses  $LIBS"
1447cat > conftest.$ac_ext <<EOF
1448#line 1449 "configure"
1449#include "confdefs.h"
1450/* Override any gcc2 internal prototype to avoid an error.  */
1451char tgetent();
1452
1453int main() { return 0; }
1454int t() {
1455tgetent()
1456; return 0; }
1457EOF
1458if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1459  rm -rf conftest*
1460  eval "ac_cv_lib_$ac_lib_var=yes"
1461else
1462  rm -rf conftest*
1463  eval "ac_cv_lib_$ac_lib_var=no"
1464fi
1465rm -f conftest*
1466LIBS="$ac_save_LIBS"
1467
1468fi
1469if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1470  echo "$ac_t""yes" 1>&6
1471    ac_tr_lib=HAVE_LIB`echo curses | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1472  cat >> confdefs.h <<EOF
1473#define $ac_tr_lib 1
1474EOF
1475
1476  LIBS="-lcurses $LIBS"
1477
1478else
1479  echo "$ac_t""no" 1>&6
1480\
1481   echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
1482ac_lib_var=`echo termcap_tgetent | tr '.-/+' '___p'`
1483if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1484  echo $ac_n "(cached) $ac_c" 1>&6
1485else
1486  ac_save_LIBS="$LIBS"
1487LIBS="-ltermcap  $LIBS"
1488cat > conftest.$ac_ext <<EOF
1489#line 1490 "configure"
1490#include "confdefs.h"
1491/* Override any gcc2 internal prototype to avoid an error.  */
1492char tgetent();
1493
1494int main() { return 0; }
1495int t() {
1496tgetent()
1497; return 0; }
1498EOF
1499if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1500  rm -rf conftest*
1501  eval "ac_cv_lib_$ac_lib_var=yes"
1502else
1503  rm -rf conftest*
1504  eval "ac_cv_lib_$ac_lib_var=no"
1505fi
1506rm -f conftest*
1507LIBS="$ac_save_LIBS"
1508
1509fi
1510if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1511  echo "$ac_t""yes" 1>&6
1512    ac_tr_lib=HAVE_LIB`echo termcap | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1513  cat >> confdefs.h <<EOF
1514#define $ac_tr_lib 1
1515EOF
1516
1517  LIBS="-ltermcap $LIBS"
1518
1519else
1520  echo "$ac_t""no" 1>&6
1521fi
1522
1523fi
1524
1525fi
1526
1527  echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
1528ac_lib_var=`echo readline_rl_abort | tr '.-/+' '___p'`
1529if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1530  echo $ac_n "(cached) $ac_c" 1>&6
1531else
1532  ac_save_LIBS="$LIBS"
1533LIBS="-lreadline  $LIBS"
1534cat > conftest.$ac_ext <<EOF
1535#line 1536 "configure"
1536#include "confdefs.h"
1537/* Override any gcc2 internal prototype to avoid an error.  */
1538char rl_abort();
1539
1540int main() { return 0; }
1541int t() {
1542rl_abort()
1543; return 0; }
1544EOF
1545if { (eval echo configure:1546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1546  rm -rf conftest*
1547  eval "ac_cv_lib_$ac_lib_var=yes"
1548else
1549  rm -rf conftest*
1550  eval "ac_cv_lib_$ac_lib_var=no"
1551fi
1552rm -f conftest*
1553LIBS="$ac_save_LIBS"
1554
1555fi
1556if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1557  echo "$ac_t""yes" 1>&6
1558    ac_tr_lib=HAVE_LIB`echo readline | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1559  cat >> confdefs.h <<EOF
1560#define $ac_tr_lib 1
1561EOF
1562
1563  LIBS="-lreadline $LIBS"
1564
1565else
1566  echo "$ac_t""no" 1>&6
1567fi
1568
1569  if test "$ac_cv_lib_readline_rl_abort" = yes; then
1570     for ac_hdr in readline/readline.h readline/history.h sys/file.h
1571do
1572ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1573echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1574if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1575  echo $ac_n "(cached) $ac_c" 1>&6
1576else
1577  cat > conftest.$ac_ext <<EOF
1578#line 1579 "configure"
1579#include "confdefs.h"
1580#include <$ac_hdr>
1581EOF
1582ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1583{ (eval echo configure:1584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1584ac_err=`grep -v '^ *+' conftest.out`
1585if test -z "$ac_err"; then
1586  rm -rf conftest*
1587  eval "ac_cv_header_$ac_safe=yes"
1588else
1589  echo "$ac_err" >&5
1590  rm -rf conftest*
1591  eval "ac_cv_header_$ac_safe=no"
1592fi
1593rm -f conftest*
1594fi
1595if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1596  echo "$ac_t""yes" 1>&6
1597    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1598  cat >> confdefs.h <<EOF
1599#define $ac_tr_hdr 1
1600EOF
1601 ac_readline_ok=yes
1602else
1603  echo "$ac_t""no" 1>&6
1604ac_readline_ok=no; break
1605fi
1606done
1607
1608   fi
1609   if test "$ac_readline_ok" = yes; then
1610     cat >> confdefs.h <<\EOF
1611#define HAVE_READLINE 1
1612EOF
1613
1614   else
1615     echo "configure: warning: building without readline: disabling fancy display" 1>&2;
1616     cat >> confdefs.h <<\EOF
1617#define HAVE_FEREAD 1
1618EOF
1619
1620   fi
1621 else
1622   cat >> confdefs.h <<\EOF
1623#define HAVE_FEREAD 1
1624EOF
1625
1626fi
1627 
1628if test "$with_dld" = yes; then
1629  echo $ac_n "checking for -ldld""... $ac_c" 1>&6
1630ac_lib_var=`echo dld_dld_init | tr '.-/+' '___p'`
1631if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1632  echo $ac_n "(cached) $ac_c" 1>&6
1633else
1634  ac_save_LIBS="$LIBS"
1635LIBS="-ldld  $LIBS"
1636cat > conftest.$ac_ext <<EOF
1637#line 1638 "configure"
1638#include "confdefs.h"
1639/* Override any gcc2 internal prototype to avoid an error.  */
1640char dld_init();
1641
1642int main() { return 0; }
1643int t() {
1644dld_init()
1645; return 0; }
1646EOF
1647if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1648  rm -rf conftest*
1649  eval "ac_cv_lib_$ac_lib_var=yes"
1650else
1651  rm -rf conftest*
1652  eval "ac_cv_lib_$ac_lib_var=no"
1653fi
1654rm -f conftest*
1655LIBS="$ac_save_LIBS"
1656
1657fi
1658if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1659  echo "$ac_t""yes" 1>&6
1660  \
1661   echo "configure: warning: building without dld: disabling dynamic linking" 1>&2
1662else
1663  echo "$ac_t""no" 1>&6
1664fi
1665
1666fi
1667
1668NEED_LIBS=$LIBS
1669
1670echo $ac_n "checking for -lgmp""... $ac_c" 1>&6
1671ac_lib_var=`echo gmp_mpq_init | tr '.-/+' '___p'`
1672if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1673  echo $ac_n "(cached) $ac_c" 1>&6
1674else
1675  ac_save_LIBS="$LIBS"
1676LIBS="-lgmp  $LIBS"
1677cat > conftest.$ac_ext <<EOF
1678#line 1679 "configure"
1679#include "confdefs.h"
1680/* Override any gcc2 internal prototype to avoid an error.  */
1681char mpq_init();
1682
1683int main() { return 0; }
1684int t() {
1685mpq_init()
1686; return 0; }
1687EOF
1688if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1689  rm -rf conftest*
1690  eval "ac_cv_lib_$ac_lib_var=yes"
1691else
1692  rm -rf conftest*
1693  eval "ac_cv_lib_$ac_lib_var=no"
1694fi
1695rm -f conftest*
1696LIBS="$ac_save_LIBS"
1697
1698fi
1699if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1700  echo "$ac_t""yes" 1>&6
1701    ac_tr_lib=HAVE_LIB`echo gmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1702  cat >> confdefs.h <<EOF
1703#define $ac_tr_lib 1
1704EOF
1705
1706  LIBS="-lgmp $LIBS"
1707
1708else
1709  echo "$ac_t""no" 1>&6
1710fi
1711
1712if test "ac_cv_lib_gmp_mpq_init" = yes && test "$with-apint" = smallgmp; then
1713  LIBS=NEED_LIBS
1714fi
1715echo $ac_n "checking for -lsmallgmp""... $ac_c" 1>&6
1716ac_lib_var=`echo smallgmp_mpz_init | tr '.-/+' '___p'`
1717if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1718  echo $ac_n "(cached) $ac_c" 1>&6
1719else
1720  ac_save_LIBS="$LIBS"
1721LIBS="-lsmallgmp  $LIBS"
1722cat > conftest.$ac_ext <<EOF
1723#line 1724 "configure"
1724#include "confdefs.h"
1725/* Override any gcc2 internal prototype to avoid an error.  */
1726char mpz_init();
1727
1728int main() { return 0; }
1729int t() {
1730mpz_init()
1731; return 0; }
1732EOF
1733if { (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1734  rm -rf conftest*
1735  eval "ac_cv_lib_$ac_lib_var=yes"
1736else
1737  rm -rf conftest*
1738  eval "ac_cv_lib_$ac_lib_var=no"
1739fi
1740rm -f conftest*
1741LIBS="$ac_save_LIBS"
1742
1743fi
1744if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1745  echo "$ac_t""yes" 1>&6
1746    ac_tr_lib=HAVE_LIB`echo smallgmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1747  cat >> confdefs.h <<EOF
1748#define $ac_tr_lib 1
1749EOF
1750
1751  LIBS="-lsmallgmp $LIBS"
1752
1753else
1754  echo "$ac_t""no" 1>&6
1755fi
1756
1757echo $ac_n "checking for -lMP""... $ac_c" 1>&6
1758ac_lib_var=`echo MP_IMP_PutGmpInt | tr '.-/+' '___p'`
1759if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1760  echo $ac_n "(cached) $ac_c" 1>&6
1761else
1762  ac_save_LIBS="$LIBS"
1763LIBS="-lMP  $LIBS"
1764cat > conftest.$ac_ext <<EOF
1765#line 1766 "configure"
1766#include "confdefs.h"
1767/* Override any gcc2 internal prototype to avoid an error.  */
1768char IMP_PutGmpInt();
1769
1770int main() { return 0; }
1771int t() {
1772IMP_PutGmpInt()
1773; return 0; }
1774EOF
1775if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1776  rm -rf conftest*
1777  eval "ac_cv_lib_$ac_lib_var=yes"
1778else
1779  rm -rf conftest*
1780  eval "ac_cv_lib_$ac_lib_var=no"
1781fi
1782rm -f conftest*
1783LIBS="$ac_save_LIBS"
1784
1785fi
1786if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1787  echo "$ac_t""yes" 1>&6
1788    ac_tr_lib=HAVE_LIB`echo MP | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1789  cat >> confdefs.h <<EOF
1790#define $ac_tr_lib 1
1791EOF
1792
1793  LIBS="-lMP $LIBS"
1794
1795else
1796  echo "$ac_t""no" 1>&6
1797fi
1798
1799echo $ac_n "checking for -lMPT""... $ac_c" 1>&6
1800ac_lib_var=`echo MPT_MPT_GetTree | tr '.-/+' '___p'`
1801if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1802  echo $ac_n "(cached) $ac_c" 1>&6
1803else
1804  ac_save_LIBS="$LIBS"
1805LIBS="-lMPT  $LIBS"
1806cat > conftest.$ac_ext <<EOF
1807#line 1808 "configure"
1808#include "confdefs.h"
1809/* Override any gcc2 internal prototype to avoid an error.  */
1810char MPT_GetTree();
1811
1812int main() { return 0; }
1813int t() {
1814MPT_GetTree()
1815; return 0; }
1816EOF
1817if { (eval echo configure:1818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1818  rm -rf conftest*
1819  eval "ac_cv_lib_$ac_lib_var=yes"
1820else
1821  rm -rf conftest*
1822  eval "ac_cv_lib_$ac_lib_var=no"
1823fi
1824rm -f conftest*
1825LIBS="$ac_save_LIBS"
1826
1827fi
1828if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1829  echo "$ac_t""yes" 1>&6
1830    ac_tr_lib=HAVE_LIB`echo MPT | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1831  cat >> confdefs.h <<EOF
1832#define $ac_tr_lib 1
1833EOF
1834
1835  LIBS="-lMPT $LIBS"
1836
1837else
1838  echo "$ac_t""no" 1>&6
1839fi
1840
1841echo $ac_n "checking for -lsingcf""... $ac_c" 1>&6
1842ac_lib_var=`echo singcf_atof | tr '.-/+' '___p'`
1843if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1844  echo $ac_n "(cached) $ac_c" 1>&6
1845else
1846  ac_save_LIBS="$LIBS"
1847LIBS="-lsingcf  $LIBS"
1848cat > conftest.$ac_ext <<EOF
1849#line 1850 "configure"
1850#include "confdefs.h"
1851/* Override any gcc2 internal prototype to avoid an error.  */
1852char atof();
1853
1854int main() { return 0; }
1855int t() {
1856atof()
1857; return 0; }
1858EOF
1859if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1860  rm -rf conftest*
1861  eval "ac_cv_lib_$ac_lib_var=yes"
1862else
1863  rm -rf conftest*
1864  eval "ac_cv_lib_$ac_lib_var=no"
1865fi
1866rm -f conftest*
1867LIBS="$ac_save_LIBS"
1868
1869fi
1870if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1871  echo "$ac_t""yes" 1>&6
1872    ac_tr_lib=HAVE_LIB`echo singcf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1873  cat >> confdefs.h <<EOF
1874#define $ac_tr_lib 1
1875EOF
1876
1877  LIBS="-lsingcf $LIBS"
1878
1879else
1880  echo "$ac_t""no" 1>&6
1881fi
1882
1883echo $ac_n "checking for -lsingfac""... $ac_c" 1>&6
1884ac_lib_var=`echo singfac_atof | tr '.-/+' '___p'`
1885if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1886  echo $ac_n "(cached) $ac_c" 1>&6
1887else
1888  ac_save_LIBS="$LIBS"
1889LIBS="-lsingfac  $LIBS"
1890cat > conftest.$ac_ext <<EOF
1891#line 1892 "configure"
1892#include "confdefs.h"
1893/* Override any gcc2 internal prototype to avoid an error.  */
1894char atof();
1895
1896int main() { return 0; }
1897int t() {
1898atof()
1899; return 0; }
1900EOF
1901if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1902  rm -rf conftest*
1903  eval "ac_cv_lib_$ac_lib_var=yes"
1904else
1905  rm -rf conftest*
1906  eval "ac_cv_lib_$ac_lib_var=no"
1907fi
1908rm -f conftest*
1909LIBS="$ac_save_LIBS"
1910
1911fi
1912if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1913  echo "$ac_t""yes" 1>&6
1914    ac_tr_lib=HAVE_LIB`echo singfac | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1915  cat >> confdefs.h <<EOF
1916#define $ac_tr_lib 1
1917EOF
1918
1919  LIBS="-lsingfac $LIBS"
1920
1921else
1922  echo "$ac_t""no" 1>&6
1923fi
1924
1925
1926for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h
1927do
1928ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1929echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1930if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1931  echo $ac_n "(cached) $ac_c" 1>&6
1932else
1933  cat > conftest.$ac_ext <<EOF
1934#line 1935 "configure"
1935#include "confdefs.h"
1936#include <$ac_hdr>
1937EOF
1938ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1939{ (eval echo configure:1940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1940ac_err=`grep -v '^ *+' conftest.out`
1941if test -z "$ac_err"; then
1942  rm -rf conftest*
1943  eval "ac_cv_header_$ac_safe=yes"
1944else
1945  echo "$ac_err" >&5
1946  rm -rf conftest*
1947  eval "ac_cv_header_$ac_safe=no"
1948fi
1949rm -f conftest*
1950fi
1951if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1952  echo "$ac_t""yes" 1>&6
1953    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1954  cat >> confdefs.h <<EOF
1955#define $ac_tr_hdr 1
1956EOF
1957 
1958else
1959  echo "$ac_t""no" 1>&6
1960fi
1961done
1962
1963
1964if test "$ac_cv_lib_gmp_mpq_init" = yes && \
1965 test "$ac_cv_header_gmp_h" = yes; then
1966    ac_gmp_ok=yes
1967fi
1968
1969if test "$ac_cv_lib_smallgmp_mpz_init" = yes && \
1970 test "$ac_cv_header_smallgmp_h" = yes && \
1971 test "$ac_cv_header_gmp_h" = yes; then
1972    ac_smallgmp_ok=yes
1973fi
1974
1975if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
1976 test "$ac_cv_lib_MPT_MPT_GetTree" && \
1977 test "$ac_cv_header_MP_h" = yes && \
1978 test "$ac_cv_header_MPT_h" = yes; then
1979  ac_MP_ok=yes
1980fi
1981
1982if test "$ac_cv_lib_singcf_atof" = yes && \
1983 test "$ac_cv_header_factory_h" = yes; then
1984  ac_factory_ok=yes
1985fi
1986
1987if test "$ac_cv_lib_singfac_atof" = yes && \
1988 test "$ac_cv_header_factor_h" = yes; then
1989  ac_libfac_ok=yes
1990fi
1991
1992if test "$with_apint" != buildin; then
1993  if test "$with_apint" = gmp; then
1994    if test "$ac_gmp_ok" = yes; then
1995      ac_will_have_gmp=yes
1996    elif test "$enable_gmp" = yes; then
1997      ac_will_have_gmp=yes
1998      echo "configure: warning: install gmp before making Singular" 1>&2
1999    else
2000      { echo "configure: error: Can not use with gmp: lib/header not found" 1>&2; exit 1; }
2001    fi
2002  elif test "$with_apint" = smallgmp; then
2003    if test "$ac_smallgmp_ok" = yes; then
2004      ac_will_have_gmp=yes
2005      ac_will_have_smallgmp=yes
2006    elif test "$enable_smallgmp" = yes; then
2007      ac_will_have_gmp=yes
2008      ac_will_have_smallgmp=yes
2009      echo "configure: warning: install smallgmp before making Singular" 1>&2
2010    else
2011      { echo "configure: error: Can not use with smallgmp: lib/header not found" 1>&2; exit 1; }
2012    fi
2013  elif test "$ac_gmp_ok" = yes; then
2014    ac_will_have_gmp=yes
2015  elif test "$ac_smallgmp_ok" = yes || test "$enable_smallgmp" = yes; then
2016    ac_will_have_gmp=yes
2017    ac_will_have_smallgmp=yes
2018  elif test "$enable_gmp" = yes; then
2019    ac_will_have_gmp=yes
2020  fi
2021fi
2022echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
2023if test "$ac_will_have_gmp" = yes; then
2024  cat >> confdefs.h <<\EOF
2025#define HAVE_GMP 1
2026EOF
2027
2028  if test "$ac_will_have_smallgmp" = yes; then
2029    NEED_LIBS="-lsmallgmp ${NEED_LIBS}"
2030    echo "$ac_t""smallgmp" 1>&6
2031    cat >> confdefs.h <<\EOF
2032#define HAVE_SMALLGMP 1
2033EOF
2034
2035  else
2036    NEED_LIBS="-lgmp ${NEED_LIBS}"
2037    echo "$ac_t""gmp" 1>&6
2038  fi
2039else
2040  echo "$ac_t""buildin" 1>&6
2041fi
2042
2043WITH_MP=no
2044if test "$with_MP" != no; then
2045  if test "$ac_will_have_gmp" != yes; then
2046    echo "configure: warning: Need gmp to build with MP" 1>&2
2047  else
2048    if test "$ac_MP_ok" = yes; then
2049      WITH_MP=yes
2050    elif test "$enable_MP" = yes; then
2051      WITH_MP=yes
2052      echo "configure: warning: Install MP before making Singular" 1>&2
2053    else
2054      echo "configure: warning: Need MP library to build with MP" 1>&2
2055    fi
2056  fi
2057fi
2058echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
2059
2060if test "$WITH_MP" = yes; then
2061  cat >> confdefs.h <<\EOF
2062#define HAVE_MPSR 1
2063EOF
2064
2065  NEED_LIBS="-lMPT -lMP ${NEED_LIBS}"
2066  echo "$ac_t""yes" 1>&6
2067else
2068  echo "$ac_t""no" 1>&6
2069fi
2070
2071WITH_FACTORY=no
2072if test "$with_factory" != no; then
2073  if test "$ac_will_have_gmp" != yes; then
2074    echo "configure: warning: Need gmp to build with factory" 1>&2
2075  else
2076    if test "$ac_factory_ok" = yes; then
2077      WITH_FACTORY=yes
2078    elif test "$enable_factory" = yes; then
2079      WITH_FACTORY=yes
2080      echo "configure: warning: Install factory before making Singular" 1>&2
2081    else
2082      echo "configure: warning: Need factory library to build with factory" 1>&2
2083    fi
2084  fi
2085fi
2086echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
2087
2088if test "$WITH_FACTORY" = yes; then
2089  cat >> confdefs.h <<\EOF
2090#define HAVE_FACTORY 1
2091EOF
2092
2093  NEED_LIBS="-lsingcf ${NEED_LIBS}"
2094  echo "$ac_t""yes" 1>&6
2095else
2096  echo "$ac_t""no" 1>&6
2097fi
2098
2099WITH_LIBFAC=no
2100if test "$with_libfac" != no; then
2101  if test "$WITH_FACTORY" != yes; then
2102    echo "configure: warning: Need factory to build with libfac" 1>&2
2103  else
2104    if test "$ac_libfac_ok" = yes; then
2105      WITH_LIBFAC=yes
2106    elif test "$enable_libfac" = yes; then
2107      WITH_LIBFAC=yes
2108      echo "configure: warning: Install libfac before making Singular" 1>&2
2109    else
2110      echo "configure: warning: Need libfac library to build with libfac" 1>&2
2111    fi
2112  fi
2113fi
2114echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
2115
2116if test "$WITH_LIBFAC" = yes; then
2117  cat >> confdefs.h <<\EOF
2118#define HAVE_LIBFAC_P 1
2119EOF
2120
2121  NEED_LIBS="-lsingfac ${NEED_LIBS}"
2122  echo "$ac_t""yes" 1>&6
2123else
2124  echo "$ac_t""no" 1>&6
2125fi
2126
2127
2128
2129echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2130if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2131  echo $ac_n "(cached) $ac_c" 1>&6
2132else
2133  cat > conftest.$ac_ext <<EOF
2134#line 2135 "configure"
2135#include "confdefs.h"
2136#include <stdlib.h>
2137#include <stdarg.h>
2138#include <string.h>
2139#include <float.h>
2140EOF
2141ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2142{ (eval echo configure:2143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2143ac_err=`grep -v '^ *+' conftest.out`
2144if test -z "$ac_err"; then
2145  rm -rf conftest*
2146  ac_cv_header_stdc=yes
2147else
2148  echo "$ac_err" >&5
2149  rm -rf conftest*
2150  ac_cv_header_stdc=no
2151fi
2152rm -f conftest*
2153
2154if test $ac_cv_header_stdc = yes; then
2155  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2156cat > conftest.$ac_ext <<EOF
2157#line 2158 "configure"
2158#include "confdefs.h"
2159#include <string.h>
2160EOF
2161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2162  egrep "memchr" >/dev/null 2>&1; then
2163  :
2164else
2165  rm -rf conftest*
2166  ac_cv_header_stdc=no
2167fi
2168rm -f conftest*
2169
2170fi
2171
2172if test $ac_cv_header_stdc = yes; then
2173  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2174cat > conftest.$ac_ext <<EOF
2175#line 2176 "configure"
2176#include "confdefs.h"
2177#include <stdlib.h>
2178EOF
2179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2180  egrep "free" >/dev/null 2>&1; then
2181  :
2182else
2183  rm -rf conftest*
2184  ac_cv_header_stdc=no
2185fi
2186rm -f conftest*
2187
2188fi
2189
2190if test $ac_cv_header_stdc = yes; then
2191  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2192if test "$cross_compiling" = yes; then
2193  :
2194else
2195cat > conftest.$ac_ext <<EOF
2196#line 2197 "configure"
2197#include "confdefs.h"
2198#include <ctype.h>
2199#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2200#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2201#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2202int main () { int i; for (i = 0; i < 256; i++)
2203if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2204exit (0); }
2205
2206EOF
2207{ (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2208if test -s conftest && (./conftest; exit) 2>/dev/null; then
2209  :
2210else
2211  ac_cv_header_stdc=no
2212fi
2213fi
2214rm -fr conftest*
2215fi
2216fi
2217
2218echo "$ac_t""$ac_cv_header_stdc" 1>&6
2219if test $ac_cv_header_stdc = yes; then
2220  cat >> confdefs.h <<\EOF
2221#define STDC_HEADERS 1
2222EOF
2223
2224fi
2225
2226
2227for ac_hdr in limits.h unistd.h
2228do
2229ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2230echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2231if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2232  echo $ac_n "(cached) $ac_c" 1>&6
2233else
2234  cat > conftest.$ac_ext <<EOF
2235#line 2236 "configure"
2236#include "confdefs.h"
2237#include <$ac_hdr>
2238EOF
2239ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2240{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2241ac_err=`grep -v '^ *+' conftest.out`
2242if test -z "$ac_err"; then
2243  rm -rf conftest*
2244  eval "ac_cv_header_$ac_safe=yes"
2245else
2246  echo "$ac_err" >&5
2247  rm -rf conftest*
2248  eval "ac_cv_header_$ac_safe=no"
2249fi
2250rm -f conftest*
2251fi
2252if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2253  echo "$ac_t""yes" 1>&6
2254    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2255  cat >> confdefs.h <<EOF
2256#define $ac_tr_hdr 1
2257EOF
2258 
2259else
2260  echo "$ac_t""no" 1>&6
2261{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2262fi
2263done
2264
2265
2266for ac_hdr in sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h sys/stat.h fcntl.h
2267do
2268ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2269echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2270if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2271  echo $ac_n "(cached) $ac_c" 1>&6
2272else
2273  cat > conftest.$ac_ext <<EOF
2274#line 2275 "configure"
2275#include "confdefs.h"
2276#include <$ac_hdr>
2277EOF
2278ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2279{ (eval echo configure:2280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2280ac_err=`grep -v '^ *+' conftest.out`
2281if test -z "$ac_err"; then
2282  rm -rf conftest*
2283  eval "ac_cv_header_$ac_safe=yes"
2284else
2285  echo "$ac_err" >&5
2286  rm -rf conftest*
2287  eval "ac_cv_header_$ac_safe=no"
2288fi
2289rm -f conftest*
2290fi
2291if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2292  echo "$ac_t""yes" 1>&6
2293    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2294  cat >> confdefs.h <<EOF
2295#define $ac_tr_hdr 1
2296EOF
2297 
2298else
2299  echo "$ac_t""no" 1>&6
2300fi
2301done
2302
2303
2304WITH_DBM=no
2305echo $ac_n "checking whether to build with dbm links""... $ac_c" 1>&6
2306if test "$with_dbm" != no; then
2307  cat >> confdefs.h <<\EOF
2308#define HAVE_DBM 1
2309EOF
2310 
2311  WITH_DBM=yes
2312 
2313  echo "$ac_t""yes" 1>&6
2314else
2315  echo "$ac_t""no" 1>&6
2316fi
2317
2318echo $ac_n "checking for working const""... $ac_c" 1>&6
2319if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2320  echo $ac_n "(cached) $ac_c" 1>&6
2321else
2322  cat > conftest.$ac_ext <<EOF
2323#line 2324 "configure"
2324#include "confdefs.h"
2325
2326int main() { return 0; }
2327int t() {
2328
2329/* Ultrix mips cc rejects this.  */
2330typedef int charset[2]; const charset x;
2331/* SunOS 4.1.1 cc rejects this.  */
2332char const *const *ccp;
2333char **p;
2334/* NEC SVR4.0.2 mips cc rejects this.  */
2335struct point {int x, y;};
2336static struct point const zero = {0,0};
2337/* AIX XL C 1.02.0.0 rejects this.
2338   It does not let you subtract one const X* pointer from another in an arm
2339   of an if-expression whose if-part is not a constant expression */
2340const char *g = "string";
2341ccp = &g + (g ? g-g : 0);
2342/* HPUX 7.0 cc rejects these. */
2343++ccp;
2344p = (char**) ccp;
2345ccp = (char const *const *) p;
2346{ /* SCO 3.2v4 cc rejects this.  */
2347  char *t;
2348  char const *s = 0 ? (char *) 0 : (char const *) 0;
2349
2350  *t++ = 0;
2351}
2352{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2353  int x[] = {25, 17};
2354  const int *foo = &x[0];
2355  ++foo;
2356}
2357{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2358  typedef const int *iptr;
2359  iptr p = 0;
2360  ++p;
2361}
2362{ /* AIX XL C 1.02.0.0 rejects this saying
2363     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2364  struct s { int j; const int *ap[3]; };
2365  struct s *b; b->j = 5;
2366}
2367{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2368  const int foo = 10;
2369}
2370
2371; return 0; }
2372EOF
2373if { (eval echo configure:2374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2374  rm -rf conftest*
2375  ac_cv_c_const=yes
2376else
2377  rm -rf conftest*
2378  ac_cv_c_const=no
2379fi
2380rm -f conftest*
2381
2382fi
2383
2384echo "$ac_t""$ac_cv_c_const" 1>&6
2385if test $ac_cv_c_const = no; then
2386  cat >> confdefs.h <<\EOF
2387#define const
2388EOF
2389
2390fi
2391
2392echo $ac_n "checking for inline""... $ac_c" 1>&6
2393if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2394  echo $ac_n "(cached) $ac_c" 1>&6
2395else
2396  ac_cv_c_inline=no
2397for ac_kw in inline __inline__ __inline; do
2398  cat > conftest.$ac_ext <<EOF
2399#line 2400 "configure"
2400#include "confdefs.h"
2401
2402int main() { return 0; }
2403int t() {
2404} $ac_kw foo() {
2405; return 0; }
2406EOF
2407if { (eval echo configure:2408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2408  rm -rf conftest*
2409  ac_cv_c_inline=$ac_kw; break
2410fi
2411rm -f conftest*
2412
2413done
2414
2415fi
2416
2417echo "$ac_t""$ac_cv_c_inline" 1>&6
2418case "$ac_cv_c_inline" in
2419  inline | yes) ;;
2420  no) cat >> confdefs.h <<\EOF
2421#define inline
2422EOF
2423 ;;
2424  *)  cat >> confdefs.h <<EOF
2425#define inline $ac_cv_c_inline
2426EOF
2427 ;;
2428esac
2429
2430echo $ac_n "checking for size_t""... $ac_c" 1>&6
2431if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2432  echo $ac_n "(cached) $ac_c" 1>&6
2433else
2434  cat > conftest.$ac_ext <<EOF
2435#line 2436 "configure"
2436#include "confdefs.h"
2437#include <sys/types.h>
2438#if STDC_HEADERS
2439#include <stdlib.h>
2440#endif
2441EOF
2442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2443  egrep "size_t" >/dev/null 2>&1; then
2444  rm -rf conftest*
2445  ac_cv_type_size_t=yes
2446else
2447  rm -rf conftest*
2448  ac_cv_type_size_t=no
2449fi
2450rm -f conftest*
2451
2452fi
2453echo "$ac_t""$ac_cv_type_size_t" 1>&6
2454if test $ac_cv_type_size_t = no; then
2455  cat >> confdefs.h <<\EOF
2456#define size_t unsigned
2457EOF
2458
2459fi
2460
2461echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2462if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2463  echo $ac_n "(cached) $ac_c" 1>&6
2464else
2465  cat > conftest.$ac_ext <<EOF
2466#line 2467 "configure"
2467#include "confdefs.h"
2468#include <sys/types.h>
2469#include <sys/time.h>
2470#include <time.h>
2471int main() { return 0; }
2472int t() {
2473struct tm *tp;
2474; return 0; }
2475EOF
2476if { (eval echo configure:2477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2477  rm -rf conftest*
2478  ac_cv_header_time=yes
2479else
2480  rm -rf conftest*
2481  ac_cv_header_time=no
2482fi
2483rm -f conftest*
2484
2485fi
2486
2487echo "$ac_t""$ac_cv_header_time" 1>&6
2488if test $ac_cv_header_time = yes; then
2489  cat >> confdefs.h <<\EOF
2490#define TIME_WITH_SYS_TIME 1
2491EOF
2492
2493fi
2494
2495echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2496if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2497  echo $ac_n "(cached) $ac_c" 1>&6
2498else
2499  cat > conftest.$ac_ext <<EOF
2500#line 2501 "configure"
2501#include "confdefs.h"
2502#include <sys/types.h>
2503#include <time.h>
2504int main() { return 0; }
2505int t() {
2506struct tm *tp; tp->tm_sec;
2507; return 0; }
2508EOF
2509if { (eval echo configure:2510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2510  rm -rf conftest*
2511  ac_cv_struct_tm=time.h
2512else
2513  rm -rf conftest*
2514  ac_cv_struct_tm=sys/time.h
2515fi
2516rm -f conftest*
2517
2518fi
2519
2520echo "$ac_t""$ac_cv_struct_tm" 1>&6
2521if test $ac_cv_struct_tm = sys/time.h; then
2522  cat >> confdefs.h <<\EOF
2523#define TM_IN_SYS_TIME 1
2524EOF
2525
2526fi
2527
2528
2529# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2530# for constant arguments.  Useless!
2531echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2532if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2533  echo $ac_n "(cached) $ac_c" 1>&6
2534else
2535  cat > conftest.$ac_ext <<EOF
2536#line 2537 "configure"
2537#include "confdefs.h"
2538#include <alloca.h>
2539int main() { return 0; }
2540int t() {
2541char *p = alloca(2 * sizeof(int));
2542; return 0; }
2543EOF
2544if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2545  rm -rf conftest*
2546  ac_cv_header_alloca_h=yes
2547else
2548  rm -rf conftest*
2549  ac_cv_header_alloca_h=no
2550fi
2551rm -f conftest*
2552
2553fi
2554
2555echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2556if test $ac_cv_header_alloca_h = yes; then
2557  cat >> confdefs.h <<\EOF
2558#define HAVE_ALLOCA_H 1
2559EOF
2560
2561fi
2562
2563echo $ac_n "checking for alloca""... $ac_c" 1>&6
2564if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
2565  echo $ac_n "(cached) $ac_c" 1>&6
2566else
2567  cat > conftest.$ac_ext <<EOF
2568#line 2569 "configure"
2569#include "confdefs.h"
2570
2571#ifdef __GNUC__
2572# define alloca __builtin_alloca
2573#else
2574# if HAVE_ALLOCA_H
2575#  include <alloca.h>
2576# else
2577#  ifdef _AIX
2578 #pragma alloca
2579#  else
2580#   ifndef alloca /* predefined by HP cc +Olibcalls */
2581char *alloca ();
2582#   endif
2583#  endif
2584# endif
2585#endif
2586
2587int main() { return 0; }
2588int t() {
2589char *p = (char *) alloca(1);
2590; return 0; }
2591EOF
2592if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2593  rm -rf conftest*
2594  ac_cv_func_alloca=yes
2595else
2596  rm -rf conftest*
2597  ac_cv_func_alloca=no
2598fi
2599rm -f conftest*
2600
2601fi
2602
2603echo "$ac_t""$ac_cv_func_alloca" 1>&6
2604if test $ac_cv_func_alloca = yes; then
2605  cat >> confdefs.h <<\EOF
2606#define HAVE_ALLOCA 1
2607EOF
2608
2609fi
2610
2611if test $ac_cv_func_alloca = no; then
2612  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2613  # that cause trouble.  Some versions do not even contain alloca or
2614  # contain a buggy version.  If you still want to use their alloca,
2615  # use ar to extract alloca.o from them instead of compiling alloca.c.
2616  ALLOCA=alloca.o
2617  cat >> confdefs.h <<\EOF
2618#define C_ALLOCA 1
2619EOF
2620
2621
2622echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2623if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2624  echo $ac_n "(cached) $ac_c" 1>&6
2625else
2626  cat > conftest.$ac_ext <<EOF
2627#line 2628 "configure"
2628#include "confdefs.h"
2629#if defined(CRAY) && ! defined(CRAY2)
2630webecray
2631#else
2632wenotbecray
2633#endif
2634
2635EOF
2636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2637  egrep "webecray" >/dev/null 2>&1; then
2638  rm -rf conftest*
2639  ac_cv_os_cray=yes
2640else
2641  rm -rf conftest*
2642  ac_cv_os_cray=no
2643fi
2644rm -f conftest*
2645
2646fi
2647
2648echo "$ac_t""$ac_cv_os_cray" 1>&6
2649if test $ac_cv_os_cray = yes; then
2650for ac_func in _getb67 GETB67 getb67; do
2651  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2652if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2653  echo $ac_n "(cached) $ac_c" 1>&6
2654else
2655  cat > conftest.$ac_ext <<EOF
2656#line 2657 "configure"
2657#include "confdefs.h"
2658/* System header to define __stub macros and hopefully few prototypes,
2659    which can conflict with char $ac_func(); below.  */
2660#include <assert.h>
2661/* Override any gcc2 internal prototype to avoid an error.  */
2662char $ac_func();
2663
2664int main() { return 0; }
2665int t() {
2666
2667/* The GNU C library defines this for functions which it implements
2668    to always fail with ENOSYS.  Some functions are actually named
2669    something starting with __ and the normal name is an alias.  */
2670#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2671choke me
2672#else
2673$ac_func();
2674#endif
2675
2676; return 0; }
2677EOF
2678if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2679  rm -rf conftest*
2680  eval "ac_cv_func_$ac_func=yes"
2681else
2682  rm -rf conftest*
2683  eval "ac_cv_func_$ac_func=no"
2684fi
2685rm -f conftest*
2686
2687fi
2688if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2689  echo "$ac_t""yes" 1>&6
2690  cat >> confdefs.h <<EOF
2691#define CRAY_STACKSEG_END $ac_func
2692EOF
2693
2694  break
2695else
2696  echo "$ac_t""no" 1>&6
2697fi
2698
2699done
2700fi
2701
2702echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2703if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2704  echo $ac_n "(cached) $ac_c" 1>&6
2705else
2706  if test "$cross_compiling" = yes; then
2707  ac_cv_c_stack_direction=0
2708else
2709cat > conftest.$ac_ext <<EOF
2710#line 2711 "configure"
2711#include "confdefs.h"
2712find_stack_direction ()
2713{
2714  static char *addr = 0;
2715  auto char dummy;
2716  if (addr == 0)
2717    {
2718      addr = &dummy;
2719      return find_stack_direction ();
2720    }
2721  else
2722    return (&dummy > addr) ? 1 : -1;
2723}
2724main ()
2725{
2726  exit (find_stack_direction() < 0);
2727}
2728EOF
2729{ (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2730if test -s conftest && (./conftest; exit) 2>/dev/null; then
2731  ac_cv_c_stack_direction=1
2732else
2733  ac_cv_c_stack_direction=-1
2734fi
2735fi
2736rm -fr conftest*
2737fi
2738
2739echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2740cat >> confdefs.h <<EOF
2741#define STACK_DIRECTION $ac_cv_c_stack_direction
2742EOF
2743
2744fi
2745
2746if test $ac_cv_prog_gcc = yes; then
2747    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2748if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2749  echo $ac_n "(cached) $ac_c" 1>&6
2750else
2751    ac_pattern="Autoconf.*'x'"
2752  cat > conftest.$ac_ext <<EOF
2753#line 2754 "configure"
2754#include "confdefs.h"
2755#include <sgtty.h>
2756Autoconf TIOCGETP
2757EOF
2758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2759  egrep "$ac_pattern" >/dev/null 2>&1; then
2760  rm -rf conftest*
2761  ac_cv_prog_gcc_traditional=yes
2762else
2763  rm -rf conftest*
2764  ac_cv_prog_gcc_traditional=no
2765fi
2766rm -f conftest*
2767
2768
2769  if test $ac_cv_prog_gcc_traditional = no; then
2770    cat > conftest.$ac_ext <<EOF
2771#line 2772 "configure"
2772#include "confdefs.h"
2773#include <termio.h>
2774Autoconf TCGETA
2775EOF
2776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2777  egrep "$ac_pattern" >/dev/null 2>&1; then
2778  rm -rf conftest*
2779  ac_cv_prog_gcc_traditional=yes
2780fi
2781rm -f conftest*
2782
2783  fi
2784fi
2785
2786echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2787  if test $ac_cv_prog_gcc_traditional = yes; then
2788    CC="$CC -traditional"
2789  fi
2790fi
2791
2792for ac_func in valloc getpagesize
2793do
2794echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2795if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2796  echo $ac_n "(cached) $ac_c" 1>&6
2797else
2798  cat > conftest.$ac_ext <<EOF
2799#line 2800 "configure"
2800#include "confdefs.h"
2801/* System header to define __stub macros and hopefully few prototypes,
2802    which can conflict with char $ac_func(); below.  */
2803#include <assert.h>
2804/* Override any gcc2 internal prototype to avoid an error.  */
2805char $ac_func();
2806
2807int main() { return 0; }
2808int t() {
2809
2810/* The GNU C library defines this for functions which it implements
2811    to always fail with ENOSYS.  Some functions are actually named
2812    something starting with __ and the normal name is an alias.  */
2813#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2814choke me
2815#else
2816$ac_func();
2817#endif
2818
2819; return 0; }
2820EOF
2821if { (eval echo configure:2822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2822  rm -rf conftest*
2823  eval "ac_cv_func_$ac_func=yes"
2824else
2825  rm -rf conftest*
2826  eval "ac_cv_func_$ac_func=no"
2827fi
2828rm -f conftest*
2829
2830fi
2831if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2832  echo "$ac_t""yes" 1>&6
2833    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2834  cat >> confdefs.h <<EOF
2835#define $ac_tr_func 1
2836EOF
2837 
2838else
2839  echo "$ac_t""no" 1>&6
2840fi
2841done
2842
2843echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2844if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
2845  echo $ac_n "(cached) $ac_c" 1>&6
2846else
2847  if test "$cross_compiling" = yes; then
2848  ac_cv_func_mmap=no
2849else
2850cat > conftest.$ac_ext <<EOF
2851#line 2852 "configure"
2852#include "confdefs.h"
2853
2854/* Thanks to Mike Haertel and Jim Avera for this test. */
2855#include <sys/types.h>
2856#include <fcntl.h>
2857#include <sys/mman.h>
2858
2859#ifndef HAVE_GETPAGESIZE
2860# include <sys/param.h>
2861# ifdef EXEC_PAGESIZE
2862#  define getpagesize() EXEC_PAGESIZE
2863# else
2864#  ifdef NBPG
2865#   define getpagesize() NBPG * CLSIZE
2866#   ifndef CLSIZE
2867#    define CLSIZE 1
2868#   endif
2869#  else
2870#   ifdef NBPC
2871#    define getpagesize() NBPC
2872#   else
2873#    define getpagesize() PAGESIZE /* SVR4 */
2874#   endif
2875#  endif
2876# endif
2877#endif
2878
2879#ifndef HAVE_VALLOC
2880# define valloc malloc
2881#endif
2882
2883#ifdef __cplusplus
2884extern "C" { void *valloc(unsigned), *malloc(unsigned); }
2885#else
2886char *valloc(), *malloc();
2887#endif
2888
2889int
2890main()
2891{
2892  char *buf1, *buf2, *buf3;
2893  int i = getpagesize(), j;
2894  int i2 = i * 2;
2895  int fd;
2896
2897  buf1 = (char *)valloc(i2);
2898  buf2 = (char *)valloc(i);
2899  buf3 = (char *)malloc(i2);
2900  for (j = 0; j < i2; ++j)
2901    *(buf1 + j) = rand();
2902  fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
2903  write(fd, buf1, i2);
2904  mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
2905  for (j = 0; j < i; ++j)
2906    if (*(buf1 + j) != *(buf2 + j))
2907      exit(1);
2908  lseek(fd, (long)i, 0);
2909  read(fd, buf2, i); /* read into mapped memory -- file should not change */
2910  /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
2911  lseek(fd, (long)0, 0);
2912  read(fd, buf3, i2);
2913  for (j = 0; j < i2; ++j)
2914    if (*(buf1 + j) != *(buf3 + j))
2915      exit(1);
2916  exit(0);
2917}
2918
2919EOF
2920{ (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2921if test -s conftest && (./conftest; exit) 2>/dev/null; then
2922  ac_cv_func_mmap=yes
2923else
2924  ac_cv_func_mmap=no
2925fi
2926fi
2927rm -fr conftest*
2928fi
2929
2930echo "$ac_t""$ac_cv_func_mmap" 1>&6
2931if test $ac_cv_func_mmap = yes; then
2932  cat >> confdefs.h <<\EOF
2933#define HAVE_MMAP 1
2934EOF
2935
2936fi
2937
2938echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2939if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2940  echo $ac_n "(cached) $ac_c" 1>&6
2941else
2942  cat > conftest.$ac_ext <<EOF
2943#line 2944 "configure"
2944#include "confdefs.h"
2945#include <sys/types.h>
2946#include <signal.h>
2947#ifdef signal
2948#undef signal
2949#endif
2950#ifdef __cplusplus
2951extern "C" void (*signal (int, void (*)(int)))(int);
2952#else
2953void (*signal ()) ();
2954#endif
2955
2956int main() { return 0; }
2957int t() {
2958int i;
2959; return 0; }
2960EOF
2961if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2962  rm -rf conftest*
2963  ac_cv_type_signal=void
2964else
2965  rm -rf conftest*
2966  ac_cv_type_signal=int
2967fi
2968rm -f conftest*
2969
2970fi
2971
2972echo "$ac_t""$ac_cv_type_signal" 1>&6
2973cat >> confdefs.h <<EOF
2974#define RETSIGTYPE $ac_cv_type_signal
2975EOF
2976
2977
2978echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2979if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2980  echo $ac_n "(cached) $ac_c" 1>&6
2981else
2982  cat > conftest.$ac_ext <<EOF
2983#line 2984 "configure"
2984#include "confdefs.h"
2985/* System header to define __stub macros and hopefully few prototypes,
2986    which can conflict with char vprintf(); below.  */
2987#include <assert.h>
2988/* Override any gcc2 internal prototype to avoid an error.  */
2989char vprintf();
2990
2991int main() { return 0; }
2992int t() {
2993
2994/* The GNU C library defines this for functions which it implements
2995    to always fail with ENOSYS.  Some functions are actually named
2996    something starting with __ and the normal name is an alias.  */
2997#if defined (__stub_vprintf) || defined (__stub___vprintf)
2998choke me
2999#else
3000vprintf();
3001#endif
3002
3003; return 0; }
3004EOF
3005if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3006  rm -rf conftest*
3007  eval "ac_cv_func_vprintf=yes"
3008else
3009  rm -rf conftest*
3010  eval "ac_cv_func_vprintf=no"
3011fi
3012rm -f conftest*
3013
3014fi
3015if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3016  echo "$ac_t""yes" 1>&6
3017  cat >> confdefs.h <<\EOF
3018#define HAVE_VPRINTF 1
3019EOF
3020
3021else
3022  echo "$ac_t""no" 1>&6
3023fi
3024
3025if test "$ac_cv_func_vprintf" != yes; then
3026echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3027if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3028  echo $ac_n "(cached) $ac_c" 1>&6
3029else
3030  cat > conftest.$ac_ext <<EOF
3031#line 3032 "configure"
3032#include "confdefs.h"
3033/* System header to define __stub macros and hopefully few prototypes,
3034    which can conflict with char _doprnt(); below.  */
3035#include <assert.h>
3036/* Override any gcc2 internal prototype to avoid an error.  */
3037char _doprnt();
3038
3039int main() { return 0; }
3040int t() {
3041
3042/* The GNU C library defines this for functions which it implements
3043    to always fail with ENOSYS.  Some functions are actually named
3044    something starting with __ and the normal name is an alias.  */
3045#if defined (__stub__doprnt) || defined (__stub____doprnt)
3046choke me
3047#else
3048_doprnt();
3049#endif
3050
3051; return 0; }
3052EOF
3053if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3054  rm -rf conftest*
3055  eval "ac_cv_func__doprnt=yes"
3056else
3057  rm -rf conftest*
3058  eval "ac_cv_func__doprnt=no"
3059fi
3060rm -f conftest*
3061
3062fi
3063if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3064  echo "$ac_t""yes" 1>&6
3065  cat >> confdefs.h <<\EOF
3066#define HAVE_DOPRNT 1
3067EOF
3068
3069else
3070  echo "$ac_t""no" 1>&6
3071fi
3072
3073fi
3074
3075for ac_func in gettimeofday strstr strtod strtol atexit bcopy
3076do
3077echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3078if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3079  echo $ac_n "(cached) $ac_c" 1>&6
3080else
3081  cat > conftest.$ac_ext <<EOF
3082#line 3083 "configure"
3083#include "confdefs.h"
3084/* System header to define __stub macros and hopefully few prototypes,
3085    which can conflict with char $ac_func(); below.  */
3086#include <assert.h>
3087/* Override any gcc2 internal prototype to avoid an error.  */
3088char $ac_func();
3089
3090int main() { return 0; }
3091int t() {
3092
3093/* The GNU C library defines this for functions which it implements
3094    to always fail with ENOSYS.  Some functions are actually named
3095    something starting with __ and the normal name is an alias.  */
3096#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3097choke me
3098#else
3099$ac_func();
3100#endif
3101
3102; return 0; }
3103EOF
3104if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3105  rm -rf conftest*
3106  eval "ac_cv_func_$ac_func=yes"
3107else
3108  rm -rf conftest*
3109  eval "ac_cv_func_$ac_func=no"
3110fi
3111rm -f conftest*
3112
3113fi
3114if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3115  echo "$ac_t""yes" 1>&6
3116    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3117  cat >> confdefs.h <<EOF
3118#define $ac_tr_func 1
3119EOF
3120 
3121else
3122  echo "$ac_t""no" 1>&6
3123fi
3124done
3125
3126
3127
3128echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3129if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3130  echo $ac_n "(cached) $ac_c" 1>&6
3131else
3132  if test "$cross_compiling" = yes; then
3133  if test "$ac_c_cross_dos" = yes; then
3134     ac_cv_shift=yes;
3135   else
3136     echo "$ac_t""no" 1>&6
3137     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
3138   fi
3139else
3140cat > conftest.$ac_ext <<EOF
3141#line 3142 "configure"
3142#include "confdefs.h"
3143 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
3144EOF
3145{ (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3146if test -s conftest && (./conftest; exit) 2>/dev/null; then
3147  ac_cv_shift=yes
3148else
3149  ac_cv_shift=no
3150fi
3151fi
3152rm -fr conftest*
3153fi
3154
3155
3156if test "$ac_cv_shift" = yes; then   
3157  echo "$ac_t""yes" 1>&6
3158else
3159  echo "$ac_t""no" 1>&6
3160  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3161fi
3162
3163echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3164if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3165  echo $ac_n "(cached) $ac_c" 1>&6
3166else
3167  if test "$cross_compiling" = yes; then
3168  ac_cv_returns_n_of_chars=no
3169else
3170cat > conftest.$ac_ext <<EOF
3171#line 3172 "configure"
3172#include "confdefs.h"
3173#include <stdio.h>
3174 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3175EOF
3176{ (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3177if test -s conftest && (./conftest; exit) 2>/dev/null; then
3178  ac_cv_returns_n_of_chars=yes
3179else
3180  ac_cv_returns_n_of_chars=no
3181fi
3182fi
3183rm -fr conftest*
3184fi
3185
3186if test "$ac_cv_returns_n_of_chars" = yes; then
3187  echo "$ac_t""yes" 1>&6
3188else
3189  echo "$ac_t""no" 1>&6
3190  cat >> confdefs.h <<\EOF
3191#define BSD_SPRINTF 1
3192EOF
3193
3194fi
3195
3196
3197echo $ac_n "checking size of char""... $ac_c" 1>&6
3198if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3199  echo $ac_n "(cached) $ac_c" 1>&6
3200else
3201  if test "$cross_compiling" = yes; then
3202  ac_cv_sizeof_char=1
3203else
3204cat > conftest.$ac_ext <<EOF
3205#line 3206 "configure"
3206#include "confdefs.h"
3207#include <stdio.h>
3208main()
3209{
3210  FILE *f=fopen("conftestval", "w");
3211  if (!f) exit(1);
3212  fprintf(f, "%d\n", sizeof(char));
3213  exit(0);
3214}
3215EOF
3216{ (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3217if test -s conftest && (./conftest; exit) 2>/dev/null; then
3218  ac_cv_sizeof_char=`cat conftestval`
3219else
3220  ac_cv_sizeof_char=0
3221fi
3222fi
3223rm -fr conftest*
3224fi
3225echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3226cat >> confdefs.h <<EOF
3227#define SIZEOF_CHAR $ac_cv_sizeof_char
3228EOF
3229
3230
3231echo $ac_n "checking size of short""... $ac_c" 1>&6
3232if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3233  echo $ac_n "(cached) $ac_c" 1>&6
3234else
3235  if test "$cross_compiling" = yes; then
3236  ac_cv_sizeof_short=2
3237else
3238cat > conftest.$ac_ext <<EOF
3239#line 3240 "configure"
3240#include "confdefs.h"
3241#include <stdio.h>
3242main()
3243{
3244  FILE *f=fopen("conftestval", "w");
3245  if (!f) exit(1);
3246  fprintf(f, "%d\n", sizeof(short));
3247  exit(0);
3248}
3249EOF
3250{ (eval echo configure:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3251if test -s conftest && (./conftest; exit) 2>/dev/null; then
3252  ac_cv_sizeof_short=`cat conftestval`
3253else
3254  ac_cv_sizeof_short=0
3255fi
3256fi
3257rm -fr conftest*
3258fi
3259echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3260cat >> confdefs.h <<EOF
3261#define SIZEOF_SHORT $ac_cv_sizeof_short
3262EOF
3263
3264
3265echo $ac_n "checking size of int""... $ac_c" 1>&6
3266if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3267  echo $ac_n "(cached) $ac_c" 1>&6
3268else
3269  if test "$cross_compiling" = yes; then
3270  ac_cv_sizeof_int=4
3271else
3272cat > conftest.$ac_ext <<EOF
3273#line 3274 "configure"
3274#include "confdefs.h"
3275#include <stdio.h>
3276main()
3277{
3278  FILE *f=fopen("conftestval", "w");
3279  if (!f) exit(1);
3280  fprintf(f, "%d\n", sizeof(int));
3281  exit(0);
3282}
3283EOF
3284{ (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3285if test -s conftest && (./conftest; exit) 2>/dev/null; then
3286  ac_cv_sizeof_int=`cat conftestval`
3287else
3288  ac_cv_sizeof_int=0
3289fi
3290fi
3291rm -fr conftest*
3292fi
3293echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3294cat >> confdefs.h <<EOF
3295#define SIZEOF_INT $ac_cv_sizeof_int
3296EOF
3297
3298
3299echo $ac_n "checking size of long""... $ac_c" 1>&6
3300if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3301  echo $ac_n "(cached) $ac_c" 1>&6
3302else
3303  if test "$cross_compiling" = yes; then
3304  ac_cv_sizeof_long=4
3305else
3306cat > conftest.$ac_ext <<EOF
3307#line 3308 "configure"
3308#include "confdefs.h"
3309#include <stdio.h>
3310main()
3311{
3312  FILE *f=fopen("conftestval", "w");
3313  if (!f) exit(1);
3314  fprintf(f, "%d\n", sizeof(long));
3315  exit(0);
3316}
3317EOF
3318{ (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3319if test -s conftest && (./conftest; exit) 2>/dev/null; then
3320  ac_cv_sizeof_long=`cat conftestval`
3321else
3322  ac_cv_sizeof_long=0
3323fi
3324fi
3325rm -fr conftest*
3326fi
3327echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3328cat >> confdefs.h <<EOF
3329#define SIZEOF_LONG $ac_cv_sizeof_long
3330EOF
3331
3332
3333echo $ac_n "checking size of void*""... $ac_c" 1>&6
3334if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3335  echo $ac_n "(cached) $ac_c" 1>&6
3336else
3337  if test "$cross_compiling" = yes; then
3338  ac_cv_sizeof_voidp=4
3339else
3340cat > conftest.$ac_ext <<EOF
3341#line 3342 "configure"
3342#include "confdefs.h"
3343#include <stdio.h>
3344main()
3345{
3346  FILE *f=fopen("conftestval", "w");
3347  if (!f) exit(1);
3348  fprintf(f, "%d\n", sizeof(void*));
3349  exit(0);
3350}
3351EOF
3352{ (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3353if test -s conftest && (./conftest; exit) 2>/dev/null; then
3354  ac_cv_sizeof_voidp=`cat conftestval`
3355else
3356  ac_cv_sizeof_voidp=0
3357fi
3358fi
3359rm -fr conftest*
3360fi
3361echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3362cat >> confdefs.h <<EOF
3363#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3364EOF
3365
3366
3367echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3368if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3369  echo $ac_n "(cached) $ac_c" 1>&6
3370else
3371  ac_cv_c_bigendian=unknown
3372# See if sys/param.h defines the BYTE_ORDER macro.
3373cat > conftest.$ac_ext <<EOF
3374#line 3375 "configure"
3375#include "confdefs.h"
3376#include <sys/types.h>
3377#include <sys/param.h>
3378int main() { return 0; }
3379int t() {
3380
3381#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3382 bogus endian macros
3383#endif
3384; return 0; }
3385EOF
3386if { (eval echo configure:3387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3387  rm -rf conftest*
3388  # It does; now see whether it defined to BIG_ENDIAN or not.
3389cat > conftest.$ac_ext <<EOF
3390#line 3391 "configure"
3391#include "confdefs.h"
3392#include <sys/types.h>
3393#include <sys/param.h>
3394int main() { return 0; }
3395int t() {
3396
3397#if BYTE_ORDER != BIG_ENDIAN
3398 not big endian
3399#endif
3400; return 0; }
3401EOF
3402if { (eval echo configure:3403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3403  rm -rf conftest*
3404  ac_cv_c_bigendian=yes
3405else
3406  rm -rf conftest*
3407  ac_cv_c_bigendian=no
3408fi
3409rm -f conftest*
3410
3411fi
3412rm -f conftest*
3413
3414if test $ac_cv_c_bigendian = unknown; then
3415if test "$cross_compiling" = yes; then
3416    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3417else
3418cat > conftest.$ac_ext <<EOF
3419#line 3420 "configure"
3420#include "confdefs.h"
3421main () {
3422  /* Are we little or big endian?  From Harbison&Steele.  */
3423  union
3424  {
3425    long l;
3426    char c[sizeof (long)];
3427  } u;
3428  u.l = 1;
3429  exit (u.c[sizeof (long) - 1] == 1);
3430}
3431EOF
3432{ (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
3433if test -s conftest && (./conftest; exit) 2>/dev/null; then
3434  ac_cv_c_bigendian=no
3435else
3436  ac_cv_c_bigendian=yes
3437fi
3438fi
3439rm -fr conftest*
3440fi
3441fi
3442
3443echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3444if test $ac_cv_c_bigendian = yes; then
3445  cat >> confdefs.h <<\EOF
3446#define WORDS_BIGENDIAN 1
3447EOF
3448
3449fi
3450
3451
3452if test "$ac_cv_sizeof_int" != 4; then
3453  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3454fi
3455
3456if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
3457  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3458fi
3459
3460echo $ac_n "checking which exponent types to use""... $ac_c" 1>&6
3461if test "$with_exp_type" = "char"; then
3462  echo "$ac_t""char" 1>&6
3463  cat >> confdefs.h <<\EOF
3464#define EXPONENT_TYPE char
3465EOF
3466
3467  cat >> confdefs.h <<\EOF
3468#define SIZEOF_EXPONENT SIZEOF_CHAR
3469EOF
3470
3471elif test "with_exp_type" = "int"; then
3472  echo "$ac_t""int" 1>&6
3473  cat >> confdefs.h <<\EOF
3474#define EXPONENT_TYPE int
3475EOF
3476
3477  cat >> confdefs.h <<\EOF
3478#define SIZEOF_EXPONENT SIZEOF_INT
3479EOF
3480
3481else
3482  echo "$ac_t""short" 1>&6
3483  cat >> confdefs.h <<\EOF
3484#define EXPONENT_TYPE short
3485EOF
3486
3487  cat >> confdefs.h <<\EOF
3488#define SIZEOF_TYPE SIZEOF_SHORT
3489EOF
3490
3491fi
3492
3493echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
3494if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
3495  echo $ac_n "(cached) $ac_c" 1>&6
3496else
3497  cat > conftest.$ac_ext <<EOF
3498#line 3499 "configure"
3499#include "confdefs.h"
3500#ifdef _AIX
3501    yes
3502#endif
3503
3504EOF
3505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3506  egrep "yes" >/dev/null 2>&1; then
3507  rm -rf conftest*
3508  ac_cv_is_aix=yes
3509else
3510  rm -rf conftest*
3511  ac_cv_is_aix=no
3512fi
3513rm -f conftest*
3514
3515fi
3516
3517if test "$ac_cv_is_aix" = yes; then
3518  echo "$ac_t""yes" 1>&6
3519else
3520  echo "$ac_t""no" 1>&6
3521fi
3522
3523if test ${GXX} = yes; then
3524  if test "$ac_cxxflags_set" = no; then
3525    CXXFLAGS="-O3 -w -fomit-frame-pointer"
3526  fi
3527  CXXTEMPLFLAGS="-fno-implicit-templates"
3528  if test "$ac_cv_is_aix" = yes; then
3529    CXXNOOPTFLAGS="-w"
3530  else
3531    CXXNOOPTFLAGS=$CXXFLAGS
3532  fi
3533  STATIC_LDFLAGS="-Xlinker -Bstatic"
3534else
3535  CXXTEMPFLAGS=""
3536  CXXNOOPTFLAGS=$CXXFLAGS
3537  STATIC_LDFLAGS=""
3538fi
3539
3540
3541
3542
3543if test ${GCC} = yes && test "$ac_cflags_set" = no ; then
3544  CFLAGS="-O3 -w -fomit-frame-pointer"
3545fi
3546
3547trap '' 1 2 15
3548cat > confcache <<\EOF
3549# This file is a shell script that caches the results of configure
3550# tests run on this system so they can be shared between configure
3551# scripts and configure runs.  It is not useful on other systems.
3552# If it contains results you don't want to keep, you may remove or edit it.
3553#
3554# By default, configure uses ./config.cache as the cache file,
3555# creating it if it does not exist already.  You can give configure
3556# the --cache-file=FILE option to use a different cache file; that is
3557# what configure does when it calls configure scripts in
3558# subdirectories, so they share the cache.
3559# Giving --cache-file=/dev/null disables caching, for debugging configure.
3560# config.status only pays attention to the cache file if you give it the
3561# --recheck option to rerun configure.
3562#
3563EOF
3564# Ultrix sh set writes to stderr and can't be redirected directly,
3565# and sets the high bit in the cache file unless we assign to the vars.
3566(set) 2>&1 |
3567  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3568  >> confcache
3569if cmp -s $cache_file confcache; then
3570  :
3571else
3572  if test -w $cache_file; then
3573    echo "updating cache $cache_file"
3574    cat confcache > $cache_file
3575  else
3576    echo "not updating unwritable cache $cache_file"
3577  fi
3578fi
3579rm -f confcache
3580
3581trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3582
3583test "x$prefix" = xNONE && prefix=$ac_default_prefix
3584# Let make expand exec_prefix.
3585test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3586
3587# Any assignment to VPATH causes Sun make to only execute
3588# the first set of double-colon rules, so remove it if not needed.
3589# If there is a colon in the path, we need to keep it.
3590if test "x$srcdir" = x.; then
3591  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3592fi
3593
3594trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3595
3596DEFS=-DHAVE_CONFIG_H
3597
3598# Without the "./", some shells look in PATH for config.status.
3599: ${CONFIG_STATUS=./config.status}
3600
3601echo creating $CONFIG_STATUS
3602rm -f $CONFIG_STATUS
3603cat > $CONFIG_STATUS <<EOF
3604#! /bin/sh
3605# Generated automatically by configure.
3606# Run this file to recreate the current configuration.
3607# This directory was configured as follows,
3608# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3609#
3610# $0 $ac_configure_args
3611#
3612# Compiler output produced by configure, useful for debugging
3613# configure, is in ./config.log if it exists.
3614
3615ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3616for ac_option
3617do
3618  case "\$ac_option" in
3619  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3620    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3621    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3622  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3623    echo "$CONFIG_STATUS generated by autoconf version 2.9"
3624    exit 0 ;;
3625  -help | --help | --hel | --he | --h)
3626    echo "\$ac_cs_usage"; exit 0 ;;
3627  *) echo "\$ac_cs_usage"; exit 1 ;;
3628  esac
3629done
3630
3631ac_given_srcdir=$srcdir
3632
3633trap 'rm -fr `echo "Makefile doc/Makefile mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3634EOF
3635cat >> $CONFIG_STATUS <<EOF
3636
3637# Protect against being on the right side of a sed subst in config.status.
3638sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3639 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3640$ac_vpsub
3641$extrasub
3642s%@CFLAGS@%$CFLAGS%g
3643s%@CPPFLAGS@%$CPPFLAGS%g
3644s%@CXXFLAGS@%$CXXFLAGS%g
3645s%@DEFS@%$DEFS%g
3646s%@LDFLAGS@%$LDFLAGS%g
3647s%@LIBS@%$LIBS%g
3648s%@exec_prefix@%$exec_prefix%g
3649s%@prefix@%$prefix%g
3650s%@program_transform_name@%$program_transform_name%g
3651s%@bindir@%$bindir%g
3652s%@sbindir@%$sbindir%g
3653s%@libexecdir@%$libexecdir%g
3654s%@datadir@%$datadir%g
3655s%@sysconfdir@%$sysconfdir%g
3656s%@sharedstatedir@%$sharedstatedir%g
3657s%@localstatedir@%$localstatedir%g
3658s%@libdir@%$libdir%g
3659s%@includedir@%$includedir%g
3660s%@oldincludedir@%$oldincludedir%g
3661s%@infodir@%$infodir%g
3662s%@mandir@%$mandir%g
3663s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
3664s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
3665s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
3666s%@LEX@%$LEX%g
3667s%@LEXLIB@%$LEXLIB%g
3668s%@LEXP@%$LEXP%g
3669s%@CC@%$CC%g
3670s%@CPP@%$CPP%g
3671s%@CXX@%$CXX%g
3672s%@SET_MAKE@%$SET_MAKE%g
3673s%@DOS_CROSS@%$DOS_CROSS%g
3674s%@singulardatadir@%$singulardatadir%g
3675s%@INFO@%$INFO%g
3676s%@PERL@%$PERL%g
3677s%@WITH_MP@%$WITH_MP%g
3678s%@WITH_FACTORY@%$WITH_FACTORY%g
3679s%@WITH_LIBFAC@%$WITH_LIBFAC%g
3680s%@NEED_LIBS@%$NEED_LIBS%g
3681s%@WITH_DBM@%$WITH_DBM%g
3682s%@ALLOCA@%$ALLOCA%g
3683s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
3684s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
3685s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
3686
3687CEOF
3688EOF
3689cat >> $CONFIG_STATUS <<EOF
3690
3691CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
3692EOF
3693cat >> $CONFIG_STATUS <<\EOF
3694for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3695  # Support "outfile[:infile]", defaulting infile="outfile.in".
3696  case "$ac_file" in
3697  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3698       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3699  *) ac_file_in="${ac_file}.in" ;;
3700  esac
3701
3702  # Adjust relative srcdir, etc. for subdirectories.
3703
3704  # Remove last slash and all that follows it.  Not all systems have dirname.
3705  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3706  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3707    # The file is in a subdirectory.
3708    test ! -d "$ac_dir" && mkdir "$ac_dir"
3709    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3710    # A "../" for each directory in $ac_dir_suffix.
3711    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3712  else
3713    ac_dir_suffix= ac_dots=
3714  fi
3715
3716  case "$ac_given_srcdir" in
3717  .)  srcdir=.
3718      if test -z "$ac_dots"; then top_srcdir=.
3719      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3720  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3721  *) # Relative path.
3722    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3723    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3724  esac
3725
3726  echo creating "$ac_file"
3727  rm -f "$ac_file"
3728  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3729  case "$ac_file" in
3730  *Makefile*) ac_comsub="1i\\
3731# $configure_input" ;;
3732  *) ac_comsub= ;;
3733  esac
3734  sed -e "$ac_comsub
3735s%@configure_input@%$configure_input%g
3736s%@srcdir@%$srcdir%g
3737s%@top_srcdir@%$top_srcdir%g
3738" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3739fi; done
3740rm -f conftest.subs
3741
3742# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3743# NAME is the cpp macro being defined and VALUE is the value it is being given.
3744#
3745# ac_d sets the value in "#define NAME VALUE" lines.
3746ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3747ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3748ac_dC='\3'
3749ac_dD='%g'
3750# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3751ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3752ac_uB='\([      ]\)%\1#\2define\3'
3753ac_uC=' '
3754ac_uD='\4%g'
3755# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3756ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3757ac_eB='$%\1#\2define\3'
3758ac_eC=' '
3759ac_eD='%g'
3760
3761CONFIG_HEADERS=${CONFIG_HEADERS-"mod2.h"}
3762for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3763  # Support "outfile[:infile]", defaulting infile="outfile.in".
3764  case "$ac_file" in
3765  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3766       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3767  *) ac_file_in="${ac_file}.in" ;;
3768  esac
3769
3770  echo creating $ac_file
3771
3772  rm -f conftest.frag conftest.in conftest.out
3773  cp $ac_given_srcdir/$ac_file_in conftest.in
3774
3775EOF
3776
3777# Transform confdefs.h into a sed script conftest.vals that substitutes
3778# the proper values into config.h.in to produce config.h.  And first:
3779# Protect against being on the right side of a sed subst in config.status.
3780# Protect against being in an unquoted here document in config.status.
3781rm -f conftest.vals
3782cat > conftest.hdr <<\EOF
3783s/[\\&%]/\\&/g
3784s%[\\$`]%\\&%g
3785s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3786s%ac_d%ac_u%gp
3787s%ac_u%ac_e%gp
3788EOF
3789sed -n -f conftest.hdr confdefs.h > conftest.vals
3790rm -f conftest.hdr
3791
3792# This sed command replaces #undef with comments.  This is necessary, for
3793# example, in the case of _POSIX_SOURCE, which is predefined and required
3794# on some systems where configure will not decide to define it.
3795cat >> conftest.vals <<\EOF
3796s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3797EOF
3798
3799# Break up conftest.vals because some shells have a limit on
3800# the size of here documents, and old seds have small limits too.
3801# Maximum number of lines to put in a single here document.
3802ac_max_here_lines=12
3803
3804rm -f conftest.tail
3805while :
3806do
3807  ac_lines=`grep -c . conftest.vals`
3808  # grep -c gives empty output for an empty file on some AIX systems.
3809  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3810  # Write a limited-size here document to conftest.frag.
3811  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3812  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3813  echo 'CEOF
3814  sed -f conftest.frag conftest.in > conftest.out
3815  rm -f conftest.in
3816  mv conftest.out conftest.in
3817' >> $CONFIG_STATUS
3818  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3819  rm -f conftest.vals
3820  mv conftest.tail conftest.vals
3821done
3822rm -f conftest.vals
3823
3824cat >> $CONFIG_STATUS <<\EOF
3825  rm -f conftest.frag conftest.h
3826  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3827  cat conftest.in >> conftest.h
3828  rm -f conftest.in
3829  if cmp -s $ac_file conftest.h 2>/dev/null; then
3830    echo "$ac_file is unchanged"
3831    rm -f conftest.h
3832  else
3833    rm -f $ac_file
3834    mv conftest.h $ac_file
3835  fi
3836fi; done
3837
3838
3839\
3840 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
3841exit 0
3842EOF
3843chmod +x $CONFIG_STATUS
3844rm -fr confdefs* $ac_clean_files
3845test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3846
3847
3848
3849
3850
Note: See TracBrowser for help on using the repository browser.