source: git/Singular/configure @ d2b2a7

spielwiese
Last change on this file since d2b2a7 was 1c452c, checked in by Olaf Bachmann <obachman@…>, 26 years ago
1998-04-28 Olaf Bachmann <obachman@mathematik.uni-kl.de> * kstd2.cc (redHomog): Some more ouput for KDEBUG && TEST_OPT_DEBUG * mminit.cc: introduced memory(2) which measures physical memory consumption using the system call sbrk (this never lies!) git-svn-id: file:///usr/local/Singular/svn/trunk@1504 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 118.7 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=1
548SINGULAR_SUB_VERSION=8
549VERSION_DATE="April 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
2417echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2418echo "configure:2419: checking whether stat file-mode macros are broken" >&5
2419if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2420  echo $ac_n "(cached) $ac_c" 1>&6
2421else
2422  cat > conftest.$ac_ext <<EOF
2423#line 2424 "configure"
2424#include "confdefs.h"
2425#include <sys/types.h>
2426#include <sys/stat.h>
2427
2428#if defined(S_ISBLK) && defined(S_IFDIR)
2429# if S_ISBLK (S_IFDIR)
2430You lose.
2431# endif
2432#endif
2433
2434#if defined(S_ISBLK) && defined(S_IFCHR)
2435# if S_ISBLK (S_IFCHR)
2436You lose.
2437# endif
2438#endif
2439
2440#if defined(S_ISLNK) && defined(S_IFREG)
2441# if S_ISLNK (S_IFREG)
2442You lose.
2443# endif
2444#endif
2445
2446#if defined(S_ISSOCK) && defined(S_IFREG)
2447# if S_ISSOCK (S_IFREG)
2448You lose.
2449# endif
2450#endif
2451
2452EOF
2453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2454  egrep "You lose" >/dev/null 2>&1; then
2455  rm -rf conftest*
2456  ac_cv_header_stat_broken=yes
2457else
2458  rm -rf conftest*
2459  ac_cv_header_stat_broken=no
2460fi
2461rm -f conftest*
2462
2463fi
2464
2465echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2466if test $ac_cv_header_stat_broken = yes; then
2467  cat >> confdefs.h <<\EOF
2468#define STAT_MACROS_BROKEN 1
2469EOF
2470
2471fi
2472
2473for ac_hdr in limits.h unistd.h
2474do
2475ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2476echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2477echo "configure:2478: checking for $ac_hdr" >&5
2478if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2479  echo $ac_n "(cached) $ac_c" 1>&6
2480else
2481  cat > conftest.$ac_ext <<EOF
2482#line 2483 "configure"
2483#include "confdefs.h"
2484#include <$ac_hdr>
2485EOF
2486ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2487{ (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2488ac_err=`grep -v '^ *+' conftest.out`
2489if test -z "$ac_err"; then
2490  rm -rf conftest*
2491  eval "ac_cv_header_$ac_safe=yes"
2492else
2493  echo "$ac_err" >&5
2494  echo "configure: failed program was:" >&5
2495  cat conftest.$ac_ext >&5
2496  rm -rf conftest*
2497  eval "ac_cv_header_$ac_safe=no"
2498fi
2499rm -f conftest*
2500fi
2501if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2502  echo "$ac_t""yes" 1>&6
2503    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2504  cat >> confdefs.h <<EOF
2505#define $ac_tr_hdr 1
2506EOF
2507 
2508else
2509  echo "$ac_t""no" 1>&6
2510{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2511fi
2512done
2513
2514
2515for 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
2516do
2517ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2518echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2519echo "configure:2520: checking for $ac_hdr" >&5
2520if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2521  echo $ac_n "(cached) $ac_c" 1>&6
2522else
2523  cat > conftest.$ac_ext <<EOF
2524#line 2525 "configure"
2525#include "confdefs.h"
2526#include <$ac_hdr>
2527EOF
2528ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2529{ (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2530ac_err=`grep -v '^ *+' conftest.out`
2531if test -z "$ac_err"; then
2532  rm -rf conftest*
2533  eval "ac_cv_header_$ac_safe=yes"
2534else
2535  echo "$ac_err" >&5
2536  echo "configure: failed program was:" >&5
2537  cat conftest.$ac_ext >&5
2538  rm -rf conftest*
2539  eval "ac_cv_header_$ac_safe=no"
2540fi
2541rm -f conftest*
2542fi
2543if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2544  echo "$ac_t""yes" 1>&6
2545    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2546  cat >> confdefs.h <<EOF
2547#define $ac_tr_hdr 1
2548EOF
2549 
2550else
2551  echo "$ac_t""no" 1>&6
2552fi
2553done
2554
2555
2556WITH_DBM=no
2557echo $ac_n "checking whether to build with dbm links""... $ac_c" 1>&6
2558echo "configure:2559: checking whether to build with dbm links" >&5
2559if test "$with_dbm" != no; then
2560  cat >> confdefs.h <<\EOF
2561#define HAVE_DBM 1
2562EOF
2563 
2564  WITH_DBM=yes
2565 
2566  echo "$ac_t""yes" 1>&6
2567else
2568  echo "$ac_t""no" 1>&6
2569fi
2570
2571echo $ac_n "checking for working const""... $ac_c" 1>&6
2572echo "configure:2573: checking for working const" >&5
2573if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2574  echo $ac_n "(cached) $ac_c" 1>&6
2575else
2576  cat > conftest.$ac_ext <<EOF
2577#line 2578 "configure"
2578#include "confdefs.h"
2579
2580int main() {
2581
2582/* Ultrix mips cc rejects this.  */
2583typedef int charset[2]; const charset x;
2584/* SunOS 4.1.1 cc rejects this.  */
2585char const *const *ccp;
2586char **p;
2587/* NEC SVR4.0.2 mips cc rejects this.  */
2588struct point {int x, y;};
2589static struct point const zero = {0,0};
2590/* AIX XL C 1.02.0.0 rejects this.
2591   It does not let you subtract one const X* pointer from another in an arm
2592   of an if-expression whose if-part is not a constant expression */
2593const char *g = "string";
2594ccp = &g + (g ? g-g : 0);
2595/* HPUX 7.0 cc rejects these. */
2596++ccp;
2597p = (char**) ccp;
2598ccp = (char const *const *) p;
2599{ /* SCO 3.2v4 cc rejects this.  */
2600  char *t;
2601  char const *s = 0 ? (char *) 0 : (char const *) 0;
2602
2603  *t++ = 0;
2604}
2605{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2606  int x[] = {25, 17};
2607  const int *foo = &x[0];
2608  ++foo;
2609}
2610{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2611  typedef const int *iptr;
2612  iptr p = 0;
2613  ++p;
2614}
2615{ /* AIX XL C 1.02.0.0 rejects this saying
2616     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2617  struct s { int j; const int *ap[3]; };
2618  struct s *b; b->j = 5;
2619}
2620{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2621  const int foo = 10;
2622}
2623
2624; return 0; }
2625EOF
2626if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2627  rm -rf conftest*
2628  ac_cv_c_const=yes
2629else
2630  echo "configure: failed program was:" >&5
2631  cat conftest.$ac_ext >&5
2632  rm -rf conftest*
2633  ac_cv_c_const=no
2634fi
2635rm -f conftest*
2636fi
2637
2638echo "$ac_t""$ac_cv_c_const" 1>&6
2639if test $ac_cv_c_const = no; then
2640  cat >> confdefs.h <<\EOF
2641#define const
2642EOF
2643
2644fi
2645
2646echo $ac_n "checking for inline""... $ac_c" 1>&6
2647echo "configure:2648: checking for inline" >&5
2648if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2649  echo $ac_n "(cached) $ac_c" 1>&6
2650else
2651  ac_cv_c_inline=no
2652for ac_kw in inline __inline__ __inline; do
2653  cat > conftest.$ac_ext <<EOF
2654#line 2655 "configure"
2655#include "confdefs.h"
2656
2657int main() {
2658} $ac_kw foo() {
2659; return 0; }
2660EOF
2661if { (eval echo configure:2662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2662  rm -rf conftest*
2663  ac_cv_c_inline=$ac_kw; break
2664else
2665  echo "configure: failed program was:" >&5
2666  cat conftest.$ac_ext >&5
2667fi
2668rm -f conftest*
2669done
2670
2671fi
2672
2673echo "$ac_t""$ac_cv_c_inline" 1>&6
2674case "$ac_cv_c_inline" in
2675  inline | yes) ;;
2676  no) cat >> confdefs.h <<\EOF
2677#define inline
2678EOF
2679 ;;
2680  *)  cat >> confdefs.h <<EOF
2681#define inline $ac_cv_c_inline
2682EOF
2683 ;;
2684esac
2685
2686echo $ac_n "checking for size_t""... $ac_c" 1>&6
2687echo "configure:2688: checking for size_t" >&5
2688if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2689  echo $ac_n "(cached) $ac_c" 1>&6
2690else
2691  cat > conftest.$ac_ext <<EOF
2692#line 2693 "configure"
2693#include "confdefs.h"
2694#include <sys/types.h>
2695#if STDC_HEADERS
2696#include <stdlib.h>
2697#include <stddef.h>
2698#endif
2699EOF
2700if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2701  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2702  rm -rf conftest*
2703  ac_cv_type_size_t=yes
2704else
2705  rm -rf conftest*
2706  ac_cv_type_size_t=no
2707fi
2708rm -f conftest*
2709
2710fi
2711echo "$ac_t""$ac_cv_type_size_t" 1>&6
2712if test $ac_cv_type_size_t = no; then
2713  cat >> confdefs.h <<\EOF
2714#define size_t unsigned
2715EOF
2716
2717fi
2718
2719echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2720echo "configure:2721: checking whether time.h and sys/time.h may both be included" >&5
2721if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2722  echo $ac_n "(cached) $ac_c" 1>&6
2723else
2724  cat > conftest.$ac_ext <<EOF
2725#line 2726 "configure"
2726#include "confdefs.h"
2727#include <sys/types.h>
2728#include <sys/time.h>
2729#include <time.h>
2730int main() {
2731struct tm *tp;
2732; return 0; }
2733EOF
2734if { (eval echo configure:2735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2735  rm -rf conftest*
2736  ac_cv_header_time=yes
2737else
2738  echo "configure: failed program was:" >&5
2739  cat conftest.$ac_ext >&5
2740  rm -rf conftest*
2741  ac_cv_header_time=no
2742fi
2743rm -f conftest*
2744fi
2745
2746echo "$ac_t""$ac_cv_header_time" 1>&6
2747if test $ac_cv_header_time = yes; then
2748  cat >> confdefs.h <<\EOF
2749#define TIME_WITH_SYS_TIME 1
2750EOF
2751
2752fi
2753
2754echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2755echo "configure:2756: checking whether struct tm is in sys/time.h or time.h" >&5
2756if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2757  echo $ac_n "(cached) $ac_c" 1>&6
2758else
2759  cat > conftest.$ac_ext <<EOF
2760#line 2761 "configure"
2761#include "confdefs.h"
2762#include <sys/types.h>
2763#include <time.h>
2764int main() {
2765struct tm *tp; tp->tm_sec;
2766; return 0; }
2767EOF
2768if { (eval echo configure:2769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2769  rm -rf conftest*
2770  ac_cv_struct_tm=time.h
2771else
2772  echo "configure: failed program was:" >&5
2773  cat conftest.$ac_ext >&5
2774  rm -rf conftest*
2775  ac_cv_struct_tm=sys/time.h
2776fi
2777rm -f conftest*
2778fi
2779
2780echo "$ac_t""$ac_cv_struct_tm" 1>&6
2781if test $ac_cv_struct_tm = sys/time.h; then
2782  cat >> confdefs.h <<\EOF
2783#define TM_IN_SYS_TIME 1
2784EOF
2785
2786fi
2787
2788
2789# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2790# for constant arguments.  Useless!
2791echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2792echo "configure:2793: checking for working alloca.h" >&5
2793if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2794  echo $ac_n "(cached) $ac_c" 1>&6
2795else
2796  cat > conftest.$ac_ext <<EOF
2797#line 2798 "configure"
2798#include "confdefs.h"
2799#include <alloca.h>
2800int main() {
2801char *p = alloca(2 * sizeof(int));
2802; return 0; }
2803EOF
2804if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2805  rm -rf conftest*
2806  ac_cv_header_alloca_h=yes
2807else
2808  echo "configure: failed program was:" >&5
2809  cat conftest.$ac_ext >&5
2810  rm -rf conftest*
2811  ac_cv_header_alloca_h=no
2812fi
2813rm -f conftest*
2814fi
2815
2816echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2817if test $ac_cv_header_alloca_h = yes; then
2818  cat >> confdefs.h <<\EOF
2819#define HAVE_ALLOCA_H 1
2820EOF
2821
2822fi
2823
2824echo $ac_n "checking for alloca""... $ac_c" 1>&6
2825echo "configure:2826: checking for alloca" >&5
2826if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2827  echo $ac_n "(cached) $ac_c" 1>&6
2828else
2829  cat > conftest.$ac_ext <<EOF
2830#line 2831 "configure"
2831#include "confdefs.h"
2832
2833#ifdef __GNUC__
2834# define alloca __builtin_alloca
2835#else
2836# if HAVE_ALLOCA_H
2837#  include <alloca.h>
2838# else
2839#  ifdef _AIX
2840 #pragma alloca
2841#  else
2842#   ifndef alloca /* predefined by HP cc +Olibcalls */
2843char *alloca ();
2844#   endif
2845#  endif
2846# endif
2847#endif
2848
2849int main() {
2850char *p = (char *) alloca(1);
2851; return 0; }
2852EOF
2853if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2854  rm -rf conftest*
2855  ac_cv_func_alloca_works=yes
2856else
2857  echo "configure: failed program was:" >&5
2858  cat conftest.$ac_ext >&5
2859  rm -rf conftest*
2860  ac_cv_func_alloca_works=no
2861fi
2862rm -f conftest*
2863fi
2864
2865echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2866if test $ac_cv_func_alloca_works = yes; then
2867  cat >> confdefs.h <<\EOF
2868#define HAVE_ALLOCA 1
2869EOF
2870
2871fi
2872
2873if test $ac_cv_func_alloca_works = no; then
2874  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2875  # that cause trouble.  Some versions do not even contain alloca or
2876  # contain a buggy version.  If you still want to use their alloca,
2877  # use ar to extract alloca.o from them instead of compiling alloca.c.
2878  ALLOCA=alloca.o
2879  cat >> confdefs.h <<\EOF
2880#define C_ALLOCA 1
2881EOF
2882
2883
2884echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2885echo "configure:2886: checking whether alloca needs Cray hooks" >&5
2886if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2887  echo $ac_n "(cached) $ac_c" 1>&6
2888else
2889  cat > conftest.$ac_ext <<EOF
2890#line 2891 "configure"
2891#include "confdefs.h"
2892#if defined(CRAY) && ! defined(CRAY2)
2893webecray
2894#else
2895wenotbecray
2896#endif
2897
2898EOF
2899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2900  egrep "webecray" >/dev/null 2>&1; then
2901  rm -rf conftest*
2902  ac_cv_os_cray=yes
2903else
2904  rm -rf conftest*
2905  ac_cv_os_cray=no
2906fi
2907rm -f conftest*
2908
2909fi
2910
2911echo "$ac_t""$ac_cv_os_cray" 1>&6
2912if test $ac_cv_os_cray = yes; then
2913for ac_func in _getb67 GETB67 getb67; do
2914  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2915echo "configure:2916: checking for $ac_func" >&5
2916if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2917  echo $ac_n "(cached) $ac_c" 1>&6
2918else
2919  cat > conftest.$ac_ext <<EOF
2920#line 2921 "configure"
2921#include "confdefs.h"
2922/* System header to define __stub macros and hopefully few prototypes,
2923    which can conflict with char $ac_func(); below.  */
2924#include <assert.h>
2925/* Override any gcc2 internal prototype to avoid an error.  */
2926/* We use char because int might match the return type of a gcc2
2927    builtin and then its argument prototype would still apply.  */
2928char $ac_func();
2929
2930int main() {
2931
2932/* The GNU C library defines this for functions which it implements
2933    to always fail with ENOSYS.  Some functions are actually named
2934    something starting with __ and the normal name is an alias.  */
2935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2936choke me
2937#else
2938$ac_func();
2939#endif
2940
2941; return 0; }
2942EOF
2943if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2944  rm -rf conftest*
2945  eval "ac_cv_func_$ac_func=yes"
2946else
2947  echo "configure: failed program was:" >&5
2948  cat conftest.$ac_ext >&5
2949  rm -rf conftest*
2950  eval "ac_cv_func_$ac_func=no"
2951fi
2952rm -f conftest*
2953fi
2954
2955if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2956  echo "$ac_t""yes" 1>&6
2957  cat >> confdefs.h <<EOF
2958#define CRAY_STACKSEG_END $ac_func
2959EOF
2960
2961  break
2962else
2963  echo "$ac_t""no" 1>&6
2964fi
2965
2966done
2967fi
2968
2969echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2970echo "configure:2971: checking stack direction for C alloca" >&5
2971if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2972  echo $ac_n "(cached) $ac_c" 1>&6
2973else
2974  if test "$cross_compiling" = yes; then
2975  ac_cv_c_stack_direction=0
2976else
2977  cat > conftest.$ac_ext <<EOF
2978#line 2979 "configure"
2979#include "confdefs.h"
2980find_stack_direction ()
2981{
2982  static char *addr = 0;
2983  auto char dummy;
2984  if (addr == 0)
2985    {
2986      addr = &dummy;
2987      return find_stack_direction ();
2988    }
2989  else
2990    return (&dummy > addr) ? 1 : -1;
2991}
2992main ()
2993{
2994  exit (find_stack_direction() < 0);
2995}
2996EOF
2997if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2998then
2999  ac_cv_c_stack_direction=1
3000else
3001  echo "configure: failed program was:" >&5
3002  cat conftest.$ac_ext >&5
3003  rm -fr conftest*
3004  ac_cv_c_stack_direction=-1
3005fi
3006rm -fr conftest*
3007fi
3008
3009fi
3010
3011echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3012cat >> confdefs.h <<EOF
3013#define STACK_DIRECTION $ac_cv_c_stack_direction
3014EOF
3015
3016fi
3017
3018if test $ac_cv_prog_gcc = yes; then
3019    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3020echo "configure:3021: checking whether ${CC-cc} needs -traditional" >&5
3021if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3022  echo $ac_n "(cached) $ac_c" 1>&6
3023else
3024    ac_pattern="Autoconf.*'x'"
3025  cat > conftest.$ac_ext <<EOF
3026#line 3027 "configure"
3027#include "confdefs.h"
3028#include <sgtty.h>
3029Autoconf TIOCGETP
3030EOF
3031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3032  egrep "$ac_pattern" >/dev/null 2>&1; then
3033  rm -rf conftest*
3034  ac_cv_prog_gcc_traditional=yes
3035else
3036  rm -rf conftest*
3037  ac_cv_prog_gcc_traditional=no
3038fi
3039rm -f conftest*
3040
3041
3042  if test $ac_cv_prog_gcc_traditional = no; then
3043    cat > conftest.$ac_ext <<EOF
3044#line 3045 "configure"
3045#include "confdefs.h"
3046#include <termio.h>
3047Autoconf TCGETA
3048EOF
3049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3050  egrep "$ac_pattern" >/dev/null 2>&1; then
3051  rm -rf conftest*
3052  ac_cv_prog_gcc_traditional=yes
3053fi
3054rm -f conftest*
3055
3056  fi
3057fi
3058
3059echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3060  if test $ac_cv_prog_gcc_traditional = yes; then
3061    CC="$CC -traditional"
3062  fi
3063fi
3064
3065for ac_hdr in unistd.h
3066do
3067ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3068echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3069echo "configure:3070: checking for $ac_hdr" >&5
3070if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3071  echo $ac_n "(cached) $ac_c" 1>&6
3072else
3073  cat > conftest.$ac_ext <<EOF
3074#line 3075 "configure"
3075#include "confdefs.h"
3076#include <$ac_hdr>
3077EOF
3078ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3079{ (eval echo configure:3080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3080ac_err=`grep -v '^ *+' conftest.out`
3081if test -z "$ac_err"; then
3082  rm -rf conftest*
3083  eval "ac_cv_header_$ac_safe=yes"
3084else
3085  echo "$ac_err" >&5
3086  echo "configure: failed program was:" >&5
3087  cat conftest.$ac_ext >&5
3088  rm -rf conftest*
3089  eval "ac_cv_header_$ac_safe=no"
3090fi
3091rm -f conftest*
3092fi
3093if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3094  echo "$ac_t""yes" 1>&6
3095    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3096  cat >> confdefs.h <<EOF
3097#define $ac_tr_hdr 1
3098EOF
3099 
3100else
3101  echo "$ac_t""no" 1>&6
3102fi
3103done
3104
3105for ac_func in getpagesize
3106do
3107echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3108echo "configure:3109: checking for $ac_func" >&5
3109if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3110  echo $ac_n "(cached) $ac_c" 1>&6
3111else
3112  cat > conftest.$ac_ext <<EOF
3113#line 3114 "configure"
3114#include "confdefs.h"
3115/* System header to define __stub macros and hopefully few prototypes,
3116    which can conflict with char $ac_func(); below.  */
3117#include <assert.h>
3118/* Override any gcc2 internal prototype to avoid an error.  */
3119/* We use char because int might match the return type of a gcc2
3120    builtin and then its argument prototype would still apply.  */
3121char $ac_func();
3122
3123int main() {
3124
3125/* The GNU C library defines this for functions which it implements
3126    to always fail with ENOSYS.  Some functions are actually named
3127    something starting with __ and the normal name is an alias.  */
3128#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3129choke me
3130#else
3131$ac_func();
3132#endif
3133
3134; return 0; }
3135EOF
3136if { (eval echo configure:3137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3137  rm -rf conftest*
3138  eval "ac_cv_func_$ac_func=yes"
3139else
3140  echo "configure: failed program was:" >&5
3141  cat conftest.$ac_ext >&5
3142  rm -rf conftest*
3143  eval "ac_cv_func_$ac_func=no"
3144fi
3145rm -f conftest*
3146fi
3147
3148if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3149  echo "$ac_t""yes" 1>&6
3150    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3151  cat >> confdefs.h <<EOF
3152#define $ac_tr_func 1
3153EOF
3154 
3155else
3156  echo "$ac_t""no" 1>&6
3157fi
3158done
3159
3160echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3161echo "configure:3162: checking for working mmap" >&5
3162if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3163  echo $ac_n "(cached) $ac_c" 1>&6
3164else
3165  if test "$cross_compiling" = yes; then
3166  ac_cv_func_mmap_fixed_mapped=no
3167else
3168  cat > conftest.$ac_ext <<EOF
3169#line 3170 "configure"
3170#include "confdefs.h"
3171
3172/* Thanks to Mike Haertel and Jim Avera for this test.
3173   Here is a matrix of mmap possibilities:
3174        mmap private not fixed
3175        mmap private fixed at somewhere currently unmapped
3176        mmap private fixed at somewhere already mapped
3177        mmap shared not fixed
3178        mmap shared fixed at somewhere currently unmapped
3179        mmap shared fixed at somewhere already mapped
3180   For private mappings, we should verify that changes cannot be read()
3181   back from the file, nor mmap's back from the file at a different
3182   address.  (There have been systems where private was not correctly
3183   implemented like the infamous i386 svr4.0, and systems where the
3184   VM page cache was not coherent with the filesystem buffer cache
3185   like early versions of FreeBSD and possibly contemporary NetBSD.)
3186   For shared mappings, we should conversely verify that changes get
3187   propogated back to all the places they're supposed to be.
3188
3189   Grep wants private fixed already mapped.
3190   The main things grep needs to know about mmap are:
3191   * does it exist and is it safe to write into the mmap'd area
3192   * how to use it (BSD variants)  */
3193#include <sys/types.h>
3194#include <fcntl.h>
3195#include <sys/mman.h>
3196
3197/* This mess was copied from the GNU getpagesize.h.  */
3198#ifndef HAVE_GETPAGESIZE
3199# ifdef HAVE_UNISTD_H
3200#  include <unistd.h>
3201# endif
3202
3203/* Assume that all systems that can run configure have sys/param.h.  */
3204# ifndef HAVE_SYS_PARAM_H
3205#  define HAVE_SYS_PARAM_H 1
3206# endif
3207
3208# ifdef _SC_PAGESIZE
3209#  define getpagesize() sysconf(_SC_PAGESIZE)
3210# else /* no _SC_PAGESIZE */
3211#  ifdef HAVE_SYS_PARAM_H
3212#   include <sys/param.h>
3213#   ifdef EXEC_PAGESIZE
3214#    define getpagesize() EXEC_PAGESIZE
3215#   else /* no EXEC_PAGESIZE */
3216#    ifdef NBPG
3217#     define getpagesize() NBPG * CLSIZE
3218#     ifndef CLSIZE
3219#      define CLSIZE 1
3220#     endif /* no CLSIZE */
3221#    else /* no NBPG */
3222#     ifdef NBPC
3223#      define getpagesize() NBPC
3224#     else /* no NBPC */
3225#      ifdef PAGESIZE
3226#       define getpagesize() PAGESIZE
3227#      endif /* PAGESIZE */
3228#     endif /* no NBPC */
3229#    endif /* no NBPG */
3230#   endif /* no EXEC_PAGESIZE */
3231#  else /* no HAVE_SYS_PARAM_H */
3232#   define getpagesize() 8192   /* punt totally */
3233#  endif /* no HAVE_SYS_PARAM_H */
3234# endif /* no _SC_PAGESIZE */
3235
3236#endif /* no HAVE_GETPAGESIZE */
3237
3238#ifdef __cplusplus
3239extern "C" { void *malloc(unsigned); }
3240#else
3241char *malloc();
3242#endif
3243
3244int
3245main()
3246{
3247        char *data, *data2, *data3;
3248        int i, pagesize;
3249        int fd;
3250
3251        pagesize = getpagesize();
3252
3253        /*
3254         * First, make a file with some known garbage in it.
3255         */
3256        data = malloc(pagesize);
3257        if (!data)
3258                exit(1);
3259        for (i = 0; i < pagesize; ++i)
3260                *(data + i) = rand();
3261        umask(0);
3262        fd = creat("conftestmmap", 0600);
3263        if (fd < 0)
3264                exit(1);
3265        if (write(fd, data, pagesize) != pagesize)
3266                exit(1);
3267        close(fd);
3268
3269        /*
3270         * Next, try to mmap the file at a fixed address which
3271         * already has something else allocated at it.  If we can,
3272         * also make sure that we see the same garbage.
3273         */
3274        fd = open("conftestmmap", O_RDWR);
3275        if (fd < 0)
3276                exit(1);
3277        data2 = malloc(2 * pagesize);
3278        if (!data2)
3279                exit(1);
3280        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3281        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3282            MAP_PRIVATE | MAP_FIXED, fd, 0L))
3283                exit(1);
3284        for (i = 0; i < pagesize; ++i)
3285                if (*(data + i) != *(data2 + i))
3286                        exit(1);
3287
3288        /*
3289         * Finally, make sure that changes to the mapped area
3290         * do not percolate back to the file as seen by read().
3291         * (This is a bug on some variants of i386 svr4.0.)
3292         */
3293        for (i = 0; i < pagesize; ++i)
3294                *(data2 + i) = *(data2 + i) + 1;
3295        data3 = malloc(pagesize);
3296        if (!data3)
3297                exit(1);
3298        if (read(fd, data3, pagesize) != pagesize)
3299                exit(1);
3300        for (i = 0; i < pagesize; ++i)
3301                if (*(data + i) != *(data3 + i))
3302                        exit(1);
3303        close(fd);
3304        unlink("conftestmmap");
3305        exit(0);
3306}
3307
3308EOF
3309if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3310then
3311  ac_cv_func_mmap_fixed_mapped=yes
3312else
3313  echo "configure: failed program was:" >&5
3314  cat conftest.$ac_ext >&5
3315  rm -fr conftest*
3316  ac_cv_func_mmap_fixed_mapped=no
3317fi
3318rm -fr conftest*
3319fi
3320
3321fi
3322
3323echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3324if test $ac_cv_func_mmap_fixed_mapped = yes; then
3325  cat >> confdefs.h <<\EOF
3326#define HAVE_MMAP 1
3327EOF
3328
3329fi
3330
3331echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3332echo "configure:3333: checking return type of signal handlers" >&5
3333if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3334  echo $ac_n "(cached) $ac_c" 1>&6
3335else
3336  cat > conftest.$ac_ext <<EOF
3337#line 3338 "configure"
3338#include "confdefs.h"
3339#include <sys/types.h>
3340#include <signal.h>
3341#ifdef signal
3342#undef signal
3343#endif
3344#ifdef __cplusplus
3345extern "C" void (*signal (int, void (*)(int)))(int);
3346#else
3347void (*signal ()) ();
3348#endif
3349
3350int main() {
3351int i;
3352; return 0; }
3353EOF
3354if { (eval echo configure:3355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3355  rm -rf conftest*
3356  ac_cv_type_signal=void
3357else
3358  echo "configure: failed program was:" >&5
3359  cat conftest.$ac_ext >&5
3360  rm -rf conftest*
3361  ac_cv_type_signal=int
3362fi
3363rm -f conftest*
3364fi
3365
3366echo "$ac_t""$ac_cv_type_signal" 1>&6
3367cat >> confdefs.h <<EOF
3368#define RETSIGTYPE $ac_cv_type_signal
3369EOF
3370
3371
3372echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3373echo "configure:3374: checking for vprintf" >&5
3374if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3375  echo $ac_n "(cached) $ac_c" 1>&6
3376else
3377  cat > conftest.$ac_ext <<EOF
3378#line 3379 "configure"
3379#include "confdefs.h"
3380/* System header to define __stub macros and hopefully few prototypes,
3381    which can conflict with char vprintf(); below.  */
3382#include <assert.h>
3383/* Override any gcc2 internal prototype to avoid an error.  */
3384/* We use char because int might match the return type of a gcc2
3385    builtin and then its argument prototype would still apply.  */
3386char vprintf();
3387
3388int main() {
3389
3390/* The GNU C library defines this for functions which it implements
3391    to always fail with ENOSYS.  Some functions are actually named
3392    something starting with __ and the normal name is an alias.  */
3393#if defined (__stub_vprintf) || defined (__stub___vprintf)
3394choke me
3395#else
3396vprintf();
3397#endif
3398
3399; return 0; }
3400EOF
3401if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3402  rm -rf conftest*
3403  eval "ac_cv_func_vprintf=yes"
3404else
3405  echo "configure: failed program was:" >&5
3406  cat conftest.$ac_ext >&5
3407  rm -rf conftest*
3408  eval "ac_cv_func_vprintf=no"
3409fi
3410rm -f conftest*
3411fi
3412
3413if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3414  echo "$ac_t""yes" 1>&6
3415  cat >> confdefs.h <<\EOF
3416#define HAVE_VPRINTF 1
3417EOF
3418
3419else
3420  echo "$ac_t""no" 1>&6
3421fi
3422
3423if test "$ac_cv_func_vprintf" != yes; then
3424echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3425echo "configure:3426: checking for _doprnt" >&5
3426if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3427  echo $ac_n "(cached) $ac_c" 1>&6
3428else
3429  cat > conftest.$ac_ext <<EOF
3430#line 3431 "configure"
3431#include "confdefs.h"
3432/* System header to define __stub macros and hopefully few prototypes,
3433    which can conflict with char _doprnt(); below.  */
3434#include <assert.h>
3435/* Override any gcc2 internal prototype to avoid an error.  */
3436/* We use char because int might match the return type of a gcc2
3437    builtin and then its argument prototype would still apply.  */
3438char _doprnt();
3439
3440int main() {
3441
3442/* The GNU C library defines this for functions which it implements
3443    to always fail with ENOSYS.  Some functions are actually named
3444    something starting with __ and the normal name is an alias.  */
3445#if defined (__stub__doprnt) || defined (__stub____doprnt)
3446choke me
3447#else
3448_doprnt();
3449#endif
3450
3451; return 0; }
3452EOF
3453if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3454  rm -rf conftest*
3455  eval "ac_cv_func__doprnt=yes"
3456else
3457  echo "configure: failed program was:" >&5
3458  cat conftest.$ac_ext >&5
3459  rm -rf conftest*
3460  eval "ac_cv_func__doprnt=no"
3461fi
3462rm -f conftest*
3463fi
3464
3465if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3466  echo "$ac_t""yes" 1>&6
3467  cat >> confdefs.h <<\EOF
3468#define HAVE_DOPRNT 1
3469EOF
3470
3471else
3472  echo "$ac_t""no" 1>&6
3473fi
3474
3475fi
3476
3477for ac_func in gettimeofday atexit bcopy getcwd getwd sbrk
3478do
3479echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3480echo "configure:3481: checking for $ac_func" >&5
3481if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3482  echo $ac_n "(cached) $ac_c" 1>&6
3483else
3484  cat > conftest.$ac_ext <<EOF
3485#line 3486 "configure"
3486#include "confdefs.h"
3487/* System header to define __stub macros and hopefully few prototypes,
3488    which can conflict with char $ac_func(); below.  */
3489#include <assert.h>
3490/* Override any gcc2 internal prototype to avoid an error.  */
3491/* We use char because int might match the return type of a gcc2
3492    builtin and then its argument prototype would still apply.  */
3493char $ac_func();
3494
3495int main() {
3496
3497/* The GNU C library defines this for functions which it implements
3498    to always fail with ENOSYS.  Some functions are actually named
3499    something starting with __ and the normal name is an alias.  */
3500#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3501choke me
3502#else
3503$ac_func();
3504#endif
3505
3506; return 0; }
3507EOF
3508if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3509  rm -rf conftest*
3510  eval "ac_cv_func_$ac_func=yes"
3511else
3512  echo "configure: failed program was:" >&5
3513  cat conftest.$ac_ext >&5
3514  rm -rf conftest*
3515  eval "ac_cv_func_$ac_func=no"
3516fi
3517rm -f conftest*
3518fi
3519
3520if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3521  echo "$ac_t""yes" 1>&6
3522    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3523  cat >> confdefs.h <<EOF
3524#define $ac_tr_func 1
3525EOF
3526 
3527else
3528  echo "$ac_t""no" 1>&6
3529fi
3530done
3531
3532
3533
3534echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3535echo "configure:3536: checking whether your machine has correct arithmetic shifts" >&5
3536if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3537  echo $ac_n "(cached) $ac_c" 1>&6
3538else
3539  if test "$cross_compiling" = yes; then
3540  if test "$ac_c_cross_dos" = yes; then
3541     ac_cv_shift=yes;
3542   else
3543     echo "$ac_t""no" 1>&6
3544     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
3545   fi
3546else
3547  cat > conftest.$ac_ext <<EOF
3548#line 3549 "configure"
3549#include "confdefs.h"
3550 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
3551EOF
3552if { (eval echo configure:3553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3553then
3554  ac_cv_shift=yes
3555else
3556  echo "configure: failed program was:" >&5
3557  cat conftest.$ac_ext >&5
3558  rm -fr conftest*
3559  ac_cv_shift=no
3560fi
3561rm -fr conftest*
3562fi
3563
3564fi
3565
3566
3567if test "$ac_cv_shift" = yes; then   
3568  echo "$ac_t""yes" 1>&6
3569else
3570  echo "$ac_t""no" 1>&6
3571  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3572fi
3573
3574echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3575echo "configure:3576: checking whether vsprintf returns number of printed chars" >&5
3576if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3577  echo $ac_n "(cached) $ac_c" 1>&6
3578else
3579  if test "$cross_compiling" = yes; then
3580  ac_cv_returns_n_of_chars=no
3581else
3582  cat > conftest.$ac_ext <<EOF
3583#line 3584 "configure"
3584#include "confdefs.h"
3585#include <stdio.h>
3586 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3587EOF
3588if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3589then
3590  ac_cv_returns_n_of_chars=yes
3591else
3592  echo "configure: failed program was:" >&5
3593  cat conftest.$ac_ext >&5
3594  rm -fr conftest*
3595  ac_cv_returns_n_of_chars=no
3596fi
3597rm -fr conftest*
3598fi
3599
3600fi
3601
3602if test "$ac_cv_returns_n_of_chars" = yes; then
3603  echo "$ac_t""yes" 1>&6
3604else
3605  echo "$ac_t""no" 1>&6
3606  cat >> confdefs.h <<\EOF
3607#define BSD_SPRINTF 1
3608EOF
3609
3610fi
3611
3612
3613echo $ac_n "checking size of char""... $ac_c" 1>&6
3614echo "configure:3615: checking size of char" >&5
3615if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3616  echo $ac_n "(cached) $ac_c" 1>&6
3617else
3618  if test "$cross_compiling" = yes; then
3619  ac_cv_sizeof_char=1
3620else
3621  cat > conftest.$ac_ext <<EOF
3622#line 3623 "configure"
3623#include "confdefs.h"
3624#include <stdio.h>
3625main()
3626{
3627  FILE *f=fopen("conftestval", "w");
3628  if (!f) exit(1);
3629  fprintf(f, "%d\n", sizeof(char));
3630  exit(0);
3631}
3632EOF
3633if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3634then
3635  ac_cv_sizeof_char=`cat conftestval`
3636else
3637  echo "configure: failed program was:" >&5
3638  cat conftest.$ac_ext >&5
3639  rm -fr conftest*
3640  ac_cv_sizeof_char=0
3641fi
3642rm -fr conftest*
3643fi
3644
3645fi
3646echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3647cat >> confdefs.h <<EOF
3648#define SIZEOF_CHAR $ac_cv_sizeof_char
3649EOF
3650
3651
3652echo $ac_n "checking size of short""... $ac_c" 1>&6
3653echo "configure:3654: checking size of short" >&5
3654if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3655  echo $ac_n "(cached) $ac_c" 1>&6
3656else
3657  if test "$cross_compiling" = yes; then
3658  ac_cv_sizeof_short=2
3659else
3660  cat > conftest.$ac_ext <<EOF
3661#line 3662 "configure"
3662#include "confdefs.h"
3663#include <stdio.h>
3664main()
3665{
3666  FILE *f=fopen("conftestval", "w");
3667  if (!f) exit(1);
3668  fprintf(f, "%d\n", sizeof(short));
3669  exit(0);
3670}
3671EOF
3672if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3673then
3674  ac_cv_sizeof_short=`cat conftestval`
3675else
3676  echo "configure: failed program was:" >&5
3677  cat conftest.$ac_ext >&5
3678  rm -fr conftest*
3679  ac_cv_sizeof_short=0
3680fi
3681rm -fr conftest*
3682fi
3683
3684fi
3685echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3686cat >> confdefs.h <<EOF
3687#define SIZEOF_SHORT $ac_cv_sizeof_short
3688EOF
3689
3690
3691echo $ac_n "checking size of int""... $ac_c" 1>&6
3692echo "configure:3693: checking size of int" >&5
3693if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3694  echo $ac_n "(cached) $ac_c" 1>&6
3695else
3696  if test "$cross_compiling" = yes; then
3697  ac_cv_sizeof_int=4
3698else
3699  cat > conftest.$ac_ext <<EOF
3700#line 3701 "configure"
3701#include "confdefs.h"
3702#include <stdio.h>
3703main()
3704{
3705  FILE *f=fopen("conftestval", "w");
3706  if (!f) exit(1);
3707  fprintf(f, "%d\n", sizeof(int));
3708  exit(0);
3709}
3710EOF
3711if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3712then
3713  ac_cv_sizeof_int=`cat conftestval`
3714else
3715  echo "configure: failed program was:" >&5
3716  cat conftest.$ac_ext >&5
3717  rm -fr conftest*
3718  ac_cv_sizeof_int=0
3719fi
3720rm -fr conftest*
3721fi
3722
3723fi
3724echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3725cat >> confdefs.h <<EOF
3726#define SIZEOF_INT $ac_cv_sizeof_int
3727EOF
3728
3729
3730echo $ac_n "checking size of long""... $ac_c" 1>&6
3731echo "configure:3732: checking size of long" >&5
3732if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3733  echo $ac_n "(cached) $ac_c" 1>&6
3734else
3735  if test "$cross_compiling" = yes; then
3736  ac_cv_sizeof_long=4
3737else
3738  cat > conftest.$ac_ext <<EOF
3739#line 3740 "configure"
3740#include "confdefs.h"
3741#include <stdio.h>
3742main()
3743{
3744  FILE *f=fopen("conftestval", "w");
3745  if (!f) exit(1);
3746  fprintf(f, "%d\n", sizeof(long));
3747  exit(0);
3748}
3749EOF
3750if { (eval echo configure:3751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3751then
3752  ac_cv_sizeof_long=`cat conftestval`
3753else
3754  echo "configure: failed program was:" >&5
3755  cat conftest.$ac_ext >&5
3756  rm -fr conftest*
3757  ac_cv_sizeof_long=0
3758fi
3759rm -fr conftest*
3760fi
3761
3762fi
3763echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3764cat >> confdefs.h <<EOF
3765#define SIZEOF_LONG $ac_cv_sizeof_long
3766EOF
3767
3768
3769echo $ac_n "checking size of void*""... $ac_c" 1>&6
3770echo "configure:3771: checking size of void*" >&5
3771if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3772  echo $ac_n "(cached) $ac_c" 1>&6
3773else
3774  if test "$cross_compiling" = yes; then
3775  ac_cv_sizeof_voidp=4
3776else
3777  cat > conftest.$ac_ext <<EOF
3778#line 3779 "configure"
3779#include "confdefs.h"
3780#include <stdio.h>
3781main()
3782{
3783  FILE *f=fopen("conftestval", "w");
3784  if (!f) exit(1);
3785  fprintf(f, "%d\n", sizeof(void*));
3786  exit(0);
3787}
3788EOF
3789if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3790then
3791  ac_cv_sizeof_voidp=`cat conftestval`
3792else
3793  echo "configure: failed program was:" >&5
3794  cat conftest.$ac_ext >&5
3795  rm -fr conftest*
3796  ac_cv_sizeof_voidp=0
3797fi
3798rm -fr conftest*
3799fi
3800
3801fi
3802echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3803cat >> confdefs.h <<EOF
3804#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3805EOF
3806
3807
3808echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3809echo "configure:3810: checking whether byte ordering is bigendian" >&5
3810if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3811  echo $ac_n "(cached) $ac_c" 1>&6
3812else
3813  ac_cv_c_bigendian=unknown
3814# See if sys/param.h defines the BYTE_ORDER macro.
3815cat > conftest.$ac_ext <<EOF
3816#line 3817 "configure"
3817#include "confdefs.h"
3818#include <sys/types.h>
3819#include <sys/param.h>
3820int main() {
3821
3822#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3823 bogus endian macros
3824#endif
3825; return 0; }
3826EOF
3827if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3828  rm -rf conftest*
3829  # It does; now see whether it defined to BIG_ENDIAN or not.
3830cat > conftest.$ac_ext <<EOF
3831#line 3832 "configure"
3832#include "confdefs.h"
3833#include <sys/types.h>
3834#include <sys/param.h>
3835int main() {
3836
3837#if BYTE_ORDER != BIG_ENDIAN
3838 not big endian
3839#endif
3840; return 0; }
3841EOF
3842if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3843  rm -rf conftest*
3844  ac_cv_c_bigendian=yes
3845else
3846  echo "configure: failed program was:" >&5
3847  cat conftest.$ac_ext >&5
3848  rm -rf conftest*
3849  ac_cv_c_bigendian=no
3850fi
3851rm -f conftest*
3852else
3853  echo "configure: failed program was:" >&5
3854  cat conftest.$ac_ext >&5
3855fi
3856rm -f conftest*
3857if test $ac_cv_c_bigendian = unknown; then
3858if test "$cross_compiling" = yes; then
3859    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3860else
3861  cat > conftest.$ac_ext <<EOF
3862#line 3863 "configure"
3863#include "confdefs.h"
3864main () {
3865  /* Are we little or big endian?  From Harbison&Steele.  */
3866  union
3867  {
3868    long l;
3869    char c[sizeof (long)];
3870  } u;
3871  u.l = 1;
3872  exit (u.c[sizeof (long) - 1] == 1);
3873}
3874EOF
3875if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3876then
3877  ac_cv_c_bigendian=no
3878else
3879  echo "configure: failed program was:" >&5
3880  cat conftest.$ac_ext >&5
3881  rm -fr conftest*
3882  ac_cv_c_bigendian=yes
3883fi
3884rm -fr conftest*
3885fi
3886
3887fi
3888fi
3889
3890echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3891if test $ac_cv_c_bigendian = yes; then
3892  cat >> confdefs.h <<\EOF
3893#define WORDS_BIGENDIAN 1
3894EOF
3895
3896fi
3897
3898
3899if test "$ac_cv_sizeof_int" != 4; then
3900  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3901fi
3902
3903if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
3904  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3905fi
3906
3907echo $ac_n "checking which exponent types to use""... $ac_c" 1>&6
3908echo "configure:3909: checking which exponent types to use" >&5
3909if test "$with_exp_type" = "char"; then
3910  echo "$ac_t""char" 1>&6
3911  cat >> confdefs.h <<\EOF
3912#define EXPONENT_TYPE char
3913EOF
3914
3915  cat >> confdefs.h <<\EOF
3916#define SIZEOF_EXPONENT SIZEOF_CHAR
3917EOF
3918
3919elif test "with_exp_type" = "int"; then
3920  echo "$ac_t""int" 1>&6
3921  cat >> confdefs.h <<\EOF
3922#define EXPONENT_TYPE int
3923EOF
3924
3925  cat >> confdefs.h <<\EOF
3926#define SIZEOF_EXPONENT SIZEOF_INT
3927EOF
3928
3929else
3930  echo "$ac_t""short" 1>&6
3931  cat >> confdefs.h <<\EOF
3932#define EXPONENT_TYPE short
3933EOF
3934
3935  cat >> confdefs.h <<\EOF
3936#define SIZEOF_TYPE SIZEOF_SHORT
3937EOF
3938
3939fi
3940
3941echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
3942echo "configure:3943: checking whether _AIX is defined" >&5
3943if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
3944  echo $ac_n "(cached) $ac_c" 1>&6
3945else
3946  cat > conftest.$ac_ext <<EOF
3947#line 3948 "configure"
3948#include "confdefs.h"
3949#ifdef _AIX
3950    yes
3951#endif
3952
3953EOF
3954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3955  egrep "yes" >/dev/null 2>&1; then
3956  rm -rf conftest*
3957  ac_cv_is_aix=yes
3958else
3959  rm -rf conftest*
3960  ac_cv_is_aix=no
3961fi
3962rm -f conftest*
3963
3964fi
3965
3966if test "$ac_cv_is_aix" = yes; then
3967  echo "$ac_t""yes" 1>&6
3968else
3969  echo "$ac_t""no" 1>&6
3970fi
3971
3972if test ${GXX} = yes; then
3973  if test "$ac_cxxflags_set" = no; then
3974    CXXFLAGS="-O3 -w -fomit-frame-pointer"
3975  fi
3976  CXXTEMPLFLAGS="-fno-implicit-templates"
3977  if test "$ac_cv_is_aix" = yes; then
3978    CXXNOOPTFLAGS="-w"
3979  else
3980    CXXNOOPTFLAGS=$CXXFLAGS
3981  fi
3982  STATIC_LDFLAGS="-Xlinker -Bstatic"
3983else
3984  CXXTEMPFLAGS=""
3985  CXXNOOPTFLAGS=$CXXFLAGS
3986  STATIC_LDFLAGS=""
3987fi
3988
3989
3990
3991
3992if test ${GCC} = yes && test "$ac_cflags_set" = no ; then
3993  CFLAGS="-O3 -w -fomit-frame-pointer"
3994fi
3995
3996trap '' 1 2 15
3997cat > confcache <<\EOF
3998# This file is a shell script that caches the results of configure
3999# tests run on this system so they can be shared between configure
4000# scripts and configure runs.  It is not useful on other systems.
4001# If it contains results you don't want to keep, you may remove or edit it.
4002#
4003# By default, configure uses ./config.cache as the cache file,
4004# creating it if it does not exist already.  You can give configure
4005# the --cache-file=FILE option to use a different cache file; that is
4006# what configure does when it calls configure scripts in
4007# subdirectories, so they share the cache.
4008# Giving --cache-file=/dev/null disables caching, for debugging configure.
4009# config.status only pays attention to the cache file if you give it the
4010# --recheck option to rerun configure.
4011#
4012EOF
4013# The following way of writing the cache mishandles newlines in values,
4014# but we know of no workaround that is simple, portable, and efficient.
4015# So, don't put newlines in cache variables' values.
4016# Ultrix sh set writes to stderr and can't be redirected directly,
4017# and sets the high bit in the cache file unless we assign to the vars.
4018(set) 2>&1 |
4019  case `(ac_space=' '; set) 2>&1` in
4020  *ac_space=\ *)
4021    # `set' does not quote correctly, so add quotes (double-quote substitution
4022    # turns \\\\ into \\, and sed turns \\ into \).
4023    sed -n \
4024      -e "s/'/'\\\\''/g" \
4025      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4026    ;;
4027  *)
4028    # `set' quotes correctly as required by POSIX, so do not add quotes.
4029    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4030    ;;
4031  esac >> confcache
4032if cmp -s $cache_file confcache; then
4033  :
4034else
4035  if test -w $cache_file; then
4036    echo "updating cache $cache_file"
4037    cat confcache > $cache_file
4038  else
4039    echo "not updating unwritable cache $cache_file"
4040  fi
4041fi
4042rm -f confcache
4043
4044trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4045
4046test "x$prefix" = xNONE && prefix=$ac_default_prefix
4047# Let make expand exec_prefix.
4048test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4049
4050# Any assignment to VPATH causes Sun make to only execute
4051# the first set of double-colon rules, so remove it if not needed.
4052# If there is a colon in the path, we need to keep it.
4053if test "x$srcdir" = x.; then
4054  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4055fi
4056
4057trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4058
4059DEFS=-DHAVE_CONFIG_H
4060
4061# Without the "./", some shells look in PATH for config.status.
4062: ${CONFIG_STATUS=./config.status}
4063
4064echo creating $CONFIG_STATUS
4065rm -f $CONFIG_STATUS
4066cat > $CONFIG_STATUS <<EOF
4067#! /bin/sh
4068# Generated automatically by configure.
4069# Run this file to recreate the current configuration.
4070# This directory was configured as follows,
4071# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4072#
4073# $0 $ac_configure_args
4074#
4075# Compiler output produced by configure, useful for debugging
4076# configure, is in ./config.log if it exists.
4077
4078ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4079for ac_option
4080do
4081  case "\$ac_option" in
4082  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4083    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4084    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4085  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4086    echo "$CONFIG_STATUS generated by autoconf version 2.12"
4087    exit 0 ;;
4088  -help | --help | --hel | --he | --h)
4089    echo "\$ac_cs_usage"; exit 0 ;;
4090  *) echo "\$ac_cs_usage"; exit 1 ;;
4091  esac
4092done
4093
4094ac_given_srcdir=$srcdir
4095
4096trap 'rm -fr `echo "Makefile doc/Makefile newdoc/Makefile mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4097EOF
4098cat >> $CONFIG_STATUS <<EOF
4099
4100# Protect against being on the right side of a sed subst in config.status.
4101sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4102 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4103$ac_vpsub
4104$extrasub
4105s%@CFLAGS@%$CFLAGS%g
4106s%@CPPFLAGS@%$CPPFLAGS%g
4107s%@CXXFLAGS@%$CXXFLAGS%g
4108s%@DEFS@%$DEFS%g
4109s%@LDFLAGS@%$LDFLAGS%g
4110s%@LIBS@%$LIBS%g
4111s%@exec_prefix@%$exec_prefix%g
4112s%@prefix@%$prefix%g
4113s%@program_transform_name@%$program_transform_name%g
4114s%@bindir@%$bindir%g
4115s%@sbindir@%$sbindir%g
4116s%@libexecdir@%$libexecdir%g
4117s%@datadir@%$datadir%g
4118s%@sysconfdir@%$sysconfdir%g
4119s%@sharedstatedir@%$sharedstatedir%g
4120s%@localstatedir@%$localstatedir%g
4121s%@libdir@%$libdir%g
4122s%@includedir@%$includedir%g
4123s%@oldincludedir@%$oldincludedir%g
4124s%@infodir@%$infodir%g
4125s%@mandir@%$mandir%g
4126s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
4127s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
4128s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
4129s%@LEX@%$LEX%g
4130s%@LEXLIB@%$LEXLIB%g
4131s%@LEXP@%$LEXP%g
4132s%@CC@%$CC%g
4133s%@CPP@%$CPP%g
4134s%@CXX@%$CXX%g
4135s%@SET_MAKE@%$SET_MAKE%g
4136s%@DOS_CROSS@%$DOS_CROSS%g
4137s%@singulardatadir@%$singulardatadir%g
4138s%@INFO@%$INFO%g
4139s%@PERL@%$PERL%g
4140s%@WITH_MP@%$WITH_MP%g
4141s%@WITH_FACTORY@%$WITH_FACTORY%g
4142s%@WITH_LIBFAC@%$WITH_LIBFAC%g
4143s%@NEED_LIBS@%$NEED_LIBS%g
4144s%@WITH_DBM@%$WITH_DBM%g
4145s%@ALLOCA@%$ALLOCA%g
4146s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
4147s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
4148s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
4149
4150CEOF
4151EOF
4152
4153cat >> $CONFIG_STATUS <<\EOF
4154
4155# Split the substitutions into bite-sized pieces for seds with
4156# small command number limits, like on Digital OSF/1 and HP-UX.
4157ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4158ac_file=1 # Number of current file.
4159ac_beg=1 # First line for current file.
4160ac_end=$ac_max_sed_cmds # Line after last line for current file.
4161ac_more_lines=:
4162ac_sed_cmds=""
4163while $ac_more_lines; do
4164  if test $ac_beg -gt 1; then
4165    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4166  else
4167    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4168  fi
4169  if test ! -s conftest.s$ac_file; then
4170    ac_more_lines=false
4171    rm -f conftest.s$ac_file
4172  else
4173    if test -z "$ac_sed_cmds"; then
4174      ac_sed_cmds="sed -f conftest.s$ac_file"
4175    else
4176      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4177    fi
4178    ac_file=`expr $ac_file + 1`
4179    ac_beg=$ac_end
4180    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4181  fi
4182done
4183if test -z "$ac_sed_cmds"; then
4184  ac_sed_cmds=cat
4185fi
4186EOF
4187
4188cat >> $CONFIG_STATUS <<EOF
4189
4190CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile newdoc/Makefile"}
4191EOF
4192cat >> $CONFIG_STATUS <<\EOF
4193for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4194  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4195  case "$ac_file" in
4196  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4197       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4198  *) ac_file_in="${ac_file}.in" ;;
4199  esac
4200
4201  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4202
4203  # Remove last slash and all that follows it.  Not all systems have dirname.
4204  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4205  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4206    # The file is in a subdirectory.
4207    test ! -d "$ac_dir" && mkdir "$ac_dir"
4208    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4209    # A "../" for each directory in $ac_dir_suffix.
4210    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4211  else
4212    ac_dir_suffix= ac_dots=
4213  fi
4214
4215  case "$ac_given_srcdir" in
4216  .)  srcdir=.
4217      if test -z "$ac_dots"; then top_srcdir=.
4218      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4219  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4220  *) # Relative path.
4221    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4222    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4223  esac
4224
4225
4226  echo creating "$ac_file"
4227  rm -f "$ac_file"
4228  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4229  case "$ac_file" in
4230  *Makefile*) ac_comsub="1i\\
4231# $configure_input" ;;
4232  *) ac_comsub= ;;
4233  esac
4234
4235  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4236  sed -e "$ac_comsub
4237s%@configure_input@%$configure_input%g
4238s%@srcdir@%$srcdir%g
4239s%@top_srcdir@%$top_srcdir%g
4240" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4241fi; done
4242rm -f conftest.s*
4243
4244# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4245# NAME is the cpp macro being defined and VALUE is the value it is being given.
4246#
4247# ac_d sets the value in "#define NAME VALUE" lines.
4248ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4249ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4250ac_dC='\3'
4251ac_dD='%g'
4252# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4253ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4254ac_uB='\([      ]\)%\1#\2define\3'
4255ac_uC=' '
4256ac_uD='\4%g'
4257# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4258ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4259ac_eB='$%\1#\2define\3'
4260ac_eC=' '
4261ac_eD='%g'
4262
4263if test "${CONFIG_HEADERS+set}" != set; then
4264EOF
4265cat >> $CONFIG_STATUS <<EOF
4266  CONFIG_HEADERS="mod2.h"
4267EOF
4268cat >> $CONFIG_STATUS <<\EOF
4269fi
4270for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4271  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4272  case "$ac_file" in
4273  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4274       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4275  *) ac_file_in="${ac_file}.in" ;;
4276  esac
4277
4278  echo creating $ac_file
4279
4280  rm -f conftest.frag conftest.in conftest.out
4281  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4282  cat $ac_file_inputs > conftest.in
4283
4284EOF
4285
4286# Transform confdefs.h into a sed script conftest.vals that substitutes
4287# the proper values into config.h.in to produce config.h.  And first:
4288# Protect against being on the right side of a sed subst in config.status.
4289# Protect against being in an unquoted here document in config.status.
4290rm -f conftest.vals
4291cat > conftest.hdr <<\EOF
4292s/[\\&%]/\\&/g
4293s%[\\$`]%\\&%g
4294s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4295s%ac_d%ac_u%gp
4296s%ac_u%ac_e%gp
4297EOF
4298sed -n -f conftest.hdr confdefs.h > conftest.vals
4299rm -f conftest.hdr
4300
4301# This sed command replaces #undef with comments.  This is necessary, for
4302# example, in the case of _POSIX_SOURCE, which is predefined and required
4303# on some systems where configure will not decide to define it.
4304cat >> conftest.vals <<\EOF
4305s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4306EOF
4307
4308# Break up conftest.vals because some shells have a limit on
4309# the size of here documents, and old seds have small limits too.
4310
4311rm -f conftest.tail
4312while :
4313do
4314  ac_lines=`grep -c . conftest.vals`
4315  # grep -c gives empty output for an empty file on some AIX systems.
4316  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4317  # Write a limited-size here document to conftest.frag.
4318  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4319  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4320  echo 'CEOF
4321  sed -f conftest.frag conftest.in > conftest.out
4322  rm -f conftest.in
4323  mv conftest.out conftest.in
4324' >> $CONFIG_STATUS
4325  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4326  rm -f conftest.vals
4327  mv conftest.tail conftest.vals
4328done
4329rm -f conftest.vals
4330
4331cat >> $CONFIG_STATUS <<\EOF
4332  rm -f conftest.frag conftest.h
4333  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4334  cat conftest.in >> conftest.h
4335  rm -f conftest.in
4336  if cmp -s $ac_file conftest.h 2>/dev/null; then
4337    echo "$ac_file is unchanged"
4338    rm -f conftest.h
4339  else
4340    # Remove last slash and all that follows it.  Not all systems have dirname.
4341      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4342      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4343      # The file is in a subdirectory.
4344      test ! -d "$ac_dir" && mkdir "$ac_dir"
4345    fi
4346    rm -f $ac_file
4347    mv conftest.h $ac_file
4348  fi
4349fi; done
4350
4351EOF
4352cat >> $CONFIG_STATUS <<EOF
4353
4354EOF
4355cat >> $CONFIG_STATUS <<\EOF
4356\
4357 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
4358exit 0
4359EOF
4360chmod +x $CONFIG_STATUS
4361rm -fr confdefs* $ac_clean_files
4362test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4363
4364
4365
4366
4367
Note: See TracBrowser for help on using the repository browser.