source: git/Singular/configure @ 79370c5

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