source: git/MP/configure @ e5dafa

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