source: git/Singular/configure @ e0bc8f0

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