source: git/MP/configure @ 4f006f

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