#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--enable-cache  - Turn on configure caching"
ac_help="$ac_help
--enable-echo  - Turn on strong echoing. The default is enable=no. "
ac_help="$ac_help
--enable-strict - Turn on strict debugging with gcc"
ac_help="$ac_help
--enable-coverage - Turn on coverage analysis using gcc and gcov"
ac_help="$ac_help
--enable-error-checking=level - Control the amount of error checking.  
level may be 
    no        - no error checking
    runtime   - error checking controllable at runtime through environment 
                variables
    all       - error checking always enabled"
ac_help="$ac_help
--enable-error-messages=level - Control the amount of detail in error 
  messages.  Level may be
    all       - Maximum amount of information
    generic   - Only generic messages (no information about the specific
                instance)
    class     - One message per MPI error class
    none      - No messages"
ac_help="$ac_help
--enable-timing=level - Control the amount of timing information 
collected by the MPICH implementation.  level may be
    none    - Collect no data
    all     - Collect lots of data
    runtime - Runtime control of data collected
The default is none."
ac_help="$ac_help
--enable-threads=level - Control the level of thread support in the 
MPICH implementation.  level may be 
    single - Single threaded (MPI_THREAD_SINGLE and MPI_THREAD_FUNNELED)
    multiple - Multithreaded (MPI_THREAD_SERIAL and MPI_THREAD_MULTIPLE)"
ac_help="$ac_help
--enable-mpi-macros - Implement MPI_Wtime and MPI_Wtick as C macros
The default is no."
ac_help="$ac_help
--enable-g=option - Control the level of debugging support in the MPICH
implementation.  option may be a list of common separated names including
    none   - No debugging
    mem    - Memory usage tracing
    handle - Trace handle operations
    dbg    - Add compiler -g flags
    all    - All of the above choices"
ac_help="$ac_help
--enable-internat - Enable internationalization of messages.
 Not yet supported"
ac_help="$ac_help
--enable-fast - pick the appropriate options for fast execution.  This
                turns off error checking and timing collection"
ac_help="$ac_help
--enable-f77 - Enable Fortran 77 bindings"
ac_help="$ac_help
--enable-cxx - Enable C++ bindings"
ac_help="$ac_help
--enable-f90 - Enable Fortran 90 bindings"
ac_help="$ac_help
--enable-romio - Enable ROMIO MPI I/O implementation"
ac_help="$ac_help
--enable-debugger - Enable support for debuggers"
ac_help="$ac_help
--with-device=name - Specify the communication device for MPICH."
ac_help="$ac_help
--with-pmi=name - Specify the pmi interface for MPICH."
ac_help="$ac_help
--with-pm=name - Specify the process manager for MPICH.
      Multiple process managers may be specified as long as they all use
      the same pmi interface by separating them with colons.  The 
      mpiexec for the first named process manager will be installed.
      Example: --with-pm=forker:mpd:remshell builds the three process 
      managers forker, mpd, and remshell; only the mpiexec from forker
      is installed into the bin directory."
ac_help="$ac_help
--with-logging=name - Specify the logging library for MPICH."
ac_help="$ac_help
--with-mpe - Build the MPE (MPI Parallel Environment) routines"
ac_help="$ac_help
--enable-weak-symbols - Use weak symbols to implement PMPI routines (default)"
ac_help="$ac_help
--with-htmldir=dir - Specify the directory for html documentation"
ac_help="$ac_help
--with-cross=file - Specify the values of variables that configure cannot
determine in a cross-compilation environment"
ac_help="$ac_help
--with-flavor=name - Set the name to associate with this flavor of MPICH"
ac_help="$ac_help
--with-namepublisher=name - Choose the system that will support 
                             MPI_PUBLISH_NAME and MPI_LOOKUP_NAME.  Options
                             include
                               no (no service available)
                               pmiext  (service using a pmi extension,
                                        usually only within the same MPD ring)
			       file:directory
                               ldap:ldapservername
                             Only no and file have been implemented so far."
ac_help="$ac_help
--enable-sharedlibs=kind - Enable shared libraries.  kind may be
    gcc     - Standard gcc and GNU ld options for creating shared libraries
    libtool - GNU libtool 
    none    - same as --disable-sharedlibs
Only gcc is currently supported"
ac_help="$ac_help

--enable-dependencies - Generate dependencies for sourcefiles.  This
            requires that the Makefile.in files are also created
            to support dependencies (see maint/updatefiles)"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=src/include/mpiimpl.h

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test "X$cache_system" = "X" ; then
    # A default file name, just in case
    cache_system="config.system"
    if test "$cache_file" != "/dev/null" ; then
        # Get the directory for the cache file, if any
	
        cache_system=`echo $cache_file | sed -e 's%^\(.*/\)[^/]*%\1/config.system%'`
	
        test "x$cache_system" = "x$cache_file" && cache_system="config.system"
#    else
#        We must *not* set enable_cache to no because we need to know if
#        enable_cache was not set.  
#        enable_cache=no
    fi
fi
if test -z "$real_enable_cache" ; then
    real_enable_cache=$enable_cache
    if test -z "$real_enable_cache" ; then real_enable_cache="notgiven" ; fi
fi
if test "X$real_enable_cache" = "Xnotgiven" ; then
    # check for valid cache file
    if test -z "$cache_system" ; then cache_system="config.system" ; fi
    if uname -srm >/dev/null 2>&1 ; then
		cleanargs=`echo "$CC $F77 $CXX $F90" | tr '"' ' '`
        testval="`uname -srm` $cleanargs"
        if test -f "$cache_system" -a -n "$testval" ; then
	    if test "$testval" = "`cat $cache_system`" ; then
	        real_enable_cache="yes"
	    fi
        elif test ! -f "$cache_system" -a -n "$testval" ; then
	    echo "$testval" > $cache_system
	    # remove the cache file because it may not correspond to our
	    # system
	    rm -f $cache_file
	    real_enable_cache="yes"
        fi
    fi
fi
if test "X$real_enable_cache" = "Xyes" -a "$cache_file" = "/dev/null" ; then
    real_enable_cache=no
fi
if test "X$real_enable_cache" = "Xyes" ; then
  if test -r "$cache_file" ; then
    echo "loading cache $cache_file"
    if test -w "$cache_file" ; then
        # Clean the cache file (ergh)
	
    rm -f confcache
    sed -e "s/'\\\\''//g" -e "s/'\\\\/'/" -e "s/\\\\'/'/" \
		-e "s/'\\\\''//g" $cache_file > confcache
    if cmp -s $cache_file confcache ; then
        :
    else
        if test -w $cache_file ; then
	    echo "updating cache $cache_file"
            cat confcache > $cache_file
        else
            echo "not updating unwritable cache $cache_file"
        fi
    fi	
    rm -f confcache
    if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then
        echo "Results of cleaned cache file:"
	echo "--------------------------------------------------------"
	cat $cache_file
	echo "--------------------------------------------------------"
    fi

    fi
    . $cache_file
  else
    echo "creating cache $cache_file"
    > $cache_file
    rm -f $cache_system
    cleanargs=`echo "$CC $F77 $CXX" | tr '"' ' '`
    testval="`uname -srm` $cleanargs"
    echo "$testval" > $cache_system
  fi
else
  cache_file="/dev/null"
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi


CONFIGURE_ARGUMENTS="$*"

echo "Configuring MPICH2 with $@"

if test -f $CONFIG_AUX_DIR/install-sh ; then ac_aux_dir=$CONFIG_AUX_DIR 
else
ac_aux_dir=
for ac_dir in confdb $srcdir/confdb; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
fi
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in confdb $srcdir/confdb" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.


# Check whether --enable-cache or --disable-cache was given.
if test "${enable_cache+set}" = set; then
  enableval="$enable_cache"
  enable_cache="$enableval"
else
  enable_cache="notgiven"
fi


# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
  enableval="$enable_echo"
  set -x
fi

# Check whether --enable-strict or --disable-strict was given.
if test "${enable_strict+set}" = set; then
  enableval="$enable_strict"
  CFLAGS="$CFLAGS -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast -ansi"
fi

# Check whether --enable-coverage or --disable-coverage was given.
if test "${enable_coverage+set}" = set; then
  enableval="$enable_coverage"
  :
else
  enable_coverage=no
fi

# Check whether --enable-error-checking or --disable-error-checking was given.
if test "${enable_error_checking+set}" = set; then
  enableval="$enable_error_checking"
  :
else
  enable_error_checking=all
fi

# Check whether --enable-error-messages or --disable-error-messages was given.
if test "${enable_error_messages+set}" = set; then
  enableval="$enable_error_messages"
  :
else
  enable_error_messages=all
fi

# Check whether --enable-timing or --disable-timing was given.
if test "${enable_timing+set}" = set; then
  enableval="$enable_timing"
  :
else
  enable_timing=none
fi

# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
  enableval="$enable_threads"
  :
else
  enable_threads=single
fi

# Check whether --enable-mpi-macros or --disable-mpi-macros was given.
if test "${enable_mpi_macros+set}" = set; then
  enableval="$enable_mpi_macros"
  :
else
  enable_mpi_macros=no
fi

# Check whether --enable-g or --disable-g was given.
if test "${enable_g+set}" = set; then
  enableval="$enable_g"
  :
else
  enable_g=none
fi

# Check whether --enable-internat or --disable-internat was given.
if test "${enable_internat+set}" = set; then
  enableval="$enable_internat"
  :
fi

# Check whether --enable-fast or --disable-fast was given.
if test "${enable_fast+set}" = set; then
  enableval="$enable_fast"
  :
else
  enable_fast=no
fi

# Check whether --enable-f77 or --disable-f77 was given.
if test "${enable_f77+set}" = set; then
  enableval="$enable_f77"
  :
else
  enable_f77=yes
fi

# Check whether --enable-cxx or --disable-cxx was given.
if test "${enable_cxx+set}" = set; then
  enableval="$enable_cxx"
  :
else
  enable_cxx=yes
fi

# Check whether --enable-f90 or --disable-f90 was given.
if test "${enable_f90+set}" = set; then
  enableval="$enable_f90"
  :
else
  enable_f90=no
fi

# Check whether --enable-romio or --disable-romio was given.
if test "${enable_romio+set}" = set; then
  enableval="$enable_romio"
  :
else
  enable_romio=yes
fi

# Check whether --enable-debugger or --disable-debugger was given.
if test "${enable_debugger+set}" = set; then
  enableval="$enable_debugger"
  :
else
  enable_debugger=no
fi

# Check whether --with-device or --without-device was given.
if test "${with_device+set}" = set; then
  withval="$with_device"
  :
else
  with_device=default
fi

# Check whether --with-pmi or --without-pmi was given.
if test "${with_pmi+set}" = set; then
  withval="$with_pmi"
  :
else
  with_pmi=default
fi

# Check whether --with-pm or --without-pm was given.
if test "${with_pm+set}" = set; then
  withval="$with_pm"
  :
else
  with_pm=default
fi

# Check whether --with-logging or --without-logging was given.
if test "${with_logging+set}" = set; then
  withval="$with_logging"
  :
else
  with_logging=default
fi

# Check whether --with-mpe or --without-mpe was given.
if test "${with_mpe+set}" = set; then
  withval="$with_mpe"
  :
else
  with_mpe=default
fi

# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
if test "${enable_weak_symbols+set}" = set; then
  enableval="$enable_weak_symbols"
  :
else
  enable_weak_symbols=yes
fi

# Check whether --with-htmldir or --without-htmldir was given.
if test "${with_htmldir+set}" = set; then
  withval="$with_htmldir"
  :
else
  with_htmldir='${prefix}/www'
fi

# Check whether --with-cross or --without-cross was given.
if test "${with_cross+set}" = set; then
  withval="$with_cross"
  :
else
  with_cross=no
fi

# Check whether --with-flavor or --without-flavor was given.
if test "${with_flavor+set}" = set; then
  withval="$with_flavor"
  :
fi

# Check whether --with-namepublisher or --without-namepublisher was given.
if test "${with_namepublisher+set}" = set; then
  withval="$with_namepublisher"
  :
else
  with_namepublisher=file
fi

if test "`cd $srcdir && pwd`" != "`pwd`" ; then
    if test -f $srcdir/config.status ; then
        { echo "configure: error: You cannot do a VPATH build if the source directory has been
    configured.  Run "make distclean" in $srcdir first." 1>&2; exit 1; }
    fi
    if test -d $srcdir/lib ; then
        { echo "configure: error: You cannot do a VPATH build if the source directory has been 
    configured.  Remove the lib directory in $srcdir first." 1>&2; exit 1; }
    fi
fi
# Set default variable values
MPILIBNAME=${MPILIBNAME:-"mpich"}
if test "$enable_fast" = "yes" ; then
    enable_error_checking=no
    enable_error_messages=no
    enable_timing=no
    enable_g=no
    cat >> confdefs.h <<\EOF
#define NDEBUG 1
EOF

fi
case "$enable_error_checking" in 
    no)
    ;;
    all|yes|runtime)
    error_checking_kind=`echo $enable_error_checking | \
    tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    error_checking_kind=MPID_ERROR_LEVEL_$error_checking_kind
    cat >> confdefs.h <<EOF
#define HAVE_ERROR_CHECKING $error_checking_kind
EOF

    ;;
    *)
    echo "configure: warning: Unknown value $enable_error_checking for enable-error-checking" 1>&2
    ;;
esac
case "$enable_error_messages" in 
    no|none)
        error_message_kind="MPICH_ERROR_MSG_NONE"
    ;;
    all|yes)
	error_message_kind="MPICH_ERROR_MSG_ALL"
    ;;
    generic)
	error_message_kind="MPICH_ERROR_MSG_GENERIC"
    ;;
    class)
	error_message_kind="MPICH_ERROR_MSG_CLASS"
    ;;
    *)
    echo "configure: warning: Unknown value $enable_error_messages for enable-error-messages" 1>&2
    ;;
esac
cat >> confdefs.h <<EOF
#define MPICH_ERROR_MSG_LEVEL $error_message_kind
EOF

collect_stats=false
logging_required=false
timing_name=$enable_timing
case "$enable_timing" in
    no)
    timing_name=none
    ;;
    time)
    collect_stats=true
    ;;
    log|log_detailed)
    logging_required=true
    ;;
    yes)
    timing_name=all
    collect_stats=true
    logging_required=true
    ;;
    all|runtime)
    collect_stats=true
    logging_required=true
    ;;
    none)
    ;;
    *)
    echo "configure: warning: Unknown value $enable_timing for enable-timing" 1>&2
    enable_timing=no
    timing_name=none
    ;; 
esac
case $with_logging in 
    yes)
    logging_name=rlog
    ;;
    no)
    logging_name=none
    ;;
    default)
    if test "$logging_required" = "true" ; then
        logging_name=rlog
    else
        logging_name=none
    fi
    ;;
    *)
    logging_name=$with_logging
    ;;
esac
logging_subsystems=
if test "$logging_name" != "none" ; then
    logdir=$srcdir/src/util/logging
    logging_subsystems="$logging_subsystems src/util/logging/$logging_name"
    if test "$logging_name" = "dlog" ; then
    	logging_subdirs="slog_api dlog dlog2slog"
    	logging_subsystems="$logging_subsystems src/util/logging/slog_api"
    else
    	logging_subdirs=$logging_name
    fi
    for dir in $logging_subdirs ; do
        if test ! -d $logdir/$dir ; then
	    echo "configure: warning: $logdir/$dir does not exist.  Logging library $logging_name has been diabled." 1>&2
	    logging_name=none
        fi
    done
    for dir in $logging_subsystems ; do
        if test ! -x $srcdir/$dir/configure ; then
	    echo "configure: warning: $logdir/$dir has no configure.  Logging library $logging_name has been disabled." 1>&2
	    logging_name=none
        fi
    done
fi
if test "$logging_name" != "none" ; then
    if test "$enable_timing" != "no" ; then
	if test "$enable_timing" = "none" ; then
	    enable_timing=log
	    timing_name=log
    	fi
	logging_dir=logging
	subsystems="$subsystems $logging_subsystems"
    else
	echo "configure: warning: Timing was disabled.  Logging has been disabled as well." 1>&2
	with_logging=no
	logging_name=none
        logging_dir=
        logging_subdirs=
    fi
else
    if test "$logging_required" = "true" ; then
	echo "configure: warning: Timing was enabled with log option but no logging library is available.  Timing has been disabled." 1>&2
	enable_timing=no
	timing_name=none
    fi
    logging_dir=
    logging_subdirs=
fi
if test "$timing_name" != "none" ; then
    timing_kind=`echo $timing_name | \
       tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    timing_kind=MPID_TIMING_KIND_$timing_kind
    cat >> confdefs.h <<EOF
#define HAVE_TIMING $timing_kind
EOF

    if test "$collect_stats" = "true" ; then
        cat >> confdefs.h <<\EOF
#define COLLECT_STATS 1
EOF

    fi
fi



use_logging_variable="MPID_LOGGING_`echo $logging_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
cat >> confdefs.h <<EOF
#define USE_LOGGING $use_logging_variable
EOF

case "$enable_threads" in
    no|single)
    cat >> confdefs.h <<\EOF
#define MPICH_SINGLE_THREADED 1
EOF

    ;;
    runtime=*|multiple=*)
    thread_type=`echo $enable_threads | sed -e 's/^.*=//'g`
    ;;
    all|yes|multiple|runtime)
    thread_type=pthread
    ;;
    *)
    echo "configure: warning: Unknown value $enable_threads for enable-threads" 1>&2
    ;; 
esac
# strip off multiple options, separated by commas
save_IFS="$IFS"
IFS=","
for option in $enable_g ; do
    case "$option" in 
        debug|dbg)
	CFLAGS="$CFLAGS -g"
	;;
        no|none)
	;;
	handle)
	cat >> confdefs.h <<\EOF
#define MPICH_DEBUG_HANDLES 1
EOF

	;;
	mem|all|yes)
	cat >> confdefs.h <<\EOF
#define USE_MEMORY_TRACING 1
EOF

	cat >> confdefs.h <<\EOF
#define MPICH_DEBUG_INTERNAL 1
EOF

	cat >> confdefs.h <<\EOF
#define MPICH_DEBUG_NESTING 1
EOF

	enable_g_mem=yes
	CFLAGS="$CFLAGS -g"
	;;
	*)
	echo "configure: warning: Unknown value $enable_g for enable-g" 1>&2
	;;
    esac
done
IFS="$save_IFS"

if test "$enable_f90" = "yes" -a "$enable_f77" != "yes" ; then
   # Fortran 90 support requires compatible Fortran 77 support
   echo "configure: warning: Fortran 90 support requires compatible Fortran 77 support" 1>&2
   enable_f77=yes
fi
if test "$enable_debugger" = "yes" ; then
    debugger_dir=debugger
    cat >> confdefs.h <<\EOF
#define HAVE_DEBUGGER_SUPPORT 1
EOF

fi

pac_cross_compiling=no
if test "$with_cross" != "no" ; then
    if test -s "$with_cross" ; then
        echo "$ac_t""Reading values from cross-compilation file $with_cross" 1>&6
        . $with_cross
	# Autoconf 2.52 no longer sets cross_compiling except with the
	# awkward "targethost" options.
	pac_cross_compiling=yes
	cross_compiling=yes
	ac_cv_prog_cc_cross=yes
	ac_cv_prog_f77_cross=yes
	ac_cv_prog_f90_cross=yes
        ac_cv_prog_cxx_cross=yes
        export cross_compiling
	# Export all cross variables.  Any subsidiary configure should also
        # export CROSS_xxx
	rm -f confcross
	(set) 2>&1 | grep CROSS_ | \
	      sed -e 's/^/export /g' -e 's/=.*//g' > confcross
	. confcross
	rm -f confcross      
    fi
fi

if test -n "$with_htmldir" ; then 
    htmldir=$with_htmldir
else
    htmldir='${prefix}/www'
fi


if test "$with_device" = "default" ; then
    # Pick the device.  For now, always choose ch3
    with_device=ch3
fi
device_name=`echo $with_device | sed -e 's/:.*$//'`

device_args=`echo $with_device | sed -e 's/^[^:]*//' -e 's/^://'`

export device_name
export device_args
if test -z "$top_srcdir" ; then
   use_top_srcdir=$srcdir   
else
   use_top_srcdir=$top_srcdir
fi
if test -z "$master_top_srcdir" ; then 
    # This needs to be an absolute pathname
    case "$use_top_srcdir" in
    /) ;;
    *)
        use_top_srcdir=`(cd $use_top_srcdir ; pwd)`
	;;	
    esac
    master_top_srcdir=$use_top_srcdir
fi

export master_top_srcdir
master_top_builddir="`pwd`"

export master_top_builddir
if test "$enable_romio" = "yes" ; then
   if test -d $use_top_srcdir/src/mpi/romio ; then
       subsystems="$subsystems src/mpi/romio"
       cat >> confdefs.h <<\EOF
#define HAVE_ROMIO 1
EOF

       # Set environment variables that the romio configure expects
       romio_dir=romio
       
       FROM_MPICH2=yes
       export FROM_MPICH2
       export use_top_srcdir
       top_build_dir=`pwd`
       export top_build_dir
       # if there is no $top_build_dir/lib, romio puts lib in wrong place
                     if test ! -d lib ; then mkdir lib ; fi
       # tell mpi.h to include mpio.h
       
if test "$enable_romio" = "yes" ; then HAVE_ROMIO='#include "mpio.h"'; fi


   else
       echo "configure: warning: ROMIO src directory is not available" 1>&2
       # Check for local developers
       if test -d /home/MPI/cvsMaster/romio -o -d /homes/MPI/cvsMaster/romio ; then
           echo "configure: warning: You need to check ROMIO out with 
          cd $use_top_srcdir/src/mpi
          cvs -d /home/MPI/cvsMaster checkout romio
	  followed by
	  cd ../.. && maint/updatefiles
          " 1>&2
       fi
   fi
fi
#
if test "$enable_f77" = "yes" ; then
   # We must add the include directories.  We have to wait until here
   # so that the paths will be defined.
   CPPFLAGS="$CPPFLAGS -I${master_top_srcdir}/src/binding/f77 -I`pwd`/src/binding/f77"
fi
#
if test ! -d $use_top_srcdir/src/mpid/$device_name ; then
    echo "configure: warning: Device $device_name is unknown" 1>&2
elif test ! -x $use_top_srcdir/src/mpid/$device_name/configure ; then
    echo "configure: warning: Device $device_name has no configure" 1>&2
    device_name=""
else 
    # Add the device to the configure list
    devsubsystems="$devsubsystems src/mpid/$device_name"
    fi

if test "$with_pmi" = "default" -o "$with_pmi" = "yes" ; then
    with_pmi=simple
fi
pmi_name=$with_pmi
if test ! -d $use_top_srcdir/src/pmi/$pmi_name ; then
    echo "configure: warning: $use_top_srcdir/src/pmi/$pmi_name does not exist. PMI is unknown" 1>&2
elif test ! -x $use_top_srcdir/src/pmi/$pmi_name/configure ; then
    echo "configure: warning: pmi $pmi_name has no configure or Makefile" 1>&2
    pmi_name=""
else
    subsystems="$subsystems src/pmi/$pmi_name"
fi

if test "$with_pmi" = "uni" -a "$with_pm" = "default" ; then
    with_pm=""
fi
if test "$with_pm" = "default" -o "$with_pm" = "yes" ; then
    with_pm=mpd
fi
pm_name=$with_pm
MANY_PM=no

for pm_name in `echo $with_pm | sed -e 's/:/ /g'` ; do
    if test -z "$first_pm_name" ; then
       first_pm_name=$pm_name
    else 
       other_pm_names="$other_pm_names $pm_name"
    fi
    if test ! -d $use_top_srcdir/src/pm/$pm_name ; then
        echo "configure: warning: $use_top_srcdir/src/pm/$pm_name does not exist. PM is unknown" 1>&2
    elif test ! -x $use_top_srcdir/src/pm/$pm_name/configure ; then
        echo "configure: warning: pm $pm_name has no configure" 1>&2
        pm_name=""
    else
        subsystems="$subsystems src/pm/$pm_name"
        if test -f $use_top_srcdir/src/pm/$pm_name/setup_pm ; then 
	    echo sourcing $use_top_srcdir/src/pm/$pm_name/setup_pm
	    . $use_top_srcdir/src/pm/$pm_name/setup_pm
	fi
    fi
done
pm_name=$first_pm_name



if test $with_mpe != no ; then
    if test ! -d $use_top_srcdir/src/mpe ; then
        if test $with_mpe = yes ; then
	    # No warning message on the default
            echo "configure: warning: No MPE directory available" 1>&2
        fi
    else
        subsystems="$subsystems src/mpe"
	mpe_dir=mpe
	# Make sure that MPE knows that we're building from MPICH
        # (similar to ROMIO)
        FROM_MPICH2=yes
        export FROM_MPICH2
        export use_top_srcdir
        top_build_dir=`pwd`
        export top_build_dir
    fi
fi

#
# The bindings must be the *last* subsystems configured, since they may
# need to inherit libraries and/or options required by the other subsystems
# (e.g., extra libraries required for ROMIO)
if test "$enable_f77" = "yes" ; then
   bindingsubsystems="$bindingsubsystems src/binding/f77"
   bindings="$bindings f77"
   bindings_dirs="$bindings_dirs src/binding/f77"
fi
if test "$enable_f90" = "yes" ; then
   bindingsubsystems="$bindingsubsystems src/binding/f90"
   bindings="$bindings f90"
   bindings_dirs="$bindings_dirs src/binding/f90"
fi
if test "$enable_f90" = yes -o "$enable_f77" = yes ; then
   cat >> confdefs.h <<\EOF
#define HAVE_FORTRAN_BINDING 1
EOF

fi

if test "$enable_cxx" = "yes" ; then
   bindingsubsystems="$bindingsubsystems src/binding/cxx"
   bindings="$bindings cxx"
   bindings_dirs="$bindings_dirs src/binding/cxx"
   cat >> confdefs.h <<\EOF
#define HAVE_CXX_BINDING 1
EOF

fi

# Bindings dirs is used for the installation target

#
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1403: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1433: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1484: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1516: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 1527 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1558: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1563: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1591: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

# Bug in autoconf.  Restore cross settings
if test "$pac_cross_compiling" = "yes" -a "$ac_cv_prog_cc_cross" = "no" ; then
    echo "$ac_t""Resetting cross compilation to yes" 1>&6
    cross_compiling=yes
    ac_cv_prog_cc_cross=yes
    ac_cv_prog_f77_cross=yes
    ac_cv_prog_cxx_cross=yes
fi
if test "$enable_strict" = "yes" ; then
    if test "$ac_cv_prog_gcc" = "yes" ; then
       CFLAGS="$CFLAGS -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast -ansi"
    else 
        echo "configure: warning: --enable-strict only supported for GCC" 1>&2
    fi
fi
for ac_prog in ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1642: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AR="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AR" && break
done

# Note that we set RANLIB to true if we don't find it (some systems neither
# need it nor provide it)
for ac_prog in ranlib
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1678: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$RANLIB" && break
done
test -n "$RANLIB" || RANLIB="true"

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1720: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

#
# We also need mkdir -p.

echo $ac_n "checking whether mkdir -p works""... $ac_c" 1>&6
echo "configure:1776: checking whether mkdir -p works" >&5
if eval "test \"`echo '$''{'pac_cv_mkdir_p'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
pac_cv_mkdir_p=no
rm -rf .tmp
if mkdir -p .tmp/.foo 1>/dev/null 2>&1 ; then 
    if test -d .tmp/.foo ; then 
        pac_cv_mkdir_p=yes
    fi
fi
rm -rf .tmp

fi

echo "$ac_t""$pac_cv_mkdir_p" 1>&6
if test "$pac_cv_mkdir_p" = "yes" ; then
   MKDIR_P="mkdir -p"
   export MKDIR_P
else
   echo "configure: warning: mkdir -p does not work; the install step may fail" 1>&2
fi



# Don't setup the shared libraries until we know which compiler we will be
# using

# Check whether --enable-sharedlibs or --disable-sharedlibs was given.
if test "${enable_sharedlibs+set}" = set; then
  enableval="$enable_sharedlibs"
  :
else
  enable_sharedlibs=none
fi

CC_SHL=true
C_LINK_SHL=true
case "$enable_sharedlibs" in 
    no|none)
    ;;
    gcc)
    echo "$ac_t""Creating shared libraries using GNU" 1>&6
    # Not quite right yet.  See mpich/util/makesharedlib
    # Use syntax that works in both Make and the shell
    #C_LINK_SHL='${CC} -shared -Wl,-r'
    C_LINK_SHL='${CC} -shared'
    # For example, include the libname as ${LIBNAME_SHL}
    #C_LINK_SHL='${CC} -shared -Wl,-h,<finallibname>'
    CC_SHL='${CC} -shared -fpic'
    ;;
    libtool)
    echo "$ac_t""Creating shared libraries using libtool (not yet supported)" 1>&6
    for ac_prog in libtool
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1835: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIBTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$LIBTOOL"; then
  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LIBTOOL="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
LIBTOOL="$ac_cv_prog_LIBTOOL"
if test -n "$LIBTOOL"; then
  echo "$ac_t""$LIBTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$LIBTOOL" && break
done
test -n "$LIBTOOL" || LIBTOOL="false"

    if test "$LIBTOOL" = "false" ; then
	echo "configure: warning: Could not find libtool" 1>&2
    else
        # Likely to be
        # either CC or CC_SHL is libtool $cc
        CC_SHL='libtool ${CC}'
        # CC_LINK_SHL includes the final installation path
        # For many systems, the link may need to include *all* libraries
        # (since many systems don't allow any unsatisfied dependencies)
        C_LINK_SHL='libtool ${CC} -rpath ${libdir}'
    fi
    ;;
    *)
    echo "configure: warning: Unknown value $enable_sharedlibs for enable-sharedlibs" 1>&2
    enable_sharedlibs=no
    ;;  
esac



ENABLE_SHLIB=$enable_sharedlibs
if test -z "$ENABLE_SHLIB" -o "$ENABLE_SHLIB" = "no" ; then
    ENABLE_SHLIB=none
fi


# 
# Add the steps for debugger support
BUILD_TVDLL=no
if test "$enable_debugger" = "yes" ; then
   # We can build the Totalview interface DLL only if we know how to build
   # shared libraries.  For now, require that enable_sharedlibs is not none
   if test "$ENABLE_SHLIB" != "none" ; then
        BUILD_TVDLL=yes
   else
	echo "configure: warning: Debugger support requires shared libraries" 1>&2      
   fi
   
fi

# We need the full path to perl since we'll use it as the interpreter for
# a shell script.
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1910: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL5'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PERL5" in
  /*)
  ac_cv_path_PERL5="$PERL5" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PERL5="$PERL5" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PERL5="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PERL5="$ac_cv_path_PERL5"
if test -n "$PERL5"; then
  echo "$ac_t""$PERL5" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


nameserv_name=""

if test "$with_namepublisher" != no -a "$with_namepublisher" != "none" ; then
    case "$with_namepublisher" in 
    none|no) ;;
    ldap*)
        subsystems="$subsystems src/nameserv/ldap"
	# The configure in the nameserv/ldap directory will look for 
	# the ldap files.
	cat >> confdefs.h <<\EOF
#define USE_LDAP_FOR_NAMEPUB 1
EOF

	nameserv_name="ldap"
    ;;

    pmiext)
    # This name publisher should simply use the PMI support as
    # part of the selected PMI interface implmentation.  If that
    # interface does not support pmiext, then the appropriate
    # configure should signal an error.
    echo "configure: warning: No pmiext name publisher supported" 1>&2
    #nameserv_name="pmiext"
    ;;

    file*)
    # Note that we always build the Makefile for the file version because
    # this name publisher is really too simple to require a 
    # separate configure, and we might as well include a basic
    # name publisher with any MPICH2 distribution
    # We DO need to extract the directory name that is used for writing 
    # the files, with the User's home directory as the default
    nameserv_name="file"
    basedir=`echo $with_namepublisher | sed -e 's/file://'`
    if test "$basedir" = "$with_namepublisher" ; then
        # Reset since no directory was set.
	basedir='"."';
    fi
    cat >> confdefs.h <<EOF
#define FILE_NAMEPUB_BASEDIR $basedir
EOF

    cat >> confdefs.h <<\EOF
#define USE_FILE_FOR_NAMEPUB 1
EOF

    ;;

    *)
    echo "configure: warning: Unknown name publisher $with_namepublisher" 1>&2
    ;;
    esac    
fi
if test -n "$nameserv_name" ; then
   cat >> confdefs.h <<\EOF
#define HAVE_NAMEPUB_SERVICE 1
EOF

fi

export CC_SHL
export C_LINK_SHL
export ENABLE_SHLIB

true
if test "X$MAKE" = "X" ; then
   for ac_prog in make gnumake nmake pmake smake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2014: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$MAKE"; then
  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_MAKE="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
MAKE="$ac_cv_prog_MAKE"
if test -n "$MAKE"; then
  echo "$ac_t""$MAKE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MAKE" && break
done

fi


echo $ac_n "checking whether clock skew breaks make""... $ac_c" 1>&6
echo "configure:2047: checking whether clock skew breaks make" >&5
if eval "test \"`echo '$''{'pac_cv_prog_make_found_clock_skew'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

rm -f conftest*
cat > conftest <<EOF
ALL:
	@-echo "success"
EOF
$MAKE -f conftest > conftest.out 2>&1
if grep -i skew conftest >/dev/null 2>&1 ; then
    pac_cv_prog_make_found_clock_skew=yes
else
    pac_cv_prog_make_found_clock_skew=no
fi
rm -f conftest*

fi

echo "$ac_t""$pac_cv_prog_make_found_clock_skew" 1>&6
if test "$pac_cv_prog_make_found_clock_skew" = "yes" ; then
    echo "configure: warning: Clock skew found by make.  The configure and build may fail.
Consider building in a local instead of NFS filesystem." 1>&2
fi


echo $ac_n "checking whether make echos directory changes""... $ac_c" 1>&6
echo "configure:2076: checking whether make echos directory changes" >&5
if eval "test \"`echo '$''{'pac_cv_prog_make_echos_dir'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

/bin/rm -f conftest
cat > conftest <<.
SHELL=/bin/sh
ALL:
	@(dir="`pwd`" ; cd .. ; \$(MAKE) -f "\$\$dir/conftest" SUB)
SUB:
	@echo "success"
.
str="`$MAKE -f conftest 2>&1`"
if test "$str" != "success" ; then
    str="`$MAKE --no-print-directory -f conftest 2>&1`"
    if test "$str" = "success" ; then
	pac_cv_prog_make_echos_dir="yes using --no-print-directory"
    else
	pac_cv_prog_make_echos_dir="no"
	echo "Unexpected output from make with program" >>config.log
	cat conftest >>config.log
	echo "str" >> config.log
    fi
else
    pac_cv_prog_make_echos_dir="no"
fi
/bin/rm -f conftest
str=""

fi

echo "$ac_t""$pac_cv_prog_make_echos_dir" 1>&6
if test "$pac_cv_prog_make_echos_dir" = "yes using --no-print-directory" ; then
    MAKE="$MAKE --no-print-directory"
fi


echo $ac_n "checking whether make supports include""... $ac_c" 1>&6
echo "configure:2116: checking whether make supports include" >&5
if eval "test \"`echo '$''{'pac_cv_prog_make_include'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

/bin/rm -f conftest
cat > conftest <<.
ALL:
	@echo "success"
.
cat > conftest1 <<.
include conftest
.
pac_str=`$MAKE -f conftest1 2>&1`
/bin/rm -f conftest conftest1
if test "$pac_str" != "success" ; then
    pac_cv_prog_make_include="no"
else
    pac_cv_prog_make_include="yes"
fi

fi

echo "$ac_t""$pac_cv_prog_make_include" 1>&6
if test "$pac_cv_prog_make_include" = "no" ; then
    :
else
    :
fi


echo $ac_n "checking whether make allows comments in actions""... $ac_c" 1>&6
echo "configure:2149: checking whether make allows comments in actions" >&5
if eval "test \"`echo '$''{'pac_cv_prog_make_allows_comments'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

/bin/rm -f conftest
cat > conftest <<.
SHELL=/bin/sh
ALL:
	@# This is a valid comment!
	@echo "success"
.
pac_str=`$MAKE -f conftest 2>&1`
/bin/rm -f conftest 
if test "$pac_str" != "success" ; then
    pac_cv_prog_make_allows_comments="no"
else
    pac_cv_prog_make_allows_comments="yes"
fi

fi

echo "$ac_t""$pac_cv_prog_make_allows_comments" 1>&6
if test "$pac_cv_prog_make_allows_comments" = "no" ; then
    echo "configure: warning: Your make does not allow comments in target code.
Using this make may cause problems when building programs.
You should consider using gnumake instead." 1>&2
    
fi



echo $ac_n "checking for virtual path format""... $ac_c" 1>&6
echo "configure:2183: checking for virtual path format" >&5
if eval "test \"`echo '$''{'pac_cv_prog_make_vpath'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

rm -rf conftest*
mkdir conftestdir
cat >conftestdir/a.c <<EOF
A sample file
EOF
cat > conftest <<EOF
all: a.o
VPATH=.:conftestdir
.c.o:
	@echo \$<
EOF
ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'`
if test -n "$ac_out" ; then 
    pac_cv_prog_make_vpath="VPATH"
else
    rm -f conftest
    cat > conftest <<EOF
all: a.o
.PATH: . conftestdir
.c.o:
	@echo \$<
EOF
    ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'`
    if test -n "$ac_out" ; then 
        pac_cv_prog_make_vpath=".PATH"
    else
	pac_cv_prog_make_vpath="neither VPATH nor .PATH works"
    fi
fi
rm -rf conftest*

fi

echo "$ac_t""$pac_cv_prog_make_vpath" 1>&6
if test "$pac_cv_prog_make_vpath" = "VPATH" ; then
    VPATH='VPATH=.:${srcdir}'
elif test "$pac_cv_prog_make_vpath" = ".PATH" ; then
    VPATH='.PATH: . ${srcdir}'
fi



echo $ac_n "checking whether make sets CFLAGS""... $ac_c" 1>&6
echo "configure:2232: checking whether make sets CFLAGS" >&5
if eval "test \"`echo '$''{'pac_cv_prog_make_set_cflags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  

/bin/rm -f conftest
cat > conftest <<EOF
SHELL=/bin/sh
ALL:
	@echo X\${CFLAGS}X
EOF
pac_str=`$MAKE -f conftest 2>&1`
/bin/rm -f conftest 
if test "$pac_str" = "XX" ; then
    pac_cv_prog_make_set_cflags="no"
else
    pac_cv_prog_make_set_cflags="yes"
fi

fi

echo "$ac_t""$pac_cv_prog_make_set_cflags" 1>&6
if test "$pac_cv_prog_make_set_cflags" = "no" ; then
    :
else
    SET_CFLAGS='CFLAGS='
fi

if test "$pac_cv_prog_make_echos_dir" = "no" ; then
    echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:2263: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

else
    SET_MAKE="MAKE=${MAKE-make}"
fi

NO_WEAK_SYM_TARGET=build_proflib
if test $enable_weak_symbols = yes ; then
    # Turn off weak symbols if they aren't available
    
pragma_extra_message=""
echo $ac_n "checking for type of weak symbol support""... $ac_c" 1>&6
echo "configure:2299: checking for type of weak symbol support" >&5
if eval "test \"`echo '$''{'pac_cv_prog_c_weak_symbols'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
# Test for weak symbol support...
# We can't put # in the message because it causes autoconf to generate
# incorrect code
cat > conftest.$ac_ext <<EOF
#line 2308 "configure"
#include "confdefs.h"

extern int PFoo(int);
#pragma weak PFoo = Foo
int Foo(a) { return a; }

int main() {
return PFoo(1);
; return 0; }
EOF
if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  has_pragma_weak=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
#
# Some systems (Linux ia64 and ecc, for example), support weak symbols
# only within a single object file!  This tests that case.
# Note that there is an extern int PFoo declaration before the
# pragma.  Some compilers require this in order to make the weak symbol
# extenally visible.  
if test "$has_pragma_weak" = yes ; then
    rm -f conftest*
    cat >>conftest1.c <<EOF
extern int PFoo(int);
#pragma weak PFoo = Foo
int Foo(int);
int Foo(a) { return a; }
EOF
    cat >>conftest2.c <<EOF
extern int PFoo(int);
int main() {
return PFoo(0);}
EOF
    ac_link2='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest1.c conftest2.c $LIBS >conftest.out 2>&1'
    if eval $ac_link2 ; then
        pac_cv_prog_c_weak_symbols="pragma weak"
    else
      echo "$ac_link2" >>config.log
      echo "Failed program was" >>config.log
      cat conftest1.c >>config.log
      cat conftest2.c >>config.log
      if test -s conftest.out ; then cat conftest.out >> config.log ; fi
      has_pragma_weak=0
      pragma_extra_message="pragma weak does not work outside of a file"
    fi
    rm -f conftest*
fi
if test -z "$pac_cv_prog_c_weak_symbols" ; then 
    cat > conftest.$ac_ext <<EOF
#line 2362 "configure"
#include "confdefs.h"

extern int PFoo(int);
#pragma _HP_SECONDARY_DEF Foo  PFoo
int Foo(a) { return a; }

int main() {
return PFoo(1);
; return 0; }
EOF
if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  pac_cv_prog_c_weak_symbols="pragma _HP_SECONDARY_DEF"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
fi
if test -z "$pac_cv_prog_c_weak_symbols" ; then
    cat > conftest.$ac_ext <<EOF
#line 2384 "configure"
#include "confdefs.h"

extern int PFoo(int);
#pragma _CRI duplicate PFoo as Foo
int Foo(a) { return a; }

int main() {
return PFoo(1);
; return 0; }
EOF
if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  pac_cv_prog_c_weak_symbols="pragma _CRI duplicate x as y"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
fi
if test -z "$pac_cv_prog_c_weak_symbols" ; then
    pac_cv_prog_c_weak_symbols="no"
fi
if test -n "$pragma_extra_message" ; then
    echo $pragma_extra_message
fi

fi

echo "$ac_t""$pac_cv_prog_c_weak_symbols" 1>&6
if test "$pac_cv_prog_c_weak_symbols" = "no" ; then
    enable_weak_symbols=no
else
    case "$pac_cv_prog_c_weak_symbols" in
	"pragma weak") cat >> confdefs.h <<\EOF
#define HAVE_PRAGMA_WEAK 1
EOF
 
	;;
	"pragma _HP")  cat >> confdefs.h <<\EOF
#define HAVE_PRAGMA_HP_SEC_DEF 1
EOF

	;;
	"pragma _CRI") cat >> confdefs.h <<\EOF
#define HAVE_PRAGMA_CRI_DUP 1
EOF

	;;
    esac
    :
fi
echo $ac_n "checking whether __attribute__ ((weak)) allowed""... $ac_c" 1>&6
echo "configure:2437: checking whether __attribute__ ((weak)) allowed" >&5
if eval "test \"`echo '$''{'pac_cv_attr_weak'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2443 "configure"
#include "confdefs.h"
int foo(int) __attribute__ ((weak));
int main() {
int a;
; return 0; }
EOF
if { (eval echo configure:2450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_attr_weak=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_attr_weak=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_attr_weak" 1>&6

fi
if test $enable_weak_symbols = "yes" ; then
    cat >> confdefs.h <<\EOF
#define USE_WEAK_SYMBOLS 1
EOF

else
    NO_WEAK_SYM=build_proflib
    PROFILE_DEF_MPI="-DMPICH_PROFILE_MPI -DMPICH_MPI_FROM_PMPI"
fi
export NO_WEAK_SYM
export NO_WEAK_SYM_TARGET
export PROFILE_DEF_MPI



echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2481: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2486 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi


echo $ac_n "checking for volatile""... $ac_c" 1>&6
echo "configure:2557: checking for volatile" >&5
if eval "test \"`echo '$''{'pac_cv_c_volatile'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2563 "configure"
#include "confdefs.h"

int main() {
volatile int a;
; return 0; }
EOF
if { (eval echo configure:2570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_c_volatile="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_c_volatile="no"
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_c_volatile" 1>&6
if test "$pac_cv_c_volatile" = "no" ; then
    cat >> confdefs.h <<\EOF
#define volatile 
EOF

fi


echo $ac_n "checking for restrict""... $ac_c" 1>&6
echo "configure:2592: checking for restrict" >&5
if eval "test \"`echo '$''{'pac_cv_c_restrict'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2598 "configure"
#include "confdefs.h"

int main() {
int * restrict a;
; return 0; }
EOF
if { (eval echo configure:2605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_c_restrict="restrict"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_c_restrict="no"
fi
rm -f conftest*
if test "$pac_cv_c_restrict" = "no" ; then
   cat > conftest.$ac_ext <<EOF
#line 2617 "configure"
#include "confdefs.h"

int main() {
int * _Restrict a;
; return 0; }
EOF
if { (eval echo configure:2624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_c_restrict="_Restrict"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_c_restrict="no"
fi
rm -f conftest*
fi
if test "$pac_cv_c_restrict" = "no" ; then
   cat > conftest.$ac_ext <<EOF
#line 2637 "configure"
#include "confdefs.h"

int main() {
int * __restrict a;
; return 0; }
EOF
if { (eval echo configure:2644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_c_restrict="__restrict"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_c_restrict="no"
fi
rm -f conftest*
fi

fi

echo "$ac_t""$pac_cv_c_restrict" 1>&6
if test "$pac_cv_c_restrict" = "no" ; then
  restrict_val=""
elif test "$pac_cv_c_restrict" != "restrict" ; then
  restrict_val=$pac_cv_c_restrict
fi
if test "$restrict_val" != "restrict" ; then 
  cat >> confdefs.h <<EOF
#define restrict $restrict_val
EOF

fi

echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:2672: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
#line 2679 "configure"
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done

fi

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac



if test "$ac_cv_prog_gcc" = "yes" ; then
    echo $ac_n "checking whether __attribute__ allowed""... $ac_c" 1>&6
echo "configure:2715: checking whether __attribute__ allowed" >&5
if eval "test \"`echo '$''{'pac_cv_gnu_attr_pure'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2721 "configure"
#include "confdefs.h"
int foo(int) __attribute__ ((pure));
int main() {
int a;
; return 0; }
EOF
if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_gnu_attr_pure=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_gnu_attr_pure=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_gnu_attr_pure" 1>&6
echo $ac_n "checking whether __attribute__((format)) allowed""... $ac_c" 1>&6
echo "configure:2742: checking whether __attribute__((format)) allowed" >&5
if eval "test \"`echo '$''{'pac_cv_gnu_attr_format'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2748 "configure"
#include "confdefs.h"
int foo(char *,...) __attribute__ ((format(printf,1,2)));
int main() {
int a;
; return 0; }
EOF
if { (eval echo configure:2755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_gnu_attr_format=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_gnu_attr_format=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_gnu_attr_format" 1>&6
    if test "$pac_cv_gnu_attr_pure" = "yes" -a "$pac_cv_gnu_attr_format" = "yes" ; then
        cat >> confdefs.h <<\EOF
#define HAVE_GCC_ATTRIBUTE 1
EOF

    fi
fi


# Set a default for MAKE_DEPEND_C
MAKE_DEPEND_C=true

# Check whether --enable-dependencies or --disable-dependencies was given.
if test "${enable_dependencies+set}" = set; then
  enableval="$enable_dependencies"
  :
else
  enable_dependencies=no
fi

if test "$enable_dependencies" != "no" ; then
    if test "$enable_dependencies" = "yes" -o -z "$enable_dependencies" ; then
        MAKE_DEPEND_C="gcc -MM"
    else
        echo "$ac_t""Using $enable_dependencies for MAKE_DEPEND_C" 1>&6
        MAKE_DEPEND_C="$enable_dependencies"
    fi
fi
export MAKE_DEPEND_C

# Check on support for long double and long long types.  Do this before the
# structure alignment test because it will test for including those
# types as well
echo $ac_n "checking whether long double is supported""... $ac_c" 1>&6
echo "configure:2802: checking whether long double is supported" >&5
if eval "test \"`echo '$''{'pac_cv_have_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2808 "configure"
#include "confdefs.h"

int main() {
long double a;
; return 0; }
EOF
if { (eval echo configure:2815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_have_long_double=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_have_long_double=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_have_long_double" 1>&6
if test "$pac_cv_have_long_double" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define HAVE_LONG_DOUBLE 1
EOF

fi
echo $ac_n "checking whether long long is supported""... $ac_c" 1>&6
echo "configure:2835: checking whether long long is supported" >&5
if eval "test \"`echo '$''{'pac_cv_have_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 2841 "configure"
#include "confdefs.h"

int main() {
long double a;
; return 0; }
EOF
if { (eval echo configure:2848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_have_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_have_long_long=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_have_long_long" 1>&6
if test "$pac_cv_have_long_long" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define HAVE_LONG_LONG_INT 1
EOF

fi
# Get default structure alignment

echo $ac_n "checking for C struct alignment""... $ac_c" 1>&6
echo "configure:2870: checking for C struct alignment" >&5
if eval "test \"`echo '$''{'pac_cv_c_struct_align'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  pac_cv_c_struct_align="$CROSS_STRUCT_ALIGN"
else
  cat > conftest.$ac_ext <<EOF
#line 2879 "configure"
#include "confdefs.h"

#include <stdio.h>
#define DBG(a,b,c)
int main( int argc, char *argv[] )
{
    FILE *cf;
    int is_packed  = 1;
    int is_two     = 1;
    int is_four    = 1;
    int is_eight   = 1;
    int is_largest = 1;
    struct { char a; int b; } char_int;
    struct { char a; short b; } char_short;
    struct { char a; long b; } char_long;
    struct { char a; float b; } char_float;
    struct { char a; double b; } char_double;
    struct { char a; int b; char c; } char_int_char;
    struct { char a; short b; char c; } char_short_char;
#ifdef HAVE_LONG_DOUBLE
    struct { char a; long double b; } char_long_double;
#endif
    int size, extent;

    size = sizeof(char) + sizeof(int);
    extent = sizeof(char_int);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(int)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0) is_four = 0;
    if (sizeof(int) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_int",size,extent);

    size = sizeof(char) + sizeof(short);
    extent = sizeof(char_short);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(short)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if (sizeof(short) == 4 && (extent % 4) != 0) is_four = 0;
    if (sizeof(short) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_short",size,extent);

    size = sizeof(char) + sizeof(long);
    extent = sizeof(char_long);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(long)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0) is_four = 0;
    if (sizeof(long) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_long",size,extent);

    size = sizeof(char) + sizeof(float);
    extent = sizeof(char_float);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(float)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0) is_four = 0;
    if (sizeof(float) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_float",size,extent);

    size = sizeof(char) + sizeof(double);
    extent = sizeof(char_double);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(double)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0) is_four = 0;
    if (sizeof(double) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_double",size,extent);

#ifdef HAVE_LONG_DOUBLE
    size = sizeof(char) + sizeof(long double);
    extent = sizeof(char_long_double);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(long double)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0) is_four = 0;
    if (sizeof(long double) >= 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_long-double",size,extent);
#endif

    /* char int char helps separate largest from 4/8 aligned */
    size = sizeof(char) + sizeof(int) + sizeof(char);
    extent = sizeof(char_int_char);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(int)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0) is_four = 0;
    if (sizeof(int) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_int_char",size,extent);

    /* char short char helps separate largest from 4/8 aligned */
    size = sizeof(char) + sizeof(short) + sizeof(char);
    extent = sizeof(char_short_char);
    if (size != extent) is_packed = 0;
    if ( (extent % sizeof(short)) != 0) is_largest = 0;
    if ( (extent % 2) != 0) is_two = 0;
    if (sizeof(short) == 4 && (extent % 4) != 0) is_four = 0;
    if (sizeof(short) == 8 && (extent % 8) != 0) is_eight = 0;
    DBG("char_short_char",size,extent);

    /* If aligned mod 8, it will be aligned mod 4 */
    if (is_eight) { is_four = 0; is_two = 0; }

    if (is_four) is_two = 0;

    /* largest superceeds eight */
    if (is_largest) is_eight = 0;

    /* Tabulate the results */
    cf = fopen( "ctest.out", "w" );
    if (is_packed + is_largest + is_two + is_four + is_eight == 0) {
	fprintf( cf, "Could not determine alignment\n" );
    }
    else {
	if (is_packed + is_largest + is_two + is_four + is_eight != 1) {
	    fprintf( cf, "Multiple cases:\n" );
	}
	if (is_packed) fprintf( cf, "packed\n" );
	if (is_largest) fprintf( cf, "largest\n" );
	if (is_two) fprintf( cf, "two\n" );
	if (is_four) fprintf( cf, "four\n" );
	if (is_eight) fprintf( cf, "eight\n" );
    }
    fclose( cf );
    return 0;
}
EOF
if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_c_struct_align=`cat ctest.out`

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_c_struct_align="unknown"
fi
rm -fr conftest*
fi

rm -f ctest.out

fi

echo "$ac_t""$pac_cv_c_struct_align" 1>&6
if test -z "$pac_cv_c_struct_align" ; then
    pac_cv_c_struct_align="unknown"
fi


if test "$pac_cv_c_struct_align" = "packed" ; then
    pac_cv_c_struct_align_nr=1
elif test "$pac_cv_c_struct_align" = "two" ; then
    pac_cv_c_struct_align_nr=2
elif test "$pac_cv_c_struct_align" = "four" ; then
    pac_cv_c_struct_align_nr=4
elif test "$pac_cv_c_struct_align" = "eight" ; then
    pac_cv_c_struct_align_nr=8
elif test "$pac_cv_c_struct_align" = "largest" ; then
    cat >> confdefs.h <<\EOF
#define HAVE_LARGEST_STRUCT_ALIGNMENT 1
EOF

fi

if test -n "$pac_cv_c_struct_align_nr" ; then
    cat >> confdefs.h <<EOF
#define HAVE_MAX_STRUCT_ALIGNMENT $pac_cv_c_struct_align_nr
EOF

fi

echo $ac_n "checking for alignment restrictions on pointers""... $ac_c" 1>&6
echo "configure:3053: checking for alignment restrictions on pointers" >&5
if test "$cross_compiling" = yes; then
  pac_cv_pointers_have_int_alignment=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 3058 "configure"
#include "confdefs.h"

struct foo { int a; void *b; };
int main() {
    int buf[10];
    struct foo *p1;
    p1=(struct foo*)&buf[0];
    p1->b = (void *)0;
    p1=(struct foo*)&buf[1];
    p1->b = (void *)0;
    return 0;

}
EOF
if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_pointers_have_int_alignment=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_pointers_have_int_alignment=no
fi
rm -fr conftest*
fi


if test "$pac_cv_pointers_have_int_alignment" != "yes" ; then
   cat >> confdefs.h <<\EOF
#define NEEDS_POINTER_ALIGNMENT_ADJUST 1
EOF

   echo "$ac_t""pointer" 1>&6
else
   echo "$ac_t""int or better" 1>&6
fi

echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:3097: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=$CROSS_SIZEOF_SHORT
else
  cat > conftest.$ac_ext <<EOF
#line 3105 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:3136: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=$CROSS_SIZEOF_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3144 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:3175: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=$CROSS_SIZEOF_LONG
else
  cat > conftest.$ac_ext <<EOF
#line 3183 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:3214: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=$CROSS_SIZEOF_LONG_LONG
else
  cat > conftest.$ac_ext <<EOF
#line 3222 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:3253: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_float=$CROSS_SIZEOF_FLOAT
else
  cat > conftest.$ac_ext <<EOF
#line 3261 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
EOF
if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_float=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_float=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_float" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
EOF


echo $ac_n "checking size of double""... $ac_c" 1>&6
echo "configure:3292: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_double=$CROSS_SIZEOF_DOUBLE
else
  cat > conftest.$ac_ext <<EOF
#line 3300 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
EOF
if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
EOF


echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:3331: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=$CROSS_SIZEOF_LONG_DOUBLE
else
  cat > conftest.$ac_ext <<EOF
#line 3339 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
echo "configure:3370: checking size of wchar_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_wchar_t=$CROSS_SIZEOF_WCHAR_T
else
  cat > conftest.$ac_ext <<EOF
#line 3378 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(wchar_t));
  exit(0);
}
EOF
if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_wchar_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_wchar_t=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
EOF


echo $ac_n "checking size of void *""... $ac_c" 1>&6
echo "configure:3409: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_void_p=$CROSS_SIZEOF_VOID_P
else
  cat > conftest.$ac_ext <<EOF
#line 3417 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(void *));
  exit(0);
}
EOF
if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_void_p=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_void_p=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
EOF



echo $ac_n "checking size of float int""... $ac_c" 1>&6
echo "configure:3449: checking size of float int" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_float_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_float_int=$CROSS_SIZEOF_FLOAT_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3457 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  struct { float a; int b; } a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
EOF
if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_float_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_float_int=0
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_sizeof_float_int" 1>&6



echo $ac_n "checking size of double int""... $ac_c" 1>&6
echo "configure:3488: checking size of double int" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_double_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_double_int=$CROSS_SIZEOF_DOUBLE_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3496 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  struct { double a; int b; } a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
EOF
if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_double_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_double_int=0
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_sizeof_double_int" 1>&6



echo $ac_n "checking size of long int""... $ac_c" 1>&6
echo "configure:3527: checking size of long int" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_long_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_long_int=$CROSS_SIZEOF_LONG_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3535 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  struct { long a; int b; } a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
EOF
if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_long_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_long_int=0
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_sizeof_long_int" 1>&6



echo $ac_n "checking size of short int""... $ac_c" 1>&6
echo "configure:3566: checking size of short int" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_short_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_short_int=$CROSS_SIZEOF_SHORT_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3574 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  struct { short a; int b; } a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
EOF
if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_short_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_short_int=0
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_sizeof_short_int" 1>&6



echo $ac_n "checking size of 2 int""... $ac_c" 1>&6
echo "configure:3605: checking size of 2 int" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_2_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_2_int=$CROSS_SIZEOF_2_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3613 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  struct { int a; int b; } a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
EOF
if { (eval echo configure:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_2_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_2_int=0
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_sizeof_2_int" 1>&6



echo $ac_n "checking size of long double int""... $ac_c" 1>&6
echo "configure:3644: checking size of long double int" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_long_double_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_long_double_int=$CROSS_SIZEOF_LONG_DOUBLE_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3652 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  struct { long double a; int b; } a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
EOF
if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_long_double_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_long_double_int=0
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_sizeof_long_double_int" 1>&6


# sys/bitypes.h defines the int16_t etc. on some systems (e.g., OSF1).
# Include it when testing for these types
ac_safe=`echo "sys/bitypes.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/bitypes.h""... $ac_c" 1>&6
echo "configure:3685: checking for sys/bitypes.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.c<<EOF
#line 3690 "configure"
#include "confdefs.h"
#include <sys/bitypes.h>
int conftest() {return 0;}
EOF
ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
if { (eval echo configure:3696: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
    echo "configure: failed program was:" >&5
    cat conftest.c >&5
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  use_bitypes="#include <sys/bitypes.h>"
cat >> confdefs.h <<\EOF
#define HAVE_SYS_BITYPES_H 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for int16_t""... $ac_c" 1>&6
echo "configure:3718: checking for int16_t" >&5
if eval "test \"`echo '$''{'pac_cv_int16_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 3724 "configure"
#include "confdefs.h"
#include <sys/types.h>
$use_bitypes

int main() {
int16_t a=0;
; return 0; }
EOF
if { (eval echo configure:3733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_int16_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_int16_t=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_int16_t" 1>&6
if test "$pac_cv_int16_t" = "no" ; then
    if test -z "$CROSS_SIZEOF_SHORT" ; then CROSS_SIZEOF_SHORT=2 ; fi
    echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:3749: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=$CROSS_SIZEOF_SHORT
else
  cat > conftest.$ac_ext <<EOF
#line 3757 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


    if test "$ac_cv_sizeof_short" = 2 ; then 
        INT16_T=short
    else
        # No good option
        INT16_T=int
    fi
    
    cat >> confdefs.h <<EOF
#define MPIU_INT16_T $INT16_T
EOF

else
    cat >> confdefs.h <<\EOF
#define HAVE_INT16_T 1
EOF

fi
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
echo "configure:3805: checking for int32_t" >&5
if eval "test \"`echo '$''{'pac_cv_int32_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 3811 "configure"
#include "confdefs.h"
#include <sys/types.h>
$use_bitypes

int main() {
int32_t a=0;
; return 0; }
EOF
if { (eval echo configure:3820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_int32_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_int32_t=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_int32_t" 1>&6
if test "$pac_cv_int32_t" = "no" ; then
    if test -z "$CROSS_SIZEOF_INT" ; then CROSS_SIZEOF_INT=4 ; fi
    echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:3836: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=$CROSS_SIZEOF_INT
else
  cat > conftest.$ac_ext <<EOF
#line 3844 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


    if test "$ac_cv_sizeof_int" = 4 ; then 
        INT32_T=int
    else
        # No good alternative
        INT32_T=int
    fi
    
    cat >> confdefs.h <<EOF
#define MPIU_INT32_T $INT32_T
EOF

else
    cat >> confdefs.h <<\EOF
#define HAVE_INT32_T 1
EOF

fi
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
echo "configure:3892: checking for int64_t" >&5
if eval "test \"`echo '$''{'pac_cv_int64_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 3898 "configure"
#include "confdefs.h"
#include <sys/types.h>
$use_bitypes

int main() {
int64_t a=0;
; return 0; }
EOF
if { (eval echo configure:3907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_int64_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_int64_t=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_int64_t" 1>&6
if test "$pac_cv_int64_t" = "no" ; then
    if test -z "$CROSS_SIZEOF_LONG_LONG" ; then CROSS_SIZEOF_LONG_LONG=8 ; fi
    echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:3923: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=$CROSS_SIZEOF_LONG
else
  cat > conftest.$ac_ext <<EOF
#line 3931 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


    if test "$ac_cv_sizeof_long" = 8 ; then 
        INT64_T="long"
    else
        echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:3965: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=$CROSS_SIZEOF_LONG_LONG
else
  cat > conftest.$ac_ext <<EOF
#line 3973 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:3984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


        if test "$ac_cv_sizeof_long_long" = 8 ; then 
            INT64_T="long long"
        else
            # No good alternative
            INT64_T="long long"
        fi
    fi
    
    cat >> confdefs.h <<EOF
#define MPIU_INT64_T $INT64_T
EOF

else
    cat >> confdefs.h <<\EOF
#define HAVE_INT64_T 1
EOF

fi
for type in short int long long_long float double long_double wchar_t \
    float_int double_int long_int short_int 2_int long_double_int ; do
    eval len=\$ac_cv_sizeof_$type
    if test -z "$len" ; then 
       len=0
       # Check for sizes from the CHECK_SIZEOF_DERIVED macro
       eval pclen=\$pac_cv_sizeof_$type
       if test -n "$pclen" ; then
           len=$pclen
       else
           # check for a non-optional type
	   if test $type != long_long -a $type != long_double -a \
	           $tyep != long_double_int ; then 
               { echo "configure: error: Configure was unable to determine the size of $type ; if cross compiling,
use the environment variables CROSS_SIZEOF_typename, e.g., CROSS_SIZEOF_SHORT,
or use the --with-cross=file configure option to specify a file containing
Bourne (sh) shell assignments to CROSS_SIZEOF_typename for all datatype 
types.  The program maint/getcross.c can be compiled and run on the target
system; this program outputs an appropriate file for the --with-cross option" 1>&2; exit 1; }
	   fi
       fi
    fi

    if test $len -le 0 ; then
         eval len_$type="00"
    elif test $len -le 9 ; then 
         eval len_$type="0$len" 
    elif test $len -le 15 ; then
         case $len in 
         10) char=a ;;
	 11) char=b ;;
	 12) char=c ;;
	 13) char=d ;;
	 14) char=e ;;
	 15) char=f ;;
         esac
         eval len_$type="0$char"
    elif test $len -le 31 ; then
         len=`expr $len - 16`
         eval len_$type="1$len"
    elif test $len -le 63 ; then
         len=`expr $len - 32`
         eval len_$type="2$len"
    else
         { echo "configure: error: Type sizes greater than 63 bytes not supported (type $type is $len bytes)" 1>&2; exit 1; } 
    fi
done
# By definition, sizeof char is 1
MPI_CHAR="0x4c000101"
MPI_UNSIGNED_CHAR="0x4c000102"
MPI_SHORT="0x4c00${len_short}03"
MPI_UNSIGNED_SHORT="0x4c00${len_short}04"
MPI_INT="0x4c00${len_int}05"
MPI_UNSIGNED_INT="0x4c00${len_int}06"
MPI_LONG="0x4c00${len_long}07"
MPI_UNSIGNED_LONG="0x4c00${len_long}08"
MPI_LONG_LONG="0x4c00${len_long_long}09"
MPI_FLOAT="0x4c00${len_float}0a"
MPI_DOUBLE="0x4c00${len_double}0b"
MPI_LONG_DOUBLE="0x4c00${len_long_double}0c"
MPI_BYTE="0x4c00010d"
MPI_WCHAR_T="0x4c00${len_wchar_t}0e"
MPI_PACKED="0x4c00010f"
MPI_LB="0x4c000010"
MPI_UB="0x4c000011"
#
# These should define the mixed types *only* for contiguous data.
# For example, MPI_SHORT_INT may have a gap; it will need to be defined
# as a derived type instead.  For IA32, this only affects short_int.
MPI_FLOAT_INT="0x4c00${len_float_int}12"
MPI_DOUBLE_INT="0x4c00${len_double_int}13"
MPI_LONG_INT="0x4c00${len_long_int}14"
MPI_SHORT_INT="0x4c00${len_short_int}15"
MPI_2INT="0x4c00${len_2_int}16"
MPI_LONG_DOUBLE_INT="0x4c00${len_long_double_int}17"























#
# Export the basic C types so that the Fortran system can use them
export MPI_CHAR
export MPI_SHORT
export MPI_INT
export MPI_LONG
export MPI_LONG_LONG
export MPI_FLOAT
export MPI_DOUBLE
export MPI_LONG_DOUBLE
echo $ac_n "checking if char * pointers use give byte addresses""... $ac_c" 1>&6
echo "configure:4130: checking if char * pointers use give byte addresses" >&5
if eval "test \"`echo '$''{'pac_cv_c_char_p_is_byte'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  pac_cv_char_p_is_byte=unknown
else
  cat > conftest.$ac_ext <<EOF
#line 4139 "configure"
#include "confdefs.h"

int main(int argc, char **argv ){
char *a, buf;
a = &buf;
if ((long)(a-(char*)0) == (long)(a)) return 0; return 1;
}
EOF
if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_c_char_p_is_byte=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_char_p_is_byte=no
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$pac_cv_c_char_p_is_byte" 1>&6
if test "$pac_cv_char_p_is_byte" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define CHAR_PTR_IS_BYTE 1
EOF

fi
rm -f conftestval
echo $ac_n "checking for size of MPI_BSEND_OVERHEAD""... $ac_c" 1>&6
echo "configure:4171: checking for size of MPI_BSEND_OVERHEAD" >&5
if eval "test \"`echo '$''{'pac_cv_mpi_bsend_overhead'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  pac_cv_mpi_bsend_overhead=256
else
  cat > conftest.$ac_ext <<EOF
#line 4180 "configure"
#include "confdefs.h"

#include <stdio.h>
/* BsendData describes a bsend request */
typedef struct BsendData {
    int              size;             /* size that is available for data */
    int              total_size;       /* total size of this segment */
    struct BsendData *next, *prev;
    int          kind;
    void         *request;
    struct {
    void         *msgbuf;
    int          count;
    int          dtype;
    int          tag;
    void         *comm_ptr;
    int          dest;
    double       alignpad;
    } msg;
} BsendData_t;
int main( int argc, char *argv[] ){
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(BsendData_t));
  exit(0);
}

EOF
if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_mpi_bsend_overhead=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_mpi_bsend_overhead=256
fi
rm -fr conftest*
fi


fi

echo "$ac_t""$pac_cv_mpi_bsend_overhead" 1>&6
BSEND_OVERHEAD=$pac_cv_mpi_bsend_overhead

#
# The size of MPI_Status is needed for the Fortran interface. 
# This is not quite right unless the device setup script, executed above,
# sets the EXTRA_STATUS_DECL that will be used in defining a status.
# The default size assumes that there are 5 ints
default_status_size=`expr 5 \* $ac_cv_sizeof_int`
echo $ac_n "checking for size of MPI_Status""... $ac_c" 1>&6
echo "configure:4234: checking for size of MPI_Status" >&5
if eval "test \"`echo '$''{'pac_cv_sizeof_mpi_status'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
if test "$cross_compiling" = yes; then
  pac_cv_sizeof_mpi_status=$default_status_size
else
  cat > conftest.$ac_ext <<EOF
#line 4243 "configure"
#include "confdefs.h"

#include <stdio.h>
typedef struct { 
    int count;
    int cancelled;
    int MPI_SOURCE;
    int MPI_TAG;
    int MPI_ERROR;
    $EXTRA_STATUS_DECL
} MPI_Status;
int main( int argc, char *argv[] ){
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(MPI_Status));
  exit(0);
}

EOF
if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  pac_cv_sizeof_mpi_status=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  pac_cv_sizeof_mpi_status=$default_status_size
fi
rm -fr conftest*
fi


fi

echo "$ac_t""$pac_cv_sizeof_mpi_status" 1>&6
SIZEOF_MPI_STATUS=$pac_cv_sizeof_mpi_status
export SIZEOF_MPI_STATUS


if test -n "$thread_type" ; then
    case $thread_type in 
        pthread|posix)
	for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4290: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.c<<EOF
#line 4295 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int conftest() {return 0;}
EOF
ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
if { (eval echo configure:4301: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
    echo "configure: failed program was:" >&5
    cat conftest.c >&5
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

	# OSF1 has __pthread_create but not pthread_create (because of 
	# inconsistencies in the pthread spec).  Thus, we look for pthread_key_create
	
echo $ac_n "checking for library containing pthread_key_create""... $ac_c" 1>&6
echo "configure:4327: checking for library containing pthread_key_create" >&5
if eval "test \"`echo '$''{'ac_cv_search_pthread_key_create'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_pthread_key_create="no"
cat > conftest.$ac_ext <<EOF
#line 4334 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_key_create();

int main() {
pthread_key_create()
; return 0; }
EOF
if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_pthread_key_create="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_pthread_key_create" = "no" && for i in pthread; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 4356 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_key_create();

int main() {
pthread_key_create()
; return 0; }
EOF
if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_pthread_key_create="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_pthread_key_create" 1>&6
if test "$ac_cv_search_pthread_key_create" != "no"; then
  test "$ac_cv_search_pthread_key_create" = "none required" || LIBS="$ac_cv_search_pthread_key_create $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_PTHREAD_CREATE 
EOF

else :
  
fi
	;;
	solaris|thr)
	for ac_hdr in thread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4396: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.c<<EOF
#line 4401 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int conftest() {return 0;}
EOF
ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
if { (eval echo configure:4407: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
    echo "configure: failed program was:" >&5
    cat conftest.c >&5
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

	
echo $ac_n "checking for library containing thr_create""... $ac_c" 1>&6
echo "configure:4431: checking for library containing thr_create" >&5
if eval "test \"`echo '$''{'ac_cv_search_thr_create'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_thr_create="no"
cat > conftest.$ac_ext <<EOF
#line 4438 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char thr_create();

int main() {
thr_create()
; return 0; }
EOF
if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_thr_create="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_thr_create" = "no" && for i in thread; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 4460 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char thr_create();

int main() {
thr_create()
; return 0; }
EOF
if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_thr_create="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_thr_create" 1>&6
if test "$ac_cv_search_thr_create" != "no"; then
  test "$ac_cv_search_thr_create" = "none required" || LIBS="$ac_cv_search_thr_create $LIBS"
  cat >> confdefs.h <<\EOF
#define HAVE_THR_CREATE 1
EOF

else :
  
fi
	;;
	*)
	echo "configure: warning: Unknown thread type $thread type" 1>&2 
	;;
    esac

    for ac_func in thr_yield sched_yield yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4503: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4508 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

fi
if test "$ac_cv_prog_gcc" = "yes" ; then
echo $ac_n "checking for gcc __asm__ and pentium cmpxchgl instruction""... $ac_c" 1>&6
echo "configure:4558: checking for gcc __asm__ and pentium cmpxchgl instruction" >&5
if test "$cross_compiling" = yes; then
  echo "$ac_t""not checking when cross compiling" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4563 "configure"
#include "confdefs.h"

int main(int argc, char *argv[])
{
long int compval = 10;
volatile long int *p = &compval;
long int oldval = 10;
long int newval = 20;
char ret;
long int readval;
__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
	: "=q" (ret), "=m" (*p), "=a" (readval)
	: "r" (newval), "m" (*p), "a" (oldval));
return (compval == 20) ? 0 : -1;
}

EOF
if { (eval echo configure:4581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  echo "$ac_t""yes" 1>&6
   cat >> confdefs.h <<\EOF
#define HAVE_GCC_AND_PENTIUM_ASM 1
EOF

   lac_cv_use_atomic_updates="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi

fi
if test "$lac_cv_use_atomic_updates" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define USE_ATOMIC_UPDATES 
EOF

fi
if test "$enable_coverage" = "yes" ; then
    if test "$ac_cv_prog_gcc" = "yes" ; then
        CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
    else
        echo "configure: warning: --enable-coverage only supported for GCC" 1>&2
    fi
    # Test for the routines that we need to use to ensure that the
    # data files are (usually) written out
    for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4616: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4621 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    cat >> confdefs.h <<\EOF
#define USE_COVERAGE 1
EOF

fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:4674: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 4689 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 4706 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 4723 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:4754: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4759 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 4784 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 4802 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4823 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

# Check for a specific header
# Grrr.  OS/X fails the test for sys/uio.h because uio *requires* sys/types.h
# to compile.  Thus, we'll make that a separate test
for ac_hdr in stdarg.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4864: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.c<<EOF
#line 4869 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int conftest() {return 0;}
EOF
ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
if { (eval echo configure:4875: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
    echo "configure: failed program was:" >&5
    cat conftest.c >&5
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking for sys/uio.h""... $ac_c" 1>&6
echo "configure:4898: checking for sys/uio.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_uio_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 4904 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/uio.h>

int main() {
int a;
; return 0; }
EOF
if { (eval echo configure:4914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_sys_uio_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_sys_uio_h=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_sys_uio_h" 1>&6
if test "$ac_cv_header_sys_uio_h" = yes ; then
    cat >> confdefs.h <<\EOF
#define HAVE_SYS_UIO_H 1
EOF

fi
for ac_func in vsnprintf vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4936: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4941 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4991: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4996 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

if test "$ac_cv_func_snprintf" = "yes" ; then
    
echo $ac_n "checking whether snprintf needs a declaration""... $ac_c" 1>&6
echo "configure:5046: checking whether snprintf needs a declaration" >&5
if eval "test \"`echo '$''{'pac_cv_func_decl_snprintf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 5052 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
int a=snprintf(27,1.0,"foo");
; return 0; }
EOF
if { (eval echo configure:5059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_func_decl_snprintf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_func_decl_snprintf=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_func_decl_snprintf" 1>&6
if test "$pac_cv_func_decl_snprintf" = "yes" ; then
    cat >> confdefs.h <<EOF
#define NEEDS_SNPRINTF_DECL 1
EOF


fi

fi
# if we are using stdarg, we may need va_copy .  Test to see if we have it
# Since it may be a built-in instead of a function, we must try to 
# compile and link a program that uses it.
echo $ac_n "checking for va_copy""... $ac_c" 1>&6
echo "configure:5085: checking for va_copy" >&5
if eval "test \"`echo '$''{'pac_cv_func_va_copy'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 5091 "configure"
#include "confdefs.h"

#include <stdarg.h>
void foo1( char *fmt, ... ) {
    va_list ap, list;
    va_start(ap,fmt);
    va_copy(list,ap);
    va_end(list);
    va_end(ap);
}

int main() {
foo1("a test %d", 3);
; return 0; }
EOF
if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  pac_cv_func_va_copy=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_func_va_copy=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_func_va_copy" 1>&6
if test "$pac_cv_func_va_copy" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define HAVE_VA_COPY 1
EOF

fi
if test "$enable_internat" = "yes" ; then
    for ac_hdr in libintl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5131: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.c<<EOF
#line 5136 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int conftest() {return 0;}
EOF
ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
if { (eval echo configure:5142: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
    echo "configure: failed program was:" >&5
    cat conftest.c >&5
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    for ac_func in gettext dgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5167: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5172 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    if test "$ac_cv_header_libintl" = "yes" -a \
	    "$ac_cv_func_gettext" = "yes" -a \
	    "$ac_cv_func_dgettext" = "yes" ; then
	cat >> confdefs.h <<\EOF
#define USE_GETTEXT 1
EOF

    else
        echo "configure: warning: Cannot use internationalization because necessary headers and functions are not available" 1>&2
    fi
fi
if test "$enable_g_mem" != "yes" ; then
        for ac_func in strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5234: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5239 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    if test "$ac_cv_func_strdup" = "yes" ; then
        # Do we need to declare strdup?
        
echo $ac_n "checking whether strdup needs a declaration""... $ac_c" 1>&6
echo "configure:5290: checking whether strdup needs a declaration" >&5
if eval "test \"`echo '$''{'pac_cv_func_decl_strdup'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
cat > conftest.$ac_ext <<EOF
#line 5296 "configure"
#include "confdefs.h"
#include <string.h>
int main() {
int a=strdup(27,1.0,"foo");
; return 0; }
EOF
if { (eval echo configure:5303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_func_decl_strdup=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_func_decl_strdup=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_func_decl_strdup" 1>&6
if test "$pac_cv_func_decl_strdup" = "yes" ; then
    cat >> confdefs.h <<EOF
#define NEEDS_STRDUP_DECL 1
EOF


fi

    fi
else
            for ac_hdr in search
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5330: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat >conftest.c<<EOF
#line 5335 "configure"
#include "confdefs.h"
#include <$ac_hdr>
int conftest() {return 0;}
EOF
ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
if { (eval echo configure:5341: \"$ac_compile_for_cpp\") 1>&5; (eval $ac_compile_for_cpp) 2>&5; }; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
    echo "configure: failed program was:" >&5
    cat conftest.c >&5
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    for ac_func in tsearch
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5366: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5371 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

            if test "$ac_cv_func_tsearch" = "yes" ; then
        echo $ac_n "checking whether tsearch requires char* args""... $ac_c" 1>&6
echo "configure:5420: checking whether tsearch requires char* args" >&5
if eval "test \"`echo '$''{'pac_cv_tsearch_charp'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        cat > conftest.$ac_ext <<EOF
#line 5426 "configure"
#include "confdefs.h"
#include <search.h>
    char *tsearch( char *k, char **r, (int (*)())compare ) { return k; }
int main() {
int f=0;
; return 0; }
EOF
if { (eval echo configure:5434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  pac_cv_tsearch_charp=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_tsearch_charp=no
fi
rm -f conftest*
fi

echo "$ac_t""$pac_cv_tsearch_charp" 1>&6
        if test "$pac_cv_tsearch_charp" = "yes" ; then
	    # this should consider defining a name with the argument type
	    # so that no further ifdefs are needed
	    cat >> confdefs.h <<\EOF
#define USE_TSEARCH_WITH_CHARP 1
EOF

	fi
    fi
        fi

MPI_AINT=int
for type in int long long_long short ; do
    eval len=\$ac_cv_sizeof_$type
    if test "$len" = "$ac_cv_sizeof_void_p" ; then
        MPI_AINT=`echo $type | sed -e 's/_/ /'`
        break
    fi
done

if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_void_p" ; then
    cat >> confdefs.h <<\EOF
#define SIZEOF_INT_IS_AINT 1
EOF

fi
#
# If it is necessary for the device to update some of the variables,
# this step allows that to happen.  Possible variables to update are
#   LIBS - Add libraries needed for linking
#   LDFLAGS - Add other LD flags (e.g., search paths for libraries)
#   CPPFLAGS - Add C preprocessor flags, including -Idir
#   DEFS  - Add C preprocessor definitions, e.g., -Dfoo
# These must be updated, not replaced, so the setup_device script should
# do, e.g., 
#   LIBS="$LIBS -lmywierdlib",
# not
#   LIBS="-lmywierdlib"
# In some cases (particularly for LIBS), we want to perform this update
# *after* the configure step.  This is done by including the file
# localdefs if it exists.  Note that the use of a file *after* the configure
# of subdirectories means that the subdir configures will not get the 
# value.  This is normally ok for libraries but not for include paths,
# which is why there is a pre and post step
if test -f $use_top_srcdir/src/mpid/$device_name/setup_device ; then
    echo sourcing $use_top_srcdir/src/mpid/$device_name/setup_device
    . $use_top_srcdir/src/mpid/$device_name/setup_device
fi
export AR
export RANLIB
export MPILIBNAME
export CC

if test "$cache_file" = "/dev/null" -a "X$real_enable_cache" = "Xnotgiven" ; then
    cache_file=$$conf.cache
    touch $cache_file
                ac_cv_env_CC_set=set
    ac_cv_env_CC_value=$CC
    ac_cv_env_CFLAGS_set=${CFLAGS+set}
    ac_cv_env_CFLAGS_value=$CFLAGS
    ac_cv_env_CPP_set=set
    ac_cv_env_CPP_value=$CPP
    ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
    ac_cv_env_CPPFLAGS_value=$CPPFLAGS
    ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
    ac_cv_env_LDFLAGS_value=$LDFLAGS
    ac_cv_env_LIBS_set=${LIBS+set}
    ac_cv_env_LIBS_value=$LIBS
    ac_cv_env_FC_set=${FS+set}
    ac_cv_env_FC_value=$FC
    ac_cv_env_F77_set=${F77+set}
    ac_cv_env_F77_value=$F77
    ac_cv_env_FFLAGS_set=${FFLAGS+set}
    ac_cv_env_FFLAGS_value=$FFLAGS
    ac_cv_env_CXX_set=${CXX+set}
    ac_cv_env_CXX_value=$CXX

#     dnl For Autoconf 2.57+, we also need to look at these.  This does 
#     dnl disable a sometimes useful check in autoconf, but I don't see
#     dnl a way arount it
#     ac_env_CC_set=set
#     ac_env_CC_value=$CC
#     ac_env_CFLAGS_set=set
#     ac_env_CFLAGS_value=$CFLAGS
#     ac_env_CPP_set=set
#     ac_env_CPP_value=$CPP
#     ac_env_CPPFLAGS_set=set
#     ac_env_CPPFLAGS_value=$CPPFLAGS
#     ac_env_LDFLAGS_set=set
#     ac_env_LDFLAGS_value=$LDFLAGS
#     ac_env_LIBS_set=set
#     ac_env_LIBS_value=$LIBS
#     ac_env_FC_set=set
#     ac_env_FC_value=$FC
#     ac_env_F77_set=set
#     ac_env_F77_value=$F77
#     ac_env_FFLAGS_set=set
#     ac_env_FFLAGS_value=$FFLAGS
#     ac_env_CXX_set=set
#     ac_env_CXX_value=$CXX

#	export ac_env_LDFLAGS_set
#	export ac_env_LDFLAGS_value   
        
    # It turns out that A C CACHE_SAVE can't be invoked more than once
    # with data that contains blanks.  What happens is that the quotes
    # that it adds get quoted and then added again.  To avoid this,
    # we strip off the outer quotes for all cached variables
    cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

    
    rm -f confcache
    sed -e "s/'\\\\''//g" -e "s/'\\\\/'/" -e "s/\\\\'/'/" \
		-e "s/'\\\\''//g" $cache_file > confcache
    if cmp -s $cache_file confcache ; then
        :
    else
        if test -w $cache_file ; then
	    echo "updating cache $cache_file"
            cat confcache > $cache_file
        else
            echo "not updating unwritable cache $cache_file"
        fi
    fi	
    rm -f confcache
    if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then
        echo "Results of cleaned cache file:"
	echo "--------------------------------------------------------"
	cat $cache_file
	echo "--------------------------------------------------------"
    fi

    ac_configure_args="$ac_configure_args -enable-cache"
fi
export CC
export CFLAGS
export LDFLAGS
export LIBS
export CPPFLAGS
export CPP
export FC
export F77
export CXX
export FFLAGS
export CCFLAGS

# Build the device first.  This way, any libraries or variables that it needs
# can be extracted before building the other subsystems (this is particularly
# important for the bindings, which may need to know the libraries in order
# to create the compilation scripts)
SAVE_subdirs="$subdirs"
subdirs="src/mpi/timer $devsubsystems"
#
# Build any intermediate directories
for dir in src/mpi/timer $devsubsystems ; do
    saveIFS="$IFS"
    IFS="/"
    curdir=""
    for subdir in $dir ; do
	curdir="${curdir}$subdir"
	if test ! -d "$curdir" ; then mkdir "$curdir" ; fi
        curdir="${curdir}/"
    done
    IFS="$saveIFS"
done

    rm -f confcache
    sed -e "s/'\\\\''//g" -e "s/'\\\\/'/" -e "s/\\\\'/'/" \
		-e "s/'\\\\''//g" $cache_file > confcache
    if cmp -s $cache_file confcache ; then
        :
    else
        if test -w $cache_file ; then
	    echo "updating cache $cache_file"
            cat confcache > $cache_file
        else
            echo "not updating unwritable cache $cache_file"
        fi
    fi	
    rm -f confcache
    if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then
        echo "Results of cleaned cache file:"
	echo "--------------------------------------------------------"
	cat $cache_file
	echo "--------------------------------------------------------"
    fi

SAVE_INSTALL="$INSTALL"
ac_given_INSTALL="$INSTALL"

if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -cache-file | --cache-file | --cache-fil | --cache-fi \
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
      ac_prev=cache_file ;;
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in src/mpi/timer $devsubsystems; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

subdirs="$SAVE_subdirs"
INSTALL="$SAVE_INSTALL"

# Check for any localdefs files.  These may be created, so we look in
# the local directory first.
if test -f src/mpid/$device_name/localdefs ; then
    . src/mpid/$device_name/localdefs
elif test -f $use_top_srcdir/src/mpid/$device_name/localdefs ; then
    . $use_top_srcdir/src/mpid/$device_name/localdefs
fi

SAVE_subdirs="$subdirs"
subdirs="$subsystems"
#
# Build any intermediate directories
for dir in $subsystems ; do
    saveIFS="$IFS"
    IFS="/"
    curdir=""
    for subdir in $dir ; do
	curdir="${curdir}$subdir"
	if test ! -d "$curdir" ; then mkdir "$curdir" ; fi
        curdir="${curdir}/"
    done
    IFS="$saveIFS"
done

    rm -f confcache
    sed -e "s/'\\\\''//g" -e "s/'\\\\/'/" -e "s/\\\\'/'/" \
		-e "s/'\\\\''//g" $cache_file > confcache
    if cmp -s $cache_file confcache ; then
        :
    else
        if test -w $cache_file ; then
	    echo "updating cache $cache_file"
            cat confcache > $cache_file
        else
            echo "not updating unwritable cache $cache_file"
        fi
    fi	
    rm -f confcache
    if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then
        echo "Results of cleaned cache file:"
	echo "--------------------------------------------------------"
	cat $cache_file
	echo "--------------------------------------------------------"
    fi

SAVE_INSTALL="$INSTALL"
ac_given_INSTALL="$INSTALL"

if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -cache-file | --cache-file | --cache-fil | --cache-fi \
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
      ac_prev=cache_file ;;
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in $subsystems; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

subdirs="$SAVE_subdirs"
INSTALL="$SAVE_INSTALL"

#
# Get any localdefs that the subsystems created. Use a guard in case
# the list is empty
for dir in $subsystems /dev/null ; do 
    if test -f $dir/localdefs ; then
        . $dir/localdefs
    fi
done
#
# The language bindings must be done *last* because they may need to 
# know values from the localdefs of the previous configures
SAVE_subdirs="$subdirs"
subdirs="$bindingsubsystems"
#
# Build any intermediate directories
for dir in $bindingsubsystems ; do
    saveIFS="$IFS"
    IFS="/"
    curdir=""
    for subdir in $dir ; do
	curdir="${curdir}$subdir"
	if test ! -d "$curdir" ; then mkdir "$curdir" ; fi
        curdir="${curdir}/"
    done
    IFS="$saveIFS"
done

    rm -f confcache
    sed -e "s/'\\\\''//g" -e "s/'\\\\/'/" -e "s/\\\\'/'/" \
		-e "s/'\\\\''//g" $cache_file > confcache
    if cmp -s $cache_file confcache ; then
        :
    else
        if test -w $cache_file ; then
	    echo "updating cache $cache_file"
            cat confcache > $cache_file
        else
            echo "not updating unwritable cache $cache_file"
        fi
    fi	
    rm -f confcache
    if test "$DEBUG_AUTOCONF_CACHE" = "yes" ; then
        echo "Results of cleaned cache file:"
	echo "--------------------------------------------------------"
	cat $cache_file
	echo "--------------------------------------------------------"
    fi

SAVE_INSTALL="$INSTALL"
ac_given_INSTALL="$INSTALL"

if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -cache-file | --cache-file | --cache-fil | --cache-fi \
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
      ac_prev=cache_file ;;
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in $bindingsubsystems; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

subdirs="$SAVE_subdirs"
INSTALL="$SAVE_INSTALL"

#
# Get any localdefs that the subsystems created. Use a guard in case
# the list is empty
for dir in $bindingsubsystems /dev/null ; do 
    if test -f $dir/localdefs ; then
        . $dir/localdefs
    fi
done
# Make subsystems available to makefiles.
subsystems="$devsubsystems $subsystems $bindingsubsystems"

#
if test "$enable_f77" = "yes" -a -s src/binding/f77/mpif77.conf ; then
    # Load the values from the generated configuration file
    # These set the datatypes and the other Fortran types
    . ./src/binding/f77/mpif77.conf
    case "$F77_NAME_MANGLE"X in
    F77_NAME_LOWERX|F77_NAME_MIXEDX) 
    cat >> confdefs.h <<\EOF
#define F77_NAME_LOWER 1
EOF
 
	;;
    F77_NAME_LOWER_USCOREX|F77_NAME_MIXED_USCOREX)
    cat >> confdefs.h <<\EOF
#define F77_NAME_LOWER_USCORE 1
EOF

	 ;;
    F77_NAME_LOWER_2USCOREX)
    cat >> confdefs.h <<\EOF
#define F77_NAME_LOWER_2USCORE 1
EOF

	 ;;
    F77_NAME_UPPERX)
    cat >> confdefs.h <<\EOF
#define F77_NAME_UPPER 1
EOF
 
	;;
    esac
else
    for name in CHARACTER INTEGER REAL LOGICAL COMPLEX DOUBLE_PRECISION \
	2INTEGER 2REAL DOUBLE_COMPLEX 2COMPLEX 2DOUBLE_PRECISION \
	2DOUBLE_COMPLEX ; do
	fullname="MPI_$name"
	eval $fullname=MPI_DATATYPE_NULL
    done
    echo "configure: warning: Could not define Fortran MPI datatypes for C" 1>&2
    cat >> confdefs.h <<\EOF
#define HAVE_NO_FORTRAN_MPI_TYPES_IN_C 1
EOF

    # Temporary values for MPI_Fint (need help from the Fortran subsystem)
    MPI_FINT=int
fi














# Temporary values for MPI_Offset (need help from IO subsystem)
if test -n "$MPI_OFFSET_TYPE" ; then
   # We got the value from the ROMIO configure
   MPI_OFFSET="$MPI_OFFSET_TYPE"
else
    # Make a guess at the appropriate definition for offset.  Try to 
    # find a 64bit type.
    if test "$ac_cv_sizeof_long_long" = 8 ; then
        MPI_OFFSET="long long"
    else
        MPI_OFFSET=long
    fi
fi


if test -s src/mpid/$device_name/Makefile ; then
    #
    # The dependency handling will look for a file in a .deps directory.
    # Make sure that the directory and file exists before running Make.
    if test ! -d src/mpid/$device_name/.deps ; then 
        mkdir src/mpid/$device_name/.deps
    fi
    if  test ! -f src/mpid/$device_name/.deps/alldeps ; then
        touch src/mpid/$device_name/.deps/alldeps
    fi
    maxproc="`(cd src/mpid/$device_name ; ${MAKE} echomaxprocname) | tail -1`"
    # Note: if this is more than one line, there will be problems with
    # the final step.  That may happen if MAKE is acting in some wierd
    # way, such as echoing all directory changes (even if the only
    # directory change is a result of the -f command !).  To avoid that,
    # we just run make in the device directory
    #
    # Check that this is a number
    # expr is supposed to set the return code to 1 if the result is 0
    val=`expr $maxproc - $maxproc 2>/dev/null`
    if test $? != 1 -o "$val" != "0" ; then
        echo "configure: warning: Could not determine size of MPI_MAX_PROCESSOR_NAME, using 128" 1>&2
        maxproc=128
    fi
fi
if test -z "$maxproc" ; then
    maxproc=128
fi
# We should check that the maxproc value is a valid integer
MPI_MAX_PROCESSOR_NAME="$maxproc"

if test "$enable_weak_symbols" != "yes" ; then
    # Ugh.  We don't have the dependencies between the libraries right 
    # yet.  We *should* only need -lmpich -lpmpich .  
    LIBS="-lmpich -lpmpich -lmpich -lpmpich $LIBS"
else
    LIBS="-lmpich $LIBS"
fi

MPI_CFLAGS="$MPI_CFLAGS $CFLAGS"
MPI_LDFLAGS="$MPI_LDFLAGS $LDFLAGS"



# Get and save the MPIVERSION 

# Get the locatin of the CVS repository, if present
    # We can use this test (for CVS/Root) for creating maintainer targets
    # as well, and tests for maintainer-required software, such as 
    # doctext
if test -s CVS/Root ; then
    MPICVSHOME=`cat CVS/Root`
elif test -s "$srcdir/CVS/Root" ; then
    MPICVSHOME=`cat $srcdir/CVS/Root`
fi

# In case the documentation targets are used, find doctext and attempt to 
# find the source for the doctext LaTeX style files
# Extract the first word of "doctext", so it can be a program name with args.
set dummy doctext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6228: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DOCTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DOCTEXT" in
  /*)
  ac_cv_path_DOCTEXT="$DOCTEXT" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_DOCTEXT="$DOCTEXT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_DOCTEXT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
DOCTEXT="$ac_cv_path_DOCTEXT"
if test -n "$DOCTEXT"; then
  echo "$ac_t""$DOCTEXT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -n "$DOCTEXT" ; then
    if test -z "$DOCTEXTSYTLE" ; then
        echo $ac_n "checking for location of doctext style files""... $ac_c" 1>&6
echo "configure:6263: checking for location of doctext style files" >&5
        dpath=`doctext -debug_paths 2>&1 | grep 'default path' | \
	      sed -e 's%.*default path\(.*\),%\1:%g'`
        saveIFS="$IFS"
        IFS=": "
	for dir in $dpath ; do
	    if test -s $dir/refman.sty ; then
	       DOCTEXTSTYLE=$dir
	       break
	    fi
	done
        IFS="$saveIFS"
	if test -n "$DOCTEXTSTYLE" ; then
	    echo "$ac_t""$DOCTEXTSTYLE" 1>&6
        else
	    echo "$ac_t""unavailable" 1>&6
        fi
    fi
fi



subdirs="test/mpi"



if test -z "$includebuild_dir" ; then
    includebuild_dir=`pwd`/src/include
fi
if test -z "$libbuild_dir" ; then
    libbuild_dir=`pwd`/lib
fi
#export includebuild_dir
#export libbuild_dir


# Move the mpio.h file into the build directories for testing
#export top_srcdir
#export enable_romio


#
# If dependencies are enabled in the updatefiles/simplemake step, then
# we must generate the dependency directories.  We do this by detecting 
# the dependencies target.  Note that this refers to the Makefile,
# in case we are building with VPATH
# Grr. Finds differ on how they handle {} in a string.  We could use
# xargs, but that may not be standard enough.  Instead we fall back on 
# the old standby of using find with -print, then sed to
# construct the line, which is fed to sh
#    find . -type d -exec sh -c '(cd {} && grep MAKE_DEPEND_C Makefile >/dev/null 2>&1 && ( test -d .deps || mkdir .deps ) && touch .deps/alldeps )' \;


trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "Makefile src/Makefile \
          src/binding/Makefile \
          src/env/mpicc \
	  src/env/mpicc.conf \
	  src/env/Makefile\
          src/mpi/Makefile \
          src/mpi/attr/Makefile \
	  src/mpi/coll/Makefile \
          src/mpi/comm/Makefile \
	  src/mpi/datatype/Makefile \
	  src/mpi/debugger/Makefile \
          src/mpi/errhan/Makefile \
          src/mpi/group/Makefile \
          src/mpi/init/Makefile \
          src/mpi/io/Makefile \
          src/mpi/misc/Makefile \
          src/mpi/pt2pt/Makefile \
          src/mpi/rma/Makefile \
          src/mpi/spawn/Makefile \
          src/mpi/topo/Makefile \
          src/mpid/Makefile \
          src/mpid/common/Makefile \
          $TOPLEVEL_OUTPUT_FILES \
          src/mpid/common/datatype/Makefile \
          src/mpid/common/locks/Makefile \
          src/pm/Makefile \
          src/pmi/Makefile \
	  src/nameserv/Makefile \
	  src/nameserv/file/Makefile \
	  src/util/Makefile \
	  src/util/info/Makefile \
	  src/util/instrm/Makefile \
	  src/util/mem/Makefile \
	  src/util/msgs/Makefile \
	  src/util/param/Makefile \
	  src/util/thread/Makefile \
          src/util/dbg/Makefile \
          src/include/mpi.h \
	  test/Makefile test/runtests test/util/Makefile \
	  test/mpid/Makefile \
	  test/mpid/ch3/Makefile \
	  test/util/info/Makefile \
	  examples/Makefile \
          src/util/logging/Makefile \
          src/util/timing/Makefile \
	  doc/Makefile doc/mansrc/Makefile \
	  doc/adi3/Makefile doc/installguide/Makefile doc/userguide/Makefile \
	  doc/develop/Makefile \
 src/include/mpichconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@CONFIGURE_ARGUMENTS@%$CONFIGURE_ARGUMENTS%g
s%@logging_dir@%$logging_dir%g
s%@logging_name@%$logging_name%g
s%@logging_subdirs@%$logging_subdirs%g
s%@debugger_dir@%$debugger_dir%g
s%@htmldir@%$htmldir%g
s%@master_top_srcdir@%$master_top_srcdir%g
s%@master_top_builddir@%$master_top_builddir%g
s%@romio_dir@%$romio_dir%g
s%@HAVE_ROMIO@%$HAVE_ROMIO%g
s%@device_name@%$device_name%g
s%@pmi_name@%$pmi_name%g
s%@MANY_PM@%$MANY_PM%g
s%@pm_name@%$pm_name%g
s%@other_pm_names@%$other_pm_names%g
s%@mpe_dir@%$mpe_dir%g
s%@bindings@%$bindings%g
s%@bindings_dirs@%$bindings_dirs%g
s%@CC@%$CC%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@MKDIR_P@%$MKDIR_P%g
s%@LIBTOOL@%$LIBTOOL%g
s%@CC_SHL@%$CC_SHL%g
s%@C_LINK_SHL@%$C_LINK_SHL%g
s%@ENABLE_SHLIB@%$ENABLE_SHLIB%g
s%@BUILD_TVDLL@%$BUILD_TVDLL%g
s%@PERL5@%$PERL5%g
s%@nameserv_name@%$nameserv_name%g
s%@MAKE@%$MAKE%g
s%@VPATH@%$VPATH%g
s%@SET_CFLAGS@%$SET_CFLAGS%g
s%@SET_MAKE@%$SET_MAKE%g
s%@NO_WEAK_SYM@%$NO_WEAK_SYM%g
s%@NO_WEAK_SYM_TARGET@%$NO_WEAK_SYM_TARGET%g
s%@PROFILE_DEF_MPI@%$PROFILE_DEF_MPI%g
s%@MAKE_DEPEND_C@%$MAKE_DEPEND_C%g
s%@INT16_T@%$INT16_T%g
s%@INT32_T@%$INT32_T%g
s%@INT64_T@%$INT64_T%g
s%@MPI_CHAR@%$MPI_CHAR%g
s%@MPI_UNSIGNED_CHAR@%$MPI_UNSIGNED_CHAR%g
s%@MPI_SHORT@%$MPI_SHORT%g
s%@MPI_UNSIGNED_SHORT@%$MPI_UNSIGNED_SHORT%g
s%@MPI_INT@%$MPI_INT%g
s%@MPI_UNSIGNED_INT@%$MPI_UNSIGNED_INT%g
s%@MPI_LONG@%$MPI_LONG%g
s%@MPI_UNSIGNED_LONG@%$MPI_UNSIGNED_LONG%g
s%@MPI_LONG_LONG@%$MPI_LONG_LONG%g
s%@MPI_FLOAT@%$MPI_FLOAT%g
s%@MPI_DOUBLE@%$MPI_DOUBLE%g
s%@MPI_LONG_DOUBLE@%$MPI_LONG_DOUBLE%g
s%@MPI_BYTE@%$MPI_BYTE%g
s%@MPI_WCHAR_T@%$MPI_WCHAR_T%g
s%@MPI_PACKED@%$MPI_PACKED%g
s%@MPI_LB@%$MPI_LB%g
s%@MPI_UB@%$MPI_UB%g
s%@MPI_FLOAT_INT@%$MPI_FLOAT_INT%g
s%@MPI_DOUBLE_INT@%$MPI_DOUBLE_INT%g
s%@MPI_LONG_INT@%$MPI_LONG_INT%g
s%@MPI_SHORT_INT@%$MPI_SHORT_INT%g
s%@MPI_2INT@%$MPI_2INT%g
s%@MPI_LONG_DOUBLE_INT@%$MPI_LONG_DOUBLE_INT%g
s%@BSEND_OVERHEAD@%$BSEND_OVERHEAD%g
s%@SIZEOF_MPI_STATUS@%$SIZEOF_MPI_STATUS%g
s%@CPP@%$CPP%g
s%@MPILIBNAME@%$MPILIBNAME%g
s%@MPI_AINT@%$MPI_AINT%g
s%@subsystems@%$subsystems%g
s%@MPI_CHARACTER@%$MPI_CHARACTER%g
s%@MPI_INTEGER@%$MPI_INTEGER%g
s%@MPI_REAL@%$MPI_REAL%g
s%@MPI_LOGICAL@%$MPI_LOGICAL%g
s%@MPI_COMPLEX@%$MPI_COMPLEX%g
s%@MPI_DOUBLE_PRECISION@%$MPI_DOUBLE_PRECISION%g
s%@MPI_2INTEGER@%$MPI_2INTEGER%g
s%@MPI_2REAL@%$MPI_2REAL%g
s%@MPI_DOUBLE_COMPLEX@%$MPI_DOUBLE_COMPLEX%g
s%@MPI_2DOUBLE_PRECISION@%$MPI_2DOUBLE_PRECISION%g
s%@MPI_2COMPLEX@%$MPI_2COMPLEX%g
s%@MPI_2DOUBLE_COMPLEX@%$MPI_2DOUBLE_COMPLEX%g
s%@MPI_FINT@%$MPI_FINT%g
s%@MPI_OFFSET@%$MPI_OFFSET%g
s%@EXTRA_STATUS_DECL@%$EXTRA_STATUS_DECL%g
s%@MPI_MAX_PROCESSOR_NAME@%$MPI_MAX_PROCESSOR_NAME%g
s%@MPI_CFLAGS@%$MPI_CFLAGS%g
s%@MPI_LDFLAGS@%$MPI_LDFLAGS%g
s%@MPIVERSION@%$MPIVERSION%g
s%@MPICVSHOME@%$MPICVSHOME%g
s%@DOCTEXT@%$DOCTEXT%g
s%@DOCTEXTSTYLE@%$DOCTEXTSTYLE%g
s%@subdirs@%$subdirs%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile \
          src/binding/Makefile \
          src/env/mpicc \
	  src/env/mpicc.conf \
	  src/env/Makefile\
          src/mpi/Makefile \
          src/mpi/attr/Makefile \
	  src/mpi/coll/Makefile \
          src/mpi/comm/Makefile \
	  src/mpi/datatype/Makefile \
	  src/mpi/debugger/Makefile \
          src/mpi/errhan/Makefile \
          src/mpi/group/Makefile \
          src/mpi/init/Makefile \
          src/mpi/io/Makefile \
          src/mpi/misc/Makefile \
          src/mpi/pt2pt/Makefile \
          src/mpi/rma/Makefile \
          src/mpi/spawn/Makefile \
          src/mpi/topo/Makefile \
          src/mpid/Makefile \
          src/mpid/common/Makefile \
          $TOPLEVEL_OUTPUT_FILES \
          src/mpid/common/datatype/Makefile \
          src/mpid/common/locks/Makefile \
          src/pm/Makefile \
          src/pmi/Makefile \
	  src/nameserv/Makefile \
	  src/nameserv/file/Makefile \
	  src/util/Makefile \
	  src/util/info/Makefile \
	  src/util/instrm/Makefile \
	  src/util/mem/Makefile \
	  src/util/msgs/Makefile \
	  src/util/param/Makefile \
	  src/util/thread/Makefile \
          src/util/dbg/Makefile \
          src/include/mpi.h \
	  test/Makefile test/runtests test/util/Makefile \
	  test/mpid/Makefile \
	  test/mpid/ch3/Makefile \
	  test/util/info/Makefile \
	  examples/Makefile \
          src/util/logging/Makefile \
          src/util/timing/Makefile \
	  doc/Makefile doc/mansrc/Makefile \
	  doc/adi3/Makefile doc/installguide/Makefile doc/userguide/Makefile \
	  doc/develop/Makefile \
"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="src/include/mpichconf.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
done
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF

includebuild_dir=$includebuild_dir
libbuild_dir=$libbuild_dir
enable_romio=$enable_romio
top_srcdir=$top_srcdir
enable_dependencies=$enable_dependencies

EOF
cat >> $CONFIG_STATUS <<\EOF
chmod a+x test/runtests
chmod a+x src/env/mpicc ;
   if test ! -d bin  ; then mkdir bin ; fi 
   sed -e 's%includedir=.*%includedir='$includebuild_dir% \
       -e 's%libdir=.*%libdir='$libbuild_dir% src/env/mpicc > bin/mpicc ;
   chmod a+x bin/mpicc 
if test "$enable_romio" = "yes" ; then
  /bin/rm -f src/include/mpio.h "${top_srcdir}/include/mpio.h"
  cp src/mpi/romio/include/mpio.h src/include ; fi
if grep 'dependencies:' Makefile >/dev/null 2>&1 ; then
    find . -type d -print | sed -e 's%\(.*\)%(cd \1 \&\& grep MAKE_DEPEND_C Makefile >/dev/null 2>\&1 \&\& ( test -d .deps || mkdir .deps) \&\& touch .deps/alldeps)%g' | sh
fi

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -cache-file | --cache-file | --cache-fil | --cache-fi \
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
      ac_prev=cache_file ;;
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in test/mpi; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi





if test "$cache_file" != "/dev/null" -a "X$real_enable_cache" = "Xnotgiven" ; then
   rm -f $cache_file
fi

echo 'Configuration completed.'
