source: git/Singular/configure @ 82ac59

spielwiese
Last change on this file since 82ac59 was 82ac59, checked in by Olaf Bachmann <obachman@…>, 26 years ago
* small bug fix git-svn-id: file:///usr/local/Singular/svn/trunk@1301 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 117.6 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=`pwd`/..
15ac_help="$ac_help
16  --without-readline   do not use readline for fancy display"
17ac_help="$ac_help
18  --without-MP         do not use MP (disables MP links)"
19ac_help="$ac_help
20  --without-dbm        do not use dbm (disables DBM links)"
21ac_help="$ac_help
22  --without-info       do not use info for help (use buildin help, instead)"
23ac_help="$ac_help
24  --without-dld        do not use dld (disables dynamic linking)"
25ac_help="$ac_help
26  --without-factory    do not use factory (disables poly factorization)"
27ac_help="$ac_help
28  --without-libfac     do not use libfac (disables primary decompositions)"
29ac_help="$ac_help
30\
31  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
32                          where PACKAGE can be gmp, smallgmp, or buildin"
33ac_help="$ac_help
34  --with-exp_type=TYPE uses TYPE as type of exponents in polynomials
35                          -- default type is short
36                          -- possible other types are char and int"
37
38# Initialize some variables set by options.
39# The variables have the same names as the options, with
40# dashes changed to underlines.
41build=NONE
42cache_file=./config.cache
43exec_prefix=NONE
44host=NONE
45no_create=
46nonopt=NONE
47no_recursion=
48prefix=NONE
49program_prefix=NONE
50program_suffix=NONE
51program_transform_name=s,x,x,
52silent=
53site=
54srcdir=
55target=NONE
56verbose=
57x_includes=NONE
58x_libraries=NONE
59bindir='${exec_prefix}/bin'
60sbindir='${exec_prefix}/sbin'
61libexecdir='${exec_prefix}/libexec'
62datadir='${prefix}/share'
63sysconfdir='${prefix}/etc'
64sharedstatedir='${prefix}/com'
65localstatedir='${prefix}/var'
66libdir='${exec_prefix}/lib'
67includedir='${prefix}/include'
68oldincludedir='/usr/include'
69infodir='${prefix}/info'
70mandir='${prefix}/man'
71
72# Initialize some other variables.
73subdirs=
74MFLAGS= MAKEFLAGS=
75# Maximum number of lines to put in a shell here document.
76ac_max_here_lines=12
77
78ac_prev=
79for ac_option
80do
81
82  # If the previous option needs an argument, assign it.
83  if test -n "$ac_prev"; then
84    eval "$ac_prev=\$ac_option"
85    ac_prev=
86    continue
87  fi
88
89  case "$ac_option" in
90  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
91  *) ac_optarg= ;;
92  esac
93
94  # Accept the important Cygnus configure options, so we can diagnose typos.
95
96  case "$ac_option" in
97
98  -bindir | --bindir | --bindi | --bind | --bin | --bi)
99    ac_prev=bindir ;;
100  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
101    bindir="$ac_optarg" ;;
102
103  -build | --build | --buil | --bui | --bu)
104    ac_prev=build ;;
105  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
106    build="$ac_optarg" ;;
107
108  -cache-file | --cache-file | --cache-fil | --cache-fi \
109  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
110    ac_prev=cache_file ;;
111  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
112  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
113    cache_file="$ac_optarg" ;;
114
115  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
116    ac_prev=datadir ;;
117  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
118  | --da=*)
119    datadir="$ac_optarg" ;;
120
121  -disable-* | --disable-*)
122    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
123    # Reject names that are not valid shell variable names.
124    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
125      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126    fi
127    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128    eval "enable_${ac_feature}=no" ;;
129
130  -enable-* | --enable-*)
131    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
132    # Reject names that are not valid shell variable names.
133    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
134      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135    fi
136    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137    case "$ac_option" in
138      *=*) ;;
139      *) ac_optarg=yes ;;
140    esac
141    eval "enable_${ac_feature}='$ac_optarg'" ;;
142
143  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
144  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
145  | --exec | --exe | --ex)
146    ac_prev=exec_prefix ;;
147  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
148  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
149  | --exec=* | --exe=* | --ex=*)
150    exec_prefix="$ac_optarg" ;;
151
152  -gas | --gas | --ga | --g)
153    # Obsolete; use --with-gas.
154    with_gas=yes ;;
155
156  -help | --help | --hel | --he)
157    # Omit some internal or obsolete options to make the list less imposing.
158    # This message is too long to be a string in the A/UX 3.1 sh.
159    cat << EOF
160Usage: configure [options] [host]
161Options: [defaults in brackets after descriptions]
162Configuration:
163  --cache-file=FILE       cache test results in FILE
164  --help                  print this message
165  --no-create             do not create output files
166  --quiet, --silent       do not print \`checking...' messages
167  --version               print the version of autoconf that created configure
168Directory and file names:
169  --prefix=PREFIX         install architecture-independent files in PREFIX
170                          [$ac_default_prefix]
171  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
172                          [same as prefix]
173  --bindir=DIR            user executables in DIR [EPREFIX/bin]
174  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
175  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
176  --datadir=DIR           read-only architecture-independent data in DIR
177                          [PREFIX/share]
178  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
179  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
180                          [PREFIX/com]
181  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
182  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
183  --includedir=DIR        C header files in DIR [PREFIX/include]
184  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
185  --infodir=DIR           info documentation in DIR [PREFIX/info]
186  --mandir=DIR            man documentation in DIR [PREFIX/man]
187  --srcdir=DIR            find the sources in DIR [configure dir or ..]
188  --program-prefix=PREFIX prepend PREFIX to installed program names
189  --program-suffix=SUFFIX append SUFFIX to installed program names
190  --program-transform-name=PROGRAM
191                          run sed PROGRAM on installed program names
192EOF
193    cat << EOF
194Host type:
195  --build=BUILD           configure for building on BUILD [BUILD=HOST]
196  --host=HOST             configure for HOST [guessed]
197  --target=TARGET         configure for TARGET [TARGET=HOST]
198Features and packages:
199  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
200  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
201  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
202  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
203  --x-includes=DIR        X include files are in DIR
204  --x-libraries=DIR       X library files are in DIR
205EOF
206    if test -n "$ac_help"; then
207      echo "--enable and --with options recognized:$ac_help"
208    fi
209    exit 0 ;;
210
211  -host | --host | --hos | --ho)
212    ac_prev=host ;;
213  -host=* | --host=* | --hos=* | --ho=*)
214    host="$ac_optarg" ;;
215
216  -includedir | --includedir | --includedi | --included | --include \
217  | --includ | --inclu | --incl | --inc)
218    ac_prev=includedir ;;
219  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
220  | --includ=* | --inclu=* | --incl=* | --inc=*)
221    includedir="$ac_optarg" ;;
222
223  -infodir | --infodir | --infodi | --infod | --info | --inf)
224    ac_prev=infodir ;;
225  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
226    infodir="$ac_optarg" ;;
227
228  -libdir | --libdir | --libdi | --libd)
229    ac_prev=libdir ;;
230  -libdir=* | --libdir=* | --libdi=* | --libd=*)
231    libdir="$ac_optarg" ;;
232
233  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
234  | --libexe | --libex | --libe)
235    ac_prev=libexecdir ;;
236  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
237  | --libexe=* | --libex=* | --libe=*)
238    libexecdir="$ac_optarg" ;;
239
240  -localstatedir | --localstatedir | --localstatedi | --localstated \
241  | --localstate | --localstat | --localsta | --localst \
242  | --locals | --local | --loca | --loc | --lo)
243    ac_prev=localstatedir ;;
244  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
245  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
246  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
247    localstatedir="$ac_optarg" ;;
248
249  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
250    ac_prev=mandir ;;
251  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
252    mandir="$ac_optarg" ;;
253
254  -nfp | --nfp | --nf)
255    # Obsolete; use --without-fp.
256    with_fp=no ;;
257
258  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
259  | --no-cr | --no-c)
260    no_create=yes ;;
261
262  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
263  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
264    no_recursion=yes ;;
265
266  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
267  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
268  | --oldin | --oldi | --old | --ol | --o)
269    ac_prev=oldincludedir ;;
270  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
271  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
272  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
273    oldincludedir="$ac_optarg" ;;
274
275  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
276    ac_prev=prefix ;;
277  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
278    prefix="$ac_optarg" ;;
279
280  -program-prefix | --program-prefix | --program-prefi | --program-pref \
281  | --program-pre | --program-pr | --program-p)
282    ac_prev=program_prefix ;;
283  -program-prefix=* | --program-prefix=* | --program-prefi=* \
284  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
285    program_prefix="$ac_optarg" ;;
286
287  -program-suffix | --program-suffix | --program-suffi | --program-suff \
288  | --program-suf | --program-su | --program-s)
289    ac_prev=program_suffix ;;
290  -program-suffix=* | --program-suffix=* | --program-suffi=* \
291  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
292    program_suffix="$ac_optarg" ;;
293
294  -program-transform-name | --program-transform-name \
295  | --program-transform-nam | --program-transform-na \
296  | --program-transform-n | --program-transform- \
297  | --program-transform | --program-transfor \
298  | --program-transfo | --program-transf \
299  | --program-trans | --program-tran \
300  | --progr-tra | --program-tr | --program-t)
301    ac_prev=program_transform_name ;;
302  -program-transform-name=* | --program-transform-name=* \
303  | --program-transform-nam=* | --program-transform-na=* \
304  | --program-transform-n=* | --program-transform-=* \
305  | --program-transform=* | --program-transfor=* \
306  | --program-transfo=* | --program-transf=* \
307  | --program-trans=* | --program-tran=* \
308  | --progr-tra=* | --program-tr=* | --program-t=*)
309    program_transform_name="$ac_optarg" ;;
310
311  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
312  | -silent | --silent | --silen | --sile | --sil)
313    silent=yes ;;
314
315  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
316    ac_prev=sbindir ;;
317  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
318  | --sbi=* | --sb=*)
319    sbindir="$ac_optarg" ;;
320
321  -sharedstatedir | --sharedstatedir | --sharedstatedi \
322  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
323  | --sharedst | --shareds | --shared | --share | --shar \
324  | --sha | --sh)
325    ac_prev=sharedstatedir ;;
326  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
327  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
328  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
329  | --sha=* | --sh=*)
330    sharedstatedir="$ac_optarg" ;;
331
332  -site | --site | --sit)
333    ac_prev=site ;;
334  -site=* | --site=* | --sit=*)
335    site="$ac_optarg" ;;
336
337  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
338    ac_prev=srcdir ;;
339  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
340    srcdir="$ac_optarg" ;;
341
342  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
343  | --syscon | --sysco | --sysc | --sys | --sy)
344    ac_prev=sysconfdir ;;
345  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
346  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
347    sysconfdir="$ac_optarg" ;;
348
349  -target | --target | --targe | --targ | --tar | --ta | --t)
350    ac_prev=target ;;
351  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
352    target="$ac_optarg" ;;
353
354  -v | -verbose | --verbose | --verbos | --verbo | --verb)
355    verbose=yes ;;
356
357  -version | --version | --versio | --versi | --vers)
358    echo "configure generated by autoconf version 2.12"
359    exit 0 ;;
360
361  -with-* | --with-*)
362    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
363    # Reject names that are not valid shell variable names.
364    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
365      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366    fi
367    ac_package=`echo $ac_package| sed 's/-/_/g'`
368    case "$ac_option" in
369      *=*) ;;
370      *) ac_optarg=yes ;;
371    esac
372    eval "with_${ac_package}='$ac_optarg'" ;;
373
374  -without-* | --without-*)
375    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
376    # Reject names that are not valid shell variable names.
377    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
378      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
379    fi
380    ac_package=`echo $ac_package| sed 's/-/_/g'`
381    eval "with_${ac_package}=no" ;;
382
383  --x)
384    # Obsolete; use --with-x.
385    with_x=yes ;;
386
387  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
388  | --x-incl | --x-inc | --x-in | --x-i)
389    ac_prev=x_includes ;;
390  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
391  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
392    x_includes="$ac_optarg" ;;
393
394  -x-libraries | --x-libraries | --x-librarie | --x-librari \
395  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
396    ac_prev=x_libraries ;;
397  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
398  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
399    x_libraries="$ac_optarg" ;;
400
401  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
402    ;;
403
404  *)
405    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
406      echo "configure: warning: $ac_option: invalid host type" 1>&2
407    fi
408    if test "x$nonopt" != xNONE; then
409      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
410    fi
411    nonopt="$ac_option"
412    ;;
413
414  esac
415done
416
417if test -n "$ac_prev"; then
418  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
419fi
420
421trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
422
423# File descriptor usage:
424# 0 standard input
425# 1 file creation
426# 2 errors and warnings
427# 3 some systems may open it to /dev/tty
428# 4 used on the Kubota Titan
429# 6 checking for... messages and results
430# 5 compiler messages saved in config.log
431if test "$silent" = yes; then
432  exec 6>/dev/null
433else
434  exec 6>&1
435fi
436exec 5>./config.log
437
438echo "\
439This file contains any messages produced by compilers while
440running configure, to aid debugging if configure makes a mistake.
441" 1>&5
442
443# Strip out --no-create and --no-recursion so they do not pile up.
444# Also quote any args containing shell metacharacters.
445ac_configure_args=
446for ac_arg
447do
448  case "$ac_arg" in
449  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
450  | --no-cr | --no-c) ;;
451  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
452  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
453  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
454  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
455  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
456  esac
457done
458
459# NLS nuisances.
460# Only set these to C if already set.  These must not be set unconditionally
461# because not all systems understand e.g. LANG=C (notably SCO).
462# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
463# Non-C LC_CTYPE values break the ctype check.
464if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
465if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
466if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
467if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
468
469# confdefs.h avoids OS command line length limits that DEFS can exceed.
470rm -rf conftest* confdefs.h
471# AIX cpp loses on an empty file, so make sure it contains at least a newline.
472echo > confdefs.h
473
474# A filename unique to this package, relative to the directory that
475# configure is in, which we can look for to find out if srcdir is correct.
476ac_unique_file=matpol.h
477
478# Find the source files, if location was not specified.
479if test -z "$srcdir"; then
480  ac_srcdir_defaulted=yes
481  # Try the directory containing this script, then its parent.
482  ac_prog=$0
483  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
484  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
485  srcdir=$ac_confdir
486  if test ! -r $srcdir/$ac_unique_file; then
487    srcdir=..
488  fi
489else
490  ac_srcdir_defaulted=no
491fi
492if test ! -r $srcdir/$ac_unique_file; then
493  if test "$ac_srcdir_defaulted" = yes; then
494    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
495  else
496    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
497  fi
498fi
499srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
500
501# Prefer explicitly selected file to automatically selected ones.
502if test -z "$CONFIG_SITE"; then
503  if test "x$prefix" != xNONE; then
504    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
505  else
506    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
507  fi
508fi
509for ac_site_file in $CONFIG_SITE; do
510  if test -r "$ac_site_file"; then
511    echo "loading site script $ac_site_file"
512    . "$ac_site_file"
513  fi
514done
515
516if test -r "$cache_file"; then
517  echo "loading cache $cache_file"
518  . $cache_file
519else
520  echo "creating cache $cache_file"
521  > $cache_file
522fi
523
524ac_ext=c
525# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
526ac_cpp='$CPP $CPPFLAGS'
527ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
528ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
529cross_compiling=$ac_cv_prog_cc_cross
530
531if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
532  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
533  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
534    ac_n= ac_c='
535' ac_t='        '
536  else
537    ac_n=-n ac_c= ac_t=
538  fi
539else
540  ac_n= ac_c='\c' ac_t=
541fi
542
543
544
545
546SINGULAR_MAJOR_VERSION=1
547SINGULAR_MINOR_VERSION=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
2417
2418for ac_hdr in limits.h unistd.h
2419do
2420ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2421echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2422echo "configure:2423: checking for $ac_hdr" >&5
2423if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2424  echo $ac_n "(cached) $ac_c" 1>&6
2425else
2426  cat > conftest.$ac_ext <<EOF
2427#line 2428 "configure"
2428#include "confdefs.h"
2429#include <$ac_hdr>
2430EOF
2431ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2432{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2433ac_err=`grep -v '^ *+' conftest.out`
2434if test -z "$ac_err"; then
2435  rm -rf conftest*
2436  eval "ac_cv_header_$ac_safe=yes"
2437else
2438  echo "$ac_err" >&5
2439  echo "configure: failed program was:" >&5
2440  cat conftest.$ac_ext >&5
2441  rm -rf conftest*
2442  eval "ac_cv_header_$ac_safe=no"
2443fi
2444rm -f conftest*
2445fi
2446if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2447  echo "$ac_t""yes" 1>&6
2448    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2449  cat >> confdefs.h <<EOF
2450#define $ac_tr_hdr 1
2451EOF
2452 
2453else
2454  echo "$ac_t""no" 1>&6
2455{ echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; }
2456fi
2457done
2458
2459
2460for ac_hdr in sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h sys/stat.h fcntl.h
2461do
2462ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2463echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2464echo "configure:2465: checking for $ac_hdr" >&5
2465if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2466  echo $ac_n "(cached) $ac_c" 1>&6
2467else
2468  cat > conftest.$ac_ext <<EOF
2469#line 2470 "configure"
2470#include "confdefs.h"
2471#include <$ac_hdr>
2472EOF
2473ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2474{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2475ac_err=`grep -v '^ *+' conftest.out`
2476if test -z "$ac_err"; then
2477  rm -rf conftest*
2478  eval "ac_cv_header_$ac_safe=yes"
2479else
2480  echo "$ac_err" >&5
2481  echo "configure: failed program was:" >&5
2482  cat conftest.$ac_ext >&5
2483  rm -rf conftest*
2484  eval "ac_cv_header_$ac_safe=no"
2485fi
2486rm -f conftest*
2487fi
2488if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2489  echo "$ac_t""yes" 1>&6
2490    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2491  cat >> confdefs.h <<EOF
2492#define $ac_tr_hdr 1
2493EOF
2494 
2495else
2496  echo "$ac_t""no" 1>&6
2497fi
2498done
2499
2500
2501WITH_DBM=no
2502echo $ac_n "checking whether to build with dbm links""... $ac_c" 1>&6
2503echo "configure:2504: checking whether to build with dbm links" >&5
2504if test "$with_dbm" != no; then
2505  cat >> confdefs.h <<\EOF
2506#define HAVE_DBM 1
2507EOF
2508 
2509  WITH_DBM=yes
2510 
2511  echo "$ac_t""yes" 1>&6
2512else
2513  echo "$ac_t""no" 1>&6
2514fi
2515
2516echo $ac_n "checking for working const""... $ac_c" 1>&6
2517echo "configure:2518: checking for working const" >&5
2518if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2519  echo $ac_n "(cached) $ac_c" 1>&6
2520else
2521  cat > conftest.$ac_ext <<EOF
2522#line 2523 "configure"
2523#include "confdefs.h"
2524
2525int main() {
2526
2527/* Ultrix mips cc rejects this.  */
2528typedef int charset[2]; const charset x;
2529/* SunOS 4.1.1 cc rejects this.  */
2530char const *const *ccp;
2531char **p;
2532/* NEC SVR4.0.2 mips cc rejects this.  */
2533struct point {int x, y;};
2534static struct point const zero = {0,0};
2535/* AIX XL C 1.02.0.0 rejects this.
2536   It does not let you subtract one const X* pointer from another in an arm
2537   of an if-expression whose if-part is not a constant expression */
2538const char *g = "string";
2539ccp = &g + (g ? g-g : 0);
2540/* HPUX 7.0 cc rejects these. */
2541++ccp;
2542p = (char**) ccp;
2543ccp = (char const *const *) p;
2544{ /* SCO 3.2v4 cc rejects this.  */
2545  char *t;
2546  char const *s = 0 ? (char *) 0 : (char const *) 0;
2547
2548  *t++ = 0;
2549}
2550{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2551  int x[] = {25, 17};
2552  const int *foo = &x[0];
2553  ++foo;
2554}
2555{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2556  typedef const int *iptr;
2557  iptr p = 0;
2558  ++p;
2559}
2560{ /* AIX XL C 1.02.0.0 rejects this saying
2561     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2562  struct s { int j; const int *ap[3]; };
2563  struct s *b; b->j = 5;
2564}
2565{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2566  const int foo = 10;
2567}
2568
2569; return 0; }
2570EOF
2571if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2572  rm -rf conftest*
2573  ac_cv_c_const=yes
2574else
2575  echo "configure: failed program was:" >&5
2576  cat conftest.$ac_ext >&5
2577  rm -rf conftest*
2578  ac_cv_c_const=no
2579fi
2580rm -f conftest*
2581fi
2582
2583echo "$ac_t""$ac_cv_c_const" 1>&6
2584if test $ac_cv_c_const = no; then
2585  cat >> confdefs.h <<\EOF
2586#define const
2587EOF
2588
2589fi
2590
2591echo $ac_n "checking for inline""... $ac_c" 1>&6
2592echo "configure:2593: checking for inline" >&5
2593if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2594  echo $ac_n "(cached) $ac_c" 1>&6
2595else
2596  ac_cv_c_inline=no
2597for ac_kw in inline __inline__ __inline; do
2598  cat > conftest.$ac_ext <<EOF
2599#line 2600 "configure"
2600#include "confdefs.h"
2601
2602int main() {
2603} $ac_kw foo() {
2604; return 0; }
2605EOF
2606if { (eval echo configure:2607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2607  rm -rf conftest*
2608  ac_cv_c_inline=$ac_kw; break
2609else
2610  echo "configure: failed program was:" >&5
2611  cat conftest.$ac_ext >&5
2612fi
2613rm -f conftest*
2614done
2615
2616fi
2617
2618echo "$ac_t""$ac_cv_c_inline" 1>&6
2619case "$ac_cv_c_inline" in
2620  inline | yes) ;;
2621  no) cat >> confdefs.h <<\EOF
2622#define inline
2623EOF
2624 ;;
2625  *)  cat >> confdefs.h <<EOF
2626#define inline $ac_cv_c_inline
2627EOF
2628 ;;
2629esac
2630
2631echo $ac_n "checking for size_t""... $ac_c" 1>&6
2632echo "configure:2633: checking for size_t" >&5
2633if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2634  echo $ac_n "(cached) $ac_c" 1>&6
2635else
2636  cat > conftest.$ac_ext <<EOF
2637#line 2638 "configure"
2638#include "confdefs.h"
2639#include <sys/types.h>
2640#if STDC_HEADERS
2641#include <stdlib.h>
2642#include <stddef.h>
2643#endif
2644EOF
2645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2646  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2647  rm -rf conftest*
2648  ac_cv_type_size_t=yes
2649else
2650  rm -rf conftest*
2651  ac_cv_type_size_t=no
2652fi
2653rm -f conftest*
2654
2655fi
2656echo "$ac_t""$ac_cv_type_size_t" 1>&6
2657if test $ac_cv_type_size_t = no; then
2658  cat >> confdefs.h <<\EOF
2659#define size_t unsigned
2660EOF
2661
2662fi
2663
2664echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2665echo "configure:2666: checking whether time.h and sys/time.h may both be included" >&5
2666if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2667  echo $ac_n "(cached) $ac_c" 1>&6
2668else
2669  cat > conftest.$ac_ext <<EOF
2670#line 2671 "configure"
2671#include "confdefs.h"
2672#include <sys/types.h>
2673#include <sys/time.h>
2674#include <time.h>
2675int main() {
2676struct tm *tp;
2677; return 0; }
2678EOF
2679if { (eval echo configure:2680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2680  rm -rf conftest*
2681  ac_cv_header_time=yes
2682else
2683  echo "configure: failed program was:" >&5
2684  cat conftest.$ac_ext >&5
2685  rm -rf conftest*
2686  ac_cv_header_time=no
2687fi
2688rm -f conftest*
2689fi
2690
2691echo "$ac_t""$ac_cv_header_time" 1>&6
2692if test $ac_cv_header_time = yes; then
2693  cat >> confdefs.h <<\EOF
2694#define TIME_WITH_SYS_TIME 1
2695EOF
2696
2697fi
2698
2699echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2700echo "configure:2701: checking whether struct tm is in sys/time.h or time.h" >&5
2701if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2702  echo $ac_n "(cached) $ac_c" 1>&6
2703else
2704  cat > conftest.$ac_ext <<EOF
2705#line 2706 "configure"
2706#include "confdefs.h"
2707#include <sys/types.h>
2708#include <time.h>
2709int main() {
2710struct tm *tp; tp->tm_sec;
2711; return 0; }
2712EOF
2713if { (eval echo configure:2714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2714  rm -rf conftest*
2715  ac_cv_struct_tm=time.h
2716else
2717  echo "configure: failed program was:" >&5
2718  cat conftest.$ac_ext >&5
2719  rm -rf conftest*
2720  ac_cv_struct_tm=sys/time.h
2721fi
2722rm -f conftest*
2723fi
2724
2725echo "$ac_t""$ac_cv_struct_tm" 1>&6
2726if test $ac_cv_struct_tm = sys/time.h; then
2727  cat >> confdefs.h <<\EOF
2728#define TM_IN_SYS_TIME 1
2729EOF
2730
2731fi
2732
2733
2734# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2735# for constant arguments.  Useless!
2736echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2737echo "configure:2738: checking for working alloca.h" >&5
2738if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2739  echo $ac_n "(cached) $ac_c" 1>&6
2740else
2741  cat > conftest.$ac_ext <<EOF
2742#line 2743 "configure"
2743#include "confdefs.h"
2744#include <alloca.h>
2745int main() {
2746char *p = alloca(2 * sizeof(int));
2747; return 0; }
2748EOF
2749if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2750  rm -rf conftest*
2751  ac_cv_header_alloca_h=yes
2752else
2753  echo "configure: failed program was:" >&5
2754  cat conftest.$ac_ext >&5
2755  rm -rf conftest*
2756  ac_cv_header_alloca_h=no
2757fi
2758rm -f conftest*
2759fi
2760
2761echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2762if test $ac_cv_header_alloca_h = yes; then
2763  cat >> confdefs.h <<\EOF
2764#define HAVE_ALLOCA_H 1
2765EOF
2766
2767fi
2768
2769echo $ac_n "checking for alloca""... $ac_c" 1>&6
2770echo "configure:2771: checking for alloca" >&5
2771if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2772  echo $ac_n "(cached) $ac_c" 1>&6
2773else
2774  cat > conftest.$ac_ext <<EOF
2775#line 2776 "configure"
2776#include "confdefs.h"
2777
2778#ifdef __GNUC__
2779# define alloca __builtin_alloca
2780#else
2781# if HAVE_ALLOCA_H
2782#  include <alloca.h>
2783# else
2784#  ifdef _AIX
2785 #pragma alloca
2786#  else
2787#   ifndef alloca /* predefined by HP cc +Olibcalls */
2788char *alloca ();
2789#   endif
2790#  endif
2791# endif
2792#endif
2793
2794int main() {
2795char *p = (char *) alloca(1);
2796; return 0; }
2797EOF
2798if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2799  rm -rf conftest*
2800  ac_cv_func_alloca_works=yes
2801else
2802  echo "configure: failed program was:" >&5
2803  cat conftest.$ac_ext >&5
2804  rm -rf conftest*
2805  ac_cv_func_alloca_works=no
2806fi
2807rm -f conftest*
2808fi
2809
2810echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2811if test $ac_cv_func_alloca_works = yes; then
2812  cat >> confdefs.h <<\EOF
2813#define HAVE_ALLOCA 1
2814EOF
2815
2816fi
2817
2818if test $ac_cv_func_alloca_works = no; then
2819  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2820  # that cause trouble.  Some versions do not even contain alloca or
2821  # contain a buggy version.  If you still want to use their alloca,
2822  # use ar to extract alloca.o from them instead of compiling alloca.c.
2823  ALLOCA=alloca.o
2824  cat >> confdefs.h <<\EOF
2825#define C_ALLOCA 1
2826EOF
2827
2828
2829echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2830echo "configure:2831: checking whether alloca needs Cray hooks" >&5
2831if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2832  echo $ac_n "(cached) $ac_c" 1>&6
2833else
2834  cat > conftest.$ac_ext <<EOF
2835#line 2836 "configure"
2836#include "confdefs.h"
2837#if defined(CRAY) && ! defined(CRAY2)
2838webecray
2839#else
2840wenotbecray
2841#endif
2842
2843EOF
2844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2845  egrep "webecray" >/dev/null 2>&1; then
2846  rm -rf conftest*
2847  ac_cv_os_cray=yes
2848else
2849  rm -rf conftest*
2850  ac_cv_os_cray=no
2851fi
2852rm -f conftest*
2853
2854fi
2855
2856echo "$ac_t""$ac_cv_os_cray" 1>&6
2857if test $ac_cv_os_cray = yes; then
2858for ac_func in _getb67 GETB67 getb67; do
2859  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2860echo "configure:2861: checking for $ac_func" >&5
2861if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2862  echo $ac_n "(cached) $ac_c" 1>&6
2863else
2864  cat > conftest.$ac_ext <<EOF
2865#line 2866 "configure"
2866#include "confdefs.h"
2867/* System header to define __stub macros and hopefully few prototypes,
2868    which can conflict with char $ac_func(); below.  */
2869#include <assert.h>
2870/* Override any gcc2 internal prototype to avoid an error.  */
2871/* We use char because int might match the return type of a gcc2
2872    builtin and then its argument prototype would still apply.  */
2873char $ac_func();
2874
2875int main() {
2876
2877/* The GNU C library defines this for functions which it implements
2878    to always fail with ENOSYS.  Some functions are actually named
2879    something starting with __ and the normal name is an alias.  */
2880#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2881choke me
2882#else
2883$ac_func();
2884#endif
2885
2886; return 0; }
2887EOF
2888if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2889  rm -rf conftest*
2890  eval "ac_cv_func_$ac_func=yes"
2891else
2892  echo "configure: failed program was:" >&5
2893  cat conftest.$ac_ext >&5
2894  rm -rf conftest*
2895  eval "ac_cv_func_$ac_func=no"
2896fi
2897rm -f conftest*
2898fi
2899
2900if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2901  echo "$ac_t""yes" 1>&6
2902  cat >> confdefs.h <<EOF
2903#define CRAY_STACKSEG_END $ac_func
2904EOF
2905
2906  break
2907else
2908  echo "$ac_t""no" 1>&6
2909fi
2910
2911done
2912fi
2913
2914echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2915echo "configure:2916: checking stack direction for C alloca" >&5
2916if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2917  echo $ac_n "(cached) $ac_c" 1>&6
2918else
2919  if test "$cross_compiling" = yes; then
2920  ac_cv_c_stack_direction=0
2921else
2922  cat > conftest.$ac_ext <<EOF
2923#line 2924 "configure"
2924#include "confdefs.h"
2925find_stack_direction ()
2926{
2927  static char *addr = 0;
2928  auto char dummy;
2929  if (addr == 0)
2930    {
2931      addr = &dummy;
2932      return find_stack_direction ();
2933    }
2934  else
2935    return (&dummy > addr) ? 1 : -1;
2936}
2937main ()
2938{
2939  exit (find_stack_direction() < 0);
2940}
2941EOF
2942if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2943then
2944  ac_cv_c_stack_direction=1
2945else
2946  echo "configure: failed program was:" >&5
2947  cat conftest.$ac_ext >&5
2948  rm -fr conftest*
2949  ac_cv_c_stack_direction=-1
2950fi
2951rm -fr conftest*
2952fi
2953
2954fi
2955
2956echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2957cat >> confdefs.h <<EOF
2958#define STACK_DIRECTION $ac_cv_c_stack_direction
2959EOF
2960
2961fi
2962
2963if test $ac_cv_prog_gcc = yes; then
2964    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2965echo "configure:2966: checking whether ${CC-cc} needs -traditional" >&5
2966if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2967  echo $ac_n "(cached) $ac_c" 1>&6
2968else
2969    ac_pattern="Autoconf.*'x'"
2970  cat > conftest.$ac_ext <<EOF
2971#line 2972 "configure"
2972#include "confdefs.h"
2973#include <sgtty.h>
2974Autoconf TIOCGETP
2975EOF
2976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2977  egrep "$ac_pattern" >/dev/null 2>&1; then
2978  rm -rf conftest*
2979  ac_cv_prog_gcc_traditional=yes
2980else
2981  rm -rf conftest*
2982  ac_cv_prog_gcc_traditional=no
2983fi
2984rm -f conftest*
2985
2986
2987  if test $ac_cv_prog_gcc_traditional = no; then
2988    cat > conftest.$ac_ext <<EOF
2989#line 2990 "configure"
2990#include "confdefs.h"
2991#include <termio.h>
2992Autoconf TCGETA
2993EOF
2994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2995  egrep "$ac_pattern" >/dev/null 2>&1; then
2996  rm -rf conftest*
2997  ac_cv_prog_gcc_traditional=yes
2998fi
2999rm -f conftest*
3000
3001  fi
3002fi
3003
3004echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3005  if test $ac_cv_prog_gcc_traditional = yes; then
3006    CC="$CC -traditional"
3007  fi
3008fi
3009
3010for ac_hdr in unistd.h
3011do
3012ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3013echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3014echo "configure:3015: checking for $ac_hdr" >&5
3015if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3016  echo $ac_n "(cached) $ac_c" 1>&6
3017else
3018  cat > conftest.$ac_ext <<EOF
3019#line 3020 "configure"
3020#include "confdefs.h"
3021#include <$ac_hdr>
3022EOF
3023ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3024{ (eval echo configure:3025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3025ac_err=`grep -v '^ *+' conftest.out`
3026if test -z "$ac_err"; then
3027  rm -rf conftest*
3028  eval "ac_cv_header_$ac_safe=yes"
3029else
3030  echo "$ac_err" >&5
3031  echo "configure: failed program was:" >&5
3032  cat conftest.$ac_ext >&5
3033  rm -rf conftest*
3034  eval "ac_cv_header_$ac_safe=no"
3035fi
3036rm -f conftest*
3037fi
3038if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3039  echo "$ac_t""yes" 1>&6
3040    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3041  cat >> confdefs.h <<EOF
3042#define $ac_tr_hdr 1
3043EOF
3044 
3045else
3046  echo "$ac_t""no" 1>&6
3047fi
3048done
3049
3050for ac_func in getpagesize
3051do
3052echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3053echo "configure:3054: checking for $ac_func" >&5
3054if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3055  echo $ac_n "(cached) $ac_c" 1>&6
3056else
3057  cat > conftest.$ac_ext <<EOF
3058#line 3059 "configure"
3059#include "confdefs.h"
3060/* System header to define __stub macros and hopefully few prototypes,
3061    which can conflict with char $ac_func(); below.  */
3062#include <assert.h>
3063/* Override any gcc2 internal prototype to avoid an error.  */
3064/* We use char because int might match the return type of a gcc2
3065    builtin and then its argument prototype would still apply.  */
3066char $ac_func();
3067
3068int main() {
3069
3070/* The GNU C library defines this for functions which it implements
3071    to always fail with ENOSYS.  Some functions are actually named
3072    something starting with __ and the normal name is an alias.  */
3073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3074choke me
3075#else
3076$ac_func();
3077#endif
3078
3079; return 0; }
3080EOF
3081if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3082  rm -rf conftest*
3083  eval "ac_cv_func_$ac_func=yes"
3084else
3085  echo "configure: failed program was:" >&5
3086  cat conftest.$ac_ext >&5
3087  rm -rf conftest*
3088  eval "ac_cv_func_$ac_func=no"
3089fi
3090rm -f conftest*
3091fi
3092
3093if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3094  echo "$ac_t""yes" 1>&6
3095    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3096  cat >> confdefs.h <<EOF
3097#define $ac_tr_func 1
3098EOF
3099 
3100else
3101  echo "$ac_t""no" 1>&6
3102fi
3103done
3104
3105echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3106echo "configure:3107: checking for working mmap" >&5
3107if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3108  echo $ac_n "(cached) $ac_c" 1>&6
3109else
3110  if test "$cross_compiling" = yes; then
3111  ac_cv_func_mmap_fixed_mapped=no
3112else
3113  cat > conftest.$ac_ext <<EOF
3114#line 3115 "configure"
3115#include "confdefs.h"
3116
3117/* Thanks to Mike Haertel and Jim Avera for this test.
3118   Here is a matrix of mmap possibilities:
3119        mmap private not fixed
3120        mmap private fixed at somewhere currently unmapped
3121        mmap private fixed at somewhere already mapped
3122        mmap shared not fixed
3123        mmap shared fixed at somewhere currently unmapped
3124        mmap shared fixed at somewhere already mapped
3125   For private mappings, we should verify that changes cannot be read()
3126   back from the file, nor mmap's back from the file at a different
3127   address.  (There have been systems where private was not correctly
3128   implemented like the infamous i386 svr4.0, and systems where the
3129   VM page cache was not coherent with the filesystem buffer cache
3130   like early versions of FreeBSD and possibly contemporary NetBSD.)
3131   For shared mappings, we should conversely verify that changes get
3132   propogated back to all the places they're supposed to be.
3133
3134   Grep wants private fixed already mapped.
3135   The main things grep needs to know about mmap are:
3136   * does it exist and is it safe to write into the mmap'd area
3137   * how to use it (BSD variants)  */
3138#include <sys/types.h>
3139#include <fcntl.h>
3140#include <sys/mman.h>
3141
3142/* This mess was copied from the GNU getpagesize.h.  */
3143#ifndef HAVE_GETPAGESIZE
3144# ifdef HAVE_UNISTD_H
3145#  include <unistd.h>
3146# endif
3147
3148/* Assume that all systems that can run configure have sys/param.h.  */
3149# ifndef HAVE_SYS_PARAM_H
3150#  define HAVE_SYS_PARAM_H 1
3151# endif
3152
3153# ifdef _SC_PAGESIZE
3154#  define getpagesize() sysconf(_SC_PAGESIZE)
3155# else /* no _SC_PAGESIZE */
3156#  ifdef HAVE_SYS_PARAM_H
3157#   include <sys/param.h>
3158#   ifdef EXEC_PAGESIZE
3159#    define getpagesize() EXEC_PAGESIZE
3160#   else /* no EXEC_PAGESIZE */
3161#    ifdef NBPG
3162#     define getpagesize() NBPG * CLSIZE
3163#     ifndef CLSIZE
3164#      define CLSIZE 1
3165#     endif /* no CLSIZE */
3166#    else /* no NBPG */
3167#     ifdef NBPC
3168#      define getpagesize() NBPC
3169#     else /* no NBPC */
3170#      ifdef PAGESIZE
3171#       define getpagesize() PAGESIZE
3172#      endif /* PAGESIZE */
3173#     endif /* no NBPC */
3174#    endif /* no NBPG */
3175#   endif /* no EXEC_PAGESIZE */
3176#  else /* no HAVE_SYS_PARAM_H */
3177#   define getpagesize() 8192   /* punt totally */
3178#  endif /* no HAVE_SYS_PARAM_H */
3179# endif /* no _SC_PAGESIZE */
3180
3181#endif /* no HAVE_GETPAGESIZE */
3182
3183#ifdef __cplusplus
3184extern "C" { void *malloc(unsigned); }
3185#else
3186char *malloc();
3187#endif
3188
3189int
3190main()
3191{
3192        char *data, *data2, *data3;
3193        int i, pagesize;
3194        int fd;
3195
3196        pagesize = getpagesize();
3197
3198        /*
3199         * First, make a file with some known garbage in it.
3200         */
3201        data = malloc(pagesize);
3202        if (!data)
3203                exit(1);
3204        for (i = 0; i < pagesize; ++i)
3205                *(data + i) = rand();
3206        umask(0);
3207        fd = creat("conftestmmap", 0600);
3208        if (fd < 0)
3209                exit(1);
3210        if (write(fd, data, pagesize) != pagesize)
3211                exit(1);
3212        close(fd);
3213
3214        /*
3215         * Next, try to mmap the file at a fixed address which
3216         * already has something else allocated at it.  If we can,
3217         * also make sure that we see the same garbage.
3218         */
3219        fd = open("conftestmmap", O_RDWR);
3220        if (fd < 0)
3221                exit(1);
3222        data2 = malloc(2 * pagesize);
3223        if (!data2)
3224                exit(1);
3225        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3226        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3227            MAP_PRIVATE | MAP_FIXED, fd, 0L))
3228                exit(1);
3229        for (i = 0; i < pagesize; ++i)
3230                if (*(data + i) != *(data2 + i))
3231                        exit(1);
3232
3233        /*
3234         * Finally, make sure that changes to the mapped area
3235         * do not percolate back to the file as seen by read().
3236         * (This is a bug on some variants of i386 svr4.0.)
3237         */
3238        for (i = 0; i < pagesize; ++i)
3239                *(data2 + i) = *(data2 + i) + 1;
3240        data3 = malloc(pagesize);
3241        if (!data3)
3242                exit(1);
3243        if (read(fd, data3, pagesize) != pagesize)
3244                exit(1);
3245        for (i = 0; i < pagesize; ++i)
3246                if (*(data + i) != *(data3 + i))
3247                        exit(1);
3248        close(fd);
3249        unlink("conftestmmap");
3250        exit(0);
3251}
3252
3253EOF
3254if { (eval echo configure:3255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3255then
3256  ac_cv_func_mmap_fixed_mapped=yes
3257else
3258  echo "configure: failed program was:" >&5
3259  cat conftest.$ac_ext >&5
3260  rm -fr conftest*
3261  ac_cv_func_mmap_fixed_mapped=no
3262fi
3263rm -fr conftest*
3264fi
3265
3266fi
3267
3268echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3269if test $ac_cv_func_mmap_fixed_mapped = yes; then
3270  cat >> confdefs.h <<\EOF
3271#define HAVE_MMAP 1
3272EOF
3273
3274fi
3275
3276echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3277echo "configure:3278: checking return type of signal handlers" >&5
3278if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3279  echo $ac_n "(cached) $ac_c" 1>&6
3280else
3281  cat > conftest.$ac_ext <<EOF
3282#line 3283 "configure"
3283#include "confdefs.h"
3284#include <sys/types.h>
3285#include <signal.h>
3286#ifdef signal
3287#undef signal
3288#endif
3289#ifdef __cplusplus
3290extern "C" void (*signal (int, void (*)(int)))(int);
3291#else
3292void (*signal ()) ();
3293#endif
3294
3295int main() {
3296int i;
3297; return 0; }
3298EOF
3299if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3300  rm -rf conftest*
3301  ac_cv_type_signal=void
3302else
3303  echo "configure: failed program was:" >&5
3304  cat conftest.$ac_ext >&5
3305  rm -rf conftest*
3306  ac_cv_type_signal=int
3307fi
3308rm -f conftest*
3309fi
3310
3311echo "$ac_t""$ac_cv_type_signal" 1>&6
3312cat >> confdefs.h <<EOF
3313#define RETSIGTYPE $ac_cv_type_signal
3314EOF
3315
3316
3317echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3318echo "configure:3319: checking for vprintf" >&5
3319if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3320  echo $ac_n "(cached) $ac_c" 1>&6
3321else
3322  cat > conftest.$ac_ext <<EOF
3323#line 3324 "configure"
3324#include "confdefs.h"
3325/* System header to define __stub macros and hopefully few prototypes,
3326    which can conflict with char vprintf(); below.  */
3327#include <assert.h>
3328/* Override any gcc2 internal prototype to avoid an error.  */
3329/* We use char because int might match the return type of a gcc2
3330    builtin and then its argument prototype would still apply.  */
3331char vprintf();
3332
3333int main() {
3334
3335/* The GNU C library defines this for functions which it implements
3336    to always fail with ENOSYS.  Some functions are actually named
3337    something starting with __ and the normal name is an alias.  */
3338#if defined (__stub_vprintf) || defined (__stub___vprintf)
3339choke me
3340#else
3341vprintf();
3342#endif
3343
3344; return 0; }
3345EOF
3346if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3347  rm -rf conftest*
3348  eval "ac_cv_func_vprintf=yes"
3349else
3350  echo "configure: failed program was:" >&5
3351  cat conftest.$ac_ext >&5
3352  rm -rf conftest*
3353  eval "ac_cv_func_vprintf=no"
3354fi
3355rm -f conftest*
3356fi
3357
3358if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3359  echo "$ac_t""yes" 1>&6
3360  cat >> confdefs.h <<\EOF
3361#define HAVE_VPRINTF 1
3362EOF
3363
3364else
3365  echo "$ac_t""no" 1>&6
3366fi
3367
3368if test "$ac_cv_func_vprintf" != yes; then
3369echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3370echo "configure:3371: checking for _doprnt" >&5
3371if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3372  echo $ac_n "(cached) $ac_c" 1>&6
3373else
3374  cat > conftest.$ac_ext <<EOF
3375#line 3376 "configure"
3376#include "confdefs.h"
3377/* System header to define __stub macros and hopefully few prototypes,
3378    which can conflict with char _doprnt(); below.  */
3379#include <assert.h>
3380/* Override any gcc2 internal prototype to avoid an error.  */
3381/* We use char because int might match the return type of a gcc2
3382    builtin and then its argument prototype would still apply.  */
3383char _doprnt();
3384
3385int main() {
3386
3387/* The GNU C library defines this for functions which it implements
3388    to always fail with ENOSYS.  Some functions are actually named
3389    something starting with __ and the normal name is an alias.  */
3390#if defined (__stub__doprnt) || defined (__stub____doprnt)
3391choke me
3392#else
3393_doprnt();
3394#endif
3395
3396; return 0; }
3397EOF
3398if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3399  rm -rf conftest*
3400  eval "ac_cv_func__doprnt=yes"
3401else
3402  echo "configure: failed program was:" >&5
3403  cat conftest.$ac_ext >&5
3404  rm -rf conftest*
3405  eval "ac_cv_func__doprnt=no"
3406fi
3407rm -f conftest*
3408fi
3409
3410if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3411  echo "$ac_t""yes" 1>&6
3412  cat >> confdefs.h <<\EOF
3413#define HAVE_DOPRNT 1
3414EOF
3415
3416else
3417  echo "$ac_t""no" 1>&6
3418fi
3419
3420fi
3421
3422for ac_func in gettimeofday strstr strtod strtol atexit bcopy
3423do
3424echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3425echo "configure:3426: checking for $ac_func" >&5
3426if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 $ac_func(); 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 $ac_func();
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_$ac_func) || defined (__stub___$ac_func)
3446choke me
3447#else
3448$ac_func();
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_$ac_func=yes"
3456else
3457  echo "configure: failed program was:" >&5
3458  cat conftest.$ac_ext >&5
3459  rm -rf conftest*
3460  eval "ac_cv_func_$ac_func=no"
3461fi
3462rm -f conftest*
3463fi
3464
3465if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3466  echo "$ac_t""yes" 1>&6
3467    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3468  cat >> confdefs.h <<EOF
3469#define $ac_tr_func 1
3470EOF
3471 
3472else
3473  echo "$ac_t""no" 1>&6
3474fi
3475done
3476
3477
3478
3479echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
3480echo "configure:3481: checking whether your machine has correct arithmetic shifts" >&5
3481if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
3482  echo $ac_n "(cached) $ac_c" 1>&6
3483else
3484  if test "$cross_compiling" = yes; then
3485  if test "$ac_c_cross_dos" = yes; then
3486     ac_cv_shift=yes;
3487   else
3488     echo "$ac_t""no" 1>&6
3489     { echo "configure: error: cross compilation without default value" 1>&2; exit 1; }
3490   fi
3491else
3492  cat > conftest.$ac_ext <<EOF
3493#line 3494 "configure"
3494#include "confdefs.h"
3495 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
3496EOF
3497if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3498then
3499  ac_cv_shift=yes
3500else
3501  echo "configure: failed program was:" >&5
3502  cat conftest.$ac_ext >&5
3503  rm -fr conftest*
3504  ac_cv_shift=no
3505fi
3506rm -fr conftest*
3507fi
3508
3509fi
3510
3511
3512if test "$ac_cv_shift" = yes; then   
3513  echo "$ac_t""yes" 1>&6
3514else
3515  echo "$ac_t""no" 1>&6
3516  { echo "configure: error: need  -2 >> 1 == -1" 1>&2; exit 1; }
3517fi
3518
3519echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
3520echo "configure:3521: checking whether vsprintf returns number of printed chars" >&5
3521if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
3522  echo $ac_n "(cached) $ac_c" 1>&6
3523else
3524  if test "$cross_compiling" = yes; then
3525  ac_cv_returns_n_of_chars=no
3526else
3527  cat > conftest.$ac_ext <<EOF
3528#line 3529 "configure"
3529#include "confdefs.h"
3530#include <stdio.h>
3531 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
3532EOF
3533if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3534then
3535  ac_cv_returns_n_of_chars=yes
3536else
3537  echo "configure: failed program was:" >&5
3538  cat conftest.$ac_ext >&5
3539  rm -fr conftest*
3540  ac_cv_returns_n_of_chars=no
3541fi
3542rm -fr conftest*
3543fi
3544
3545fi
3546
3547if test "$ac_cv_returns_n_of_chars" = yes; then
3548  echo "$ac_t""yes" 1>&6
3549else
3550  echo "$ac_t""no" 1>&6
3551  cat >> confdefs.h <<\EOF
3552#define BSD_SPRINTF 1
3553EOF
3554
3555fi
3556
3557
3558echo $ac_n "checking size of char""... $ac_c" 1>&6
3559echo "configure:3560: checking size of char" >&5
3560if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
3561  echo $ac_n "(cached) $ac_c" 1>&6
3562else
3563  if test "$cross_compiling" = yes; then
3564  ac_cv_sizeof_char=1
3565else
3566  cat > conftest.$ac_ext <<EOF
3567#line 3568 "configure"
3568#include "confdefs.h"
3569#include <stdio.h>
3570main()
3571{
3572  FILE *f=fopen("conftestval", "w");
3573  if (!f) exit(1);
3574  fprintf(f, "%d\n", sizeof(char));
3575  exit(0);
3576}
3577EOF
3578if { (eval echo configure:3579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3579then
3580  ac_cv_sizeof_char=`cat conftestval`
3581else
3582  echo "configure: failed program was:" >&5
3583  cat conftest.$ac_ext >&5
3584  rm -fr conftest*
3585  ac_cv_sizeof_char=0
3586fi
3587rm -fr conftest*
3588fi
3589
3590fi
3591echo "$ac_t""$ac_cv_sizeof_char" 1>&6
3592cat >> confdefs.h <<EOF
3593#define SIZEOF_CHAR $ac_cv_sizeof_char
3594EOF
3595
3596
3597echo $ac_n "checking size of short""... $ac_c" 1>&6
3598echo "configure:3599: checking size of short" >&5
3599if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3600  echo $ac_n "(cached) $ac_c" 1>&6
3601else
3602  if test "$cross_compiling" = yes; then
3603  ac_cv_sizeof_short=2
3604else
3605  cat > conftest.$ac_ext <<EOF
3606#line 3607 "configure"
3607#include "confdefs.h"
3608#include <stdio.h>
3609main()
3610{
3611  FILE *f=fopen("conftestval", "w");
3612  if (!f) exit(1);
3613  fprintf(f, "%d\n", sizeof(short));
3614  exit(0);
3615}
3616EOF
3617if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3618then
3619  ac_cv_sizeof_short=`cat conftestval`
3620else
3621  echo "configure: failed program was:" >&5
3622  cat conftest.$ac_ext >&5
3623  rm -fr conftest*
3624  ac_cv_sizeof_short=0
3625fi
3626rm -fr conftest*
3627fi
3628
3629fi
3630echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3631cat >> confdefs.h <<EOF
3632#define SIZEOF_SHORT $ac_cv_sizeof_short
3633EOF
3634
3635
3636echo $ac_n "checking size of int""... $ac_c" 1>&6
3637echo "configure:3638: checking size of int" >&5
3638if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3639  echo $ac_n "(cached) $ac_c" 1>&6
3640else
3641  if test "$cross_compiling" = yes; then
3642  ac_cv_sizeof_int=4
3643else
3644  cat > conftest.$ac_ext <<EOF
3645#line 3646 "configure"
3646#include "confdefs.h"
3647#include <stdio.h>
3648main()
3649{
3650  FILE *f=fopen("conftestval", "w");
3651  if (!f) exit(1);
3652  fprintf(f, "%d\n", sizeof(int));
3653  exit(0);
3654}
3655EOF
3656if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3657then
3658  ac_cv_sizeof_int=`cat conftestval`
3659else
3660  echo "configure: failed program was:" >&5
3661  cat conftest.$ac_ext >&5
3662  rm -fr conftest*
3663  ac_cv_sizeof_int=0
3664fi
3665rm -fr conftest*
3666fi
3667
3668fi
3669echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3670cat >> confdefs.h <<EOF
3671#define SIZEOF_INT $ac_cv_sizeof_int
3672EOF
3673
3674
3675echo $ac_n "checking size of long""... $ac_c" 1>&6
3676echo "configure:3677: checking size of long" >&5
3677if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3678  echo $ac_n "(cached) $ac_c" 1>&6
3679else
3680  if test "$cross_compiling" = yes; then
3681  ac_cv_sizeof_long=4
3682else
3683  cat > conftest.$ac_ext <<EOF
3684#line 3685 "configure"
3685#include "confdefs.h"
3686#include <stdio.h>
3687main()
3688{
3689  FILE *f=fopen("conftestval", "w");
3690  if (!f) exit(1);
3691  fprintf(f, "%d\n", sizeof(long));
3692  exit(0);
3693}
3694EOF
3695if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3696then
3697  ac_cv_sizeof_long=`cat conftestval`
3698else
3699  echo "configure: failed program was:" >&5
3700  cat conftest.$ac_ext >&5
3701  rm -fr conftest*
3702  ac_cv_sizeof_long=0
3703fi
3704rm -fr conftest*
3705fi
3706
3707fi
3708echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3709cat >> confdefs.h <<EOF
3710#define SIZEOF_LONG $ac_cv_sizeof_long
3711EOF
3712
3713
3714echo $ac_n "checking size of void*""... $ac_c" 1>&6
3715echo "configure:3716: checking size of void*" >&5
3716if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
3717  echo $ac_n "(cached) $ac_c" 1>&6
3718else
3719  if test "$cross_compiling" = yes; then
3720  ac_cv_sizeof_voidp=4
3721else
3722  cat > conftest.$ac_ext <<EOF
3723#line 3724 "configure"
3724#include "confdefs.h"
3725#include <stdio.h>
3726main()
3727{
3728  FILE *f=fopen("conftestval", "w");
3729  if (!f) exit(1);
3730  fprintf(f, "%d\n", sizeof(void*));
3731  exit(0);
3732}
3733EOF
3734if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3735then
3736  ac_cv_sizeof_voidp=`cat conftestval`
3737else
3738  echo "configure: failed program was:" >&5
3739  cat conftest.$ac_ext >&5
3740  rm -fr conftest*
3741  ac_cv_sizeof_voidp=0
3742fi
3743rm -fr conftest*
3744fi
3745
3746fi
3747echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6
3748cat >> confdefs.h <<EOF
3749#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
3750EOF
3751
3752
3753echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3754echo "configure:3755: checking whether byte ordering is bigendian" >&5
3755if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3756  echo $ac_n "(cached) $ac_c" 1>&6
3757else
3758  ac_cv_c_bigendian=unknown
3759# See if sys/param.h defines the BYTE_ORDER macro.
3760cat > conftest.$ac_ext <<EOF
3761#line 3762 "configure"
3762#include "confdefs.h"
3763#include <sys/types.h>
3764#include <sys/param.h>
3765int main() {
3766
3767#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3768 bogus endian macros
3769#endif
3770; return 0; }
3771EOF
3772if { (eval echo configure:3773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3773  rm -rf conftest*
3774  # It does; now see whether it defined to BIG_ENDIAN or not.
3775cat > conftest.$ac_ext <<EOF
3776#line 3777 "configure"
3777#include "confdefs.h"
3778#include <sys/types.h>
3779#include <sys/param.h>
3780int main() {
3781
3782#if BYTE_ORDER != BIG_ENDIAN
3783 not big endian
3784#endif
3785; return 0; }
3786EOF
3787if { (eval echo configure:3788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3788  rm -rf conftest*
3789  ac_cv_c_bigendian=yes
3790else
3791  echo "configure: failed program was:" >&5
3792  cat conftest.$ac_ext >&5
3793  rm -rf conftest*
3794  ac_cv_c_bigendian=no
3795fi
3796rm -f conftest*
3797else
3798  echo "configure: failed program was:" >&5
3799  cat conftest.$ac_ext >&5
3800fi
3801rm -f conftest*
3802if test $ac_cv_c_bigendian = unknown; then
3803if test "$cross_compiling" = yes; then
3804    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3805else
3806  cat > conftest.$ac_ext <<EOF
3807#line 3808 "configure"
3808#include "confdefs.h"
3809main () {
3810  /* Are we little or big endian?  From Harbison&Steele.  */
3811  union
3812  {
3813    long l;
3814    char c[sizeof (long)];
3815  } u;
3816  u.l = 1;
3817  exit (u.c[sizeof (long) - 1] == 1);
3818}
3819EOF
3820if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3821then
3822  ac_cv_c_bigendian=no
3823else
3824  echo "configure: failed program was:" >&5
3825  cat conftest.$ac_ext >&5
3826  rm -fr conftest*
3827  ac_cv_c_bigendian=yes
3828fi
3829rm -fr conftest*
3830fi
3831
3832fi
3833fi
3834
3835echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3836if test $ac_cv_c_bigendian = yes; then
3837  cat >> confdefs.h <<\EOF
3838#define WORDS_BIGENDIAN 1
3839EOF
3840
3841fi
3842
3843
3844if test "$ac_cv_sizeof_int" != 4; then
3845  { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; }
3846fi
3847
3848if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
3849  { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; }
3850fi
3851
3852echo $ac_n "checking which exponent types to use""... $ac_c" 1>&6
3853echo "configure:3854: checking which exponent types to use" >&5
3854if test "$with_exp_type" = "char"; then
3855  echo "$ac_t""char" 1>&6
3856  cat >> confdefs.h <<\EOF
3857#define EXPONENT_TYPE char
3858EOF
3859
3860  cat >> confdefs.h <<\EOF
3861#define SIZEOF_EXPONENT SIZEOF_CHAR
3862EOF
3863
3864elif test "with_exp_type" = "int"; then
3865  echo "$ac_t""int" 1>&6
3866  cat >> confdefs.h <<\EOF
3867#define EXPONENT_TYPE int
3868EOF
3869
3870  cat >> confdefs.h <<\EOF
3871#define SIZEOF_EXPONENT SIZEOF_INT
3872EOF
3873
3874else
3875  echo "$ac_t""short" 1>&6
3876  cat >> confdefs.h <<\EOF
3877#define EXPONENT_TYPE short
3878EOF
3879
3880  cat >> confdefs.h <<\EOF
3881#define SIZEOF_TYPE SIZEOF_SHORT
3882EOF
3883
3884fi
3885
3886echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
3887echo "configure:3888: checking whether _AIX is defined" >&5
3888if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
3889  echo $ac_n "(cached) $ac_c" 1>&6
3890else
3891  cat > conftest.$ac_ext <<EOF
3892#line 3893 "configure"
3893#include "confdefs.h"
3894#ifdef _AIX
3895    yes
3896#endif
3897
3898EOF
3899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3900  egrep "yes" >/dev/null 2>&1; then
3901  rm -rf conftest*
3902  ac_cv_is_aix=yes
3903else
3904  rm -rf conftest*
3905  ac_cv_is_aix=no
3906fi
3907rm -f conftest*
3908
3909fi
3910
3911if test "$ac_cv_is_aix" = yes; then
3912  echo "$ac_t""yes" 1>&6
3913else
3914  echo "$ac_t""no" 1>&6
3915fi
3916
3917if test ${GXX} = yes; then
3918  if test "$ac_cxxflags_set" = no; then
3919    CXXFLAGS="-O3 -w -fomit-frame-pointer"
3920  fi
3921  CXXTEMPLFLAGS="-fno-implicit-templates"
3922  if test "$ac_cv_is_aix" = yes; then
3923    CXXNOOPTFLAGS="-w"
3924  else
3925    CXXNOOPTFLAGS=$CXXFLAGS
3926  fi
3927  STATIC_LDFLAGS="-Xlinker -Bstatic"
3928else
3929  CXXTEMPFLAGS=""
3930  CXXNOOPTFLAGS=$CXXFLAGS
3931  STATIC_LDFLAGS=""
3932fi
3933
3934
3935
3936
3937if test ${GCC} = yes && test "$ac_cflags_set" = no ; then
3938  CFLAGS="-O3 -w -fomit-frame-pointer"
3939fi
3940
3941trap '' 1 2 15
3942cat > confcache <<\EOF
3943# This file is a shell script that caches the results of configure
3944# tests run on this system so they can be shared between configure
3945# scripts and configure runs.  It is not useful on other systems.
3946# If it contains results you don't want to keep, you may remove or edit it.
3947#
3948# By default, configure uses ./config.cache as the cache file,
3949# creating it if it does not exist already.  You can give configure
3950# the --cache-file=FILE option to use a different cache file; that is
3951# what configure does when it calls configure scripts in
3952# subdirectories, so they share the cache.
3953# Giving --cache-file=/dev/null disables caching, for debugging configure.
3954# config.status only pays attention to the cache file if you give it the
3955# --recheck option to rerun configure.
3956#
3957EOF
3958# The following way of writing the cache mishandles newlines in values,
3959# but we know of no workaround that is simple, portable, and efficient.
3960# So, don't put newlines in cache variables' values.
3961# Ultrix sh set writes to stderr and can't be redirected directly,
3962# and sets the high bit in the cache file unless we assign to the vars.
3963(set) 2>&1 |
3964  case `(ac_space=' '; set) 2>&1` in
3965  *ac_space=\ *)
3966    # `set' does not quote correctly, so add quotes (double-quote substitution
3967    # turns \\\\ into \\, and sed turns \\ into \).
3968    sed -n \
3969      -e "s/'/'\\\\''/g" \
3970      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3971    ;;
3972  *)
3973    # `set' quotes correctly as required by POSIX, so do not add quotes.
3974    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3975    ;;
3976  esac >> confcache
3977if cmp -s $cache_file confcache; then
3978  :
3979else
3980  if test -w $cache_file; then
3981    echo "updating cache $cache_file"
3982    cat confcache > $cache_file
3983  else
3984    echo "not updating unwritable cache $cache_file"
3985  fi
3986fi
3987rm -f confcache
3988
3989trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3990
3991test "x$prefix" = xNONE && prefix=$ac_default_prefix
3992# Let make expand exec_prefix.
3993test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3994
3995# Any assignment to VPATH causes Sun make to only execute
3996# the first set of double-colon rules, so remove it if not needed.
3997# If there is a colon in the path, we need to keep it.
3998if test "x$srcdir" = x.; then
3999  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4000fi
4001
4002trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4003
4004DEFS=-DHAVE_CONFIG_H
4005
4006# Without the "./", some shells look in PATH for config.status.
4007: ${CONFIG_STATUS=./config.status}
4008
4009echo creating $CONFIG_STATUS
4010rm -f $CONFIG_STATUS
4011cat > $CONFIG_STATUS <<EOF
4012#! /bin/sh
4013# Generated automatically by configure.
4014# Run this file to recreate the current configuration.
4015# This directory was configured as follows,
4016# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4017#
4018# $0 $ac_configure_args
4019#
4020# Compiler output produced by configure, useful for debugging
4021# configure, is in ./config.log if it exists.
4022
4023ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4024for ac_option
4025do
4026  case "\$ac_option" in
4027  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4028    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4029    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4030  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4031    echo "$CONFIG_STATUS generated by autoconf version 2.12"
4032    exit 0 ;;
4033  -help | --help | --hel | --he | --h)
4034    echo "\$ac_cs_usage"; exit 0 ;;
4035  *) echo "\$ac_cs_usage"; exit 1 ;;
4036  esac
4037done
4038
4039ac_given_srcdir=$srcdir
4040
4041trap 'rm -fr `echo "Makefile doc/Makefile mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4042EOF
4043cat >> $CONFIG_STATUS <<EOF
4044
4045# Protect against being on the right side of a sed subst in config.status.
4046sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4047 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4048$ac_vpsub
4049$extrasub
4050s%@CFLAGS@%$CFLAGS%g
4051s%@CPPFLAGS@%$CPPFLAGS%g
4052s%@CXXFLAGS@%$CXXFLAGS%g
4053s%@DEFS@%$DEFS%g
4054s%@LDFLAGS@%$LDFLAGS%g
4055s%@LIBS@%$LIBS%g
4056s%@exec_prefix@%$exec_prefix%g
4057s%@prefix@%$prefix%g
4058s%@program_transform_name@%$program_transform_name%g
4059s%@bindir@%$bindir%g
4060s%@sbindir@%$sbindir%g
4061s%@libexecdir@%$libexecdir%g
4062s%@datadir@%$datadir%g
4063s%@sysconfdir@%$sysconfdir%g
4064s%@sharedstatedir@%$sharedstatedir%g
4065s%@localstatedir@%$localstatedir%g
4066s%@libdir@%$libdir%g
4067s%@includedir@%$includedir%g
4068s%@oldincludedir@%$oldincludedir%g
4069s%@infodir@%$infodir%g
4070s%@mandir@%$mandir%g
4071s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g
4072s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g
4073s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g
4074s%@LEX@%$LEX%g
4075s%@LEXLIB@%$LEXLIB%g
4076s%@LEXP@%$LEXP%g
4077s%@CC@%$CC%g
4078s%@CPP@%$CPP%g
4079s%@CXX@%$CXX%g
4080s%@SET_MAKE@%$SET_MAKE%g
4081s%@DOS_CROSS@%$DOS_CROSS%g
4082s%@singulardatadir@%$singulardatadir%g
4083s%@INFO@%$INFO%g
4084s%@PERL@%$PERL%g
4085s%@WITH_MP@%$WITH_MP%g
4086s%@WITH_FACTORY@%$WITH_FACTORY%g
4087s%@WITH_LIBFAC@%$WITH_LIBFAC%g
4088s%@NEED_LIBS@%$NEED_LIBS%g
4089s%@WITH_DBM@%$WITH_DBM%g
4090s%@ALLOCA@%$ALLOCA%g
4091s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g
4092s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g
4093s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
4094
4095CEOF
4096EOF
4097
4098cat >> $CONFIG_STATUS <<\EOF
4099
4100# Split the substitutions into bite-sized pieces for seds with
4101# small command number limits, like on Digital OSF/1 and HP-UX.
4102ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4103ac_file=1 # Number of current file.
4104ac_beg=1 # First line for current file.
4105ac_end=$ac_max_sed_cmds # Line after last line for current file.
4106ac_more_lines=:
4107ac_sed_cmds=""
4108while $ac_more_lines; do
4109  if test $ac_beg -gt 1; then
4110    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4111  else
4112    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4113  fi
4114  if test ! -s conftest.s$ac_file; then
4115    ac_more_lines=false
4116    rm -f conftest.s$ac_file
4117  else
4118    if test -z "$ac_sed_cmds"; then
4119      ac_sed_cmds="sed -f conftest.s$ac_file"
4120    else
4121      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4122    fi
4123    ac_file=`expr $ac_file + 1`
4124    ac_beg=$ac_end
4125    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4126  fi
4127done
4128if test -z "$ac_sed_cmds"; then
4129  ac_sed_cmds=cat
4130fi
4131EOF
4132
4133cat >> $CONFIG_STATUS <<EOF
4134
4135CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
4136EOF
4137cat >> $CONFIG_STATUS <<\EOF
4138for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4139  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4140  case "$ac_file" in
4141  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4142       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4143  *) ac_file_in="${ac_file}.in" ;;
4144  esac
4145
4146  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4147
4148  # Remove last slash and all that follows it.  Not all systems have dirname.
4149  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4150  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4151    # The file is in a subdirectory.
4152    test ! -d "$ac_dir" && mkdir "$ac_dir"
4153    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4154    # A "../" for each directory in $ac_dir_suffix.
4155    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4156  else
4157    ac_dir_suffix= ac_dots=
4158  fi
4159
4160  case "$ac_given_srcdir" in
4161  .)  srcdir=.
4162      if test -z "$ac_dots"; then top_srcdir=.
4163      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4164  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4165  *) # Relative path.
4166    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4167    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4168  esac
4169
4170
4171  echo creating "$ac_file"
4172  rm -f "$ac_file"
4173  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4174  case "$ac_file" in
4175  *Makefile*) ac_comsub="1i\\
4176# $configure_input" ;;
4177  *) ac_comsub= ;;
4178  esac
4179
4180  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4181  sed -e "$ac_comsub
4182s%@configure_input@%$configure_input%g
4183s%@srcdir@%$srcdir%g
4184s%@top_srcdir@%$top_srcdir%g
4185" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4186fi; done
4187rm -f conftest.s*
4188
4189# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4190# NAME is the cpp macro being defined and VALUE is the value it is being given.
4191#
4192# ac_d sets the value in "#define NAME VALUE" lines.
4193ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4194ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4195ac_dC='\3'
4196ac_dD='%g'
4197# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4198ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4199ac_uB='\([      ]\)%\1#\2define\3'
4200ac_uC=' '
4201ac_uD='\4%g'
4202# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4203ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4204ac_eB='$%\1#\2define\3'
4205ac_eC=' '
4206ac_eD='%g'
4207
4208if test "${CONFIG_HEADERS+set}" != set; then
4209EOF
4210cat >> $CONFIG_STATUS <<EOF
4211  CONFIG_HEADERS="mod2.h"
4212EOF
4213cat >> $CONFIG_STATUS <<\EOF
4214fi
4215for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4216  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4217  case "$ac_file" in
4218  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4219       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4220  *) ac_file_in="${ac_file}.in" ;;
4221  esac
4222
4223  echo creating $ac_file
4224
4225  rm -f conftest.frag conftest.in conftest.out
4226  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4227  cat $ac_file_inputs > conftest.in
4228
4229EOF
4230
4231# Transform confdefs.h into a sed script conftest.vals that substitutes
4232# the proper values into config.h.in to produce config.h.  And first:
4233# Protect against being on the right side of a sed subst in config.status.
4234# Protect against being in an unquoted here document in config.status.
4235rm -f conftest.vals
4236cat > conftest.hdr <<\EOF
4237s/[\\&%]/\\&/g
4238s%[\\$`]%\\&%g
4239s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4240s%ac_d%ac_u%gp
4241s%ac_u%ac_e%gp
4242EOF
4243sed -n -f conftest.hdr confdefs.h > conftest.vals
4244rm -f conftest.hdr
4245
4246# This sed command replaces #undef with comments.  This is necessary, for
4247# example, in the case of _POSIX_SOURCE, which is predefined and required
4248# on some systems where configure will not decide to define it.
4249cat >> conftest.vals <<\EOF
4250s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4251EOF
4252
4253# Break up conftest.vals because some shells have a limit on
4254# the size of here documents, and old seds have small limits too.
4255
4256rm -f conftest.tail
4257while :
4258do
4259  ac_lines=`grep -c . conftest.vals`
4260  # grep -c gives empty output for an empty file on some AIX systems.
4261  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4262  # Write a limited-size here document to conftest.frag.
4263  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4264  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4265  echo 'CEOF
4266  sed -f conftest.frag conftest.in > conftest.out
4267  rm -f conftest.in
4268  mv conftest.out conftest.in
4269' >> $CONFIG_STATUS
4270  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4271  rm -f conftest.vals
4272  mv conftest.tail conftest.vals
4273done
4274rm -f conftest.vals
4275
4276cat >> $CONFIG_STATUS <<\EOF
4277  rm -f conftest.frag conftest.h
4278  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4279  cat conftest.in >> conftest.h
4280  rm -f conftest.in
4281  if cmp -s $ac_file conftest.h 2>/dev/null; then
4282    echo "$ac_file is unchanged"
4283    rm -f conftest.h
4284  else
4285    # Remove last slash and all that follows it.  Not all systems have dirname.
4286      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4287      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4288      # The file is in a subdirectory.
4289      test ! -d "$ac_dir" && mkdir "$ac_dir"
4290    fi
4291    rm -f $ac_file
4292    mv conftest.h $ac_file
4293  fi
4294fi; done
4295
4296EOF
4297cat >> $CONFIG_STATUS <<EOF
4298
4299EOF
4300cat >> $CONFIG_STATUS <<\EOF
4301\
4302 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi
4303exit 0
4304EOF
4305chmod +x $CONFIG_STATUS
4306rm -fr confdefs* $ac_clean_files
4307test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4308
4309
4310
4311
4312
Note: See TracBrowser for help on using the repository browser.