source: git/Singular/configure @ 3bb3e6a

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