#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh

# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi


# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`


# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for as_base in sh bash ksh sh5; do
	 case $as_dir in
	 /*)
	   if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
	     CONFIG_SHELL=$as_dir/$as_base
	     export CONFIG_SHELL
	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
	   fi;;
	 esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_executable_p="test -f"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH


# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

exec 6>&1

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_config_libobj_dir=.
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Maximum number of lines to put in a shell here document.
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=

ac_unique_file="src/include/mpichconf.h.in"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"

ac_subdirs_all="$ac_subdirs_all test/mpi"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION CONFIGURE_ARGUMENTS MPIFLIBNAME PMPIFLIBNAME FWRAPNAME htmldir docdir master_top_builddir master_top_srcdir DEVICE INCLUDE_MPIDDEFS_H MPICXXLIBNAME logging_dir logging_name logging_subdirs debugger_dir romio_dir HAVE_ROMIO device_name MANY_PM pm_name other_pm_names pmi_name mpe_dir other_install_dirs CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CREATESHLIB NEEDSPLIB NO_WEAK_SYM NO_WEAK_SYM_TARGET PROFILE_DEF_MPI F77 FFLAGS ac_ct_F77 FLIBS F77_NAME_MANGLE F90 F90FLAGS ac_ct_F90 F77_INCDIR FINCLUDES F77_LIBDIR_LEADER MPIFPMPI F77_IN_C_LIBS FC_SHL FC_LINKPATH_SHL F77CPP F90MODEXT F90_WORK_FILES_ARG F90MODINCFLAG F90MODINCSPEC MPIMODNAME MPICONSTMODNAME modincdir F90INC F90INCFLAG F90EXT F90CPP F90_SHL F90_LINKPATH_SHL CXX CXXFLAGS ac_ct_CXX HAVE_CXX_EXCEPTIONS CXX_DEFS CXX_SHL CXX_LINKPATH_SHL GNUC_VERSION GNUC_MINORVERSION INCLUDE_MPICXX_H FORTRAN_BINDING MPIR_CXX_BOOL MPIR_CXX_COMPLEX MPIR_CXX_DOUBLE_COMPLEX MPIR_CXX_LONG_DOUBLE_COMPLEX bindings bindings_dirs FC PERL AR RANLIB ETAGS ETAGSADD ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB_AFTER_INSTALL MKDIR_P MAKE VPATH SET_CFLAGS SET_MAKE BASH BUILD_BASH_SCRIPTS CC_SHL C_LINK_SHL C_LINKPATH_SHL SHLIB_EXT SHLIB_FROM_LO SHLIB_INSTALL ENABLE_SHLIB pac_prog LIBTOOL BUILD_TVDLL CC_SHL_DBG C_LINK_SHL_DBG nameserv_name DOCTEXT DOCTEXTSTYLE MAKE_DEPEND_C GCC CPP EGREP INT16_T INT32_T INT64_T MPI_CHAR MPI_UNSIGNED_CHAR MPI_SHORT MPI_UNSIGNED_SHORT MPI_INT MPI_UNSIGNED_INT MPI_LONG MPI_UNSIGNED_LONG MPI_LONG_LONG MPI_FLOAT MPI_DOUBLE MPI_LONG_DOUBLE MPI_BYTE MPI_WCHAR MPI_PACKED MPI_LB MPI_UB MPI_FLOAT_INT MPI_DOUBLE_INT MPI_LONG_INT MPI_SHORT_INT MPI_2INT MPI_LONG_DOUBLE_INT MPI_SIGNED_CHAR MPI_UNSIGNED_LONG_LONG MPI_REAL4 MPI_REAL8 MPI_REAL16 MPI_COMPLEX8 MPI_COMPLEX16 MPI_COMPLEX32 MPI_INTEGER1 MPI_INTEGER2 MPI_INTEGER4 MPI_INTEGER8 MPI_INTEGER16 MPI_CHARACTER MPI_INTEGER MPI_REAL MPI_LOGICAL MPI_COMPLEX MPI_DOUBLE_PRECISION MPI_2INTEGER MPI_2REAL MPI_DOUBLE_COMPLEX MPI_2DOUBLE_PRECISION MPI_2COMPLEX MPI_2DOUBLE_COMPLEX MPI_F77_PACKED MPI_F77_UB MPI_F77_LB MPI_F77_BYTE F77_INTEGER1 F77_INTEGER2 F77_INTEGER4 F77_INTEGER8 F77_INTEGER16 F77_REAL4 F77_REAL8 F77_REAL16 F77_COMPLEX8 F77_COMPLEX16 F77_COMPLEX32 SIZEOF_MPI_STATUS MPI_STATUS_SIZE TESTCPP ADDRESS_KIND OFFSET_KIND DLLIMPORT CXXCPP BSEND_OVERHEAD ALLOCA MPID_TIMER_TYPE MPICH_TIMER_KIND MPILIBNAME PMPILIBNAME MPI_AINT THR_DEFS THR_CFLAGS THR_CPPFLAGS THR_LDFLAGS THR_LIBS MPE_THREAD_LIB_NAME subsystems MPI_FINT MPI_OFFSET MPI_OFFSET_TYPEDEF FORTRAN_MPI_OFFSET EXTRA_STATUS_DECL MPI_MAX_PROCESSOR_NAME EXAMPLE_LIBS MPI_CFLAGS MPI_FFLAGS MPI_CXXFLAGS MPI_F90FLAGS MPI_LDFLAGS MPIU_DLL_SPEC_DEF MPICVSHOME EXTERNAL_SRC_DIRS subdirs MPICC MPICXX MPIF77 MPIF90 LIBOBJS LTLIBOBJS'
ac_subst_files='MPE_THREAD_TYPEDEFS MPE_THREAD_FUNCS'

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
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'

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

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`

  # 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_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$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 ;;

  --config-cache | -C)
    cache_file=config.cache ;;

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

  -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) 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 | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$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 | -n)
    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_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

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

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "with_$ac_package='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    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 "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
   { (exit 1); exit 1; }; }
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    ;;

  esac
done

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

# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
	      localstatedir libdir includedir oldincludedir infodir mandir
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used." >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null


# 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_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$0" : 'X\(//\)[^/]' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$0" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  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 "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
   { (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_F77_set=${F77+set}
ac_env_F77_value=$F77
ac_cv_env_F77_set=${F77+set}
ac_cv_env_F77_value=$F77
ac_env_FFLAGS_set=${FFLAGS+set}
ac_env_FFLAGS_value=$FFLAGS
ac_cv_env_FFLAGS_set=${FFLAGS+set}
ac_cv_env_FFLAGS_value=$FFLAGS
ac_env_F90_set=${F90+set}
ac_env_F90_value=$F90
ac_cv_env_F90_set=${F90+set}
ac_cv_env_F90_value=$F90
ac_env_F90FLAGS_set=${F90FLAGS+set}
ac_env_F90FLAGS_value=$F90FLAGS
ac_cv_env_F90FLAGS_set=${F90FLAGS+set}
ac_cv_env_F90FLAGS_value=$F90FLAGS
ac_env_CXX_set=${CXX+set}
ac_env_CXX_value=$CXX
ac_cv_env_CXX_set=${CXX+set}
ac_cv_env_CXX_value=$CXX
ac_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_env_CXXFLAGS_value=$CXXFLAGS
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
ac_env_CXXCPP_set=${CXXCPP+set}
ac_env_CXXCPP_value=$CXXCPP
ac_cv_env_CXXCPP_set=${CXXCPP+set}
ac_cv_env_CXXCPP_value=$CXXCPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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 <<_ACEOF
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

_ACEOF

  cat <<_ACEOF
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
			  [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
			  [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]
_ACEOF

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then

  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
--enable-cache  - Turn on configure caching
--enable-echo  - Turn on strong echoing. The default is enable=no.
--enable-strict - Turn on strict debugging with gcc
--enable-coverage - Turn on coverage analysis using gcc and gcov
--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
--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
--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.
--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
    log      - Enable debug event logging
    meminit  - Preinitialize memory associated structures and unions to
               eliminate access warnings from programs like valgrind
    all      - All of the above choices
--enable-fast - pick the appropriate options for fast execution.  This
                turns off error checking and timing collection
--enable-f77 - Enable Fortran 77 bindings
--enable-f90 - Enable Fortran 90 bindings
--enable-cxx - Enable C++ bindings
--enable-romio - Enable ROMIO MPI I/O implementation
--enable-debuginfo - Enable support for debuggers
--enable-nmpi-as-mpi - Use MPI rather than PMPI routines for MPI routines,
 such as the collectives, that may be implemented in terms of other MPI
 routines
--enable-mpe - Build the MPE (MPI Parallel Environment) routines
--enable-threads=level - Control the level of thread support in the
MPICH implementation.  The following levels are supported.
    single - No threads (MPI_THREAD_SINGLE)
    funneled - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
    serialized - User serializes calls to MPI (MPI_THREAD_SERIALIZED)
    multiple(:impl) - Fully multi-threaded (MPI_THREAD_MULTIPLE)
The following implementations are supported.
    global_mutex - a single global lock guards access to all MPI functions.
The default implementation is global_mutex.
For the ch3:sock channel, a separate build is no longer needed for thread-multiple.
It is compiled by default and is selectable at run time with MPI_Init_thread.
If MPI_Init_thread is not called, the default is funneled .
For other channels, the --enable-threads option is not supported currently, and
the default is funneled.
--enable-weak-symbols - Use weak symbols to implement PMPI routines (default)
--enable-sharedlibs=kind - Enable shared libraries.  kind may be
    gcc     - Standard gcc and GNU ld options for creating shared libraries
    osx-gcc - Special options for gcc needed only on OS/X
    solaris-cc - Solaris native (SPARC) compilers for 32 bit systems
    cygwin-gcc - Special options for gcc needed only for cygwin
    none    - same as --disable-sharedlibs
Only gcc, osx-gcc, and solaris-cc are currently supported

--enable-dependencies - Generate dependencies for sourcefiles.  This
            requires that the Makefile.in files are also created
            to support dependencies (see maint/updatefiles)
--enable-timer-type=name - Select the timer to use
for MPI_Wtime and internal timestamps.  name may be one of
    gethrtime - Solaris timer (Solaris systems only)
    clock_gettime   - Posix timer (where available)
    gettimeofday - Most Unix systems
    linux86_cycle - Linux x86; returns cycle counts, not time in seconds
    linuxalpha_cycle - Like linux86_cycle, but for Linux Alpha
    gcc_ia64_cycle - IPF ar.itc timer

--enable-base-cache - Enable the use of a simple cache for the subsidieary
                       configure scripts.

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
--with-device=name - Specify the communication device for MPICH.
--with-pmi=name - Specify the pmi interface for MPICH.
--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.
--with-logging=name - Specify the logging library for MPICH.
--with-mpe - Build the MPE (MPI Parallel Environment) routines
--with-htmldir=dir - Specify the directory for html documentation
--with-docdir=dir - Specify the directory for documentation
--with-cross=file - Specify the values of variables that configure cannot
determine in a cross-compilation environment
--with-namepublisher=name - Choose the system that will support
                             MPI_PUBLISH_NAME and MPI_LOOKUP_NAME.  Options
                             include
                               no (no service available)
                               mpd
			       file:directory (optional directory)

--with-fwrapname=name  - Specify name of library containing Fortran interface
routines
--with-thread-package=package - Thread package to use.  Supported thread
packages include:
    posix or pthreads - POSIX threads
    solaris - Solaris threads (Solaris OS only)
    none - no threads
If the option is not specified, the default package is ${MPE_THREAD_DEFAULT}.
If the option is specified, but a package is not given, then the default
is posix.

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags
  F90         Fortran 90 compiler command
  F90FLAGS    Fortran 90 compiler flags
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor
  CXXCPP      C++ preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

_ACEOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d $ac_dir || continue
    ac_builddir=.

if test "$ac_dir" != .; then
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac

# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=`pwd`;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
  case $ac_srcdir in
  .) ac_abs_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
  case $ac_top_srcdir in
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  esac;;
esac

    cd $ac_dir
    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_srcdir/configure.gnu; then
      echo
      $SHELL $ac_srcdir/configure.gnu  --help=recursive
    elif test -f $ac_srcdir/configure; then
      echo
      $SHELL $ac_srcdir/configure  --help=recursive
    elif test -f $ac_srcdir/configure.ac ||
	   test -f $ac_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi
    cd "$ac_popdir"
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\_ACEOF

Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ $0 $@

_ACEOF
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
    2)
      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
      # Get rid of the leading space.
      ac_sep=" "
      ;;
    esac
  done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Be sure not to use single quotes in there, as some shells,
# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
    echo
    # The following way of writing the cache mishandles newlines in values,
{
  (set) 2>&1 |
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      sed -n \
	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
      ;;
    *)
      sed -n \
	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
}
    echo

    cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=$`echo $ac_var`
      echo "$ac_var='"'"'$ac_val'"'"'"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      cat <<\_ASBOX
## ------------- ##
## Output files. ##
## ------------- ##
_ASBOX
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=$`echo $ac_var`
	echo "$ac_var='"'"'$ac_val'"'"'"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
      echo
      sed "/^$/d" confdefs.h | sort
      echo
    fi
    test "$ac_signal" != 0 &&
      echo "$as_me: caught signal $ac_signal"
    echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core &&
  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
     ' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# 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

# Predefined preprocessor variables.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF


# Let the site file select an alternate cache file if it wants to.
# 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 "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

if test "$CONFIGURE_DEBUG_CACHE" = yes ; then
    oldopts="$-"
    clearMinusX=no
    set -x
    if test "$oldopts" != "$-" ; then
        clearMinusX=yes
    fi
fi
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%^\(.*/\)[^/]*%\1config.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
#
# Get a test value and flag whether we should remove/replace the
# cache_system file (do so unless cache_system_ok is yes)
# FC and F77 should be synonyms.  Save both in case
# We include the xxxFLAGS in case the user is using the flags to change
# the language (either input or output) of the compiler.  E.g.,
# using -xarch=v9 on Solaris to select 64 bit output or using -D_BSD_SOURCE
# with gcc to get different header files on input.
cleanargs=`echo "$CC $F77 $FC $CXX $F90 $CFLAGS $FFLAGS $CXXFLAGS $F90FLAGS $PATH" | tr '"' ' '`
if uname -srm >/dev/null 2>&1 ; then
    cache_system_text="`uname -srm` $cleanargs"
else
    cache_system_text="-no-uname- $cleanargs"
fi
cache_system_ok=no
#
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
        if test -f "$cache_system" -a -n "$cache_system_text" ; then
	    if test "$cache_system_text" = "`cat $cache_system`" ; then
	        real_enable_cache="yes"
                cache_system_ok=yes
	    fi
        elif test ! -f "$cache_system" -a -n "$cache_system_text" ; then
	    # remove the cache file because it may not correspond to our
	    # system
	    if test "$cache_file" != "/dev/null" ; then
	        rm -f $cache_file
	    fi
	    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 "Configure in `pwd` creating cache $cache_file"
    > $cache_file
    rm -f $cache_system
  fi
else
  cache_file="/dev/null"
fi
# Remember our location and the name of the cachefile
pac_cv_my_conf_dir=`pwd`
#
# Update the cache_system file if necessary
if test "$cache_system_ok" != yes ; then
    if test -n "$cache_system" ; then
        rm -f $cache_system
        echo $cache_system_text > $cache_system
    fi
fi
if test "$clearMinusX" = yes ; then
    set +x
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  eval ac_new_val="\$ac_env_${ac_var}_value"
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
	ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



















# Try to find the version
if test -s "$srcdir/maint/Version" ; then
    VERSION="`cat $srcdir/maint/Version`"
else
    VERSION="1.0.4p1"
fi

CONFIGURE_ARGUMENTS="$ac_configure_args"

if test -n "$ac_configure_args" ; then
    echo "Configuring MPICH2 version $VERSION with $ac_configure_args"
else
    echo "Configuring MPICH2 version $VERSION"
fi
          ac_config_headers="$ac_config_headers src/include/mpichconf.h"






if test -f $CONFIG_AUX_DIR/install-sh ; then ac_aux_dir=$CONFIG_AUX_DIR
else
ac_aux_dir=
# We force the test to use the absolute path to ensure that the install
# program can be used if we cd to a different directory before using
# install.
for ac_dir in confdb $srcdir/confdb; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    abs_ac_aux_dir=`(cd $ac_aux_dir && pwd)`
    ac_install_sh="$abs_ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    abs_ac_aux_dir=`(cd $ac_aux_dir && pwd)`
    ac_install_sh="$abs_ac_aux_dir/install.sh -c"
    break
  fi
done
fi
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:$LINENO: error: can not find install-sh or install.sh in confdb $srcdir/confdb" >&5
echo "$as_me: error: can not find install-sh or install.sh in confdb $srcdir/confdb" >&2;}
   { (exit 1); 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"

else
  enable_strict=no
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=default
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-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=default; enable_f77_wasdefault=yes
fi;
# Check whether --enable-f90 or --disable-f90 was given.
if test "${enable_f90+set}" = set; then
  enableval="$enable_f90"

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

else
  enable_cxx=default
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-debuginfo or --disable-debuginfo was given.
if test "${enable_debuginfo+set}" = set; then
  enableval="$enable_debuginfo"

else
  enable_debuginfo=no
fi;
# Check whether --enable-nmpi-as-mpi or --disable-nmpi-as-mpi was given.
if test "${enable_nmpi_as_mpi+set}" = set; then
  enableval="$enable_nmpi_as_mpi"

else
  enable_nmpi_as_mpi=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"
  if test -z "$withval" ; then with_logging=rlog ; fi
else
  with_logging=none
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;
if test "$with_mpe" = "default" ; then
    # Check whether --enable-mpe or --disable-mpe was given.
if test "${enable_mpe+set}" = set; then
  enableval="$enable_mpe"
  with_mpe=$enableval
else
  with_mpe=default
fi;
fi
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
  enableval="$enable_threads"

else
  enable_threads=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-docdir or --without-docdir was given.
if test "${with_docdir+set}" = set; then
  withval="$with_docdir"

else
  with_docdir='${prefix}/doc'
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-namepublisher or --without-namepublisher was given.
if test "${with_namepublisher+set}" = set; then
  withval="$with_namepublisher"

else
  with_namepublisher=default
fi;




# Check whether --with-fwrapname or --without-fwrapname was given.
if test "${with_fwrapname+set}" = set; then
  withval="$with_fwrapname"
  FWRAPNAME=$withval;set_FWRAPNAME="yes"
else
  FWRAPNAME=fmpich
fi;

# -----------------------------------------------------------------------------
# First check that we have a clean build if we are doing a VPATH build

rm -f conftest*
date >conftest$$
# If creating a file in the current directory does not show up in the srcdir
# then we're doing a VPATH build (or something is very wrong)
if test ! -s $srcdir/conftest$$ ; then
    pac_dirtyfiles=""
    pac_dirtydirs=""
    pac_header=""

    for file in config.status $pac_header src/include/mpi.h src/env/mpicc src/env/mpicc.conf ; do
        if test -f $srcdir/$file ; then
	    pac_dirtyfiles="$pac_dirtyfiles $file"
	fi
    done

 	for dir in lib ; do
            if test -d $srcdir/$dir ; then
                pac_dirtydirs="$pac_dirtydirs $dir"
	    fi
	done


    if test -n "$pac_dirtyfiles" -o -n "$pac_dirtydirs" ; then
	# Create a nice message about what to remove
	rmmsg=""
	if test -n "$pac_dirtyfiles" ; then
	    rmmsg="files $pac_dirtyfiles"
        fi
 	if test -n "$pac_dirtydirs" ; then
	    if test -n "$rmmsg" ; then
	        rmmsg="$rmmsg and directories $pac_dirtydirs"
            else
                rmmsg="directories $pac_dirtydirs"
            fi
        fi
        if test -f $srcdir/Makefile ; then
            { { echo "$as_me:$LINENO: error: You cannot do a VPATH build if the source directory has been
    configured.  Run \"make distclean\" in $srcdir first and make sure that the
    $rmmsg have been removed." >&5
echo "$as_me: error: You cannot do a VPATH build if the source directory has been
    configured.  Run \"make distclean\" in $srcdir first and make sure that the
    $rmmsg have been removed." >&2;}
   { (exit 1); exit 1; }; }
        else
            { { echo "$as_me:$LINENO: error: You cannot do a VPATH build if the source directory has been
    configured.  Remove the $rmmsg in $srcdir." >&5
echo "$as_me: error: You cannot do a VPATH build if the source directory has been
    configured.  Remove the $rmmsg in $srcdir." >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi
fi
rm -f conftest*


# ----------------------------------------------------------------------------
#
# Set the defaults for directories that are not included in configure's
# repetoire
if test -n "$with_htmldir" ; then
    htmldir=$with_htmldir
else
    htmldir='${prefix}/www'
fi


if test -n "$with_docdir" ; then
    docdir=$with_docdir
else
    docdir='${prefix}/doc'
fi


# This test is complicated by the fact that top_srcdir is not set until
# the very end of configure.  Instead, we get it ourselves
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
# Get the directory that we're running in...
if test -z "$master_top_builddir" ; then
   master_top_builddir="`pwd`"
fi


export master_top_builddir
export master_top_srcdir
# ----------------------------------------------------------------------------
# We create this file to allow other configures to find the "master"
# top builddir
rm -f .mpich2
date > .mpich2
# ----------------------------------------------------------------------------
# with-device
if test "$with_device" = "default" ; then
    # Pick the device.  For now, always choose ch3
    with_device=ch3
fi
# Extract the device name from any options
# Allow the device to specify a directory; if no directory, use the
# included directories
#
DEVICE=$with_device


device_name=`echo $with_device | sed -e 's/:.*$//'`

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


devicedir=$use_top_srcdir/src/mpid/$device_name
devicereldir=src/mpid/$device_name
case "$device_name" in
     /*)
     devicedir=$DEVICE
     # Get the name from the leaf
     device_name=`echo $device_name ~ sed -e 's%.*/%%'`
     # FIXME: should the devicereldir be different (perhaps not -
     # this allows use to build within our tree, even when other data
     # is outside of the tree)
     ;;
     *)
     ;;
esac
export device_name
export device_args
export devicedir

#
# Give the device an opportunity to include a header file in mpi.h.  The
# default value of INCLUDE_MPIDDEFS_H is set prior to the inclusion of the
# device's mpich2prereq script.  The device's script may override the value
# if needed.
INCLUDE_MPIDDEFS_H='/* ... no device specific definitions ... */'


#
# See if the device wants to say something about the compilers (for example,
# the globus device may need to do this)
if test -f $devicedir/mpich2prereq ; then
    . $devicedir/mpich2prereq
fi

# ----------------------------------------------------------------------------
# Set default library names if names haven't already been provided
MPILIBNAME=${MPILIBNAME:-"mpich"}
PMPILIBNAME_set=no
if test -n "$PMPILIBNAME" ; then
   PMPILIBNAME_set=yes
fi
PMPILIBNAME=${PMPILIBNAME:-"p$MPILIBNAME"}
# Note that the name for this library may be updated after we check for
# enable_shmem
# Fortran names are set later.
# We use a different library for the C++ wrappers to avoid problems when
# creating shared libraries
if test -z "$MPICXXLIBNAME" ; then MPICXXLIBNAME="${MPILIBNAME}cxx" ; fi
export MPIFLIBNAME
export PMPIFLIBNAME
export MPICXXLIBNAME


# We'll set FORTRAN_BINDING to 1 if we support Fortran
FORTRAN_BINDING=0

# ----------------------------------------------------------------------------
# Process any enable or with values
# We must do enable-fast first, because it changes the other enable values
if test "$enable_fast" = "yes" ; then
    enable_error_checking=no
    enable_error_messages=no
    enable_timing=no
    # Export a variable that will allow the test suite to detect that
    # MPICH has no error testing
    MPICH_FAST=yes
    export MPICH_FAST
#
# [BRT] removed the reseting of enable_g so that --with-enable=dbg,meminit
# can be specified with -enable-fast.  This change was largely made for the
# PETSc folks who want to use --enable-fast to eliminate parameter checking
# overhead, but also wish to use meminit to eliminate initialization
# warnings from valgrind.
#
#   enable_g=no
#

cat >>confdefs.h <<\_ACEOF
#define NDEBUG 1
_ACEOF

fi

# error-checking
case "$enable_error_checking" in
    no)
    # if error checking has been diabled, then automatically diable the error
    # checking tests in the test suite
    ac_configure_args="${ac_configure_args} --disable-checkerrors"
    ;;
    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 <<_ACEOF
#define HAVE_ERROR_CHECKING $error_checking_kind
_ACEOF

    ;;
    *)
    { echo "$as_me:$LINENO: WARNING: Unknown value $enable_error_checking for enable-error-checking" >&5
echo "$as_me: WARNING: Unknown value $enable_error_checking for enable-error-checking" >&2;}
    ;;
esac

# error-messages
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 "$as_me:$LINENO: WARNING: Unknown value $enable_error_messages for enable-error-messages" >&5
echo "$as_me: WARNING: Unknown value $enable_error_messages for enable-error-messages" >&2;}
    ;;
esac

cat >>confdefs.h <<_ACEOF
#define MPICH_ERROR_MSG_LEVEL $error_message_kind
_ACEOF


# ----------------------------------------------------------------------------
#
# enable-timing and with-logging
#
# Still to do: add subsets: e.g., class=pt2pt,class=coll.  See mpich2 doc
#
# Logging and timing are intertwined.  If you select logging, you
# may also need to select a timing level.  If no timing is selected
# but logging with rlog is selected, make "all" the default timing level.
#
# FIXME: make timing and logging options work more cleanly together,
# particularly when other logging options are selected (e.g., logging is not
# rlog).
# ----------------------------------------------------------------------------
collect_stats=false
logging_required=false
if test "$enable_timing" = "default" ; then
    if test "$with_logging" = "rlog" ; then
        enable_timing=all
    fi
fi
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|default)
    timing_name=none
    ;;
    *)
    { echo "$as_me:$LINENO: WARNING: Unknown value $enable_timing for enable-timing" >&5
echo "$as_me: WARNING: Unknown value $enable_timing for enable-timing" >&2;}
    enable_timing=no
    timing_name=none
    ;;
esac
#
# The default logging package is rlog; you can get it by
# specifying --with-logging or --with-logging=rlog
#
case $with_logging in
    yes)
    logging_name=rlog
    ;;
    no|none)
    logging_name=none
    ;;
    default)
    if test "$logging_required" = "true" ; then
        logging_name=rlog
    else
        logging_name=none
    fi
    ;;
    *)
    logging_name=$with_logging
    ;;
esac
#
# Include the selected logging subsystem
#
# Choices:
# 1) A subdir of src/util/logging
#     This directory must contain a configure which will be executed
#     to build the
# 2) An external directory
#     This directory must contain
#          a mpilogging.h file
#     It may contain
#          a setup_logging script
#          a configure
#
#
logging_subsystems=
if test "$logging_name" != "none" ; then
    # Check for an external name (directory containing a /)
    hasSlash=`echo A$logging_name | sed -e 's%[^/]%%g'`
    if test -n "$hasSlash" ; then
        # Check that the external logging system is complete.
	# Any failure will cause configure to abort
        if test ! -d $logging_name ; then
	    { { echo "$as_me:$LINENO: error: External logging directory $logging_name not found.  Configure aborted" >&5
echo "$as_me: error: External logging directory $logging_name not found.  Configure aborted" >&2;}
   { (exit 1); exit 1; }; }
	    logging_name=none
        elif test ! -s $logging_name/mpilogging.h ; then
	    { { echo "$as_me:$LINENO: error: External logging header $logging_name/mpilogging.h not found.  Configure aborted" >&5
echo "$as_me: error: External logging header $logging_name/mpilogging.h not found.  Configure aborted" >&2;}
   { (exit 1); exit 1; }; }
	    logging_name=none
        fi

        logdir=$logging_name
	# Force the logdir to be absolute
	logdir=`cd $logdir && pwd`
	# Switch name to "external" because that is how the MPICH2
	# code will know it
	logging_name=external
	# Add the dir to the include paths
	CPPFLAGS="$CPPFLAGS -I$logdir"
	# Add the dir to the external build dirs
	EXTERNAL_SRC_DIRS="$EXTERNAL_SRC_DIRS $logdir"
	# Add to the list of external modules to setup
	if test -x $logdir/setup_logging ; then
	     EXTERNAL_SETUPS="$EXTERNAL_SETUPS $logdir/setup_logging"
	fi
    else
        logdir=$srcdir/src/util/logging
        logging_subsystems="$logging_subsystems src/util/logging/$logging_name"
        logging_subdirs=$logging_name
        for dir in $logging_subdirs ; do
            if test ! -d $logdir/$dir ; then
	        { { echo "$as_me:$LINENO: error: $logdir/$dir does not exist.  Configure aborted" >&5
echo "$as_me: error: $logdir/$dir does not exist.  Configure aborted" >&2;}
   { (exit 1); exit 1; }; }
	        logging_name=none
            fi
        done
        for dir in $logging_subsystems ; do
            if test ! -x $srcdir/$dir/configure ; then
	        { { echo "$as_me:$LINENO: error: $logdir/$dir has no configure (required).  Configure aborted" >&5
echo "$as_me: error: $logdir/$dir has no configure (required).  Configure aborted" >&2;}
   { (exit 1); exit 1; }; }
	        logging_name=none
            fi
        done
    fi
fi
#
# FIXME: Logging doesn't necessarily require timing (e.g., simply logging the
# sequence of routines).
if test "$logging_name" != "none" ; then
    if test "$enable_timing" != "no" ; then
	if test "$enable_timing" = "default" -o "$enable_timing" = "none" ; then
	    enable_timing=log
	    timing_name=log
    	fi
	logging_dir=logging
	subsystems="$subsystems $logging_subsystems"
    else
	{ echo "$as_me:$LINENO: WARNING: Timing was disabled.  Logging has been disabled as well." >&5
echo "$as_me: WARNING: Timing was disabled.  Logging has been disabled as well." >&2;}
	with_logging=no
	logging_name=none
        logging_dir=
        logging_subdirs=
    fi
else
    if test "$logging_required" = "true" ; then
	{ echo "$as_me:$LINENO: WARNING: Timing was enabled with log option but no logging library is available.  Timing has been disabled." >&5
echo "$as_me: WARNING: Timing was enabled with log option but no logging library is available.  Timing has been disabled." >&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 <<_ACEOF
#define HAVE_TIMING $timing_kind
_ACEOF

    if test "$collect_stats" = "true" ; then

cat >>confdefs.h <<\_ACEOF
#define COLLECT_STATS 1
_ACEOF

    fi
fi
#



use_logging_variable="MPID_LOGGING_`echo $logging_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"

cat >>confdefs.h <<_ACEOF
#define USE_LOGGING $use_logging_variable
_ACEOF

# ----------------------------------------------------------------------------
# End of logging tests
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Check to see if the device does not support spawn.
# FIXME: This should provide the option of not building the dynamic
# process routines.  It could also allow us to specialize support
# for all processes are members of MPI_COMM_WORLD (only one comm_world).
# ----------------------------------------------------------------------------
if test "$MPID_NO_SPAWN" = yes ; then
    { echo "$as_me:$LINENO: WARNING: The device $with_device does not support MPI dynamic process routines" >&5
echo "$as_me: WARNING: The device $with_device does not support MPI dynamic process routines" >&2;}
fi

# ----------------------------------------------------------------------------
# Threads
# ----------------------------------------------------------------------------
#
# Threads must be supported by the device.  First, set the default to
# be the highest supported by the device
if test "$enable_threads" = default ; then
    if test -n "$MPID_MAX_THREAD_LEVEL" ; then
        case $MPID_MAX_THREAD_LEVEL in
            MPI_THREAD_SINGLE)     enable_threads=single ;;
            MPI_THREAD_FUNNELED)   enable_threads=funneled ;;
            MPI_THREAD_SERIALIZED) enable_threads=serialized ;;
            MPI_THREAD_MULTIPLE)   enable_threads=runtime ;;
            *) { { echo "$as_me:$LINENO: error: Unrecognized thread level from device $MPID_MAX_THREAD_LEVEL" >&5
echo "$as_me: error: Unrecognized thread level from device $MPID_MAX_THREAD_LEVEL" >&2;}
   { (exit 1); exit 1; }; }
    	    ;;
        esac
    else
        enable_threads=single
    fi
fi

if test "$enable_threads" = "yes" ; then
    enable_threads=multiple
elif test "$enable_threads" = "no" ; then
    enable_threads=single
elif test "$enable_threads" = "default"; then
    if test "$with_device" = "default" -o "$with_device" = "ch3:sock" ; then
        enable_threads=runtime
    fi
fi
# Runtime is an alias for multiple with an additional value
if test "$enable_threads" = "runtime" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_RUNTIME_THREADCHECK 1
_ACEOF

    enable_threads=multiple
    # FIXME: This doesn't support runtime:thread-impl (as in multiple:thread-impl)
fi

MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED
case "$enable_threads" in
    single)
    thread_pkg_required=no
    thread_impl=none
    MPICH_THREAD_LEVEL=MPI_THREAD_SINGLE
    ;;
    funneled)
    thread_pkg_required=no
    thread_impl=none
    MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED
    ;;
    serialized)
    # FIXME: Why does serialized require a thread package?
    thread_pkg_required=yes
    thread_impl=none
    MPICH_THREAD_LEVEL=MPI_THREAD_SERIALIZED
    ;;
    multiple)
    thread_pkg_required=yes
    thread_impl=global_mutex
    MPICH_THREAD_LEVEL=MPI_THREAD_MULTIPLE
    ;;
    multiple:*)
    thread_pkg_required=yes
    thread_impl="`echo $enable_threads | sed -e 's/.*://'`"
    MPICH_THREAD_LEVEL=MPI_THREAD_MULTIPLE
    case "$thread_impl" in
	global_mutex)
	;;
	# global_monitor)
	# ;;
	*)
	{ { echo "$as_me:$LINENO: error: \"$thread_impl\" is not a valid multi-thread implementation for MPICH2" >&5
echo "$as_me: error: \"$thread_impl\" is not a valid multi-thread implementation for MPICH2" >&2;}
   { (exit 1); exit 1; }; }
	;;
    esac
    ;;
    *)
    { { echo "$as_me:$LINENO: error: \"$enable_threads\" is not a valid value for --enable-threads" >&5
echo "$as_me: error: \"$enable_threads\" is not a valid value for --enable-threads" >&2;}
   { (exit 1); exit 1; }; }
    ;;
esac
# Check that the requested thread level is available.
threadLevelOK=yes
if test -z "$MPID_MAX_THREAD_LEVEL" ; then
    if test "$MPICH_THREAD_LEVEL" = "MPI_THREAD_MULTIPLE" ; then
        threadLevelOK=no
    fi
else
    # Check that MPID_MAX_THREAD_LEVEL is at least as large as the
    # selected MPICH_THREAD_LEVEL
    case $MPICH_THREAD_LEVEL in
        MPI_THREAD_MULTIPLE)
	if test "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_MULTIPLE" ; then
	    threadLevelOK=no
        fi
	;;
	MPI_THREAD_SERIALIZED)
	if test "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_MULTIPLE" -a \
	        "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_SERIALIZED" ; then
            threadLevelOK=no
        fi
	;;
	MPI_THREAD_FUNNELED)
        if test "$MPID_MAX_THREAD_LEVEL" = "MPI_THREAD_SINGLE" ; then
            threadLevelOK=no
        fi
	;;
	MPI_THREAD_SINGLE)
	;;
    esac
fi
if test "$threadLevelOK" != yes ; then
   { { echo "$as_me:$LINENO: error: The device $with_device does not support MPI_THREAD_MULTIPLE" >&5
echo "$as_me: error: The device $with_device does not support MPI_THREAD_MULTIPLE" >&2;}
   { (exit 1); exit 1; }; }
fi

export MPICH_THREAD_LEVEL

cat >>confdefs.h <<_ACEOF
#define MPICH_THREAD_LEVEL $MPICH_THREAD_LEVEL
_ACEOF


MPICH_THREAD_IMPL="MPICH_THREAD_IMPL_`echo $thread_impl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
export MPICH_THREAD_IMPL

cat >>confdefs.h <<_ACEOF
#define USE_THREAD_IMPL $MPICH_THREAD_IMPL
_ACEOF


if test "$thread_pkg_required" = "no" ; then
    MPE_THREAD_DEFAULT=${MPE_THREAD_DEFAULT:-none}
fi
export MPE_THREAD_DEFAULT

# enable-g
# 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 <<\_ACEOF
#define MPICH_DEBUG_HANDLES 1
_ACEOF

	;;
	meminit)
	perform_meminit=yes
	;;
	nesting)
	perform_nesttesting=yes
	;;
	fine-grain-nesting|fg-nesting)
	perform_fg_nesttesting=yes
	;;
	mem)
	perform_memtracing=yes
	;;
	log)
	perform_dbglog=yes
	;;
	all|yes)
	perform_memtracing=yes
	perform_nesttesting=yes
	perform_dbglog=yes
	CFLAGS="$CFLAGS -g"
	perform_meminit=yes
	;;
	*)
	{ echo "$as_me:$LINENO: WARNING: Unknown value $enable_g for enable-g" >&5
echo "$as_me: WARNING: Unknown value $enable_g for enable-g" >&2;}
	;;
    esac
done
IFS="$save_IFS"
if test -n "$perform_meminit" ; then

cat >>confdefs.h <<\_ACEOF
#define MPICH_DEBUG_MEMINIT 1
_ACEOF

fi
if test -n "$perform_memtracing" ; then
    enable_g_mem=yes

cat >>confdefs.h <<\_ACEOF
#define USE_MEMORY_TRACING 1
_ACEOF

fi
if test -n "$perform_nesttesting" ; then

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

fi
if test -n "$perform_fg_nesttesting" ; then

cat >>confdefs.h <<\_ACEOF
#define MPICH_DEBUG_FINE_GRAIN_NESTING 1
_ACEOF

fi
if test -n "$perform_dbglog" ; then
   if test "$with_logging" != "none" ; then
       { echo "$as_me:$LINENO: WARNING: --with-logging overrides --enable-g=log" >&5
echo "$as_me: WARNING: --with-logging overrides --enable-g=log" >&2;}
   else

cat >>confdefs.h <<\_ACEOF
#define USE_DBG_LOGGING 1
_ACEOF

   fi
fi

if test "$enable_debuginfo" = "yes" ; then
    debugger_dir=debugger

cat >>confdefs.h <<\_ACEOF
#define HAVE_DEBUGGER_SUPPORT 1
_ACEOF

    # The debugger support requires a shared library.  This is handled
    # below, after we check for compiler support for shared libraries
    # Note: if libdir contains exec_prefix, handle the fact that the
    # default exec_prefix is NONE, which (much later in configure)
    # gets turned into the value of prefix
    if test "x$exec_prefix" = xNONE ; then
        saveExecPrefix=$exec_prefix
	exec_prefix=$prefix
        eval dlldir=$libdir/libtvmpich2.so
	exec_prefix=$saveExecPrefix
    else
        eval dlldir=$libdir/libtvmpich2.so
    fi
    dlldir='"'$dlldir'"'

cat >>confdefs.h <<_ACEOF
#define MPICH_INFODLL_LOC $dlldir
_ACEOF

fi

pac_cross_compiling=no
if test "$with_cross" != "no" ; then
    if test -s "$with_cross" ; then
        echo "$as_me:$LINENO: result: Reading values from cross-compilation file $with_cross" >&5
echo "${ECHO_T}Reading values from cross-compilation file $with_cross" >&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 "$enable_nmpi_as_mpi" = yes ; then

cat >>confdefs.h <<\_ACEOF
#define USE_MPI_FOR_NMPI 1
_ACEOF

fi

# This goes here because we need the top_srcdir
FROM_MPICH2=yes
export FROM_MPICH2
if test "$enable_romio" = "yes" ; then
   if test -d $use_top_srcdir/src/mpi/romio ; then
       subsystems="$subsystems src/mpi/romio"

cat >>confdefs.h <<\_ACEOF
#define HAVE_ROMIO 1
_ACEOF

       # Set environment variables that the romio configure expects
       romio_dir=romio

       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
       # This test used -e under Linux, but not all test programs understand
       # -e
       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 "$as_me:$LINENO: WARNING: ROMIO src directory is not available" >&5
echo "$as_me: WARNING: ROMIO src directory is not available" >&2;}
       # Check for local developers
       if test -d /home/MPI/cvsMaster/romio -o -d /homes/MPI/cvsMaster/romio ; then
           { echo "$as_me:$LINENO: 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
          " >&5
echo "$as_me: 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
          " >&2;}
       fi
   fi
fi
#
# FIXME: If an external device, don't necessarily complain (e.g.,
# if the device is already built)
if test ! -d $devicedir ; then
    { echo "$as_me:$LINENO: WARNING: Device $device_name is unknown" >&5
echo "$as_me: WARNING: Device $device_name is unknown" >&2;}
elif test ! -x $devicedir/configure ; then
    { echo "$as_me:$LINENO: WARNING: Device $device_name has no configure" >&5
echo "$as_me: WARNING: Device $device_name has no configure" >&2;}
    device_name=""
else
    # Add the device to the configure list
    devsubsystems="$devsubsystems $devicereldir"
    # Make device_name available to subdirs
fi

#
# with-pm
if test "$MPID_NO_PM" = yes ; then
    if test "$with_pm" != "default" -a "$with_pm" != no ; then
        { { echo "$as_me:$LINENO: error: The PM chosen ($with_pm) is is not valid for the selected device ($with_device)" >&5
echo "$as_me: error: The PM chosen ($with_pm) is is not valid for the selected device ($with_device)" >&2;}
   { (exit 1); exit 1; }; }
    fi
    # This is used to change with_pm=default to with_pm=no in the case
    # where the device does not want a PM
    with_pm=no
fi
if test -z "$with_pm" ; then
    with_pm="no"
fi
if test "$with_pmi" = "uni" -a "$with_pm" = "default" ; then
    with_pm="no"
fi
if test "$with_pm" = "default" -o "$with_pm" = "yes" ; then
    with_pm=mpd
fi

# We allow multiple pm names, separated by : or ,
# If multiple PMs are provided, we set the value MANY_PM to yes
MANY_PM=no

if test "$with_pm" != "no" ; then
    pm_names="`echo $with_pm | sed -e 's/:/ /g' -e 's/,/ /g'`"
else
    pm_names=""
fi
#
hasError=no
# We need to be careful about PM's that have either conflicting
# requirements (e.g., different PMI implementations) or different
# optional features (e.g., MPID_PM_NAMESERVER).
# In addition, we need to interleave the setup of the PMI and PM
# modules.  The order is as follows:
#
# For each PM, execute the mpich2prereq script for that pm (if present).
# This script provides information about the PM, including which PMI
# implementations are supported.
#
# Then, for the selected PMI, the setup script (if any) is run.  This is
# necessary because the setup of the PM may require information discovered
# or provided duing the PMI setup step (e.g., smpd requires this)
#
# Finally, for each PM, the setup script is executed.
#
# Step 1: invoke the mpich2prereq for each PM
for pm_name in $pm_names ; do
    if test -z "$first_pm_name" ; then
       first_pm_name=$pm_name
    else
       # Only add to other_pm_names if the directory exists,
       # since the Makefile in src/pm/Makefile will try to cd to
       # that directory
       if test -d $use_top_srcdir/src/pm/$pm_name ; then
           other_pm_names="$other_pm_names $pm_name"
       fi
    fi
    if test ! -d $use_top_srcdir/src/pm/$pm_name ; then
        { echo "$as_me:$LINENO: WARNING: $use_top_srcdir/src/pm/$pm_name does not exist. PM is unknown" >&5
echo "$as_me: WARNING: $use_top_srcdir/src/pm/$pm_name does not exist. PM is unknown" >&2;}
	hasError=yes
    elif test ! -x $use_top_srcdir/src/pm/$pm_name/configure ; then
        { echo "$as_me:$LINENO: WARNING: pm $pm_name has no configure" >&5
echo "$as_me: WARNING: pm $pm_name has no configure" >&2;}
        pm_name=""
	hasError=yes
    else
	nameserver=$MPID_PM_NAMESERVER
        if test -f $use_top_srcdir/src/pm/$pm_name/mpich2prereq ; then
	    echo sourcing $use_top_srcdir/src/pm/$pm_name/mpich2prereq
	    . $use_top_srcdir/src/pm/$pm_name/mpich2prereq
	fi
	# Check for a change; if found, we'll take the default
	if test "$MPID_PM_NAMESERVER" != "$nameserver" ; then
            if test "$first_pm_name" != "$pm_name" ; then
	        # Reject suggestion (use the default, common mode)
		MPID_PM_NAMESERVER=""
	    fi
	fi
    fi
done
if test "$hasError" != no ; then
    { { echo "$as_me:$LINENO: error: Aborting configure because an error was seen in the selection of process managers" >&5
echo "$as_me: error: Aborting configure because an error was seen in the selection of process managers" >&2;}
   { (exit 1); exit 1; }; }
fi
#
# pm_name is the *primary* pm
pm_name=$first_pm_name



# Some versions of PM and PMI require a special definition (currently, only
# smpd requires this)
if test "$PMI_REQUIRES_READABLE_TOKENS" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define USE_HUMAN_READABLE_TOKENS 1
_ACEOF

fi

if test -n "$first_pm_name" ; then
    other_install_dirs="${other_install_dirs} src/pm/$first_pm_name"
fi
# Step 2:
# Once we've selected the process manager (or managers), we can
# check that we have a compatible PMI implemenatation.
# with-pmi
if test "$MPID_NO_PMI" = yes ; then
    if test "$with_pmi" != "default" -a "$with_pmi" != no ; then
        { { echo "$as_me:$LINENO: error: The PMI chosen ($with_pmi) is is not valid for the selected device ($with_device)" >&5
echo "$as_me: error: The PMI chosen ($with_pmi) is is not valid for the selected device ($with_device)" >&2;}
   { (exit 1); exit 1; }; }
    fi
    # This is used to change with_pmi=default to with_pmi=no in the case
    # where the device does not want a PMI
    with_pmi=no
elif test "$with_pmi" != "no" ; then
    if test "$with_pmi" = "default" -o "$with_pmi" = "yes" ; then
        if test -n "$PM_REQUIRES_PMI" ; then
	    with_pmi=$PM_REQUIRES_PMI
        else
            with_pmi=simple
        fi
    elif test -n "$PM_REQUIRES_PMI" ; then
        # Test for compatibility between pm and pmi choices
        if test "$PM_REQUIRES_PMI" != "$with_pmi" ; then
	    { { echo "$as_me:$LINENO: error: The PM chosen ($with_pm) requires the PMI implementation $PM_REQUIRES_PMI but $with_pmi was selected as the PMI implementation." >&5
echo "$as_me: error: The PM chosen ($with_pm) requires the PMI implementation $PM_REQUIRES_PMI but $with_pmi was selected as the PMI implementation." >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi
    pmi_name=$with_pmi

    if test ! -d $use_top_srcdir/src/pmi/$pmi_name ; then
        { echo "$as_me:$LINENO: WARNING: $use_top_srcdir/src/pmi/$pmi_name does not exist. PMI is unknown" >&5
echo "$as_me: WARNING: $use_top_srcdir/src/pmi/$pmi_name does not exist. PMI is unknown" >&2;}
    elif test ! -x $use_top_srcdir/src/pmi/$pmi_name/configure ; then
        { echo "$as_me:$LINENO: WARNING: pmi $pmi_name has no configure or Makefile" >&5
echo "$as_me: WARNING: pmi $pmi_name has no configure or Makefile" >&2;}
        pmi_name=""
    else
        subsystems="$subsystems src/pmi/$pmi_name"
    fi
else
    { { echo "$as_me:$LINENO: error: A PMI implementation must be selected or the default used." >&5
echo "$as_me: error: A PMI implementation must be selected or the default used." >&2;}
   { (exit 1); exit 1; }; }
fi


# Step 3: complete pm setup.
# Note that checks for errors have already been performed, so this
# loop does not need to perform any extra error checks.
# Note that this uses this_pm_name because pm_name must be the *first*
# of the PM names
for this_pm_name in $pm_names ; do
    subsystems="$subsystems src/pm/$this_pm_name"
    if test -f $use_top_srcdir/src/pm/$this_pm_name/setup_pm ; then
	echo sourcing $use_top_srcdir/src/pm/$this_pm_name/setup_pm
	. $use_top_srcdir/src/pm/$this_pm_name/setup_pm
    fi
done

# ----------------------------------------------------------------------------
if test $with_mpe != no ; then
    if test ! -d $use_top_srcdir/src/mpe2 ; then
        if test $with_mpe = yes ; then
	    # No warning message on the default
            { echo "$as_me:$LINENO: WARNING: No MPE directory available" >&5
echo "$as_me: WARNING: No MPE directory available" >&2;}
        fi
    elif test ! -x $use_top_srcdir/src/mpe2/configure ; then
        if test $with_mpe = yes ; then
	    # No warning message on the default
            { echo "$as_me:$LINENO: WARNING: No configure available for MPE" >&5
echo "$as_me: WARNING: No configure available for MPE" >&2;}
        fi
    else
        subsystems="$subsystems src/mpe2"
	other_install_dirs="$other_install_dirs src/mpe2"
	mpe_dir=mpe2
	# Make sure that MPE knows that we're building from MPICH
        # (similar to ROMIO)
        FROM_MPICH2=yes
        export FROM_MPICH2
	# Temporarily replace the default NONE value for exec_prefix
	# and prefix with the actual, default values.
	savePrefix=$prefix
	saveExecprefix=$exec_prefix
	test "x$prefix" = xNONE && prefix=$ac_default_prefix
	test "x$exec_prefix" = xNONE && exec_prefix=$prefix
	eval actualbindir=$bindir
	# MPI_CC and MPIF77 must use the local (build) bin dir, not
	# the installation bin dir
	#MPI_CC=$actualbindir/mpicc
	#MPI_F77=$actualbindir/mpif77
	#eval actuallibdir=$libdir
	#MPI_LIBS="-L$actuallibdir -lmpich -lpmpich"
	buildbindir=`pwd`/bin
	MPI_CC=$buildbindir/mpicc
	MPI_F77=$buildbindir/mpif77
	prefix=$savePrefix
	exec_prefix=$saveExecprefix
	# NOTE: You must append LIBS to MPI_LIBS before invoking the mpe
	# configure
	export MPI_CC
	export MPI_F77
	#export MPI_LIBS
        export use_top_srcdir
        top_build_dir=`pwd`
        export top_build_dir
    fi
fi



#
#
# Find a C compiler (choose gcc first).
# We also need to do this before the F77 and F90 test to ensure that we
# find the C preprocessor reliably.
saveCFLAGS=$CFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

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 $# != 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
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi


test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Find the output, starting from the most likely.  This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.

# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
# b.out is created by i960 compilers.
for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
	;;
    conftest.$ac_ext )
	# This is the source file.
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	# FIXME: I believe we export ac_cv_exeext for Libtool,
	# but it would be cool to find out if it's true.  Does anybody
	# maintain Libtool? --akim.
	export ac_cv_exeext
	break;;
    * )
	break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6

# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  export ac_cv_exeext
	  break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_cc_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&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
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not '\xHH' hex character constants.
   These don't provoke an error unfortunately, instead are silently treated
   as 'x'.  The following induces an error, until -std1 is added to get
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
   array size at least.  It's necessary to write '\x00'==0 to get something
   that's true only with -std1.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   '' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
#include <stdlib.h>
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

# Bug in autoconf.  Restore cross settings
if test "$pac_cross_compiling" = "yes" -a "$ac_cv_prog_cc_cross" = "no" ; then
    echo "$as_me:$LINENO: result: Resetting cross compilation to yes" >&5
echo "${ECHO_T}Resetting cross compilation to yes" >&6
    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
fi
# Misfeature in autoconf.  When using gcc, PROG_CC insists on setting
# CFLAGS to -g -O2 if CFLAGS is not set.  This may be appropriate for
# many tools built with configure and gcc, but not always.  In particular,
# there seems to be no way to get gcc to use no extra flags if that is desired.
if test -z "$saveCFLAGS" -a -n "$CFLAGS" ; then
    # restore CFLAGS
    # Note: This may not be correct if PROG_CC decided to add other
    # flags to CFLAGS to enforce some behavior (such as ANSI/ISO C),
    # But we haven't seen that in practice.  It would be better
    # if the CFLAGS were decomposed into flags-that-change-the-language
    # that the compiler accepts from optimizations
    CFLAGS=$saveCFLAGS
fi

# Check whether shared libraries are enabled.  We need to know this
# before we start chosing the Fortran, Fortran 90, and C++ compilers
ENABLE_SHLIB=$enable_sharedlibs
if test -z "$ENABLE_SHLIB" -o "$ENABLE_SHLIB" = "no" ; then
    ENABLE_SHLIB=none
    # Also turn off the libtool tests
    enable_shared=no
fi
# We need the script that is used to create shared libraries if either
# we are creating shared libraries for MPICH2 or we are creating the
# dynamically loadable library for the debugger interface
CREATESHLIB=false
if test "$ENABLE_SHLIB" != "none" -o "$enable_debuginfo" != "no" ; then
   CREATESHLIB=`pwd`/src/util/createshlib
fi

# ---------------------------------------------------------------------------
# Basic properties of the C compiler; some are needed for the language
# bindings tests.
# Set CFLAGS for enable strict if necessary.  Do this *first* because
# it may influence the output of the other tests


export enable_strict_done
if test "$enable_strict_done" != "yes" ; then
    # We must know the compiler type
    if test -z "CC" ; then
        for ac_prog in gcc
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$CC" && break
done

    fi
    case "$enable_strict" in
	yes)
        enable_strict_done="yes"
        if test "$ac_cv_c_compiler_gnu" = "yes" ; then
            CFLAGS="${CFLAGS} -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast -ansi -DGCC_WALL"
	    echo "$as_me:$LINENO: result: Adding strict check arguments to CFLAGS" >&5
echo "${ECHO_T}Adding strict check arguments to CFLAGS" >&6
	    echo "$as_me:$LINENO: checking whether we can add -std=c89" >&5
echo $ECHO_N "checking whether we can add -std=c89... $ECHO_C" >&6
            # See if we can add -std=c89
            savCFLAGS=$CFLAGS
            CFLAGS="$CFLAGS -std=c89"
            cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  stdc_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

stdc_ok=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
            echo "$as_me:$LINENO: result: $stdc_ok" >&5
echo "${ECHO_T}$stdc_ok" >&6
            if test "$stdc_ok" != yes ; then
                CFLAGS="$savCFLAGS"
            fi
	else
	    { echo "$as_me:$LINENO: WARNING: enable strict supported only for gcc" >&5
echo "$as_me: WARNING: enable strict supported only for gcc" >&2;}
    	fi
 	;;
	all)
        enable_strict_done="yes"
        if test "$ac_cv_c_compiler_gnu" = "yes" ; then
            CFLAGS="${CFLAGS} -Wall -O -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast -ansi -DGCC_WALL -Wunused -Wshadow -Wmissing-declarations -Wunused-parameter -Wunused-value -Wno-long-long"
	    echo "$as_me:$LINENO: checking whether we can add -std=c89" >&5
echo $ECHO_N "checking whether we can add -std=c89... $ECHO_C" >&6
            # See if we can add -std=c89
            savCFLAGS=$CFLAGS
            CFLAGS="$CFLAGS -std=c89"
            cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  stdc_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

stdc_ok=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
            echo "$as_me:$LINENO: result: $stdc_ok" >&5
echo "${ECHO_T}$stdc_ok" >&6
            if test "$stdc_ok" != yes ; then
                CFLAGS="$savCFLAGS"
            fi
	else
	    { echo "$as_me:$LINENO: WARNING: enable strict supported only for gcc" >&5
echo "$as_me: WARNING: enable strict supported only for gcc" >&2;}
    	fi
	;;

	posix)
	enable_strict_done="yes"
        if test "$ac_cv_c_compiler_gnu" = "yes" ; then
            CFLAGS="${CFLAGS} -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast -ansi -DGCC_WALL -D_POSIX_C_SOURCE=199506L"
	    echo "$as_me:$LINENO: result: Adding strict check arguments (POSIX flavor) to CFLAGS" >&5
echo "${ECHO_T}Adding strict check arguments (POSIX flavor) to CFLAGS" >&6
	    echo "$as_me:$LINENO: checking whether we can add -std=c89" >&5
echo $ECHO_N "checking whether we can add -std=c89... $ECHO_C" >&6
            # See if we can add -std=c89
            savCFLAGS=$CFLAGS
            CFLAGS="$CFLAGS -std=c89"
            cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  stdc_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

stdc_ok=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
            echo "$as_me:$LINENO: result: $stdc_ok" >&5
echo "${ECHO_T}$stdc_ok" >&6
            if test "$stdc_ok" != yes ; then
                CFLAGS="$savCFLAGS"
            fi
	else
	    { echo "$as_me:$LINENO: WARNING: enable strict supported only for gcc" >&5
echo "$as_me: WARNING: enable strict supported only for gcc" >&2;}
    	fi
 	;;

	noopt)
        enable_strict_done="yes"
        if test "$ac_cv_c_compiler_gnu" = "yes" ; then
            CFLAGS="${CFLAGS} -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast -ansi -DGCC_WALL"
	    echo "$as_me:$LINENO: result: Adding strict check arguments to CFLAGS" >&5
echo "${ECHO_T}Adding strict check arguments to CFLAGS" >&6
	    echo "$as_me:$LINENO: checking whether we can add -std=c89" >&5
echo $ECHO_N "checking whether we can add -std=c89... $ECHO_C" >&6
            # See if we can add -std=c89
            savCFLAGS=$CFLAGS
            CFLAGS="$CFLAGS -std=c89"
            cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  stdc_ok=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

stdc_ok=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
            echo "$as_me:$LINENO: result: $stdc_ok" >&5
echo "${ECHO_T}$stdc_ok" >&6
            if test "$stdc_ok" != yes ; then
                CFLAGS="$savCFLAGS"
            fi
	else
	    { echo "$as_me:$LINENO: WARNING: enable strict supported only for gcc" >&5
echo "$as_me: WARNING: enable strict supported only for gcc" >&2;}
    	fi
	;;
	no)
	# Accept and ignore this value
	:
	;;
	*)
	if test -n "$enable_strict" ; then
  	    { echo "$as_me:$LINENO: WARNING: Unrecognized value for enable-strict:$enable_strict" >&5
echo "$as_me: WARNING: Unrecognized value for enable-strict:$enable_strict" >&2;}
	fi
	;;
    esac
fi

# Check for support for weak symbols.  If not found, set NO_WEAK_SYM
# to the Make target name understood by simplemake.
# Set NEEDSPLIB to yes if link commands need both -l$MPILIBNAME
# and -lp$MPILIBNAME.
NEEDSPLIB=yes
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 "$as_me:$LINENO: checking for type of weak symbol support" >&5
echo $ECHO_N "checking for type of weak symbol support... $ECHO_C" >&6
if test "${pac_cv_prog_c_weak_symbols+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

int
main ()
{
return PFoo(1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  has_pragma_weak=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
#
# 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(int a) { return a; }
EOF
    cat >>conftest2.c <<EOF
extern int PFoo(int);
int main(int argc, char **argv) {
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
        # The gcc 3.4.x compiler accepts the pragma weak, but does not
        # correctly implement it on systems where the loader doesn't
        # support weak symbols (e.g., cygwin).  This is a bug in gcc, but it
        # it is one that *we* have to detect.
        rm -f conftest*
        cat >>conftest1.c <<EOF
extern int PFoo(int);
#pragma weak PFoo = Foo
int Foo(int);
int Foo(int a) { return a; }
EOF
    cat >>conftest2.c <<EOF
extern int Foo(int);
int PFoo(int a) { return a+1;}
int main(int argc, char **argv) {
return Foo(0);}
EOF
        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 accepted but does not work (probably creates two non-weak entries)"
        fi
    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 <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

int
main ()
{
return PFoo(1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_c_weak_symbols="pragma _HP_SECONDARY_DEF"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
if test -z "$pac_cv_prog_c_weak_symbols" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

int
main ()
{
return PFoo(1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_c_weak_symbols="pragma _CRI duplicate x as y"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
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 "$as_me:$LINENO: result: $pac_cv_prog_c_weak_symbols" >&5
echo "${ECHO_T}$pac_cv_prog_c_weak_symbols" >&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 <<\_ACEOF
#define HAVE_PRAGMA_WEAK 1
_ACEOF

	;;
	"pragma _HP")
cat >>confdefs.h <<\_ACEOF
#define HAVE_PRAGMA_HP_SEC_DEF 1
_ACEOF

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

	;;
    esac
    :
fi
echo "$as_me:$LINENO: checking whether __attribute__ ((weak)) allowed" >&5
echo $ECHO_N "checking whether __attribute__ ((weak)) allowed... $ECHO_C" >&6
if test "${pac_cv_attr_weak+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
int foo(int) __attribute__ ((weak));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_attr_weak=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_attr_weak=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_attr_weak" >&5
echo "${ECHO_T}$pac_cv_attr_weak" >&6

fi
if test $enable_weak_symbols = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define USE_WEAK_SYMBOLS 1
_ACEOF

    NEEDSPLIB=no
    # Check for the ability to support multiple weak symbols
    if test "$pac_cv_prog_c_weak_symbols" = "pragma weak" ; then

echo "$as_me:$LINENO: checking for multiple weak symbol support" >&5
echo $ECHO_N "checking for multiple weak symbol support... $ECHO_C" >&6
if test "${pac_cv_prog_c_multiple_weak_symbols+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# Test for multiple weak symbol support...
#
rm -f conftest*
cat >>conftest1.c <<EOF
extern int PFoo(int);
extern int PFoo_(int);
extern int pfoo_(int);
#pragma weak PFoo = Foo
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
int Foo(a) { return a; }
EOF
cat >>conftest2.c <<EOF
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
return PFoo(0) + PFoo_(1) + pfoo_(2);}
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_multiple_weak_symbols="yes"
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
fi
rm -f conftest*

fi
echo "$as_me:$LINENO: result: $pac_cv_prog_c_multiple_weak_symbols" >&5
echo "${ECHO_T}$pac_cv_prog_c_multiple_weak_symbols" >&6
if test "$pac_cv_prog_c_multiple_weak_symbols" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_MULTIPLE_PRAGMA_WEAK 1
_ACEOF

else
    :
fi

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





# ---------------------------------------------------------------------------
# Support for the language bindings: Fortran 77, Fortran 90, and C++
#
# First, we handle the case of no explicit enable/disable option.  In that
# case, we look for a usable compiler.  We cannot use the ac macros for this
# because they abort the configure step if they fail to find a compiler
# (earlier versions of autoconf did not have this behavior!).
#
# Second, we perform the langugage-specific tests, if necessary.  This may
# be relatively simple (C++) or complex (Fortran 77, including formation of
# the encoded MPI handles).
#
# Note that the bindings support needs to know some of the properties of
# the C compiler, so those tests (particularly for weak symbols)
# must come first.
# ----------------------------------------------------------------------------

#
# First, determine whether we are/can support the language bindings
#
# Handle the case that the user set FC but not F77 before we run the
# PROG_F77 command
if test -n "$F77" -a -n "$FC" -a "$F77" != "$FC" ; then
    { { echo "$as_me:$LINENO: error: The values of the environment variables F77 (=$F77) and FC (=$FC) are not the same.  Unset one or both and rerun configure" >&5
echo "$as_me: error: The values of the environment variables F77 (=$F77) and FC (=$FC) are not the same.  Unset one or both and rerun configure" >&2;}
   { (exit 1); exit 1; }; }
fi
if test -z "$F77" -a -n "$FC" ; then F77="$FC" ; fi
if test -z "$FC" -a -n "$F77" ; then FC="$F77" ; fi
# ----------------------------------------------------------------------------
# Handle default choices for the Fortran compilers
if test "$enable_f77" = "default" ; then
    enable_f77=no
    # Check for a Fortran compiler
    # Warning: the PROG_F77 command aborts if it fails to
    # find a compiler.  We should first try to find a compiler, then
    # check to see if it works (which the PROG_F77 command does as well)
    # It also prefers g77 to f77, and doesn't know about other compilers
    # Also handle the bug that autoconf sets FFLAGS for you
    saveFFLAGS=$FFLAGS
    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_F77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
  echo "$as_me:$LINENO: result: $F77" >&5
echo "${ECHO_T}$F77" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_F77"; then
  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
echo "${ECHO_T}$ac_ct_F77" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_F77" && break
done

  F77=$ac_ct_F77
fi


# Provide some information about the compiler.
echo "$as_me:4669:" \
     "checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
rm -f a.out

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.  (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
if test "${ac_cv_f77_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_f77_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  FFLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_f77_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_f77_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
if test "$ac_test_FFLAGS" = set; then
  FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-g -O2"
  else
    FFLAGS="-g"
  fi
else
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-O2"
  else
    FFLAGS=
  fi
fi

G77=`test $ac_compiler_gnu = yes && echo yes`
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    FFLAGS=$saveFFLAGS
    if test -n "$F77" ; then
        enable_f77_wasdefault=yes
        enable_f77=yes
    fi
elif test "$enable_f77" = "yes" ; then
    saveFFLAGS=$FFLAGS
    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_F77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
  echo "$as_me:$LINENO: result: $F77" >&5
echo "${ECHO_T}$F77" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_F77"; then
  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
echo "${ECHO_T}$ac_ct_F77" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_F77" && break
done

  F77=$ac_ct_F77
fi


# Provide some information about the compiler.
echo "$as_me:4910:" \
     "checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
rm -f a.out

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.  (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
if test "${ac_cv_f77_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_f77_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  FFLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_f77_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_f77_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
if test "$ac_test_FFLAGS" = set; then
  FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-g -O2"
  else
    FFLAGS="-g"
  fi
else
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-O2"
  else
    FFLAGS=
  fi
fi

G77=`test $ac_compiler_gnu = yes && echo yes`
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    FFLAGS=$saveFFLAGS
fi
#
# We need to know the name mangling for Fortran before testing for F90
# compatibility (we need this because of the way we decide to generate
# the Fortran 77 bindings)
if test "$enable_f77" = yes ; then
    FLIBS_save="$FLIBS"
    FLIBS=""

ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5
echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6
if test "${ac_cv_prog_f77_v+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_f77_v=
# Try some options frequently used verbose output
for ac_verb in -v -verbose --verbose -V -\#\#\#; do
  cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF

# Compile and link our simple test program by passing a flag (argument
# 1 to this macro) to the Fortran compiler in order to get
# "verbose" output that we can then parse for the Fortran linker
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_verb"
(eval echo $as_me:5112: \"$ac_link\") >&5
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS

rm -f conftest*

# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
# /foo, /bar, and /baz are search directories for the Fortran linker.
# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
ac_f77_v_output="`echo $ac_f77_v_output |
	grep 'LPATH is:' |
	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"

case $ac_f77_v_output in
  # If we are using xlf then replace all the commas with spaces.
  *xlfentry*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;

  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
  # $LIBS confuse us, and the libraries appear later in the output anyway).
  *mGLOB_options_string*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;

  # If we are using Cray Fortran then delete quotes.
  # Use "\"" instead of '"' for font-lock-mode.
  # FIXME: a more general fix for quoted arguments with spaces?
  *cft90*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;;
esac


  # look for -l* and *.a constructs in the output
  for ac_arg in $ac_f77_v_output; do
     case $ac_arg in
        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
          ac_cv_prog_f77_v=$ac_verb
          break 2 ;;
     esac
  done
done
if test -z "$ac_cv_prog_f77_v"; then
   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5
echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
fi
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5
echo "$as_me: WARNING: compilation failed" >&2;}
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5
echo "${ECHO_T}$ac_cv_prog_f77_v" >&6
echo "$as_me:$LINENO: checking for Fortran libraries of $F77" >&5
echo $ECHO_N "checking for Fortran libraries of $F77... $ECHO_C" >&6
if test "${ac_cv_f77_libs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "x$FLIBS" != "x"; then
  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
else

cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF

# Compile and link our simple test program by passing a flag (argument
# 1 to this macro) to the Fortran compiler in order to get
# "verbose" output that we can then parse for the Fortran linker
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
(eval echo $as_me:5190: \"$ac_link\") >&5
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS

rm -f conftest*

# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
# /foo, /bar, and /baz are search directories for the Fortran linker.
# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
ac_f77_v_output="`echo $ac_f77_v_output |
	grep 'LPATH is:' |
	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output"

case $ac_f77_v_output in
  # If we are using xlf then replace all the commas with spaces.
  *xlfentry*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;

  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
  # $LIBS confuse us, and the libraries appear later in the output anyway).
  *mGLOB_options_string*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;

  # If we are using Cray Fortran then delete quotes.
  # Use "\"" instead of '"' for font-lock-mode.
  # FIXME: a more general fix for quoted arguments with spaces?
  *cft90*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` ;;
esac



ac_cv_f77_libs=

# Save positional arguments (if any)
ac_save_positional="$@"

set X $ac_f77_v_output
while test $# != 1; do
  shift
  ac_arg=$1
  case $ac_arg in
        [\\/]*.a | ?:[\\/]*.a)
            ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue; then
  :
else
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi

          ;;
        -bI:*)
            ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue; then
  :
else
  if test "$ac_compiler_gnu" = yes; then
  for ac_link_opt in $ac_arg; do
    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
  done
else
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi
fi

          ;;
          # Ignore these flags.
        -lang* | -lcrt*.o | -lc | -lgcc | -libmil | -LANG:=*)
          ;;
        -lkernel32)
          test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
          ;;
        -[LRuY])
          # These flags, when seen by themselves, take an argument.
          # We remove the space between option and argument and re-iterate
          # unless we find an empty arg or a new option (starting with -)
	  case $2 in
	     "" | -*);;
	     *)
		ac_arg="$ac_arg$2"
		shift; shift
		set X $ac_arg "$@"
		;;
	  esac
          ;;
        -YP,*)
          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
              ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_j" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue; then
  :
else
  ac_arg="$ac_arg $ac_j"
                               ac_cv_f77_libs="$ac_cv_f77_libs $ac_j"
fi

          done
          ;;
        -[lLR]*)
            ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue; then
  :
else
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi

          ;;
          # Ignore everything else.
  esac
done
# restore positional arguments
set X $ac_save_positional; shift

# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
# then we insist that the "run path" must be an absolute path (i.e. it
# must begin with a "/").
case `(uname -sr) 2>/dev/null` in
   "SunOS 5"*)
      ac_ld_run_path=`echo $ac_f77_v_output |
                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
      test "x$ac_ld_run_path" != x &&
        if test "$ac_compiler_gnu" = yes; then
  for ac_link_opt in $ac_ld_run_path; do
    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
  done
else
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path"
fi
      ;;
esac
fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"

fi
echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5
echo "${ECHO_T}$ac_cv_f77_libs" >&6
FLIBS="$ac_cv_f77_libs"


ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    echo "$as_me:$LINENO: checking whether C can link with $FLIBS" >&5
echo $ECHO_N "checking whether C can link with $FLIBS... $ECHO_C" >&6
# Try to link a C program with all of these libraries
save_LIBS="$LIBS"
LIBS="$LIBS $FLIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  runs=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

runs=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS="$save_LIBS"
echo "$as_me:$LINENO: result: $runs" >&5
echo "${ECHO_T}$runs" >&6
if test "$runs" = "no" ; then
    echo "$as_me:$LINENO: checking for which libraries can be used" >&5
echo $ECHO_N "checking for which libraries can be used... $ECHO_C" >&6
    pac_ldirs=""
    pac_libs=""
    pac_other=""
    for name in $FLIBS ; do
        case $name in
        -l*) pac_libs="$pac_libs $name" ;;
        -L*) pac_ldirs="$pac_ldirs $name" ;;
        *)   pac_other="$pac_other $name" ;;
        esac
    done
    save_LIBS="$LIBS"
    keep_libs=""
    for name in $pac_libs ; do
        LIBS="$save_LIBS $pac_ldirs $pac_other $name"
        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  runs=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

runs=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
        if test $runs = "yes" ; then keep_libs="$keep_libs $name" ; fi
    done
    echo "$as_me:$LINENO: result: $keep_libs" >&5
echo "${ECHO_T}$keep_libs" >&6
    LIBS="$save_LIBS"
    FLIBS="$pac_ldirs $pac_other $keep_libs"
fi



cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
long long a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_LONG 1
_ACEOF

else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: checking for linker for Fortran main programs" >&5
echo $ECHO_N "checking for linker for Fortran main programs... $ECHO_C" >&6
cat > conftest.c <<EOF
#include "confdefs.h"
#ifdef HAVE_LONG_LONG
int f(int a, long long b) { int c; c = a * ( b / 3 ) / (b-1); return c ; }
#else
int f(int a, long b) { int c; c = a * b / (b-1); return c ; }
#endif
EOF


ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
    mv conftest.o conftest1.o
else
    { { echo "$as_me:$LINENO: error: Could not compile C test program" >&5
echo "$as_me: error: Could not compile C test program" >&2;}
   { (exit 1); exit 1; }; }
fi
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

cat > conftest.f <<EOF
        program main
        double precision d
        print *, "hi"
        end
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
    # We include $FFLAGS on the link line because this is
    # the way in which most of the configure tests run.  In particular,
    # many users are used to using FFLAGS (and CFLAGS) to select
    # different instruction sets, such as 64-bit with -xarch=v9 for
    # Solaris.
    if ${F77} ${FFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS 2>&5 ; then
	echo "$as_me:$LINENO: result: Use Fortran to link programs" >&5
echo "${ECHO_T}Use Fortran to link programs" >&6
    elif ${CC} ${CFLAGS} -o conftest conftest.o conftest1.o $LDFLAGS $FLIBS 2>&5 ; then
	echo "$as_me:$LINENO: result: Use C with FLIBS to link programs" >&5
echo "${ECHO_T}Use C with FLIBS to link programs" >&6
	F77LINKER="$CC"
        F77_LDFLAGS="$F77_LDFLAGS $FLIBS"
    else
	echo "$as_me:$LINENO: result: Unable to determine how to link Fortran programs with C" >&5
echo "${ECHO_T}Unable to determine how to link Fortran programs with C" >&6
    fi
else
    { { echo "$as_me:$LINENO: error: Could not compile Fortran test program" >&5
echo "$as_me: error: Could not compile Fortran test program" >&2;}
   { (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


    # For name mangle, we need the library flags

echo "$as_me:$LINENO: checking for Fortran 77 name mangling" >&5
echo $ECHO_N "checking for Fortran 77 name mangling... $ECHO_C" >&6
if test "${pac_cv_prog_f77_name_mangle+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

   # Check for strange behavior of Fortran.  For example, some FreeBSD
   # systems use f2c to implement f77, and the version of f2c that they
   # use generates TWO (!!!) trailing underscores
   # Currently, WDEF is not used but could be...
   #
   # Eventually, we want to be able to override the choices here and
   # force a particular form.  This is particularly useful in systems
   # where a Fortran compiler option is used to force a particular
   # external name format (rs6000 xlf, for example).
   rm -f conftest*
   cat > conftest.f <<EOF
       subroutine MY_name( i )
       return
       end
EOF
   # This is the ac_compile line used if LANG_FORTRAN77 is selected
   if test "X$ac_fcompile" = "X" ; then
       ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5'
   fi
   if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5
  (eval $ac_fcompile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
	mv conftest.o fconftestf.o
   else
	echo "configure: failed program was:" >&5
        cat conftest.f >&5
   fi



   ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

   save_LIBS="$LIBS"
      LIBS="fconftestf.o $FLIBS $LIBS"
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
my_name();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="lower"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   if test  "X$pac_cv_prog_f77_name_mangle" = "X" ; then
     cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
my_name_();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="lower underscore"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   fi
   if test  "X$pac_cv_prog_f77_name_mangle" = "X" ; then
     cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
void __stdcall MY_NAME(int);
int
main ()
{
MY_NAME(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="upper stdcall"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   fi
   if test  "X$pac_cv_prog_f77_name_mangle" = "X" ; then
     cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
MY_NAME();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="upper"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   fi
   if test  "X$pac_cv_prog_f77_name_mangle" = "X" ; then
     cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
my_name__();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="lower doubleunderscore"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   fi
   if test  "X$pac_cv_prog_f77_name_mangle" = "X" ; then
     cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
MY_name();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="mixed"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   fi
   if test  "X$pac_cv_prog_f77_name_mangle" = "X" ; then
     cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
MY_name_();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_name_mangle="mixed underscore"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   fi
   LIBS="$save_LIBS"
   ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

   rm -f fconftest*

fi
echo "$as_me:$LINENO: result: $pac_cv_prog_f77_name_mangle" >&5
echo "${ECHO_T}$pac_cv_prog_f77_name_mangle" >&6
# Make the actual definition
pac_namecheck=`echo X$pac_cv_prog_f77_name_mangle | sed 's/ /-/g'`

pac_cv_test_stdcall=""
case $pac_namecheck in
    X) { echo "$as_me:$LINENO: WARNING: Cannot determine Fortran naming scheme" >&5
echo "$as_me: WARNING: Cannot determine Fortran naming scheme" >&2;} ;;
    Xlower)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_LOWER 1
_ACEOF

	F77_NAME_MANGLE="F77_NAME_LOWER"
	;;
    Xlower-underscore)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_LOWER_USCORE 1
_ACEOF

	F77_NAME_MANGLE="F77_NAME_LOWER_USCORE"
	 ;;
    Xlower-doubleunderscore)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_LOWER_2USCORE 1
_ACEOF

	F77_NAME_MANGLE="F77_NAME_LOWER_2USCORE"
	 ;;
    Xupper)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_UPPER 1
_ACEOF

	F77_NAME_MANGLE="F77_NAME_UPPER"
	;;
    Xmixed)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_MIXED 1
_ACEOF

	F77_NAME_MANGLE="F77_NAME_MIXED"
	;;
    Xmixed-underscore)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_MIXED_USCORE 1
_ACEOF

	F77_NAME_MANGLE="F77_NAME_MIXED_USCORE"
	;;
    Xupper-stdcall)
cat >>confdefs.h <<\_ACEOF
#define F77_NAME_UPPER 1
_ACEOF

        F77_NAME_MANGLE="F77_NAME_UPPER_STDCALL"
        pac_cv_test_stdcall="__stdcall"
        ;;
    *) { echo "$as_me:$LINENO: WARNING: Unknown Fortran naming scheme" >&5
echo "$as_me: WARNING: Unknown Fortran naming scheme" >&2;} ;;
esac

# Get the standard call definition
# FIXME: This should use F77_STDCALL, not STDCALL (non-conforming name)
if test "X$pac_cv_test_stdcall" = "X" ; then
    F77_STDCALL=""
else
    F77_STDCALL="__stdcall"
fi
#

cat >>confdefs.h <<_ACEOF
#define STDCALL $F77_STDCALL
_ACEOF



    # Warn about mixed name mangling, since many of the tests will fail
    if test "$pac_cv_prog_f77_name_mangle" = "mixed" ; then
        { echo "$as_me:$LINENO: WARNING: The compiler $F77 uses mixed case names.  Fortran is monocase
and many Fortran programs may use either upper or lower case names for MPI
calls.  Consider specifying a particular parameter to your Fortran compiler
to select either upper or lower case names.  For the Absoft compiler,
-f selects lower case and -N109 selects upper case (if you use -f, also use
-B108 to enable the iargc and getarg routines, which are needed for some
tests and by many user programs).  Specify new command
line options by setting the environment variable FFLAGS to include
the options (e.g., setenv FFLAGS \"-f -B108\").  In addition, make sure that your
Fortran 90 compiler uses a compatible naming choice.  For the
Absoft Fortran 90, -YALL_NAMES=LCS selects lower case names and -B108
adds underscores to names, as required for iargc and getarg.  Pass this
information to configure with the F90FLAGS environment variable." >&5
echo "$as_me: WARNING: The compiler $F77 uses mixed case names.  Fortran is monocase
and many Fortran programs may use either upper or lower case names for MPI
calls.  Consider specifying a particular parameter to your Fortran compiler
to select either upper or lower case names.  For the Absoft compiler,
-f selects lower case and -N109 selects upper case (if you use -f, also use
-B108 to enable the iargc and getarg routines, which are needed for some
tests and by many user programs).  Specify new command
line options by setting the environment variable FFLAGS to include
the options (e.g., setenv FFLAGS \"-f -B108\").  In addition, make sure that your
Fortran 90 compiler uses a compatible naming choice.  For the
Absoft Fortran 90, -YALL_NAMES=LCS selects lower case names and -B108
adds underscores to names, as required for iargc and getarg.  Pass this
information to configure with the F90FLAGS environment variable." >&2;}
        # If Fortran implicitly enabled, disable it now.  Otherwise,
	# abort the configure since warning messages are often lost in
	# the output.
	if test "$enable_f77_wasdefault" = yes ; then
	    { echo "$as_me:$LINENO: WARNING: Turning off Fortran support because of mixed case names" >&5
echo "$as_me: WARNING: Turning off Fortran support because of mixed case names" >&2;}
	    enable_f77=no
	    enable_f90=no
	else
	    { { echo "$as_me:$LINENO: error: Aborting configure because of mixed case names in Fortran.  Either select --disable-f77 or set FFLAGS to force the compiler to select monocase names" >&5
echo "$as_me: error: Aborting configure because of mixed case names in Fortran.  Either select --disable-f77 or set FFLAGS to force the compiler to select monocase names" >&2;}
   { (exit 1); exit 1; }; }
	fi
    fi
fi

# F90 requires F77 as well.  If the user disabled f77, do not run the
# next test; instead, drop into the warning message
# Set a default value for f90 works with f77.  This value is
# set to no *only* if f90 was selected but was not compatible with f77
f90_with_f77=yes
if test "$enable_f90" = "default" -a "$enable_f77" = yes ; then
    enable_f90=no
    # Check for a Fortran compiler.  Work around bug in autoconf that
    # adds -g to F90FLAGS
    saveF90FLAGS="$F90FLAGS"
    # This is the fortran90 version of f90 language support
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_F90+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$F90"; then
  ac_cv_prog_F90="$F90" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_F90="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
F90=$ac_cv_prog_F90
if test -n "$F90"; then
  echo "$as_me:$LINENO: result: $F90" >&5
echo "${ECHO_T}$F90" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$F90" && break
  done
fi
if test -z "$F90"; then
  ac_ct_F90=$F90
  for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_F90+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_F90"; then
  ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_F90="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_F90=$ac_cv_prog_ac_ct_F90
if test -n "$ac_ct_F90"; then
  echo "$as_me:$LINENO: result: $ac_ct_F90" >&5
echo "${ECHO_T}$ac_ct_F90" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_F90" && break
done

  F90=$ac_ct_F90
fi


# once we find the compiler, confirm the extension
echo "$as_me:$LINENO: checking that $ac_ext works as the extension for Fortran 90 program" >&5
echo $ECHO_N "checking that $ac_ext works as the extension for Fortran 90 program... $ECHO_C" >&6
cat > conftest.$ac_ext <<EOF
      program conftest
      end
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
    echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
    echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
    echo "$as_me:$LINENO: checking for extension for Fortran 90 programs" >&5
echo $ECHO_N "checking for extension for Fortran 90 programs... $ECHO_C" >&6
    ac_ext="f90"
    cat > conftest.$ac_ext <<EOF
      program conftest
      end
EOF
    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
        echo "$as_me:$LINENO: result: f90" >&5
echo "${ECHO_T}f90" >&6
    else
        rm -f conftest*
        ac_ext="f"
        cat > conftest.$ac_ext <<EOF
      program conftest
      end
EOF
        if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
            echo "$as_me:$LINENO: result: f" >&5
echo "${ECHO_T}f" >&6
        else
            echo "$as_me:$LINENO: result: unknown!" >&5
echo "${ECHO_T}unknown!" >&6
        fi
    fi
    ac_f90ext=$ac_ext
    if test "$ac_ext" = "f90" ; then
        pac_cv_f90_ext_f90=yes
    else
        pac_cv_f90_ext_f90=no
    fi
    pac_cv_f90_ext=$ac_ext
    rm -f conftest*
fi
# Provide some information about the compiler.
echo "$as_me:6270:" \
     "checking for Fortran 90 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.
if test -n "$F90" ; then
    ac_save_ext=$ac_ext
    ac_ext=F
    echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5
echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6
if test "${ac_cv_f90_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f90_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f90_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6
    ac_ext=$ac_save_ext
    G90=`test $ac_compiler_gnu = yes && echo yes`
    ac_test_F90FLAGS=${F90FLAGS+set}
ac_save_F90FLAGS=$F90FLAGS
F90FLAGS=
echo "$as_me:$LINENO: checking whether $F90 accepts -g" >&5
echo $ECHO_N "checking whether $F90 accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_f90_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  F90FLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f90_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_f90_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_f90_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_prog_f90_g" >&5
echo "${ECHO_T}$ac_cv_prog_f90_g" >&6
if test "$ac_test_F90FLAGS" = set; then
  F90FLAGS=$ac_save_F90FLAGS
elif test $ac_cv_prog_f90_g = yes; then
  if test "$G90" = yes; then
    F90FLAGS="-g -O2"
  else
    F90FLAGS="-g"
  fi
else
  if test "$G90" = yes; then
    F90FLAGS="-O2"
  else
    F90FLAGS=
  fi
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    F90FLAGS=$saveF90FLAGS
    if test -n "$F90" ; then
        if test -z "$F77" ; then
	    saveFFLAGS=$FFLAGS
	    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_F77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
  echo "$as_me:$LINENO: result: $F77" >&5
echo "${ECHO_T}$F77" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_F77"; then
  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
echo "${ECHO_T}$ac_ct_F77" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_F77" && break
done

  F77=$ac_ct_F77
fi


# Provide some information about the compiler.
echo "$as_me:6508:" \
     "checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
rm -f a.out

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.  (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
if test "${ac_cv_f77_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_f77_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  FFLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_f77_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_f77_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
if test "$ac_test_FFLAGS" = set; then
  FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-g -O2"
  else
    FFLAGS="-g"
  fi
else
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-O2"
  else
    FFLAGS=
  fi
fi

G77=`test $ac_compiler_gnu = yes && echo yes`
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	    FFLAGS=$saveFFLAGS
	fi
	#
	# If we allow multiple weak symbols, we should test a name
	# that does not contain an underscore.  The Fortran binding uses
	# this rule for enabling multiple weak symbols:
	# if defined(USE_WEAK_SYMBOLS) && !defined(USE_ONLY_MPI_NAMES) &&
	#    defined(HAVE_MULTIPLE_PRAGMA_WEAK) &&
	#    defined(F77_NAME_LOWER_2USCORE)
	#
	testRoutine="t1_2"
	if test "$pac_cv_prog_c_multiple_weak_symbols" = "yes" -a \
               "$enable_weak_symbols" = "yes" -a \
	       "$pac_cv_prog_f77_name_mangle" = "lower doubleunderscore" ; then
	    testRoutine="t12"
        fi
        echo "$as_me:$LINENO: checking for extension for Fortran 90 programs" >&5
echo $ECHO_N "checking for extension for Fortran 90 programs... $ECHO_C" >&6
pac_cv_f90_ext="f90"
cat > conftest.$pac_cv_f90_ext <<EOF
      program conftest
      end
EOF
ac_compile='${F90-f90} -c $F90FLAGS conftest.$pac_cv_f90_ext 1>&5'
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
    echo "$as_me:$LINENO: result: f90" >&5
echo "${ECHO_T}f90" >&6
else
    rm -f conftest*
    pac_cv_f90_ext="f"
    cat > conftest.$pac_cv_f90_ext <<EOF
      program conftest
      end
EOF
    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
	echo "$as_me:$LINENO: result: f" >&5
echo "${ECHO_T}f" >&6
    else
        echo "$as_me:$LINENO: result: unknown!" >&5
echo "${ECHO_T}unknown!" >&6
    fi
fi
echo "$as_me:$LINENO: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works" >&5
echo $ECHO_N "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works... $ECHO_C" >&6


# We cannot use _LANG_FORTRAN90 here because we will usually be executing this
# test in the context of _PROG_F90, which is a require on _LANG_FORTRAN90.
# Instead, we insert the necessary code from _LANG_FORTRAN90 here

ac_ext=$pac_cv_f90_ext
ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5'
ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
# Include a Fortran 90 construction to distinguish between Fortran 77
# and Fortran 90 compilers.
cat >conftest.$ac_ext <<EOF
      program conftest
      integer, dimension(10) :: n
      end
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext} ; then
    pac_cv_prog_f90_works="yes"
    if (./conftest; exit) 2>/dev/null ; then
        pac_cv_prog_f90_cross="no"
    else
        pac_cv_prog_f90_cross="yes"
    fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  pac_cv_prog_f90_works="no"
fi
rm -f conftest*
# The intel compiler sometimes generates these work.pc and .pcl files
rm -f work.pc work.pcl
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

echo "$as_me:$LINENO: result: $pac_cv_prog_f90_works" >&5
echo "${ECHO_T}$pac_cv_prog_f90_works" >&6
if test $pac_cv_prog_f90_works = no; then
  { echo "$as_me:$LINENO: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&5
echo "$as_me: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&2;}
fi
echo "$as_me:$LINENO: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler" >&5
echo $ECHO_N "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $pac_cv_prog_f90_cross" >&5
echo "${ECHO_T}$pac_cv_prog_f90_cross" >&6



echo "$as_me:$LINENO: checking whether Fortran 90 works with Fortran 77" >&5
echo $ECHO_N "checking whether Fortran 90 works with Fortran 77... $ECHO_C" >&6
if test "${pac_cv_f90_and_f77+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_cv_f90_and_f77="unknown"
rm -f conftest*
if test -z "$ac_ext_f90" -a -n "$pac_cv_f90_ext" ; then ac_ext_f90=$pac_cv_f90_ext ; fi
# Define the two language-specific steps
link_f90='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest1.$ac_ext_f90 conftest2.o $LIBS 1>&5'
compile_f77='${F77-f77} -c $FFLAGS conftest2.f 1>&5'
# Create test programs
pacTestRoutine=t1_2
# eval the assignment in case the argument is a variable.
eval pacTestRoutine=$testRoutine
cat > conftest1.$ac_ext_f90 <<EOF
       program main
       integer a
       a = 1
       call ${pacTestRoutine}(a)
       end
EOF
cat > conftest2.f <<EOF
       subroutine ${pacTestRoutine}(b)
       integer b
       b = b + 1
       end
EOF
# compile the f77 program and link with the f90 program
# The reverse may not work because the Fortran 90 environment may
# expect to be in control (and to provide library files unknown to any other
# environment, even Fortran 77!)
if { (eval echo "$as_me:$LINENO: \"$compile_f77\"") >&5
  (eval $compile_f77) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
    if { (eval echo "$as_me:$LINENO: \"$link_f90\"") >&5
  (eval $link_f90) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -x conftest ; then
        pac_cv_f90_and_f77="yes"
    else
        pac_cv_f90_and_f77="no"
    fi
    # Some versions of the Intel compiler produce these two files
    rm -f work.pc work.pcl
else
    pac_cv_f90_and_f77="yes"
fi
fi
echo "$as_me:$LINENO: result: $pac_cv_f90_and_f77" >&5
echo "${ECHO_T}$pac_cv_f90_and_f77" >&6
# Perform the requested action based on whether the test succeeded
if test "$pac_cv_f90_and_f77" = yes ; then
    f90_with_f77=yes
else
    f90_with_f77=no
fi

        if test "$f90_with_f77" != yes ; then
	    enable_f90=no
	    { echo "$as_me:$LINENO: WARNING: The selected Fortran 90 compiler $F90 does not work with the selected Fortran 77 compiler $F77.  Use the environment variables F90 and F77 respectively to select compatible Fortran compilers.  The check here tests to see if a main program compiled with the Fortran 90 compiler can link with a subroutine compiled with the Fortran 77 compiler." >&5
echo "$as_me: WARNING: The selected Fortran 90 compiler $F90 does not work with the selected Fortran 77 compiler $F77.  Use the environment variables F90 and F77 respectively to select compatible Fortran compilers.  The check here tests to see if a main program compiled with the Fortran 90 compiler can link with a subroutine compiled with the Fortran 77 compiler." >&2;}
        elif test "$f90_with_f77" = "yes" ; then
            # If we got here, there is a Fortran 90 compiler that we can use
            enable_f90=yes
        fi
    elif test "$pac_cv_prog_f90_works" = no; then
        { echo "$as_me:$LINENO: WARNING: Use --disable-f90 to keep configure from searching for a Fortran 90 compiler" >&5
echo "$as_me: WARNING: Use --disable-f90 to keep configure from searching for a Fortran 90 compiler" >&2;}
    fi
fi
if test "$enable_f90" = "yes" -a "$enable_f77" != "yes" ; then
   # Fortran 90 support requires compatible Fortran 77 support
   { echo "$as_me:$LINENO: WARNING: Fortran 90 support requires compatible Fortran 77 support.  To force the use of the Fortran 90 compiler for Fortran 77, set the environment variable F77 to the name of the Fortran 90 compiler." >&5
echo "$as_me: WARNING: Fortran 90 support requires compatible Fortran 77 support.  To force the use of the Fortran 90 compiler for Fortran 77, set the environment variable F77 to the name of the Fortran 90 compiler." >&2;}
   # We should probably do the compatibility test as well
   enable_f77=yes
fi

# ----------------------------------------------------------------------------
# Now test for Fortran compiler characteristics
# ----------------------------------------------------------------------------
if test "$enable_f77" = "yes" ; then
    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu


echo "$as_me:$LINENO: checking whether Fortran accepts ! for comments" >&5
echo $ECHO_N "checking whether Fortran accepts ! for comments... $ECHO_C" >&6
if test "${pac_cv_prog_f77_exclaim_comments+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else



ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

cat >conftest.$ac_ext <<_ACEOF
      program main
!        This is a comment
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_f77_exclaim_comments="yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_prog_f77_exclaim_comments="no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu


fi
echo "$as_me:$LINENO: result: $pac_cv_prog_f77_exclaim_comments" >&5
echo "${ECHO_T}$pac_cv_prog_f77_exclaim_comments" >&6
if test "$pac_cv_prog_f77_exclaim_comments" = "yes" ; then
    has_exclaim="yes"
else
    has_exclaim="no"
fi


checkdir=src
echo "$as_me:$LINENO: checking for include directory flag for Fortran" >&5
echo $ECHO_N "checking for include directory flag for Fortran... $ECHO_C" >&6
if test "${pac_cv_prog_f77_has_incdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test ! -d $checkdir ; then mkdir $checkdir ; fi
cat >$checkdir/conftestf.h <<EOF
       call sub()
EOF
cat >conftest.f <<EOF
       program main
       include 'conftestf.h'
       end
EOF

ac_fcompiletest='${F77-f77} -c $FFLAGS ${idir}$checkdir conftest.f 1>&5'
pac_cv_prog_f77_has_incdir="none"
# SGI wants -Wf,-I
for idir in "-I" "-Wf,-I" ; do
    if { (eval echo "$as_me:$LINENO: \"$ac_fcompiletest\"") >&5
  (eval $ac_fcompiletest) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
        pac_cv_prog_f77_has_incdir="$idir"
	break
    fi
done
rm -f conftest*
rm -f $checkdir/conftestf.h

fi
echo "$as_me:$LINENO: result: $pac_cv_prog_f77_has_incdir" >&5
echo "${ECHO_T}$pac_cv_prog_f77_has_incdir" >&6

if test "X$pac_cv_prog_f77_has_incdir" != "Xnone" ; then
    F77_INCDIR="$pac_cv_prog_f77_has_incdir"
fi

    if test -n "$F77_INCDIR" ; then
        # For building the Fortran files, add the directory where we are building
        # the object to the include list.  This is needed for g77, which makes
        # includes relative to the source directory of the file, not the
        # directory that the command is executed in
        FINCLUDES="$F77_INCDIR`pwd`/src"
    fi

    #

if test "X$F77_LIBDIR_LEADER" = "X" ; then
echo "$as_me:$LINENO: checking for Fortran 77 flag for library directories" >&5
echo $ECHO_N "checking for Fortran 77 flag for library directories... $ECHO_C" >&6
if test "${pac_cv_prog_f77_library_dir_flag+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


    rm -f conftest.* conftest1.*
    cat > conftest.f <<EOF
        program main
        call f1conf
        end
EOF
    cat > conftest1.f <<EOF
        subroutine f1conf
        end
EOF
    ac_fcompileforlib='${F77-f77} -c $FFLAGS conftest1.f 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_fcompileforlib\"") >&5
  (eval $ac_fcompileforlib) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest1.o ; then
        if test ! -d conftest ; then mkdir conftest2 ; fi
	# We have had some problems with "AR" set to "ar cr"; this is
	# a user-error; AR should be set to just the program (plus
	# any flags that affect the object file format, such as -X64
	# required for 64-bit objects in some versions of AIX).
        { ac_try='${AR-"ar"} cr conftest2/libconftest.a conftest1.o'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }
        { ac_try='${RANLIB-ranlib} conftest2/libconftest.a'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }
        ac_fcompileldtest='${F77-f77} -o conftest $FFLAGS ${ldir}conftest2 conftest.f -lconftest $LDFLAGS 1>&5'
        for ldir in "-L" "-Wl,-L," ; do
            if { (eval echo "$as_me:$LINENO: \"$ac_fcompileldtest\"") >&5
  (eval $ac_fcompileldtest) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest ; then
	        pac_cv_prog_f77_library_dir_flag="$ldir"
	        break
            fi
        done
        rm -rf ./conftest2
    else
        echo "configure: failed program was:" >&5
        cat conftest1.f >&5
    fi
    rm -f conftest*

fi
echo "$as_me:$LINENO: result: $pac_cv_prog_f77_library_dir_flag" >&5
echo "${ECHO_T}$pac_cv_prog_f77_library_dir_flag" >&6

    if test "X$pac_cv_prog_f77_library_dir_flag" != "X" ; then
        F77_LIBDIR_LEADER="$pac_cv_prog_f77_library_dir_flag"
    fi
fi



    if test "$MPI_WITH_PMPI" = "no" ; then
        # If the PMPI routines are not in the same library with the MPI
        # routines, we may need to remove the pmpi declarations

echo "$as_me:$LINENO: checking whether Fortran allows unused externals" >&5
echo $ECHO_N "checking whether Fortran allows unused externals... $ECHO_C" >&6
if test "${pac_cv_prog_f77_allows_unused_externals+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else



ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

cat > conftest.$ac_ext <<EOF
       program main
       external bar
       end
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  pac_cv_prog_f77_allows_unused_externals="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  pac_cv_prog_f77_allows_unused_externals="no"

fi
rm -f conftest*
#
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu


fi
echo "$as_me:$LINENO: result: $pac_cv_prog_f77_allows_unused_externals" >&5
echo "${ECHO_T}$pac_cv_prog_f77_allows_unused_externals" >&6
if test "X$pac_cv_prog_f77_allows_unused_externals" = "Xyes" ; then
   MPIFPMPI=",PMPI_WTIME,PMPI_WTICK"
else

        MPIFPMPI="";
        { echo "$as_me:$LINENO: WARNING: Removed PMPI_WTIME and PMPI_WTICK from mpif.h" >&5
echo "$as_me: WARNING: Removed PMPI_WTIME and PMPI_WTICK from mpif.h" >&2;}
fi

    else
        MPIFPMPI=",PMPI_WTIME,PMPI_WTICK"
    fi

    # Once we have name mangle, we can try to limit the number of needed libs

echo "$as_me:$LINENO: checking for which Fortran libraries are needed to link C with Fortran" >&5
echo $ECHO_N "checking for which Fortran libraries are needed to link C with Fortran... $ECHO_C" >&6
F77_IN_C_LIBS="$FLIBS"
rm -f conftest*
cat <<EOF > conftest.f
        subroutine ftest
        end
EOF
if test "X$ac_fcompile" = "X" ; then
    ac_fcompile='${F77-f77} -c $FFLAGS conftest.f 1>&5'
fi
if { (eval echo "$as_me:$LINENO: \"$ac_fcompile\"") >&5
  (eval $ac_fcompile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
    mv conftest.o mconftestf.o


    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    save_LIBS="$LIBS"
        LIBS="mconftestf.o $save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{

#ifdef F77_NAME_UPPER
#define ftest_ FTEST
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define ftest_ ftest
#endif
ftest_();

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  link_worked=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

link_worked=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
    if test "$link_worked" = "no" ; then
        flibdirs=`echo $FLIBS | tr ' ' '\012' | grep '\-L' | tr '\012' ' '`
        fliblibs=`echo $FLIBS | tr ' ' '\012' | grep -v '\-L' | tr '\012' ' '`
        for flibs in $fliblibs ; do
            LIBS="mconftestf.o $flibdirs $flibs $save_LIBS"
            cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{

#ifdef F77_NAME_UPPER
#define ftest_ FTEST
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define ftest_ ftest
#endif
ftest_();

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  link_worked=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

link_worked=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
            if test "$link_worked" = "yes" ; then
	        F77_IN_C_LIBS="$flibdirs $flibs"
                break
            fi
        done
    if test "$link_worked" = "no" ; then
	# try to add libraries until it works...
        flibscat=""
        for flibs in $fliblibs ; do
	    flibscat="$flibscat $flibs"
            LIBS="mconftestf.o $flibdirs $flibscat $save_LIBS"
            cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{

#ifdef F77_NAME_UPPER
#define ftest_ FTEST
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define ftest_ ftest
#endif
ftest_();

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  link_worked=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

link_worked=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
            if test "$link_worked" = "yes" ; then
	        F77_IN_C_LIBS="$flibdirs $flibscat"
                break
            fi
        done
    fi
    else
	# No libraries needed
	F77_IN_C_LIBS=""
    fi
    LIBS="$save_LIBS"
    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

else
    echo "configure: failed program was:" >&5
    cat conftest.f >&5
fi
rm -f conftest* mconftest*
if test -z "$F77_IN_C_LIBS" ; then
    echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6
else
    echo "$as_me:$LINENO: result: $F77_IN_C_LIBS" >&5
echo "${ECHO_T}$F77_IN_C_LIBS" >&6
fi



    # ------------------------------------------------
    # Shared library support
    # ------------------------------------------------
# Note that USE_GCC_G77_DECLS is not used anywhere within the code, so
# this check has been commented out.


    case "$ENABLE_SHLIB" in
	 gcc-osx|osx-gcc)
	 FC_SHL="$F77 -fPIC"
	 FC_LINKPATH_SHL=""
	 ;;
	 gcc)
	 # Assume that the compiler is g77 if gcc style shared libraries chosen
	 # (unfortunately, the name may be g77 or f77)
	 # To make this a little more robust, only add the -shared
	 # if the compiler allows it (e.g., building with gcc but
	 # a different Fortran compiler. Another option is to
	 # *require* g77.
	 echo "$as_me:$LINENO: checking whether $F77 allows -shared -fpic" >&5
echo $ECHO_N "checking whether $F77 allows -shared -fpic... $ECHO_C" >&6
	 rm -f conftest.f
	 cat > conftest.f <<EOF
       program main
       end
EOF
         if $F77 -shared -fpic -o conftest conftest.f >/dev/null 2>&1 ; then
	     FC_SHL="$F77 -shared -fpic"
             echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
         else
             echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
             echo "$as_me:$LINENO: checking whether $F77 allows -fpic" >&5
echo $ECHO_N "checking whether $F77 allows -fpic... $ECHO_C" >&6
             if $F77 -fpic -o conftest conftest.f >/dev/null 2>&1 ; then
	         FC_SHL="$F77 -fpic"
                 echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
             else
	         FC_SHL=false
                 echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
		 { echo "$as_me:$LINENO: WARNING: Cannot build shared libraries for Fortran with this compiler" >&5
echo "$as_me: WARNING: Cannot build shared libraries for Fortran with this compiler" >&2;}
             fi
         fi
         rm -f conftest*

	 FC_LINKPATH_SHL="-Wl,-rpath -Wl,"
	 ;;
	 cygwin|cygwin-gcc)
	 FC_SHL="$F77 -shared"
	 FC_LINKPATH_SHL=""
	 ;;

	 solaris|solaris-cc)
	 FC_SHL="$F77 -xcode=pic32"
         FC_LINKPATH_SHL=-R
	 ;;

	 # Do we need a solaris-64 with -xcode=pic64?

	 libtool)
	 FC_SHL='${LIBTOOL} --mode=compile ${F77}'
         FC_LINKPATH_SHL="-rpath "
	 ;;

	 *)
	 FC_SHL=false
	 ;;
    esac
    # ------------------------------------------------

    #
    # Most systems allow the Fortran compiler to process .F and .F90 files
    # using the C preprocessor.  However, some systems either do not
    # allow this or have serious bugs (OSF Fortran compilers have a bug
    # that generates an error message from cpp).  The following test
    # checks to see if .F works, and if not, whether "cpp -P -C" can be used
    rm -f conftest*
    echo "$as_me:$LINENO: checking whether Fortran compiler processes .F files with C preprocessor" >&5
echo $ECHO_N "checking whether Fortran compiler processes .F files with C preprocessor... $ECHO_C" >&6
    cat >conftest.F <<EOF
        program main
#define SIZE 10
        integer a(SIZE)
        end
EOF
    pac_cv_fort_accepts_F=no
    pac_Fcompile='${F77} -c $FFLAGS $CPPFLAGS conftest.F 1>&5'

    if { (eval echo "$as_me:$LINENO: \"$pac_Fcompile\"") >&5
  (eval $pac_Fcompile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
        pac_cv_fort_accepts_F=yes
    else
        # Can we use cpp?
        pac_Fcpp='${CPP} -C -P $CPPFLAGS conftest.F >conftest.f 2>&5'
        if { (eval echo "$as_me:$LINENO: \"$pac_Fcpp\"") >&5
  (eval $pac_Fcpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.f ; then
            pac_fFcompile='${F77} -c $FFLAGS $CPPFLAGS conftest.f 1>&5'
   	    if { (eval echo "$as_me:$LINENO: \"$pac_fFcompile\"") >&5
  (eval $pac_fFcompile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
	        pac_cv_fort_accepts_F="no, use cpp"
 	    fi
        fi
    fi
    rm -f conftest.*
    echo "$as_me:$LINENO: result: $pac_cv_fort_accepts_F" >&5
echo "${ECHO_T}$pac_cv_fort_accepts_F" >&6
    case "$pac_cv_fort_accepts_F" in
        yes)
        F77CPP=""
        ;;
        "no, use cpp")
         F77CPP="$CPP -C -P"
        ;;
        no)
        F77CPP="false"
        ;;
    esac


    bindings="$bindings f77"
    bindings_dirs="$bindings_dirs src/binding/f77"

cat >>confdefs.h <<\_ACEOF
#define HAVE_FORTRAN_BINDING 1
_ACEOF

    # Also define the name FORTRAN_BINDING for use in #if @FORTRAN_BINDING@..
    FORTRAN_BINDING=1
fi

          ac_config_commands="$ac_config_commands default-1"


if test "$enable_f90" = "yes" ; then
    if test "$enable_f77" != "yes" ; then
        { echo "$as_me:$LINENO: WARNING: Fortran 90 requires Fortran 77" >&5
echo "$as_me: WARNING: Fortran 90 requires Fortran 77" >&2;}
        enable_f90=no
    else
        bindingsubsystems="$bindingsubsystems src/binding/f90"
        bindings="$bindings f90"
        bindings_dirs="$bindings_dirs src/binding/f90"
    fi
fi

if test "$enable_f90" = "yes" ; then
    # Determine characteristics of the Fortran 90 compiler
    # Find a Fortran 90 compiler.  Sets F90
    # Work around bug in autoconf that adds -g to F90FLAGS
    saveF90FLAGS="$F90FLAGS"
    # This is the fortran90 version of f90 language support
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_F90+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$F90"; then
  ac_cv_prog_F90="$F90" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_F90="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
F90=$ac_cv_prog_F90
if test -n "$F90"; then
  echo "$as_me:$LINENO: result: $F90" >&5
echo "${ECHO_T}$F90" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$F90" && break
  done
fi
if test -z "$F90"; then
  ac_ct_F90=$F90
  for ac_prog in f90 xlf90 pgf90 ifort epcf90 f95 fort xlf95 lf95 pathf90 g95 gfortran ifc efc
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_F90+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_F90"; then
  ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_F90="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_F90=$ac_cv_prog_ac_ct_F90
if test -n "$ac_ct_F90"; then
  echo "$as_me:$LINENO: result: $ac_ct_F90" >&5
echo "${ECHO_T}$ac_ct_F90" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_F90" && break
done

  F90=$ac_ct_F90
fi


# once we find the compiler, confirm the extension
echo "$as_me:$LINENO: checking that $ac_ext works as the extension for Fortran 90 program" >&5
echo $ECHO_N "checking that $ac_ext works as the extension for Fortran 90 program... $ECHO_C" >&6
cat > conftest.$ac_ext <<EOF
      program conftest
      end
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
    echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
    echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
    echo "$as_me:$LINENO: checking for extension for Fortran 90 programs" >&5
echo $ECHO_N "checking for extension for Fortran 90 programs... $ECHO_C" >&6
    ac_ext="f90"
    cat > conftest.$ac_ext <<EOF
      program conftest
      end
EOF
    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
        echo "$as_me:$LINENO: result: f90" >&5
echo "${ECHO_T}f90" >&6
    else
        rm -f conftest*
        ac_ext="f"
        cat > conftest.$ac_ext <<EOF
      program conftest
      end
EOF
        if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
            echo "$as_me:$LINENO: result: f" >&5
echo "${ECHO_T}f" >&6
        else
            echo "$as_me:$LINENO: result: unknown!" >&5
echo "${ECHO_T}unknown!" >&6
        fi
    fi
    ac_f90ext=$ac_ext
    if test "$ac_ext" = "f90" ; then
        pac_cv_f90_ext_f90=yes
    else
        pac_cv_f90_ext_f90=no
    fi
    pac_cv_f90_ext=$ac_ext
    rm -f conftest*
fi
# Provide some information about the compiler.
echo "$as_me:7640:" \
     "checking for Fortran 90 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.
if test -n "$F90" ; then
    ac_save_ext=$ac_ext
    ac_ext=F
    echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5
echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6
if test "${ac_cv_f90_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f90_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f90_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6
    ac_ext=$ac_save_ext
    G90=`test $ac_compiler_gnu = yes && echo yes`
    ac_test_F90FLAGS=${F90FLAGS+set}
ac_save_F90FLAGS=$F90FLAGS
F90FLAGS=
echo "$as_me:$LINENO: checking whether $F90 accepts -g" >&5
echo $ECHO_N "checking whether $F90 accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_f90_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  F90FLAGS=-g
cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f90_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_f90_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_f90_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_prog_f90_g" >&5
echo "${ECHO_T}$ac_cv_prog_f90_g" >&6
if test "$ac_test_F90FLAGS" = set; then
  F90FLAGS=$ac_save_F90FLAGS
elif test $ac_cv_prog_f90_g = yes; then
  if test "$G90" = yes; then
    F90FLAGS="-g -O2"
  else
    F90FLAGS="-g"
  fi
else
  if test "$G90" = yes; then
    F90FLAGS="-O2"
  else
    F90FLAGS=
  fi
fi
fi
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    echo "$as_me:$LINENO: checking for extension for Fortran 90 programs" >&5
echo $ECHO_N "checking for extension for Fortran 90 programs... $ECHO_C" >&6
pac_cv_f90_ext="f90"
cat > conftest.$pac_cv_f90_ext <<EOF
      program conftest
      end
EOF
ac_compile='${F90-f90} -c $F90FLAGS conftest.$pac_cv_f90_ext 1>&5'
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
    echo "$as_me:$LINENO: result: f90" >&5
echo "${ECHO_T}f90" >&6
else
    rm -f conftest*
    pac_cv_f90_ext="f"
    cat > conftest.$pac_cv_f90_ext <<EOF
      program conftest
      end
EOF
    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
	echo "$as_me:$LINENO: result: f" >&5
echo "${ECHO_T}f" >&6
    else
        echo "$as_me:$LINENO: result: unknown!" >&5
echo "${ECHO_T}unknown!" >&6
    fi
fi
echo "$as_me:$LINENO: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works" >&5
echo $ECHO_N "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) works... $ECHO_C" >&6


# We cannot use _LANG_FORTRAN90 here because we will usually be executing this
# test in the context of _PROG_F90, which is a require on _LANG_FORTRAN90.
# Instead, we insert the necessary code from _LANG_FORTRAN90 here

ac_ext=$pac_cv_f90_ext
ac_compile='${F90-f90} -c $F90FLAGS conftest.$ac_ext 1>&5'
ac_link='${F90-f90} -o conftest${ac_exeext} $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
# Include a Fortran 90 construction to distinguish between Fortran 77
# and Fortran 90 compilers.
cat >conftest.$ac_ext <<EOF
      program conftest
      integer, dimension(10) :: n
      end
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext} ; then
    pac_cv_prog_f90_works="yes"
    if (./conftest; exit) 2>/dev/null ; then
        pac_cv_prog_f90_cross="no"
    else
        pac_cv_prog_f90_cross="yes"
    fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  pac_cv_prog_f90_works="no"
fi
rm -f conftest*
# The intel compiler sometimes generates these work.pc and .pcl files
rm -f work.pc work.pcl
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

echo "$as_me:$LINENO: result: $pac_cv_prog_f90_works" >&5
echo "${ECHO_T}$pac_cv_prog_f90_works" >&6
if test $pac_cv_prog_f90_works = no; then
  { echo "$as_me:$LINENO: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&5
echo "$as_me: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&2;}
fi
echo "$as_me:$LINENO: checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler" >&5
echo $ECHO_N "checking whether the Fortran 90 compiler ($F90 $F90FLAGS $LDFLAGS) is a cross-compiler... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $pac_cv_prog_f90_cross" >&5
echo "${ECHO_T}$pac_cv_prog_f90_cross" >&6

    F90FLAGS=$saveF90FLAGS
    if test "$pac_cv_prog_f90_works" = no ; then
        # Reject this compiler
        if test -n "$F90" ; then
            f90_rejected=yes
            oldF90="$F90"
            F90=""
        fi
    fi

    if test -z "$F90" ; then
        if test "$f90_rejected" = "yes" ; then
            { { echo "$as_me:$LINENO: error: Could not find a usable F90 compiler.  The compiler $oldF90 may be incompatible with the Fortran 77 compiler $F77; check the output of configure and consult the installation manuals" >&5
echo "$as_me: error: Could not find a usable F90 compiler.  The compiler $oldF90 may be incompatible with the Fortran 77 compiler $F77; check the output of configure and consult the installation manuals" >&2;}
   { (exit 1); exit 1; }; }
        else
            { { echo "$as_me:$LINENO: error: Could not find a usable F90 compiler." >&5
echo "$as_me: error: Could not find a usable F90 compiler." >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi

    # Find the extension that this compiler uses for modules.
    # Sets F90MODEXT (and adds it to the list substed)
    # Sets F90MODINCFLAG (and adds it to the list substed)

echo "$as_me:$LINENO: checking for Fortran 90 module extension" >&5
echo $ECHO_N "checking for Fortran 90 module extension... $ECHO_C" >&6
if test "${pac_cv_f90_module_ext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

# fortran90.m4 version
pac_cv_f90_module_case="unknown"
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

cat >conftest.$ac_ext <<EOF
        module conftest
        integer n
        parameter (n=1)
        end module conftest
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
                  for name in conftest CONFTEST ; do
       for ext in mod MOD d ; do
           if test -s $name.$ext ; then
               if test $name = conftest ; then
                   pac_cv_f90_module_case=lower
               else
                   pac_cv_f90_module_case=upper
               fi
               pac_cv_f90_module_ext=$ext
               pac_MOD=$ext
               break
           fi
       done
       if test -n "$pac_cv_f90_module_ext" ; then break ; fi
   done
   if test -z "$pac_MOD" ; then

       pac_MOD=`ls conftest.* 2>&1 | grep -v conftest.$ac_f90ext | grep -v conftest.o`
       pac_MOD=`echo $pac_MOD | sed -e 's/conftest\.//g'`
       pac_cv_f90_module_case="lower"
       if test "X$pac_MOD" = "X" ; then
	   pac_MOD=`ls CONFTEST* 2>&1 | grep -v CONFTEST.f | grep -v CONFTEST.o`
           pac_MOD=`echo $pac_MOD | sed -e 's/CONFTEST\.//g'`
	   if test -n "$pac_MOD" -a -s "CONFTEST.$pac_MOD" ; then
	       testname="CONFTEST"
	       pac_cv_f90_module_case="upper"
	   else
	       # Clear because we must have gotten an error message
	       pac_MOD=""
	   fi
       fi
       if test -z "$pac_MOD" ; then
	   pac_cv_f90_module_ext="unknown"
       else
	   pac_cv_f90_module_ext=$pac_MOD
       fi
    fi
else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    pac_cv_f90_module_ext="unknown"
fi
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

rm -f conftest*

fi
echo "$as_me:$LINENO: result: $pac_cv_f90_module_ext" >&5
echo "${ECHO_T}$pac_cv_f90_module_ext" >&6

if test "$pac_cv_f90_module_ext" = "unknown" ; then
    :
else
    F90MODEXT=$pac_MOD
fi


echo "$as_me:$LINENO: checking for Fortran 90 module include flag" >&5
echo $ECHO_N "checking for Fortran 90 module include flag... $ECHO_C" >&6
if test "${pac_cv_f90_module_incflag+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

cat >conftest.$ac_ext <<EOF
        module conf
        integer n
        parameter (n=1)
        end module conf
EOF
pac_madedir="no"
if test ! -d conf ; then mkdir conftestdir ; pac_madedir="yes"; fi
if test "$pac_cv_f90_module_case" = "upper" ; then
    pac_module="CONF.$pac_cv_f90_module_ext"
else
    pac_module="conf.$pac_cv_f90_module_ext"
fi
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
    if test -s "$pac_module" ; then
        mv $pac_module conftestdir
	# Remove any temporary files, and hide the work.pc file (if
	# the compiler generates them)
	if test -f work.pc ; then
	    mv -f work.pc conftest.pc
        fi
	rm -f work.pcl
    else
	{ echo "$as_me:$LINENO: WARNING: Unable to build a simple F90 module" >&5
echo "$as_me: WARNING: Unable to build a simple F90 module" >&2;}
        echo "configure: failed program was:" >&5
        cat conftest.$ac_f90ext >&5
    fi
else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_ext
cat >conftest.$ac_ext <<EOF
        program main
        use conf
        end
EOF
if ${F90-f90} -c $F90FLAGS -Iconftestdir conftest.$ac_ext 1>&5 2>&1 && \
	test -s conftest.o ; then
    pac_cv_f90_module_incflag="-I"
elif ${F90-f90} -c $F90FLAGS -Mconftestdir conftest.$ac_ext 1>&5 2>&1 && \
	test -s conftest.o ; then
    pac_cv_f90_module_incflag="-M"
elif ${F90-f90} -c $F90FLAGS -pconftestdir conftest.$ac_ext 1>&5 2>&1 && \
	test -s conftest.o ; then
    pac_cv_f90_module_incflag="-p"
elif test -s work.pc ; then
     mv conftest.pc conftestdir/mpimod.pc
     echo "mpimod.pc" > conftestdir/mpimod.pcl
     echo "`pwd`/conftestdir/mpimod.pc" >> conftestdir/mpimod.pcl
     if ${F90-f90} -c $F90FLAGS -cl,conftestdir/mpimod.pcl conftest.$ac_ext 1>&5 2>&1 && test -s conftest.o ; then
         pac_cv_f90_module_incflag='-cl,'
	# Not quite right; see the comments that follow
         echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
	 F90_WORK_FILES_ARG="-cl,mpimod.pcl"
         F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"

     else
         # The version of the Intel compiler that I have refuses to let
	 # you put the "work catalog" list anywhere but the current directory.
         pac_cv_f90_module_incflag="Unavailable!"
     fi
else
    # Early versions of the Intel ifc compiler required a *file*
    # containing the names of files that contained the names of the
    #
    # -cl,filename.pcl
    #   filename.pcl contains
    #     fullpathname.pc
    # The "fullpathname.pc" is generated, I believe, when a module is
    # compiled.
    # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
    # specified, work.pcl and work.pc are created.  However, if you specify
    # a file, it must contain a the name of a file ending in .pc .  Ugh!
    pac_cv_f90_module_incflag="unknown"
fi
if test "$pac_madedir" = "yes" ; then rm -rf conftestdir ; fi
rm -f conftest*
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu


fi
echo "$as_me:$LINENO: result: $pac_cv_f90_module_incflag" >&5
echo "${ECHO_T}$pac_cv_f90_module_incflag" >&6

F90MODINCFLAG=$pac_cv_f90_module_incflag



    if test "$pac_cv_f90_module_case" = "upper" ; then
        MPIMODNAME=MPI
        MPICONSTMODNAME=MPI_CONSTANTS
    else
        MPIMODNAME=mpi
        MPICONSTMODNAME=mpi_constants
    fi


    if test -z "$modincdir" ; then
        # The default module include dir is the same as the include dir
        modincdir=$includedir
    fi

    #
    # For now, assume that all f90 compilers accept -I for include directories
    F90INC=-I

    F90INCFLAG=-I


    #
    # Determine the extension for f90 files (it isn't always .f90)


echo "$as_me:$LINENO: checking whether Fortran 90 accepts f90 suffix" >&5
echo $ECHO_N "checking whether Fortran 90 accepts f90 suffix... $ECHO_C" >&6
if test "${pac_cv_f90_ext_f90+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

save_ac_f90ext=$ac_f90ext
ac_f90ext="f90"
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

cat >conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f90_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_f90_ext_f90="yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_f90_ext_f90="no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu


fi
echo "$as_me:$LINENO: result: $pac_cv_f90_ext_f90" >&5
echo "${ECHO_T}$pac_cv_f90_ext_f90" >&6
if test "$pac_cv_f90_ext_f90" = "yes" ; then
    ac_f90ext=f90
else
    ac_f90ext=f
fi

    F90EXT=$pac_cv_f90_ext

    #
    # Most systems allow the Fortran compiler to process .F and .F90 files
    # using the C preprocessor.  However, some systems either do not
    # allow this or have serious bugs (OSF Fortran compilers have a bug
    # that generates an error message from cpp).  The following test
    # checks to see if .F works, and if not, whether "cpp -P -C" can be used
    rm -f conftest*
    echo "$as_me:$LINENO: checking whether Fortran 90 compiler processes .F90 files with C preprocessor" >&5
echo $ECHO_N "checking whether Fortran 90 compiler processes .F90 files with C preprocessor... $ECHO_C" >&6
    cat >conftest.F90 <<EOF
        program main
#define ASIZE 10
        integer a(ASIZE)
        end
EOF
    pac_cv_f90_accepts_F90=no
    pac_F90compile='${F90} -c $F90FLAGS $CPPFLAGS conftest.F90 1>&5'

    if { (eval echo "$as_me:$LINENO: \"$pac_F90compile\"") >&5
  (eval $pac_F90compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
        pac_cv_f90_accepts_F90=yes
    else
        # Can we use cpp?
        pac_F90cpp='${CPP} -C -P $CPPFLAGS conftest.F90 >conftest.$pac_cv_f90_ext 2>&5'
        if { (eval echo "$as_me:$LINENO: \"$pac_F90cpp\"") >&5
  (eval $pac_F90cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.$pac_cv_f90_ext ; then
            pac_fF90compile='${F90} -c $F90FLAGS $CPPFLAGS conftest.$pac_cv_f90_ext 1>&5'
	    if { (eval echo "$as_me:$LINENO: \"$pac_fF90compile\"") >&5
  (eval $pac_fF90compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest.o ; then
	        pac_cv_f90_accepts_F90="no, use cpp"
	    fi
        fi
    fi
    rm -f conftest.*
    echo "$as_me:$LINENO: result: $pac_cv_f90_accepts_F90" >&5
echo "${ECHO_T}$pac_cv_f90_accepts_F90" >&6
    case "$pac_cv_f90_accepts_F90" in
        yes)
        F90CPP=""
        ;;
        "no, use cpp")
        F90CPP="$CPP -C -P"
        ;;
        no)
        F90CPP="false"
        ;;
    esac

    # ------------------------------------------------
    # ------------------------------------------------
    # Here are the commands to substitute the compilers to be used to create
    # shared libraries.  The choices for the first two come down from the
    # top-level configure.  FC_SHL must be determined in this configure



    # Try to get a version string for the F90 compiler.  We may
    # need this to find likely command-line arguments for accessing
    # shared libraries
    echo "$as_me:$LINENO: checking for f90 compiler vendor" >&5
echo $ECHO_N "checking for f90 compiler vendor... $ECHO_C" >&6
    # This is complicated by some compilers (such as the Intel 8.1 ifort)
    # that return a non-zero status even when they accept the -V option
    # (a zero status is returned only if there is a file).
    pac_cv_f90_vendor="unknown"
    for arg in --version -V -v ; do
        rm -f conftest.txt
        $F90 $arg </dev/null >conftest.txt 2>&1
	# Ignore the return code, because some compilers set the
	# return code to zero on invalid arguments and some to
        # non-zero on success (with no files to compile)
        if test -f conftest.txt ; then
            if grep 'Portland Group' conftest.txt >/dev/null 2>&1 ; then
                pac_cv_f90_vendor=pgi
            elif grep 'Sun Workshop' conftest.txt >/dev/null 2>&1 ; then
                pac_cv_f90_vendor=sun
            elif grep 'Absoft' conftest.txt >/dev/null 2>&1 ; then
                pac_cv_f90_vendor=absoft
            elif grep 'G95' conftest.txt >/dev/null 2>&1 ; then
                pac_cv_f90_vendor=gnu
            elif grep 'GNU Fortran' conftest.txt >/dev/null 2>&1 ; then
                # This is gfortran
                pac_cv_f90_vendor=gnu
	    elif grep Intel conftest.txt >/dev/null 2>&1 ; then
                pac_cv_f90_vendor=intel
	    fi
        fi
        if test "$pac_cv_f90_vendor" != "unknown" ; then break ; fi
    done
    if test "$pac_cv_f90_vendor" = "unknown" ; then
        # Try to use the compiler name
        if test "$F90" = "ifort" -o "$F90" = "ifc" ; then
            pac_cv_f90_vendor=intel
        elif test "$F90" = "pgf90" ; then
            pac_cv_f90_vendor=pgi
        elif test "$F90" = "xlf90" -o "$F90" = "xlf90_r" ; then
            pac_cv_f90_vendor=ibm
        fi
    fi
    echo "$as_me:$LINENO: result: $pac_cv_f90_vendor" >&5
echo "${ECHO_T}$pac_cv_f90_vendor" >&6
    rm -f conftest.txt
    # End of checking for F90 compiler vendor

    case "$ENABLE_SHLIB" in
    gcc)
    if test "$pac_cv_f90_vendor" = gnu -o "$F90" = "g95" ; then
        # If we have the GNU Fortran 95 compiler (untested)
        F90_SHL="$F90 -shared -fpic"
        F90_LINKPATH_SHL="-Wl,-rpath -Wl,"
    else
        case "$pac_cv_f90_vendor" in
	    absoft)
	    F90_SHL="$F90 -fpic"
            F90_LINKPATH_SHL="-X -rpath -X "
	    ;;

	    intel)
	    # Intel implements the GNU options
	    F90_SHL="$F90 -shared -fpic"
            F90_LINKPATH_SHL="-Wl,-rpath -Wl,"
	    ;;

	    pgi)
	    # Portland Group implements the GNU options
	    F90_SHL="$F90 -shared -fpic"
            F90_LINKPATH_SHL="-Wl,-rpath -Wl,"
	    ;;

	    *)
	    # Unknown, ignore
	    { echo "$as_me:$LINENO: WARNING: Unable to determine how to link Fortran 90 compiler with shared libraries" >&5
echo "$as_me: WARNING: Unable to determine how to link Fortran 90 compiler with shared libraries" >&2;}
	    ;;
        esac
    fi
    ;;
    solaris|solaris-cc)
        # Assume the Solaris F90 compiler, in 32-bit mode
        F90_SHL="$F90 -xcode=pic32"
        F90_LINKPATH_SHL=-R
    ;;
    *)
       # Unknown, ignore
    ;;
    esac
    if test "$ENABLE_SHLIB" != "none" -a -z "$F90_LINKPATH_SHL" -a \
        -n "$C_LINKPATH_SHL" ; then
        { echo "$as_me:$LINENO: WARNING: Unable to determine how to pass the shared-library link patth to the Fortran 90 compiler $F90.  Set the environment variable F90_LINKPATH_SHL and rerun configure (the corresponding value for the C compiler is $C_LINKPATH_SHL)" >&5
echo "$as_me: WARNING: Unable to determine how to pass the shared-library link patth to the Fortran 90 compiler $F90.  Set the environment variable F90_LINKPATH_SHL and rerun configure (the corresponding value for the C compiler is $C_LINKPATH_SHL)" >&2;}
    fi
    # ------------------------------------------------
fi

          ac_config_commands="$ac_config_commands default-2"


# ----------------------------------------------------------------------------
# By default, only build C++ if there is a C++ compiler (if we don't
# test here, the configure can fail if there is no C++ compiler available)
if test "$enable_cxx" = "default" ; then
    # This test uses the list from a recent PROG_CXX, but with the
    # addition of the Portland group, IBM, and Intel C++ compilers
    # (While the Intel icc compiler will compile C++ programs, it will
    # not *link* C++ object files unless there is at least one C++ source
    # file present on the command that performs the linking.  icpc is the
    # Intel C++ compiler that both compiles and links C++ programs)
    for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl pgCC xlC icpc
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "$as_me:$LINENO: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$CXX" && break
done

    if test -n "$CXX" ; then
        enable_cxx=yes
    fi
fi

if test "$enable_cxx" = "yes" ; then
    # Save the current CXXFLAGS (see below for the reason)
    saveCXXFLAGS=$CXXFLAGS
    # Misfeature in autoconf.  While the macro name is PROG_CXX, it
    # looks at the CCC environment variable, not CXX, even though it
    # *sets* CXX!!!!
    if test -z "$CCC" -a -n "$CXX" ; then
        CCC="$CXX"
    fi
    ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "$as_me:$LINENO: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CXX" && break
done
test -n "$ac_ct_CXX" || ac_ct_CXX="g++"

  CXX=$ac_ct_CXX
fi


# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
     "checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
GXX=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_prog_cxx_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
for ac_declaration in \
   '' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
#include <stdlib.h>
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    # Misfeature in autoconf.  When using gcc, PROG_CXX insists on setting
    # CXXFLAGS to -g -O2 if CXXFLAGS is not set.  This may be appropriate for
    # many tools built with configure and gcc, but not always.  In particular,
    # there seems to be no way to get gcc to use no extra flags if that is
    # desired.
    if test -z "$saveCXXFLAGS" -a -n "$CXXFLAGS" ; then
        # restore CXXFLAGS
        # Note: This may not be correct if PROG_CXX decided to add other
        # flags to CXXFLAGS to enforce some behavior (such as ANSI/ISO C++),
        # But we haven't seen that in practice.  It would be better
        # if the CXXFLAGS were decomposed into flags-that-change-the-language
        # that the compiler accepts from optimizations
        CXXFLAGS=$saveCXXFLAGS
    fi
    ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


echo "$as_me:$LINENO: checking whether the compiler supports exceptions" >&5
echo $ECHO_N "checking whether the compiler supports exceptions... $ECHO_C" >&6
if test "${ac_cv_cxx_exceptions+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
try { throw  1; } catch (int i) { return i; }
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_cxx_exceptions=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_cxx_exceptions=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_exceptions" >&5
echo "${ECHO_T}$ac_cv_cxx_exceptions" >&6
if test "$ac_cv_cxx_exceptions" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_CXX_EXCEPTIONS
_ACEOF

fi

    echo "$as_me:$LINENO: checking whether the compiler recognizes bool as a built-in type" >&5
echo $ECHO_N "checking whether the compiler recognizes bool as a built-in type... $ECHO_C" >&6
if test "${ac_cv_cxx_bool+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int f(int  x){return 1;}
int f(char x){return 1;}
int f(bool x){return 1;}

int
main ()
{
bool b = true; return f(b);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_cxx_bool=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_cxx_bool=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_bool" >&5
echo "${ECHO_T}$ac_cv_cxx_bool" >&6
if test "$ac_cv_cxx_bool" != yes; then

cat >>confdefs.h <<\_ACEOF
#define bool int
_ACEOF

fi

    echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5
echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6
if test "${ac_cv_cxx_namespaces+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
namespace Outer { namespace Inner { int i = 0; }}
int
main ()
{
using namespace Outer::Inner; return i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_cxx_namespaces=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_cxx_namespaces=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5
echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6
if test "$ac_cv_cxx_namespaces" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NAMESPACES
_ACEOF

fi

    if test "$ac_cv_cxx_namespaces" != "yes" ; then
        { { echo "$as_me:$LINENO: error: Namespaces are required for the MPI C++ interface" >&5
echo "$as_me: error: Namespaces are required for the MPI C++ interface" >&2;}
   { (exit 1); exit 1; }; }
    fi
    HAVE_CXX_EXCEPTIONS=0

    if test "$ac_cv_cxx_exceptions" = "yes" ; then
        HAVE_CXX_EXCEPTIONS=1
    fi
    # iostream and math are needed for examples/cxx/cxxpi.cxx
    echo "$as_me:$LINENO: checking whether <iostream> available" >&5
echo $ECHO_N "checking whether <iostream> available... $ECHO_C" >&6
if test "${pac_cv_cxx_has_iostream+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <iostream>

int
main ()
{
using namespace std;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_cxx_has_iostream=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_cxx_has_iostream=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_cxx_has_iostream" >&5
echo "${ECHO_T}$pac_cv_cxx_has_iostream" >&6
    if test "$pac_cv_cxx_has_iostream" = yes ; then
        CXX_DEFS="$CXX_DEFS -DHAVE_CXX_IOSTREAM"
    fi

echo "$as_me:$LINENO: checking whether the compiler implements the namespace std" >&5
echo $ECHO_N "checking whether the compiler implements the namespace std... $ECHO_C" >&6
if test "${ac_cv_cxx_namespace_std+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_cxx_namespace_std=no
if test "$ac_cv_cxx_namespaces" = yes ; then


   ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <iostream>
using namespace std;
int
main ()
{
cout << "message\n";
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_cxx_namespace_std=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_cxx_namespace_std=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

fi

fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_namespace_std" >&5
echo "${ECHO_T}$ac_cv_cxx_namespace_std" >&6
if test "$ac_cv_cxx_namespace_std" = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NAMESPACE_STD
_ACEOF

fi

    if test "$ac_cv_cxx_namespace_std" = "yes" ; then
        CXX_DEFS="$CXX_DEFS -DHAVE_NAMESPACE_STD"
    fi

    echo "$as_me:$LINENO: checking whether <math> available" >&5
echo $ECHO_N "checking whether <math> available... $ECHO_C" >&6
if test "${pac_cv_cxx_has_math+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <math>

int
main ()
{
using namespace std;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_cxx_has_math=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_cxx_has_math=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_cxx_has_math" >&5
echo "${ECHO_T}$pac_cv_cxx_has_math" >&6
    if test "$pac_cv_cxx_has_math" = yes ; then
        CXX_DEFS="$CXX_DEFS -DHAVE_CXX_MATH"
    fi


    # Add support for shared libraries if possible


    case "$ENABLE_SHLIB" in
        gcc-osx|osx-gcc)
        # Assume that the compiler is g++ if gcc style shared libraries chosen
        CXX_SHL="$CXX -fPIC"
        CXX_LINKPATH_SHL=""
	;;
	gcc)
        # Assume that the compiler is g++ if gcc style shared libraries chosen
        CXX_SHL="$CXX -shared -fpic"
        CXX_LINKPATH_SHL="-Wl,-rpath -Wl,"
	;;
	cygwin|cygwin-gcc)
        CXX_SHL="$CXX -shared"
        CXX_LINKPATH_SHL=""
	;;
	solaris|solaris-cc)
        CXX_SHL="$CXX -xcode=pic32"
        CXX_LINKPATH_SHL=-R
	;;
	libtool)
	CXX_SHL='${LIBTOOL} --mode=compile ${CXX}'
	CXX_LINKPATH_SHL="-rpath "
	;;
	*)
	CXX_SHL=false
	;;
    esac
    # GNU changed the calling conventions between minor releases (!!!)
    # This is too hard to detect, but we should be able to detect
    # the version mismatch
    GNU_VERSION=0
    GNU_MINORVERSION=0
    if test "$ac_compiler_gnu" = "yes" ; then
         ac_vals=""
	 echo "$as_me:$LINENO: checking for GNU g++ version" >&5
echo $ECHO_N "checking for GNU g++ version... $ECHO_C" >&6
         if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
int main() {
    int v = -1, m = -1;
    FILE *fp = fopen("conftest.out","w");
#ifdef __GNUC_MINOR__
    m = __GNUC_MINOR__;
#endif
#ifdef __GNUC__
    v = __GNUC__;
#endif
    fprintf( fp, "v=%d, m=%d\n", v, m );
    fclose( fp );
    return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_vals=`cat conftest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
         if test -n "$ac_vals" ; then
             v=`echo "$ac_vals" | sed -e 's/v=\(.*\),.*/\1/'`
             m=`echo "$ac_vals" | sed -e 's/.*m=\(.*\)/\1/'`
             echo "$as_me:$LINENO: result: $v . $m" >&5
echo "${ECHO_T}$v . $m" >&6
             GNUC_VERSION=$v
             GNUC_MINORVERSION=$m
         else
             echo "$as_me:$LINENO: result: unknown" >&5
echo "${ECHO_T}unknown" >&6
         fi


    fi

    bindings="$bindings cxx"
    bindings_dirs="$bindings_dirs src/binding/cxx"

cat >>confdefs.h <<\_ACEOF
#define HAVE_CXX_BINDING 1
_ACEOF

    INCLUDE_MPICXX_H='#include "mpicxx.h"'


    # In order to support the Fortran datatypes within C++,
    #
    # FORTRAN_BINDING always has a CPP-time value of either 0 or 1,
    # so that it may be used in #if statements without adding to
    # the CPP name space


    # Special C++ datatypes.  Set to DATATYPE NULL first; we'll
    # replace the ones that we have later, after we have determined
    # the C datatypes
    MPIR_CXX_BOOL=0x0c000000
    MPIR_CXX_COMPLEX=0x0c000000
    MPIR_CXX_DOUBLE_COMPLEX=0x0c000000
    MPIR_CXX_LONG_DOUBLE_COMPLEX=0x0c000000





fi
# Copy the mpicxx.h file to the main include directory
          ac_config_commands="$ac_config_commands default-3"



# Bindings dirs is used for the installation target

#
# A few final exports
# Some users use FC, others F77 for the Fortran compiler.  The following
# tests makes us consistent
if test -z "$FC" -a -n "$F77" ; then FC="$F77" ; export FC ; fi
if test -z "$F77" -a -n "$FC" ; then F77="$FC" ; export F77 ; fi

# ----------------------------------------------------------------------------
# End of the bindings support
# ----------------------------------------------------------------------------

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

#
# ----------------------------------------------------------------------------
# Done with the basic argument processing and decisions about which
# subsystems to build
# ----------------------------------------------------------------------------

# Look for perl.  Perl is used *only* in the tests of the commands such as
# mpiexec, mpicc, etc, in test/commands, and in some of the utility
# programs for processing log files .  If perl is not found,
# MPICH2 may still be built and used.
# 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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PERL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
PERL=$ac_cv_path_PERL

if test -n "$PERL"; then
  echo "$as_me:$LINENO: result: $PERL" >&5
echo "${ECHO_T}$PERL" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Look for ar.  If we fail, abort
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
  echo "$as_me:$LINENO: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$AR" && break
done

if test -z "$AR" ; then
    { { echo "$as_me:$LINENO: error: The program ar is required for building MPICH2.  Make sure that your path includes ar" >&5
echo "$as_me: error: The program ar is required for building MPICH2.  Make sure that your path includes ar" >&2;}
   { (exit 1); exit 1; }; }
fi
# 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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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


# Check for etags.  Note that different versions of etags take
# different arguments for specifying the language to use in parsing a
# file.  Older versions only accept -l c or --language c as a way to
# *change* the interpretation of the following files; newer versions
# allow --langmap=c:+.i to add a file extension to those that are C
# programs.  New versions might want --language-force=c.
for ac_prog in etags
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ETAGS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ETAGS"; then
  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ETAGS="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
ETAGS=$ac_cv_prog_ETAGS
if test -n "$ETAGS"; then
  echo "$as_me:$LINENO: result: $ETAGS" >&5
echo "${ECHO_T}$ETAGS" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

if test -n "$ETAGS" -a "$ETAGS" != true ; then
    # Check for the --langmap argument
    echo "$as_me:$LINENO: checking for etags argument to specify language" >&5
echo $ECHO_N "checking for etags argument to specify language... $ECHO_C" >&6
    cat >>conftest.c <<EOF
int footest = 0;
EOF
    if $ETAGS --langmap=c:+.i -o conftesttags conftest.c >/dev/null 2>&1 ; then
        ETAGSADD="--langmap=c:+.i"
    else
        if $ETAGS --language=c -o conftesttags conftest.c >/dev/null 2>&1 ; then
	    ETAGSADD="--language=c"
        else
            if $ETAGS --language-force=c -o conftesttags conftest.c >/dev/null 2>&1 ; then
	        ETAGSADD="--language-force=c"
            else
	        ETAGS=true
	        { echo "$as_me:$LINENO: WARNING: Could not find working etags" >&5
echo "$as_me: WARNING: Could not find working etags" >&2;}
            fi
        fi
    fi
    if test -n "$ETAGSADD" ; then
        echo "$as_me:$LINENO: result: $ETAGSADD" >&5
echo "${ECHO_T}$ETAGSADD" >&6
    fi
    rm -f conftest*
fi


export ETAGS
export ETAGSADD

# Check for broken handling of common symbols.  There are two fixes:
# Force ranlib to handle correctly (ranlib -c on some BSD and MAC OS platforms)
# or force gcc to not generate common symbols if using gcc (-fno-common).
# This autoconf macro checks for this.
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  RANLIB=$ac_ct_RANLIB
else
  RANLIB="$ac_cv_prog_RANLIB"
fi


echo "$as_me:$LINENO: checking whether global variables handled properly" >&5
echo $ECHO_N "checking whether global variables handled properly... $ECHO_C" >&6
if test "${ac_cv_prog_cc_globals_work+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


ac_cv_prog_cc_globals_work=no
rm -f libconftest.a
echo 'extern int a; int a;' > conftest1.c
echo 'extern int a; int main( ){ return a; }' > conftest2.c
if ${CC-cc} $CFLAGS -c conftest1.c >conftest.out 2>&1 ; then
    if ${AR-ar} cr libconftest.a conftest1.o >/dev/null 2>&1 ; then
        if ${RANLIB-:} libconftest.a >/dev/null 2>&1 ; then
            if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a >>conftest.out 2>&1 ; then
		# Success!  C works
		ac_cv_prog_cc_globals_work=yes
	    else
		echo "Error linking program with uninitialized global" >&5
	        echo "Programs were:" >&5
		echo "conftest1.c:" >&5
                cat conftest1.c >&5
		echo "conftest2.c:" >&5
		cat conftest2.c >&5
		echo "and link line was:" >&5
		echo "${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a" >&5
		echo "with output:" >&5
		cat conftest.out >&5

	        # Failure!  Do we need -fno-common?
	        ${CC-cc} $CFLAGS -fno-common -c conftest1.c >> conftest.out 2>&1
		rm -f libconftest.a
		${AR-ar} cr libconftest.a conftest1.o
	        ${RANLIB-:} libconftest.a
	        if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a >> conftest.out 2>&1 ; then
		    ac_cv_prog_cc_globals_work="needs -fno-common"
		    CFLAGS="$CFLAGS -fno-common"
                elif test -n "$RANLIB" ; then
		    # Try again, with ranlib changed to ranlib -c
                    # (send output to /dev/null incase this ranlib
                    # doesn't know -c)
		    ${RANLIB} -c libconftest.a >/dev/null 2>&1
		    if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest.a >> conftest.out 2>&1 ; then
			RANLIB="$RANLIB -c"
	 	    #else
		    #	# That didn't work
		    #	:
		    fi
	        #else
		#    :
		fi
	    fi
        fi
    fi
fi
rm -f conftest* libconftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_globals_work" >&5
echo "${ECHO_T}$ac_cv_prog_cc_globals_work" >&6
if test "$ac_cv_prog_cc_globals_work" = no ; then
    { echo "$as_me:$LINENO: WARNING: Common symbols not supported on this system!" >&5
echo "$as_me: WARNING: Common symbols not supported on this system!" >&2;}
fi

#
# 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
# AmigaOS /C/install, which installs bootblocks on floppy discs
# 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"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  # Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
  ./ | .// | /cC/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
  /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
      for ac_exec_ext in '' $ac_executable_extensions; do
	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
	  if test $ac_prog = install &&
	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
	    break 3
	  fi
	fi
      done
    done
    ;;
esac
done


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 "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&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}'

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


if test -z "$INSTALL" ; then
    echo "$as_me:$LINENO: result: No install program available" >&5
echo "${ECHO_T}No install program available" >&6
else
    # Check that this install really works
    rm -f conftest
    echo "Test file" > conftest
    if test ! -d .conftest ; then mkdir .conftest ; fi
    echo "$as_me:$LINENO: checking whether install works" >&5
echo $ECHO_N "checking whether install works... $ECHO_C" >&6
    if $INSTALL conftest .conftest >/dev/null 2>&1 ; then
        installOk=yes
    else
        installOk=no
    fi
    rm -rf .conftest conftest
    echo "$as_me:$LINENO: result: $installOk" >&5
echo "${ECHO_T}$installOk" >&6
    if test "$installOk" = no ; then
        if test -n "$ac_install_sh" ; then
            INSTALL=$ac_install_sh
        else
	    { { echo "$as_me:$LINENO: error: Unable to find working install" >&5
echo "$as_me: error: Unable to find working install" >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi
fi

#
# On Mac OS/X, install breaks libraries unless used with the -p switch

echo "$as_me:$LINENO: checking whether install breaks libraries" >&5
echo $ECHO_N "checking whether install breaks libraries... $ECHO_C" >&6
if test "${ac_cv_prog_install_breaks_libs+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else




ac_cv_prog_install_breaks_libs=yes
rm -f libconftest* conftest*
echo 'int foo(int);int foo(int a){return a;}' > conftest1.c
echo 'extern int foo(int); int main( int argc, char **argv){ return foo(0); }' > conftest2.c
if ${CC-cc} $CFLAGS -c conftest1.c >conftest.out 2>&1 ; then
    if ${AR-ar} cr libconftest.a conftest1.o >/dev/null 2>&1 ; then
        if ${RANLIB-:} libconftest.a >/dev/null 2>&1 ; then
	    # Anything less than sleep 10, and Mac OS/X (Darwin)
	    # will claim that install works because ranlib won't complain
	    sleep 10
	    libinstall="$INSTALL_DATA"
	    eval "libinstall=\"$libinstall\""
	    if ${libinstall} libconftest.a libconftest1.a  >/dev/null 2>&1 ; then
                if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest1.a >>conftest.out 2>&1 && test -x conftest ; then
		    # Success!  Install works
 	            ac_cv_prog_install_breaks_libs=no
	        else
	            # Failure!  Does install -p work?
		    rm -f libconftest1.a
		    if ${libinstall} -p libconftest.a libconftest1.a >/dev/null 2>&1 ; then
                        if ${CC-cc} $CFLAGS -o conftest conftest2.c $LDFLAGS libconftest1.a >>conftest.out 2>&1 && test -x conftest ; then
			# Success!  Install works
			    ac_cv_prog_install_breaks_libs="no, with -p"
			fi
		    fi
                fi
            fi
        fi
    fi
fi
rm -f conftest* libconftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_install_breaks_libs" >&5
echo "${ECHO_T}$ac_cv_prog_install_breaks_libs" >&6

if test -z "$RANLIB_AFTER_INSTALL" ; then
    RANLIB_AFTER_INSTALL=no
fi
case "$ac_cv_prog_install_breaks_libs" in
	yes)
	    RANLIB_AFTER_INSTALL=yes
	;;
	"no, with -p")
	    INSTALL_DATA="$INSTALL_DATA -p"
	;;
	*)
	# Do nothing
	:
	;;
esac


# We also need mkdir -p.

echo "$as_me:$LINENO: checking whether mkdir -p works" >&5
echo $ECHO_N "checking whether mkdir -p works... $ECHO_C" >&6
if test "${pac_cv_mkdir_p+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:$LINENO: result: $pac_cv_mkdir_p" >&5
echo "${ECHO_T}$pac_cv_mkdir_p" >&6
if test "$pac_cv_mkdir_p" = "yes" ; then
   MKDIR_P="mkdir -p"
   export MKDIR_P
else
   { echo "$as_me:$LINENO: WARNING: mkdir -p does not work; the install step may fail" >&5
echo "$as_me: WARNING: mkdir -p does not work; the install step may fail" >&2;}
fi



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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$MAKE"; then
  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_MAKE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
MAKE=$ac_cv_prog_MAKE
if test -n "$MAKE"; then
  echo "$as_me:$LINENO: result: $MAKE" >&5
echo "${ECHO_T}$MAKE" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$MAKE" && break
done

fi


echo "$as_me:$LINENO: checking whether clock skew breaks make" >&5
echo $ECHO_N "checking whether clock skew breaks make... $ECHO_C" >&6
if test "${pac_cv_prog_make_found_clock_skew+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:$LINENO: result: $pac_cv_prog_make_found_clock_skew" >&5
echo "${ECHO_T}$pac_cv_prog_make_found_clock_skew" >&6
if test "$pac_cv_prog_make_found_clock_skew" = "yes" ; then
    { echo "$as_me:$LINENO: WARNING: Clock skew found by make.  The configure and build may fail.
Consider building in a local instead of NFS filesystem." >&5
echo "$as_me: WARNING: Clock skew found by make.  The configure and build may fail.
Consider building in a local instead of NFS filesystem." >&2;}
fi


echo "$as_me:$LINENO: checking whether make supports include" >&5
echo $ECHO_N "checking whether make supports include... $ECHO_C" >&6
if test "${pac_cv_prog_make_include+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


rm -f conftest
cat > conftest <<.
ALL:
	@echo "success"
.
cat > conftest1 <<.
include conftest
.
pac_str=`$MAKE -f conftest1 2>&1`
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 "$as_me:$LINENO: result: $pac_cv_prog_make_include" >&5
echo "${ECHO_T}$pac_cv_prog_make_include" >&6
if test "$pac_cv_prog_make_include" = "no" ; then
    :
else
    :
fi


echo "$as_me:$LINENO: checking whether make allows comments in actions" >&5
echo $ECHO_N "checking whether make allows comments in actions... $ECHO_C" >&6
if test "${pac_cv_prog_make_allows_comments+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


rm -f conftest
cat > conftest <<.
SHELL=/bin/sh
ALL:
	@# This is a valid comment!
	@echo "success"
.
pac_str=`$MAKE -f conftest 2>&1`
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 "$as_me:$LINENO: result: $pac_cv_prog_make_allows_comments" >&5
echo "${ECHO_T}$pac_cv_prog_make_allows_comments" >&6
if test "$pac_cv_prog_make_allows_comments" = "no" ; then
    { echo "$as_me:$LINENO: 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." >&5
echo "$as_me: 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." >&2;}

fi



echo "$as_me:$LINENO: checking for virtual path format" >&5
echo $ECHO_N "checking for virtual path format... $ECHO_C" >&6
if test "${pac_cv_prog_make_vpath+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&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 "$as_me:$LINENO: result: $pac_cv_prog_make_vpath" >&5
echo "${ECHO_T}$pac_cv_prog_make_vpath" >&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 "$as_me:$LINENO: checking whether make sets CFLAGS" >&5
echo $ECHO_N "checking whether make sets CFLAGS... $ECHO_C" >&6
if test "${pac_cv_prog_make_set_cflags+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


rm -f conftest
cat > conftest <<EOF
SHELL=/bin/sh
ALL:
	@echo X\${CFLAGS}X
EOF
pac_str=`$MAKE -f conftest 2>&1`
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 "$as_me:$LINENO: result: $pac_cv_prog_make_set_cflags" >&5
echo "${ECHO_T}$pac_cv_prog_make_set_cflags" >&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 "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\_ACEOF
all:
	@echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 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 conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

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


#
# Check for bash to allow more robust shell scripts
# Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_BASH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $BASH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
BASH=$ac_cv_path_BASH

if test -n "$BASH"; then
  echo "$as_me:$LINENO: result: $BASH" >&5
echo "${ECHO_T}$BASH" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

#
# Confirm that bash has working arrays.  We can use this to
# build more robust versions of the scripts (particularly the
# compliation scripts) by taking advantage of the array features in
# bash.
bashWorks=no
if test -x "$BASH" ; then
    cat >>conftest <<EOF
#! /bin/bash
A[0]="b"
A[1]="c"
if test \${A[1]} != "c" ; then exit 1 ; fi
exit 0
EOF
    echo "$as_me:$LINENO: checking whether $BASH supports arrays" >&5
echo $ECHO_N "checking whether $BASH supports arrays... $ECHO_C" >&6
    chmod +x conftest
    if ./conftest 2>&1 >/dev/null ; then
        bashWorks=yes
    else
        bashWorks=no
    fi
    rm -f conftest*
    echo "$as_me:$LINENO: result: $bashWorks" >&5
echo "${ECHO_T}$bashWorks" >&6
fi
BUILD_BASH_SCRIPTS=no
if test "$bashWorks" = yes ; then
    BUILD_BASH_SCRIPTS=yes
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;enable_shared=no
fi;
CC_SHL=true
C_LINK_SHL=true
SHLIB_EXT=so
SHLIB_FROM_LO=no
SHLIB_INSTALL='$(INSTALL_PROGRAM)'
case "$enable_sharedlibs" in
    no|none)
    ;;
    gcc-osx|osx-gcc)
    echo "$as_me:$LINENO: result: Creating shared libraries using GNU for Mac OSX" >&5
echo "${ECHO_T}Creating shared libraries using GNU for Mac OSX" >&6
    C_LINK_SHL='${CC} -dynamiclib -undefined suppress -single_module -flat_namespace'
    CC_SHL='${CC} -fPIC'
    # No way in osx to specify the location of the shared libraries at link
    # time (see the code in createshlib in mpich2/src/util)
    C_LINKPATH_SHL=""
    SHLIB_EXT="dylib"
    enable_sharedlibs="osx-gcc"
    ;;
    gcc)
    echo "$as_me:$LINENO: result: Creating shared libraries using GNU" >&5
echo "${ECHO_T}Creating shared libraries using GNU" >&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>'
    # May need -fPIC
    CC_SHL='${CC} -fpic'
    C_LINKPATH_SHL="-Wl,-rpath -Wl,"
    # We need to test that this isn't osx.  The following is a
    # simple hack
    osname=`uname -s`
    case $osname in
        *Darwin*|*darwin*)
	{ { echo "$as_me:$LINENO: error: You must specify --enable-sharedlibs=osx-gcc for Mac OS/X" >&5
echo "$as_me: error: You must specify --enable-sharedlibs=osx-gcc for Mac OS/X" >&2;}
   { (exit 1); exit 1; }; }
        ;;
        *CYGWIN*|*cygwin*)
	{ { echo "$as_me:$LINENO: error: You must specify --enable-sharedlibs=cygwin-gcc for Cygwin" >&5
echo "$as_me: error: You must specify --enable-sharedlibs=cygwin-gcc for Cygwin" >&2;}
   { (exit 1); exit 1; }; }
	;;
	*SunOS*)
	{ { echo "$as_me:$LINENO: error: You must specify --enable-sharedlibs=solaris-gcc for Solaris with gcc" >&5
echo "$as_me: error: You must specify --enable-sharedlibs=solaris-gcc for Solaris with gcc" >&2;}
   { (exit 1); exit 1; }; }
	;;
    esac
    ;;

    cygwin|cygwin-gcc|gcc-cygwin)
    echo "$as_me:$LINENO: result: Creating shared libraries using GNU under CYGWIN" >&5
echo "${ECHO_T}Creating shared libraries using GNU under CYGWIN" >&6
    C_LINK_SHL='${CC} -shared'
    CC_SHL='${CC}'
    # DLL Libraries need to be in the user's path (!)
    C_LINKPATH_SHL=""
    SHLIB_EXT="dll"
    enable_sharedlibs="cygwin-gcc"
    ;;

    libtool)
    { { echo "$as_me:$LINENO: error: Creating shared libraries using libtool not yet supported" >&5
echo "$as_me: error: Creating shared libraries using libtool not yet supported" >&2;}
   { (exit 1); exit 1; }; }
    ;;
    solaris|solaris-cc)
    echo "$as_me:$LINENO: result: Creating shared libraries using Solaris" >&5
echo "${ECHO_T}Creating shared libraries using Solaris" >&6
    # pic32 is appropriate for both 32 and 64 bit Solaris
    C_LINK_SHL='${CC} -G -xcode=pic32'
    CC_SHL='${CC} -xcode=pic32'
    C_LINKPATH_SHL="-R"
    enable_sharedlibs="solaris-cc"
    ;;

    solaris-gcc)
    # This is the same as gcc, except for the C_LINKPATH_SHL
    echo "$as_me:$LINENO: result: Creating shared libraries using Solaris with gcc" >&5
echo "${ECHO_T}Creating shared libraries using Solaris with gcc" >&6
    C_LINK_SHL='${CC} -shared'
    CC_SHL='${CC} -fPIC'
    C_LINKPATH_SHL="-R"
    enable_sharedlibs="solaris-gcc"
    ;;

    linuxppc-xlc)
    # This is only the beginning of xlc support, thanks to andy@vpac.org
    CC_SHL='${CC} -qmkshrobj'
    C_LINKPATH_SHL="-Wl,-rpath -Wl,"
    C_LINK_SHL='${CC} -shared -qmkshrobj'
    # Note that the full line should be more like
    # $CLINKER -shared -qmkshrobj -Wl,-h,$libbase.$slsuffix -o ../shared/$libbase.$slsuffix *.o $OtherLibs
    # for the appropriate values of $libbase and $slsuffix
    # The -h name sets the name of the object; this is necessary to
    # ensure that the dynamic linker can find the proper shared library.
    ;;

    *)
    { { echo "$as_me:$LINENO: error: Unknown value $enable_sharedlibs for enable-sharedlibs.  Values should be gcc or osx-gcc" >&5
echo "$as_me: error: Unknown value $enable_sharedlibs for enable-sharedlibs.  Values should be gcc or osx-gcc" >&2;}
   { (exit 1); exit 1; }; }
    enable_sharedlibs=no
    ;;
esac







# We allow aliases for enable_sharedlibs, but after ARG_SHAREDLIBS,
# enable_sharedlibs contains the cannonical version
ENABLE_SHLIB="$enable_sharedlibs"
# Special restrictions for some shared libraries
# It is difficult to import/export symbols from some shared libraries, so
# in that case, we require PMPILIBNAME and MPILIBNAME be the same
case $ENABLE_SHLIB in
     cygwin-gcc)
	if test "$PMPILIBNAME_set" = "no" ; then
            # Rename PMPILIBNAME
            PMPILIBNAME=$MPILIBNAME
        else
            if test "$PMPILIBNAME" != "$MPILIBNAME" ; then
                { { echo "$as_me:$LINENO: error: The PMPI and MPI libraries must have the same name when building shared libraries of type $ENABLE_SHLIB" >&5
echo "$as_me: error: The PMPI and MPI libraries must have the same name when building shared libraries of type $ENABLE_SHLIB" >&2;}
   { (exit 1); exit 1; }; }
            fi
        fi
    ;;
esac


# Now that CC is defined, get these values
# eval C_LINK_SHL=$C_LINK_SHL
# eval CC_SHL=$CC_SHL
# Ensure that all subdir configures get the shared library items
export CC_SHL
export C_LINK_SHL
export C_LINKPATH_SHL
export ENABLE_SHLIB
export LIBTOOL

# ----------------------------------------------------------------------------
# At this point, we've finally settled on the value of PMPILIBNAME.  We
# can now set NEEDSPLIB.
if test "$NEEDSPLIB" = yes -a "$PMPILIBNAME" = "$MPILIBNAME" ; then
    NEEDSPLIB=no
fi
# Set the defaults for the Fortran libraries to be the same as the C libraries
if test -z "$MPIFLIBNAME" ; then
    MPIFLIBNAME=$MPILIBNAME
fi
if test -z "$PMPIFLIBNAME" ; then
    PMPIFLIBNAME=$PMPILIBNAME
fi

# ----------------------------------------------------------------------------
#
# Add the steps for debugger support
BUILD_TVDLL=no
if test "$enable_debuginfo" = "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
   # Also, we may want to put some of this into a configure in the debugger
   # directory
   if test "$ENABLE_SHLIB" != "none" ; then
        BUILD_TVDLL=yes
	CC_SHL_DBG="$CC_SHL"
	C_LINK_SHL_DBG="$C_LINK_SHL"
   else
        # Try to determine how to build the tv shared library
	echo "$as_me:$LINENO: checking for how to build shared library for debugger interface" >&5
echo $ECHO_N "checking for how to build shared library for debugger interface... $ECHO_C" >&6

pac_kinds=

    pac_prog=""
    # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_pac_prog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$pac_prog"; then
  ac_cv_prog_pac_prog="$pac_prog" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_pac_prog="yes"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_prog_pac_prog" && ac_cv_prog_pac_prog="no"
fi
fi
pac_prog=$ac_cv_prog_pac_prog
if test -n "$pac_prog"; then
  echo "$as_me:$LINENO: result: $pac_prog" >&5
echo "${ECHO_T}$pac_prog" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    if test "$pac_prog" = yes ; then pac_kinds=gcc ; fi
    pac_prog=""
    # Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_pac_prog+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$pac_prog"; then
  ac_cv_prog_pac_prog="$pac_prog" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_pac_prog="yes"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_prog_pac_prog" && ac_cv_prog_pac_prog="no"
fi
fi
pac_prog=$ac_cv_prog_pac_prog
if test -n "$pac_prog"; then
  echo "$as_me:$LINENO: result: $pac_prog" >&5
echo "${ECHO_T}$pac_prog" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    if test "$pac_prog" = yes ; then pac_kinds="$pac_kinds libtool" ; fi

for pac_arg in $pac_kinds ; do
    case $pac_arg in
    gcc)
    # For example, include the libname as ${LIBNAME_SHL}
    #C_LINK_SHL='${CC} -shared -Wl,-h,<finallibname>'
    pac_cc_sharedlibs='gcc -shared -fpic'
    pac_clink_sharedlibs='gcc -shared'
    ;;
    libtool)
    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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LIBTOOL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$LIBTOOL"; then
  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_LIBTOOL="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
LIBTOOL=$ac_cv_prog_LIBTOOL
if test -n "$LIBTOOL"; then
  echo "$as_me:$LINENO: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

    if test "$LIBTOOL" = "false" ; then
	{ echo "$as_me:$LINENO: WARNING: Could not find libtool" >&5
echo "$as_me: WARNING: Could not find libtool" >&2;}
    else
        # Likely to be
        # either CC or CC_SHL is libtool $cc
        pac_cc_sharedlibs'${LIBTOOL} -mode=compile ${CC}'
        pac_clink_sharedlibs='${LIBTOOL} -mode=link ${CC} -rpath ${libdir}'
    fi
    ;;
    *)
    ;;
    esac
    if test -n "$pac_cc_sharedlibs" ; then break ; fi
done
if test -z "$pac_cc_sharedlibs" ; then pac_cc_sharedlibs=true ; fi
if test -z "$pac_clink_sharedlibs" ; then pac_clink_sharedlibs=true ; fi
CC_SHL_DBG=$pac_cc_sharedlibs
C_LINK_SHL_DBG=$pac_clink_sharedlibs

	if test "$CC_SHL_DBG" = true ; then
	    echo "$as_me:$LINENO: result: none found" >&5
echo "${ECHO_T}none found" >&6
            { echo "$as_me:$LINENO: WARNING: Debugger support requires shared libraries" >&5
echo "$as_me: WARNING: Debugger support requires shared libraries" >&2;}
	else
	    echo "$as_me:$LINENO: result: $CC_SHL_DBG" >&5
echo "${ECHO_T}$CC_SHL_DBG" >&6
	    BUILD_TVDLL=yes
        fi
   fi
   # One more nasty problem.  Totalview relies on debugger symbols
   # being present in the executable.  Some experimental versions of
   # gcc (3.2 20020329 for ia64) do *not* include the object symbols
   # when debugging.  For HPUX, the necessary linking options are
   #    +noobjdebug
   # for C, Fortran, and C++.  We don't have a good test for this yet,
   # so we add a warning
   if test "$ac_cv_c_compiler_gnu" = "yes" ; then
       { echo "$as_me:$LINENO: WARNING: Some versions of gcc do not include debugging information
within the executable.  Totalview requires this information to detect
an MPICH code.  If you have trouble, try linking with the additional
option
    +noobjdebug
on all link lines (consider adding it to LDFLAGS)" >&5
echo "$as_me: WARNING: Some versions of gcc do not include debugging information
within the executable.  Totalview requires this information to detect
an MPICH code.  If you have trouble, try linking with the additional
option
    +noobjdebug
on all link lines (consider adding it to LDFLAGS)" >&2;}
   fi



fi
# ----------------------------------------------------------------------------

nameserv_name=""

#
# Get the default nameserver, if no nameserver was selected.  A process
# manager may advertise a nameserver name by setting the variable
# MPID_PM_NAMESERVER.
if test "$with_namepublisher" = "default" ; then
   if test -n "$MPID_PM_NAMESERVER" ; then
       with_namepublisher=$MPID_PM_NAMESERVER
   else
       # The default is to use a file to communicate published names
       with_namepublisher=file
   fi
fi

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 <<\_ACEOF
#define USE_LDAP_FOR_NAMEPUB 1
_ACEOF

	nameserv_name="ldap"
    ;;

    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 <<_ACEOF
#define FILE_NAMEPUB_BASEDIR $basedir
_ACEOF


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

    ;;

    mpd)
    nameserv_name="mpd"
    ;;

    *)
    # Check for a new namepublisher
    dir=$with_namepublisher
    # If we later need args, here is where we can strip them off of the
    # with argument
    if test -d "$use_top_srcdir/src/nameserv/$dir" ; then
        if test -x "$use_top_srcdir/src/nameserv/$dir/configure" ; then
	    # Run the configure in this directory if necessary
            subsystems="$subsystems src/nameserv/$dir"
        fi
	nameserv_name=$dir
    else
        { echo "$as_me:$LINENO: WARNING: Unknown name publisher $with_namepublisher" >&5
echo "$as_me: WARNING: Unknown name publisher $with_namepublisher" >&2;}
    fi
    ;;
    esac
fi
if test -n "$nameserv_name" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_NAMEPUB_SERVICE 1
_ACEOF

fi

# In case the documentation targets are used, find doctext and attempt to
# find the source for the doctext LaTeX style files.  Use "false" if
# doctext is not found
# Extract the first word of "doctext", so it can be a program name with args.
set dummy doctext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_DOCTEXT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DOCTEXT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DOCTEXT="$DOCTEXT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DOCTEXT="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  test -z "$ac_cv_path_DOCTEXT" && ac_cv_path_DOCTEXT="false"
  ;;
esac
fi
DOCTEXT=$ac_cv_path_DOCTEXT

if test -n "$DOCTEXT"; then
  echo "$as_me:$LINENO: result: $DOCTEXT" >&5
echo "${ECHO_T}$DOCTEXT" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test -n "$DOCTEXT" ; then
    if test -z "$DOCTEXTSYTLE" ; then
        echo "$as_me:$LINENO: checking for location of doctext style files" >&5
echo $ECHO_N "checking for location of doctext style files... $ECHO_C" >&6
        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 "$as_me:$LINENO: result: $DOCTEXTSTYLE" >&5
echo "${ECHO_T}$DOCTEXTSTYLE" >&6
        else
	    echo "$as_me:$LINENO: result: unavailable" >&5
echo "${ECHO_T}unavailable" >&6
        fi
    fi
fi
export DOCTEXT
export DOCTEXTSTYLE



# ----------------------------------------------------------------------------
# Check for C compiler characteristics
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* 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;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_c_const=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then

cat >>confdefs.h <<\_ACEOF
#define const
_ACEOF

fi


echo "$as_me:$LINENO: checking for volatile" >&5
echo $ECHO_N "checking for volatile... $ECHO_C" >&6
if test "${pac_cv_c_volatile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
volatile int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_volatile="yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_c_volatile="no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_c_volatile" >&5
echo "${ECHO_T}$pac_cv_c_volatile" >&6
if test "$pac_cv_c_volatile" = "no" ; then

cat >>confdefs.h <<\_ACEOF
#define volatile
_ACEOF

fi


echo "$as_me:$LINENO: checking for restrict" >&5
echo $ECHO_N "checking for restrict... $ECHO_C" >&6
if test "${pac_cv_c_restrict+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int * restrict a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_restrict="restrict"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_c_restrict="no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$pac_cv_c_restrict" = "no" ; then
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int * _Restrict a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_restrict="_Restrict"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_c_restrict="no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "$pac_cv_c_restrict" = "no" ; then
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
int * __restrict a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_restrict="__restrict"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_c_restrict="no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:$LINENO: result: $pac_cv_c_restrict" >&5
echo "${ECHO_T}$pac_cv_c_restrict" >&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 <<_ACEOF
#define restrict $restrict_val
_ACEOF

fi

echo "$as_me:$LINENO: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifndef __cplusplus
typedef int foo_t;
static $ac_kw foo_t static_foo () {return 0; }
$ac_kw foo_t foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6


case $ac_cv_c_inline in
  inline | yes) ;;
  *)
    case $ac_cv_c_inline in
      no) ac_val=;;
      *) ac_val=$ac_cv_c_inline;;
    esac
    cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus
#define inline $ac_val
#endif
_ACEOF
    ;;
esac




if test "$ac_cv_c_compiler_gnu" = "yes" ; then
    echo "$as_me:$LINENO: checking whether __attribute__ allowed" >&5
echo $ECHO_N "checking whether __attribute__ allowed... $ECHO_C" >&6
if test "${pac_cv_gnu_attr_pure+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
int foo(int) __attribute__ ((pure));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_gnu_attr_pure=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_gnu_attr_pure=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_gnu_attr_pure" >&5
echo "${ECHO_T}$pac_cv_gnu_attr_pure" >&6
echo "$as_me:$LINENO: checking whether __attribute__((format)) allowed" >&5
echo $ECHO_N "checking whether __attribute__((format)) allowed... $ECHO_C" >&6
if test "${pac_cv_gnu_attr_format+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
int foo(char *,...) __attribute__ ((format(printf,1,2)));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_gnu_attr_format=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_gnu_attr_format=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_gnu_attr_format" >&5
echo "${ECHO_T}$pac_cv_gnu_attr_format" >&6
    if test "$pac_cv_gnu_attr_pure" = "yes" -a "$pac_cv_gnu_attr_format" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_GCC_ATTRIBUTE 1
_ACEOF

    fi
fi


# We only need this test if we are using Fortran
if test "$enable_f77" ; then

echo "$as_me:$LINENO: checking whether C compiler allows unaligned doubles" >&5
echo $ECHO_N "checking whether C compiler allows unaligned doubles... $ECHO_C" >&6
if test "${pac_cv_prog_c_unaligned_doubles+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_prog_c_unaligned_doubles="unknown"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

void fetch_double( v )
double *v;
{
*v = 1.0;
}
int main( argc, argv )
int argc;
char **argv;
{
int p[4];
double *p_val;
fetch_double( (double *)&(p[0]) );
p_val = (double *)&(p[0]);
if (*p_val != 1.0) return 1;
fetch_double( (double *)&(p[1]) );
p_val = (double *)&(p[1]);
if (*p_val != 1.0) return 1;
return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_prog_c_unaligned_doubles="yes"
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_prog_c_unaligned_doubles="no"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $pac_cv_prog_c_unaligned_doubles" >&5
echo "${ECHO_T}$pac_cv_prog_c_unaligned_doubles" >&6

if test "X$pac_cv_prog_c_unaligned_doubles" = "no" ; then
{ echo "$as_me:$LINENO: WARNING: Your C compiler $CC does not support unaligned accesses
to doubles.  This is required for interoperation with
Fortran (the Fortran standard requires it).
You may need to specify an additional argument to your C compiler to
force it to allow unaligned accesses." >&5
echo "$as_me: WARNING: Your C compiler $CC does not support unaligned accesses
to doubles.  This is required for interoperation with
Fortran (the Fortran standard requires it).
You may need to specify an additional argument to your C compiler to
force it to allow unaligned accesses." >&2;}
fi


fi

# ----------------------------------------------------------------------------
# Attempt to support dependency handling
# ----------------------------------------------------------------------------
# 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=default
fi;
#
#
if test -z "$enable_dependencies" ; then
   enable_dependencies=default
fi
if test "$enable_dependencies" = "default" ; then
    # Try to use gcc if available
    enable_dependencies=no
    if test "$ac_cv_c_compiler_gnu" != "yes" ; then
         # See if gcc is available
	 for ac_prog in gcc
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 "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_GCC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$GCC"; then
  ac_cv_prog_GCC="$GCC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_GCC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
GCC=$ac_cv_prog_GCC
if test -n "$GCC"; then
  echo "$as_me:$LINENO: result: $GCC" >&5
echo "${ECHO_T}$GCC" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$GCC" && break
done

	 if test -n "$GCC" ; then
	     enable_dependencies=gcc
         else
	     # Try for another form, based on the stock compiler on the
	     # given system
	     ostype=`uname -s`
	     case "$ostype" in
	         SunOS)
		 enable_dependencies=solaris
		 ;;
	         *)
		 # Unrecognized; ignore
		 ;;
	     esac
         fi
    else
	enable_dependencies=gcc
    fi
    # We use this to indicate that we use gcc for dependencies,
    # even if a different compiler (e.g., pgcc) is selected for
    # compiling the code.  This will normally be adequate, even
    # if gcc points to different system header files, we're really
    # only interested in dependencies on the MPICH2 source files.
    if test "$enable_dependencies" = "gcc" ; then
        echo "$as_me:$LINENO: result: Using gcc to determine dependencies" >&5
echo "${ECHO_T}Using gcc to determine dependencies" >&6
    fi
fi
if test "$enable_dependencies" != "no" ; then
   case "$enable_dependencies" in
   gcc|yes)
        # Ensure that the profiling libraries get their targets into
	# the files.  Use -MMD if you want the file in the build directory
	# instead of a subdirectory
        MAKE_DEPEND_C="gcc -MM"
    ;;
    solaris)
        # At least some Solaris SunPro compilers accept -xM1 -MT name, though
	# they ignore the -MT name argument.
        MAKE_DEPEND_C="cc -xM1"
    ;;
    *)
        echo "$as_me:$LINENO: result: Using $enable_dependencies for MAKE_DEPEND_C" >&5
echo "${ECHO_T}Using $enable_dependencies for MAKE_DEPEND_C" >&6
        MAKE_DEPEND_C="$enable_dependencies"
    ;;
    esac
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.  In addition, allow the device to suppress support for these
# optional C types by setting MPID_NO_LONG_DOUBLE and/or MPID_NO_LONG_LONG
# to yes.
if test "$MPID_NO_LONG_DOUBLE" != "yes" ; then
    echo "$as_me:$LINENO: checking whether long double is supported" >&5
echo $ECHO_N "checking whether long double is supported... $ECHO_C" >&6
if test "${pac_cv_have_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
long double a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_have_long_double=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_have_long_double=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_have_long_double" >&5
echo "${ECHO_T}$pac_cv_have_long_double" >&6
    if test "$pac_cv_have_long_double" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_DOUBLE 1
_ACEOF

    fi
fi
if test "$MPID_NO_LONG_LONG" != "yes" ; then
    echo "$as_me:$LINENO: checking whether long long is supported" >&5
echo $ECHO_N "checking whether long long is supported... $ECHO_C" >&6
if test "${pac_cv_have_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
long long a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_have_long_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_have_long_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_have_long_long" >&5
echo "${ECHO_T}$pac_cv_have_long_long" >&6
    if test "$pac_cv_have_long_long" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_LONG_INT 1
_ACEOF

    fi
fi
# ----------------------------------------------------------------------------
# Get default structure alignment for integers

echo "$as_me:$LINENO: checking for max C struct integer alignment" >&5
echo $ECHO_N "checking for max C struct integer alignment... $ECHO_C" >&6
if test "${pac_cv_c_max_integer_align+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_max_integer_align="$CROSS_STRUCT_INT_ALIGN"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
    struct { char a; int b; } char_int;
    struct { char a; short b; } char_short;
    struct { char a; long b; } char_long;
    struct { char a; int b; char c; } char_int_char;
    struct { char a; short b; char c; } char_short_char;
#ifdef HAVE_LONG_LONG_INT
    struct { long long int a; char b; } lli_c;
    struct { char a; long long int b; } c_lli;
#endif
    int size, extent, extent2;

    /* assume max integer alignment isn't 8 if we don't have
     * an eight-byte value :)
     */
    if (sizeof(int) < 8 && sizeof(long) < 8) is_eight = 0;

    size = sizeof(char) + sizeof(int);
    extent = sizeof(char_int);
    if (size != extent) is_packed = 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 % 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 % 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);

#ifdef HAVE_LONG_LONG_INT
    size = sizeof(char) + sizeof(long long int);
    extent = sizeof(lli_c);
    extent2 = sizeof(c_lli);
    if (size != extent) is_packed = 0;
    if ( (extent % 2) != 0 && (extent2 % 2) != 0) is_two = 0;
    if ( (extent % 4) != 0 && (extent2 % 4) != 0) is_four = 0;
    if (sizeof(long long int) >= 8 && (extent % 8) != 0 && (extent2 % 8) != 0)
	is_eight = 0;
#endif

    size = sizeof(char) + sizeof(int) + sizeof(char);
    extent = sizeof(char_int_char);
    if (size != extent) is_packed = 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);

    size = sizeof(char) + sizeof(short) + sizeof(char);
    extent = sizeof(char_short_char);
    if (size != extent) is_packed = 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;

    /* Tabulate the results */
    cf = fopen( "ctest.out", "w" );
    if (is_packed + is_two + is_four + is_eight == 0) {
	fprintf( cf, "Could not determine alignment\n" );
    }
    else {
	if (is_packed + is_two + is_four + is_eight != 1) {
	    fprintf( cf, "error!\n" );
	}
	else {
	    if (is_packed) fprintf( cf, "packed\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;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_max_integer_align=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_max_integer_align="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_max_integer_align" >&5
echo "${ECHO_T}$pac_cv_c_max_integer_align" >&6
if test -z "$pac_cv_c_max_integer_align" ; then
    pac_cv_c_max_integer_align="unknown"
fi


if test "$pac_cv_c_max_integer_align" = "packed" ; then
    pac_cv_c_struct_align_nr=1
elif test "$pac_cv_c_max_integer_align" = "two" ; then
    pac_cv_c_struct_align_nr=2
elif test "$pac_cv_c_max_integer_align" = "four" ; then
    pac_cv_c_struct_align_nr=4
elif test "$pac_cv_c_max_integer_align" = "eight" ; then
    pac_cv_c_struct_align_nr=8
elif test "$pac_cv_c_max_integer_align" = "largest" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_LARGEST_STRUCT_ALIGNMENT 1
_ACEOF

fi

if test -n "$pac_cv_c_struct_align_nr" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_MAX_INTEGER_ALIGNMENT $pac_cv_c_struct_align_nr
_ACEOF


cat >>confdefs.h <<_ACEOF
#define HAVE_MAX_STRUCT_ALIGNMENT $pac_cv_c_struct_align_nr
_ACEOF

fi
# Get default structure alignment for floating point types

echo "$as_me:$LINENO: checking for max C struct floating point alignment" >&5
echo $ECHO_N "checking for max C struct floating point alignment... $ECHO_C" >&6
if test "${pac_cv_c_max_fp_align+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_max_fp_align="$CROSS_STRUCT_FP_ALIGN"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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_sixteen = 1;
    struct { char a; float b; } char_float;
    struct { float b; char a; } float_char;
    struct { char a; double b; } char_double;
    struct { double b; char a; } double_char;
#ifdef HAVE_LONG_DOUBLE
    struct { char a; long double b; } char_long_double;
    struct { long double b; char a; } long_double_char;
    struct { long double a; int b; char c; } long_double_int_char;
#endif
    int size, extent1, extent2;

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

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

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

    extent1 = sizeof(long_double_int_char);
    if ( (extent1 % 2) != 0) is_two = 0;
    if ( (extent1 % 4) != 0) is_four = 0;
    if (sizeof(long double) >= 8 && (extent1 % 8) != 0)	is_eight = 0;
    if (sizeof(long double) > 8 && (extent1 % 16) != 0) is_sixteen = 0;
#else
    is_sixteen = 0;
#endif

    if (is_sixteen) { is_eight = 0; is_four = 0; is_two = 0; }

    if (is_eight) { is_four = 0; is_two = 0; }

    if (is_four) is_two = 0;

    /* Tabulate the results */
    cf = fopen( "ctest.out", "w" );
    if (is_packed + is_two + is_four + is_eight + is_sixteen == 0) {
	fprintf( cf, "Could not determine alignment\n" );
    }
    else {
	if (is_packed + is_two + is_four + is_eight + is_sixteen != 1) {
	    fprintf( cf, "error!\n" );
	}
	else {
	    if (is_packed) fprintf( cf, "packed\n" );
	    if (is_two) fprintf( cf, "two\n" );
	    if (is_four) fprintf( cf, "four\n" );
	    if (is_eight) fprintf( cf, "eight\n" );
	    if (is_sixteen) fprintf( cf, "sixteen\n" );
	}
    }
    fclose( cf );
    return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_max_fp_align=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_max_fp_align="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_max_fp_align" >&5
echo "${ECHO_T}$pac_cv_c_max_fp_align" >&6
if test -z "$pac_cv_c_max_fp_align" ; then
    pac_cv_c_max_fp_align="unknown"
fi


if test "$pac_cv_c_max_fp_align" = "packed" ; then
    pac_cv_c_fp_align_nr=1
elif test "$pac_cv_c_max_fp_align" = "two" ; then
    pac_cv_c_fp_align_nr=2
elif test "$pac_cv_c_max_fp_align" = "four" ; then
    pac_cv_c_fp_align_nr=4
elif test "$pac_cv_c_max_fp_align" = "eight" ; then
    pac_cv_c_fp_align_nr=8
elif test "$pac_cv_c_max_fp_align" = "sixteen" ; then
    pac_cv_c_fp_align_nr=16
elif test "$pac_cv_c_max_fp_align" = "largest" ; then
    { { echo "$as_me:$LINENO: error: Configure detected unsupported structure alignment rules.  Please email mpich2-maint@mcs.anl.gov with complete configure output and information on architecture." >&5
echo "$as_me: error: Configure detected unsupported structure alignment rules.  Please email mpich2-maint@mcs.anl.gov with complete configure output and information on architecture." >&2;}
   { (exit 1); exit 1; }; }
fi

if test -n "$pac_cv_c_fp_align_nr" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_MAX_FP_ALIGNMENT $pac_cv_c_fp_align_nr
_ACEOF

fi

# Test for the alignment of structs containing only long doubles.
if test "$pac_cv_have_long_double" = yes ; then
    # Check for alignment of just float and double (no long doubles)

echo "$as_me:$LINENO: checking for max C struct alignment of structs with doubles" >&5
echo $ECHO_N "checking for max C struct alignment of structs with doubles... $ECHO_C" >&6
if test "${pac_cv_c_max_double_fp_align+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_max_double_fp_align="$CROSS_STRUCT_FP_ALIGN"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
    struct { char a; float b; } char_float;
    struct { float b; char a; } float_char;
    struct { char a; double b; } char_double;
    struct { double b; char a; } double_char;
    int size, extent1, extent2;

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

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

    if (is_eight) { is_four = 0; is_two = 0; }

    if (is_four) is_two = 0;

    /* Tabulate the results */
    cf = fopen( "ctest.out", "w" );
    if (is_packed + is_two + is_four + is_eight == 0) {
	fprintf( cf, "Could not determine alignment\n" );
    }
    else {
	if (is_packed + is_two + is_four + is_eight != 1) {
	    fprintf( cf, "error!\n" );
	}
	else {
	    if (is_packed) fprintf( cf, "packed\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;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_max_double_fp_align=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_max_double_fp_align="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_max_double_fp_align" >&5
echo "${ECHO_T}$pac_cv_c_max_double_fp_align" >&6
if test -z "$pac_cv_c_max_double_fp_align" ; then
    pac_cv_c_max_double_fp_align="unknown"
fi


echo "$as_me:$LINENO: checking for max C struct floating point alignment with long doubles" >&5
echo $ECHO_N "checking for max C struct floating point alignment with long doubles... $ECHO_C" >&6
if test "${pac_cv_c_max_longdouble_fp_align+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_max_longdouble_fp_align="$CROSS_STRUCT_LONGDOUBLE_FP_ALIGN"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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_sixteen = 1;
    struct { char a; long double b; } char_long_double;
    struct { long double b; char a; } long_double_char;
    struct { long double a; int b; char c; } long_double_int_char;
    int size, extent1, extent2;

    size = sizeof(char) + sizeof(long double);
    extent1 = sizeof(char_long_double);
    extent2 = sizeof(long_double_char);
    if (size != extent1) is_packed = 0;
    if ( (extent1 % 2) != 0 && (extent2 % 2) != 0) is_two = 0;
    if ( (extent1 % 4) != 0 && (extent2 % 4) != 0) is_four = 0;
    if (sizeof(long double) >= 8 && (extent1 % 8) != 0 && (extent2 % 8) != 0)
	is_eight = 0;
    if (sizeof(long double) > 8 && (extent1 % 16) != 0
	&& (extent2 % 16) != 0) is_sixteen = 0;
    DBG("char_long-double",size,extent1);

    extent1 = sizeof(long_double_int_char);
    if ( (extent1 % 2) != 0) is_two = 0;
    if ( (extent1 % 4) != 0) is_four = 0;
    if (sizeof(long double) >= 8 && (extent1 % 8) != 0)	is_eight = 0;
    if (sizeof(long double) > 8 && (extent1 % 16) != 0) is_sixteen = 0;

    if (is_sixteen) { is_eight = 0; is_four = 0; is_two = 0; }

    if (is_eight) { is_four = 0; is_two = 0; }

    if (is_four) is_two = 0;

    /* Tabulate the results */
    cf = fopen( "ctest.out", "w" );
    if (is_packed + is_two + is_four + is_eight + is_sixteen == 0) {
	fprintf( cf, "Could not determine alignment\n" );
    }
    else {
	if (is_packed + is_two + is_four + is_eight + is_sixteen != 1) {
	    fprintf( cf, "error!\n" );
	}
	else {
	    if (is_packed) fprintf( cf, "packed\n" );
	    if (is_two) fprintf( cf, "two\n" );
	    if (is_four) fprintf( cf, "four\n" );
	    if (is_eight) fprintf( cf, "eight\n" );
	    if (is_sixteen) fprintf( cf, "sixteen\n" );
	}
    }
    fclose( cf );
    return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_max_longdouble_fp_align=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_max_longdouble_fp_align="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_max_longdouble_fp_align" >&5
echo "${ECHO_T}$pac_cv_c_max_longdouble_fp_align" >&6
if test -z "$pac_cv_c_max_longdouble_fp_align" ; then
    pac_cv_c_max_longdouble_fp_align="unknown"
fi

    # FIXME: If this alignment is not the same as that for all float types,
    # we need to do something else in the alignment rule code.
    if test "$pac_cv_c_max_fp_align" != "$pac_cv_c_max_longdouble_fp_align" -o \
            "$pac_cv_c_max_fp_align" != "$pac_cv_c_max_double_fp_align" ; then
        { echo "$as_me:$LINENO: WARNING: Structures containing long doubles may be aligned differently from structures with floats or longs.  MPICH2 does not handle this case automatically and you should avoid assumed extents for structures containing float types." >&5
echo "$as_me: WARNING: Structures containing long doubles may be aligned differently from structures with floats or longs.  MPICH2 does not handle this case automatically and you should avoid assumed extents for structures containing float types." >&2;}

	double_align=-1
	case $pac_cv_c_max_double_fp_align in
	packed) double_align=1 ;;
	two)    double_align=2 ;;
	four)   double_align=4 ;;
	eight)  double_align=8 ;;
	esac
	longdouble_align=-1
	case $pac_cv_c_max_longdouble_fp_align in
	packed) longdouble_align=1 ;;
	two)    longdouble_align=2 ;;
	four)   longdouble_align=4 ;;
	eight)  longdouble_align=8 ;;
	sixteen)longdouble_align=16 ;;
	esac


cat >>confdefs.h <<_ACEOF
#define HAVE_MAX_DOUBLE_FP_ALIGNMENT $double_align
_ACEOF


cat >>confdefs.h <<_ACEOF
#define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT $longdouble_align
_ACEOF

    fi
fi

# Test for weird struct alignment rules that vary padding based on
# size of leading type only.

echo "$as_me:$LINENO: checking if alignment of structs with doubles is based on position" >&5
echo $ECHO_N "checking if alignment of structs with doubles is based on position... $ECHO_C" >&6
if test "${pac_cv_c_double_pos_align+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_double_pos_align="$CROSS_DOUBLE_POS_ALIGN"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <stdio.h>
#define DBG(a,b,c)
int main( int argc, char *argv[] )
{
    FILE *cf;
    int padding_varies_by_pos = 0;
    struct { char a; double b; } char_double;
    struct { double b; char a; } double_char;
    int extent1, extent2;

    extent1 = sizeof(char_double);
    extent2 = sizeof(double_char);
    if (extent1 != extent2) padding_varies_by_pos = 1;

    cf = fopen( "ctest.out", "w" );
    if (padding_varies_by_pos) fprintf( cf, "yes\n" );
    else fprintf( cf, "no\n" );

    fclose( cf );
    return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_double_pos_align=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_double_pos_align="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_double_pos_align" >&5
echo "${ECHO_T}$pac_cv_c_double_pos_align" >&6
if test -z "$pac_cv_c_double_pos_align" ; then
    pac_cv_c_double_pos_align="unknown"
fi

if test "$pac_cv_c_double_pos_align" = "yes" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_DOUBLE_POS_ALIGNMENT 1
_ACEOF

fi

# Test for same weird issues with long long int.

echo "$as_me:$LINENO: checking if alignment of structs with long long ints is based on position" >&5
echo $ECHO_N "checking if alignment of structs with long long ints is based on position... $ECHO_C" >&6
if test "${pac_cv_c_llint_pos_align+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_llint_pos_align="$CROSS_LLINT_POS_ALIGN"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <stdio.h>
#define DBG(a,b,c)
int main( int argc, char *argv[] )
{
    FILE *cf;
    int padding_varies_by_pos = 0;
#ifdef HAVE_LONG_LONG_INT
    struct { char a; long long int b; } char_llint;
    struct { long long int b; char a; } llint_char;
    int extent1, extent2;

    extent1 = sizeof(char_llint);
    extent2 = sizeof(llint_char);
    if (extent1 != extent2) padding_varies_by_pos = 1;
#endif

    cf = fopen( "ctest.out", "w" );
    if (padding_varies_by_pos) fprintf( cf, "yes\n" );
    else fprintf( cf, "no\n" );

    fclose( cf );
    return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_llint_pos_align=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_llint_pos_align="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_llint_pos_align" >&5
echo "${ECHO_T}$pac_cv_c_llint_pos_align" >&6
if test -z "$pac_cv_c_llint_pos_align" ; then
    pac_cv_c_llint_pos_align="unknown"
fi

if test "$pac_cv_c_llint_pos_align" = "yes" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_LLINT_POS_ALIGNMENT 1
_ACEOF

fi

# Test for double alignment not following all our other carefully constructed rules

echo "$as_me:$LINENO: checking if double alignment breaks rules, find actual alignment" >&5
echo $ECHO_N "checking if double alignment breaks rules, find actual alignment... $ECHO_C" >&6
if test "${pac_cv_c_double_alignment_exception+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_c_double_alignment_exception="$CROSS_DOUBLE_ALIGNMENT_EXCEPTION"
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <stdio.h>
#define DBG(a,b,c)
int main( int argc, char *argv[] )
{
    FILE *cf;
    struct { char a; double b; } char_double;
    struct { double b; char a; } double_char;
    int extent1, extent2, align_4 = 0;

    extent1 = sizeof(char_double);
    extent2 = sizeof(double_char);

    /* we're interested in the largest value, will let separate test
     * deal with position-based issues.
     */
    if (extent1 < extent2) extent1 = extent2;
    if ((sizeof(double) == 8) && (extent1 % 8) != 0) {
       if (extent1 % 4 == 0) {
#ifdef HAVE_MAX_FP_ALIGNMENT
          if (HAVE_MAX_FP_ALIGNMENT >= 8) align_4 = 1;
#else
          align_4 = 1;
#endif
       }
    }

    cf = fopen( "ctest.out", "w" );

    if (align_4) fprintf( cf, "four\n" );
    else fprintf( cf, "no\n" );

    fclose( cf );
    return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_double_alignment_exception=`cat ctest.out`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_c_double_alignment_exception="unknown"
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f ctest.out

fi
echo "$as_me:$LINENO: result: $pac_cv_c_double_alignment_exception" >&5
echo "${ECHO_T}$pac_cv_c_double_alignment_exception" >&6
if test -z "$pac_cv_c_double_alignment_exception" ; then
    pac_cv_c_double_alignment_exception="unknown"
fi

if test "$pac_cv_c_double_alignment_exception" = "four" ; then

cat >>confdefs.h <<_ACEOF
#define HAVE_DOUBLE_ALIGNMENT_EXCEPTION 4
_ACEOF

fi

# Test whether pointers can be aligned on a int boundary or require
# a pointer boundary.
echo "$as_me:$LINENO: checking for alignment restrictions on pointers" >&5
echo $ECHO_N "checking for alignment restrictions on pointers... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  pac_cv_pointers_have_int_alignment=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;

}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_pointers_have_int_alignment=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_pointers_have_int_alignment=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

if test "$pac_cv_pointers_have_int_alignment" != "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define NEEDS_POINTER_ALIGNMENT_ADJUST 1
_ACEOF

   echo "$as_me:$LINENO: result: pointer" >&5
echo "${ECHO_T}pointer" >&6
else
   echo "$as_me:$LINENO: result: int or better" >&5
echo "${ECHO_T}int or better" >&6
fi

# Get the size of the C types for encoding in the basic datatypes and for
# the specific-sized integers
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    then ac_cv_prog_egrep='grep -E'
    else ac_cv_prog_egrep='egrep'
    fi
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
 EGREP=$ac_cv_prog_egrep


echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "memchr" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "free" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
		   (('a' <= (c) && (c) <= 'i') \
		     || ('j' <= (c) && (c) <= 'r') \
		     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then

cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF

fi

# On IRIX 5.3, sys/types and inttypes.h are conflicting.









for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
		  inttypes.h stdint.h unistd.h
do
ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 13052 "configure"
#include "confdefs.h"
#include <$ac_header>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done


echo "$as_me:$LINENO: checking for char" >&5
echo $ECHO_N "checking for char... $ECHO_C" >&6
if test "${ac_cv_type_char+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((char *) 0)
  return 0;
if (sizeof (char))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_char=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_char=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
echo "${ECHO_T}$ac_cv_type_char" >&6

echo "$as_me:$LINENO: checking size of char" >&5
echo $ECHO_N "checking size of char... $ECHO_C" >&6
if test "${ac_cv_sizeof_char+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_char" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_char=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (char)); }
unsigned long ulongval () { return (long) (sizeof (char)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (char))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (char))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (char))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_char=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (char), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_char=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
echo "${ECHO_T}$ac_cv_sizeof_char" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF


echo "$as_me:$LINENO: checking for short" >&5
echo $ECHO_N "checking for short... $ECHO_C" >&6
if test "${ac_cv_type_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((short *) 0)
  return 0;
if (sizeof (short))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_short=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_short=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
echo "${ECHO_T}$ac_cv_type_short" >&6

echo "$as_me:$LINENO: checking size of short" >&5
echo $ECHO_N "checking size of short... $ECHO_C" >&6
if test "${ac_cv_sizeof_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_short" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_short=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (short)); }
unsigned long ulongval () { return (long) (sizeof (short)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (short))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (short))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (short))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_short=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_short=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
echo "${ECHO_T}$ac_cv_sizeof_short" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF


echo "$as_me:$LINENO: checking for int" >&5
echo $ECHO_N "checking for int... $ECHO_C" >&6
if test "${ac_cv_type_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((int *) 0)
  return 0;
if (sizeof (int))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_int=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_int=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "$as_me:$LINENO: checking size of int" >&5
echo $ECHO_N "checking size of int... $ECHO_C" >&6
if test "${ac_cv_sizeof_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_int" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_int=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (int)); }
unsigned long ulongval () { return (long) (sizeof (int)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (int))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (int))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (int))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_int=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_int=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF


echo "$as_me:$LINENO: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6
if test "${ac_cv_type_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((long *) 0)
  return 0;
if (sizeof (long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6

echo "$as_me:$LINENO: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long)); }
unsigned long ulongval () { return (long) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


echo "$as_me:$LINENO: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${ac_cv_type_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((long long *) 0)
  return 0;
if (sizeof (long long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
echo "${ECHO_T}$ac_cv_type_long_long" >&6

echo "$as_me:$LINENO: checking size of long long" >&5
echo $ECHO_N "checking size of long long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_long" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long long)); }
unsigned long ulongval () { return (long) (sizeof (long long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long long))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long long))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long long))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_long=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF


echo "$as_me:$LINENO: checking for float" >&5
echo $ECHO_N "checking for float... $ECHO_C" >&6
if test "${ac_cv_type_float+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((float *) 0)
  return 0;
if (sizeof (float))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_float=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_float=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
echo "${ECHO_T}$ac_cv_type_float" >&6

echo "$as_me:$LINENO: checking size of float" >&5
echo $ECHO_N "checking size of float... $ECHO_C" >&6
if test "${ac_cv_sizeof_float+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_float" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_float=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (float)); }
unsigned long ulongval () { return (long) (sizeof (float)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (float))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (float))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (float))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_float=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (float), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_float=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
echo "${ECHO_T}$ac_cv_sizeof_float" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
_ACEOF


echo "$as_me:$LINENO: checking for double" >&5
echo $ECHO_N "checking for double... $ECHO_C" >&6
if test "${ac_cv_type_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((double *) 0)
  return 0;
if (sizeof (double))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_double=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_double=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
echo "${ECHO_T}$ac_cv_type_double" >&6

echo "$as_me:$LINENO: checking size of double" >&5
echo $ECHO_N "checking size of double... $ECHO_C" >&6
if test "${ac_cv_sizeof_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_double" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_double=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (double)); }
unsigned long ulongval () { return (long) (sizeof (double)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (double))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (double))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (double))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_double=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_double=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
echo "${ECHO_T}$ac_cv_sizeof_double" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
_ACEOF


echo "$as_me:$LINENO: checking for long double" >&5
echo $ECHO_N "checking for long double... $ECHO_C" >&6
if test "${ac_cv_type_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((long double *) 0)
  return 0;
if (sizeof (long double))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_double=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long_double=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
echo "${ECHO_T}$ac_cv_type_long_double" >&6

echo "$as_me:$LINENO: checking size of long double" >&5
echo $ECHO_N "checking size of long double... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_double+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_double" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long_double=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long double)); }
unsigned long ulongval () { return (long) (sizeof (long double)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long double))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long double))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long double))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_double=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long double), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_double=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
_ACEOF


echo "$as_me:$LINENO: checking for wchar_t" >&5
echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
if test "${ac_cv_type_wchar_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((wchar_t *) 0)
  return 0;
if (sizeof (wchar_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_wchar_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_wchar_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
echo "${ECHO_T}$ac_cv_type_wchar_t" >&6

echo "$as_me:$LINENO: checking size of wchar_t" >&5
echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
if test "${ac_cv_sizeof_wchar_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_wchar_t" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_wchar_t=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (wchar_t), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (wchar_t)); }
unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (wchar_t))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (wchar_t))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (wchar_t))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_wchar_t=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (wchar_t), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_wchar_t=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
_ACEOF


# wchar_t is sometimes defined in stddef.h.  If we got a zero for its
# size, and we have stddef.h, try again with an explicit test
if test "$ac_cv_sizeof_wchar_t" = 0 ; then
    # See if we have stddef

for ac_header in stddef.h
do
ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 16800 "configure"
#include "confdefs.h"
#include <$ac_header>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done

    if test "$ac_cv_header_stddef_h" = yes ; then
        # Do not use cache check since we don't want to use
	# any cached value
	echo "$as_me:$LINENO: checking for sizeof wchar_t" >&5
echo $ECHO_N "checking for sizeof wchar_t... $ECHO_C" >&6
        rm -f conftestval
        if test "$cross_compiling" = yes; then
  ac_cv_sizeof_wchar_t=$CROSS_SIZEOF_WCHAR_T
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <stddef.h>
main()
{
  wchar_t a;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_wchar_t=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_sizeof_wchar_t=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
        echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
        rm -f conftestval
    fi
fi
echo "$as_me:$LINENO: checking for void *" >&5
echo $ECHO_N "checking for void *... $ECHO_C" >&6
if test "${ac_cv_type_void_p+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((void * *) 0)
  return 0;
if (sizeof (void *))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_void_p=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_void_p=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
echo "${ECHO_T}$ac_cv_type_void_p" >&6

echo "$as_me:$LINENO: checking size of void *" >&5
echo $ECHO_N "checking size of void *... $ECHO_C" >&6
if test "${ac_cv_sizeof_void_p+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_void_p" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_void_p=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (void *), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (void *)); }
unsigned long ulongval () { return (long) (sizeof (void *)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (void *))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (void *))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (void *))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_void_p=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (void *), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_void_p=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF



rm -f conftestval
echo "$as_me:$LINENO: checking for size of float int" >&5
echo $ECHO_N "checking for size of float int... $ECHO_C" >&6
if test "${pac_cv_sizeof_float_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_float_int=$CROSS_SIZEOF_FLOAT_INT
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
main()
{
  float a;
  int b;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a) + sizeof(b));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_float_int=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_float_int=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

if test "X$pac_cv_sizeof_float_int" = "X" ; then
    # We have a problem.  The test returned a zero status, but no output,
    # or we're cross-compiling (or think we are) and have no value for
    # this object
    :
fi
rm -f conftestval
echo "$as_me:$LINENO: result: $pac_cv_sizeof_float_int" >&5
echo "${ECHO_T}$pac_cv_sizeof_float_int" >&6



rm -f conftestval
echo "$as_me:$LINENO: checking for size of double int" >&5
echo $ECHO_N "checking for size of double int... $ECHO_C" >&6
if test "${pac_cv_sizeof_double_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_double_int=$CROSS_SIZEOF_DOUBLE_INT
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
main()
{
  double a;
  int b;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a) + sizeof(b));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_double_int=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_double_int=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

if test "X$pac_cv_sizeof_double_int" = "X" ; then
    # We have a problem.  The test returned a zero status, but no output,
    # or we're cross-compiling (or think we are) and have no value for
    # this object
    :
fi
rm -f conftestval
echo "$as_me:$LINENO: result: $pac_cv_sizeof_double_int" >&5
echo "${ECHO_T}$pac_cv_sizeof_double_int" >&6



rm -f conftestval
echo "$as_me:$LINENO: checking for size of long int" >&5
echo $ECHO_N "checking for size of long int... $ECHO_C" >&6
if test "${pac_cv_sizeof_long_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_long_int=$CROSS_SIZEOF_LONG_INT
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
main()
{
  long a;
  int b;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a) + sizeof(b));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_long_int=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_long_int=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

if test "X$pac_cv_sizeof_long_int" = "X" ; then
    # We have a problem.  The test returned a zero status, but no output,
    # or we're cross-compiling (or think we are) and have no value for
    # this object
    :
fi
rm -f conftestval
echo "$as_me:$LINENO: result: $pac_cv_sizeof_long_int" >&5
echo "${ECHO_T}$pac_cv_sizeof_long_int" >&6



rm -f conftestval
echo "$as_me:$LINENO: checking for size of short int" >&5
echo $ECHO_N "checking for size of short int... $ECHO_C" >&6
if test "${pac_cv_sizeof_short_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_short_int=$CROSS_SIZEOF_SHORT_INT
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
main()
{
  short a;
  int b;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a) + sizeof(b));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_short_int=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_short_int=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

if test "X$pac_cv_sizeof_short_int" = "X" ; then
    # We have a problem.  The test returned a zero status, but no output,
    # or we're cross-compiling (or think we are) and have no value for
    # this object
    :
fi
rm -f conftestval
echo "$as_me:$LINENO: result: $pac_cv_sizeof_short_int" >&5
echo "${ECHO_T}$pac_cv_sizeof_short_int" >&6



rm -f conftestval
echo "$as_me:$LINENO: checking for size of 2 int" >&5
echo $ECHO_N "checking for size of 2 int... $ECHO_C" >&6
if test "${pac_cv_sizeof_2_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_2_int=$CROSS_SIZEOF_2_INT
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
main()
{
  int a;
  int b;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a) + sizeof(b));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_2_int=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_2_int=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

if test "X$pac_cv_sizeof_2_int" = "X" ; then
    # We have a problem.  The test returned a zero status, but no output,
    # or we're cross-compiling (or think we are) and have no value for
    # this object
    :
fi
rm -f conftestval
echo "$as_me:$LINENO: result: $pac_cv_sizeof_2_int" >&5
echo "${ECHO_T}$pac_cv_sizeof_2_int" >&6



rm -f conftestval
echo "$as_me:$LINENO: checking for size of long double int" >&5
echo $ECHO_N "checking for size of long double int... $ECHO_C" >&6
if test "${pac_cv_sizeof_long_double_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  pac_cv_sizeof_long_double_int=$CROSS_SIZEOF_LONG_DOUBLE_INT
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
main()
{
  long double a;
  int b;
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(a) + sizeof(b));
  exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_long_double_int=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_long_double_int=0
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi

if test "X$pac_cv_sizeof_long_double_int" = "X" ; then
    # We have a problem.  The test returned a zero status, but no output,
    # or we're cross-compiling (or think we are) and have no value for
    # this object
    :
fi
rm -f conftestval
echo "$as_me:$LINENO: result: $pac_cv_sizeof_long_double_int" >&5
echo "${ECHO_T}$pac_cv_sizeof_long_double_int" >&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 "$as_me:$LINENO: checking for sys/bitypes.h" >&5
echo $ECHO_N "checking for sys/bitypes.h... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/bitypes.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 17721 "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 "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  use_bitypes="#include <sys/bitypes.h>"

cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_BITYPES_H 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:$LINENO: checking for int16_t" >&5
echo $ECHO_N "checking for int16_t... $ECHO_C" >&6
if test "${pac_cv_int16_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
$use_bitypes

int
main ()
{
int16_t a=0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_int16_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_int16_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_int16_t" >&5
echo "${ECHO_T}$pac_cv_int16_t" >&6

# If there is not int16_t, try to define one
if test "$pac_cv_int16_t" = "no" ; then
    if test -z "$CROSS_SIZEOF_SHORT" ; then CROSS_SIZEOF_SHORT=2 ; fi
    echo "$as_me:$LINENO: checking for short" >&5
echo $ECHO_N "checking for short... $ECHO_C" >&6
if test "${ac_cv_type_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((short *) 0)
  return 0;
if (sizeof (short))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_short=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_short=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
echo "${ECHO_T}$ac_cv_type_short" >&6

echo "$as_me:$LINENO: checking size of short" >&5
echo $ECHO_N "checking size of short... $ECHO_C" >&6
if test "${ac_cv_sizeof_short+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_short" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_short=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (short)); }
unsigned long ulongval () { return (long) (sizeof (short)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (short))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (short))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (short))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_short=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (short), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_short=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
echo "${ECHO_T}$ac_cv_sizeof_short" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF


    if test "$ac_cv_sizeof_short" = 2 ; then
        INT16_T=short
    else
        # No good option
        INT16_T=int
    fi


cat >>confdefs.h <<_ACEOF
#define MPIU_INT16_T $INT16_T
_ACEOF

else

cat >>confdefs.h <<\_ACEOF
#define HAVE_INT16_T 1
_ACEOF

fi
echo "$as_me:$LINENO: checking for int32_t" >&5
echo $ECHO_N "checking for int32_t... $ECHO_C" >&6
if test "${pac_cv_int32_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
$use_bitypes

int
main ()
{
int32_t a=0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_int32_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_int32_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_int32_t" >&5
echo "${ECHO_T}$pac_cv_int32_t" >&6
# If there is not int32_t, try to define one
if test "$pac_cv_int32_t" = "no" ; then
    if test -z "$CROSS_SIZEOF_INT" ; then CROSS_SIZEOF_INT=4 ; fi
    echo "$as_me:$LINENO: checking for int" >&5
echo $ECHO_N "checking for int... $ECHO_C" >&6
if test "${ac_cv_type_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((int *) 0)
  return 0;
if (sizeof (int))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_int=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_int=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "$as_me:$LINENO: checking size of int" >&5
echo $ECHO_N "checking size of int... $ECHO_C" >&6
if test "${ac_cv_sizeof_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_int" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_int=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (int)); }
unsigned long ulongval () { return (long) (sizeof (int)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (int))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (int))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (int))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_int=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (int), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_int=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF


    if test "$ac_cv_sizeof_int" = 4 ; then
        INT32_T=int
    else
        # No good alternative
        INT32_T=int
    fi


cat >>confdefs.h <<_ACEOF
#define MPIU_INT32_T $INT32_T
_ACEOF

else

cat >>confdefs.h <<\_ACEOF
#define HAVE_INT32_T 1
_ACEOF

fi
echo "$as_me:$LINENO: checking for int64_t" >&5
echo $ECHO_N "checking for int64_t... $ECHO_C" >&6
if test "${pac_cv_int64_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
$use_bitypes

int
main ()
{
int64_t a=0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_int64_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_int64_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_int64_t" >&5
echo "${ECHO_T}$pac_cv_int64_t" >&6
# If there is not int64_t, try to define one
if test "$pac_cv_int64_t" = "no" ; then
    if test -z "$CROSS_SIZEOF_LONG_LONG" ; then CROSS_SIZEOF_LONG_LONG=8 ; fi
    echo "$as_me:$LINENO: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6
if test "${ac_cv_type_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((long *) 0)
  return 0;
if (sizeof (long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6

echo "$as_me:$LINENO: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long)); }
unsigned long ulongval () { return (long) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


    if test "$ac_cv_sizeof_long" = 8 ; then
        INT64_T="long"
    else
        echo "$as_me:$LINENO: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${ac_cv_type_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((long long *) 0)
  return 0;
if (sizeof (long long))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_long_long=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_long_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
echo "${ECHO_T}$ac_cv_type_long_long" >&6

echo "$as_me:$LINENO: checking size of long long" >&5
echo $ECHO_N "checking size of long long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_long" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (long long)); }
unsigned long ulongval () { return (long) (sizeof (long long)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (long long))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (long long))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (long long))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_long_long=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long long), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_long_long=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF


        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 <<_ACEOF
#define MPIU_INT64_T $INT64_T
_ACEOF

else

cat >>confdefs.h <<\_ACEOF
#define HAVE_INT64_T 1
_ACEOF

fi
# Generate a hex version of the size of each type
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 \
	           $type != long_double_int ; then
               { { echo "$as_me:$LINENO: 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" >&5
echo "$as_me: 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" >&2;}
   { (exit 1); exit 1; }; }
	   fi
       fi
    fi
    #
    # Take len and turn it into two hex digits (there are 8 bits available
    # in the built-in datatype handle for the length; see
    # src/mpid/common/datatype/mpid_datatype.h)
    if test "$len" -gt 255 ; then
         { { echo "$as_me:$LINENO: error: Type sizes greater than 255 bytes are not supported (type $type is $len bytes)" >&5
echo "$as_me: error: Type sizes greater than 255 bytes are not supported (type $type is $len bytes)" >&2;}
   { (exit 1); exit 1; }; }
    fi
    tmplen=$len
    hexlen=""
    while test $tmplen -gt 0 ; do
        lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)`
	case $lowdigit in
         10) char=a ;;
	 11) char=b ;;
	 12) char=c ;;
	 13) char=d ;;
	 14) char=e ;;
	 15) char=f ;;
	  *) char=$lowdigit ;;
	esac
	hexlen="$char$hexlen"
	tmplen=`expr $tmplen / 16`
    done
    if test $len -lt 16 ; then
        hexlen="0$hexlen"
    fi
    if test $len = 0 ; then
        # This sometimes happens for wchar_t
        hexlen="00";
    fi
    eval len_$type=$hexlen
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"
if test "$len_long_long" != 0 -a "$MPID_NO_LONG_LONG" != yes ; then
    MPI_LONG_LONG="0x4c00${len_long_long}09"
else
    MPI_LONG_LONG=MPI_DATATYPE_NULL;
fi
MPI_FLOAT="0x4c00${len_float}0a"
MPI_DOUBLE="0x4c00${len_double}0b"
if test "$len_long_double" != 0 -a "$MPID_NO_LONG_DOUBLE" != yes ; then
    MPI_LONG_DOUBLE="0x4c00${len_long_double}0c"
else
    MPI_LONG_DOUBLE=MPI_DATATYPE_NULL
fi
# If you change MPI_BYTE, you must change it in src/binding/f77/buildiface
MPI_BYTE="0x4c00010d"
MPI_WCHAR="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_2INT="0x4c00${len_2_int}16"
#
# For now we aren't being too clever about figuring out which of these
# are in fact contiguous, so these are all allocated as "real" types.
#
# These values correspond to direct types 0..5.
#
MPI_FLOAT_INT="0x8c000000"
MPI_DOUBLE_INT="0x8c000001"
MPI_LONG_INT="0x8c000002"
MPI_SHORT_INT="0x8c000003"
if test "$MPID_NO_LONG_DOUBLE" != yes ; then
    MPI_LONG_DOUBLE_INT="0x8c000004"
else
    MPI_LONG_DOUBLE_INT=MPI_DATATYPE_NULL
fi

# 2 additional predefined types named in MPI-2
MPI_SIGNED_CHAR="0x4c000118"
if test "$len_long_long" != 0 -a "$MPID_NO_LONG_LONG" != yes ; then
    MPI_UNSIGNED_LONG_LONG="0x4c00${len_long_long}19"
else
    MPI_UNSIGNED_LONG_LONG=MPI_DATATYPE_NULL
fi


























#
# FIXME: Leftover from separate fortran system
## 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
#
# Size-specific types.  Initialize as NULL
MPI_REAL4=MPI_DATATYPE_NULL
MPI_REAL8=MPI_DATATYPE_NULL
MPI_REAL16=MPI_DATATYPE_NULL
MPI_COMPLEX8=MPI_DATATYPE_NULL
MPI_COMPLEX16=MPI_DATATYPE_NULL
MPI_COMPLEX32=MPI_DATATYPE_NULL
MPI_INTEGER1=MPI_DATATYPE_NULL
MPI_INTEGER2=MPI_DATATYPE_NULL
MPI_INTEGER4=MPI_DATATYPE_NULL
MPI_INTEGER8=MPI_DATATYPE_NULL
MPI_INTEGER16=MPI_DATATYPE_NULL











export MPI_REAL4
export MPI_REAL8
export MPI_REAL16
export MPI_COMPLEX8
export MPI_COMPLEX16
export MPI_COMPLEX32
export MPI_INTEGER1
export MPI_INTEGER2
export MPI_INTEGER4
export MPI_INTEGER8
export MPI_INTEGER16
#
# Try to find corresponding types for the size-specific types.
#
# Assume that the float/double/long double are simply spaced
# Datatypes used up through 26 in Fortran
# 27,28,29,2a,2b,2c
if test "$ac_cv_sizeof_float" = "4" ; then
    MPI_REAL4="0x4c000427"
    MPI_COMPLEX8="0x4c000828"
    MPIR_REAL4_CTYPE=float
fi
if test "$ac_cv_sizeof_double" = "8" ; then
    MPI_REAL8="0x4c000829"
    MPI_COMPLEX16="0x4c00102a"
    MPIR_REAL8_CTYPE=double
fi
if test "$ac_cv_sizeof_long_double" = "16" -a "$MPID_NO_LONG_DOUBLE" != yes ; then
    MPI_REAL16="0x4c00102b"
    MPI_COMPLEX32="0x4c00202c"
    MPIR_REAL16_CTYPE="long double"
fi
if test -n "$MPIR_REAL4_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_REAL4_CTYPE $MPIR_REAL4_CTYPE
_ACEOF

fi
if test -n "$MPIR_REAL8_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_REAL8_CTYPE $MPIR_REAL8_CTYPE
_ACEOF

fi
if test -n "$MPIR_REAL16_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_REAL16_CTYPE $MPIR_REAL16_CTYPE
_ACEOF

fi
# For complex 8/16/32, we assume that these are 2 consequetive real4/8/16
#
# Search for the integer types
for type in char short int long long_long ; do
    # ctype is a valid C type which we can use to declare a C version of
    # this item
    ctype=`echo $type | sed 's/_/ /'`
    eval len=\$ac_cv_sizeof_$type
    if test -n "$len" ; then
    case $len in
    1) if test "$MPI_INTEGER1" = "MPI_DATATYPE_NULL" ; then
           MPI_INTEGER1="0x4c00012d"
	   MPIR_INTEGER1_CTYPE="$ctype"
       fi
       ;;
    2) if test "$MPI_INTEGER2" = "MPI_DATATYPE_NULL" ; then
           MPI_INTEGER2="0x4c00022f"
	   MPIR_INTEGER2_CTYPE="$ctype"
       fi
       ;;
    4) if test "$MPI_INTEGER4" = "MPI_DATATYPE_NULL" ; then
           MPI_INTEGER4="0x4c000430"
	   MPIR_INTEGER4_CTYPE="$ctype"
       fi
       ;;
    8) if test "$MPI_INTEGER8" = "MPI_DATATYPE_NULL" ; then
           MPI_INTEGER8="0x4c000831"
	   MPIR_INTEGER8_CTYPE="$ctype"
       fi
       ;;
    16) if test "$MPI_INTEGER16" = "MPI_DATATYPE_NULL" ; then
           MPI_INTEGER16="0x4c001032"
	   MPIR_INTEGER16_CTYPE="$ctype"
       fi
       ;;
    *)
    ;;
    esac
    fi
done
#
# Add the definitions of these types
if test -n "$MPIR_INTEGER1_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_INTEGER1_CTYPE $MPIR_INTEGER1_CTYPE
_ACEOF

fi
if test -n "$MPIR_INTEGER2_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_INTEGER2_CTYPE $MPIR_INTEGER2_CTYPE
_ACEOF

fi
if test -n "$MPIR_INTEGER4_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_INTEGER4_CTYPE $MPIR_INTEGER4_CTYPE
_ACEOF

fi
if test -n "$MPIR_INTEGER8_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_INTEGER8_CTYPE $MPIR_INTEGER8_CTYPE
_ACEOF

fi
if test -n "$MPIR_INTEGER16_CTYPE" ; then

cat >>confdefs.h <<_ACEOF
#define MPIR_INTEGER16_CTYPE $MPIR_INTEGER16_CTYPE
_ACEOF

fi

# ----------------------------------------------------------------------------
# We can now create the Fortran versions of the datatype values, along with
# some of the other datatype-dependent sizes

# There are two parts to handling the datatypes:
#    Convert the C datatype values to their Fortran equivalent.  This
#    involves converting the hex values for the C version into decimal
#    since standard Fortran does not have hex constants
#
#    Determine the existence of the Fortran 'sized' types and set those
#    values.
#
# In addition, we need to look at a few additional constants that depend
# on how the compiler sizes some datatypes.  These are:
#    STATIS_SIZE, ADDRESS_KIND, and OFFSET_KIND
#
# ----------------------------------------------------------------------------
if test "$enable_f77" = yes ; then
    # Up to size checking code in master configure.in (where it tries to
    # find the matching C sizes) as part of defining mpi_integer8 etc.
    # The results are available in pac_cv_sizeof_f77_<type>
    # Size is 0 if unknown or unavailable (or cross-compiling)
    # Due to limitations in autoconf, we cannot put these into a loop.
    # We also check integer to find the type of MPI_Fint
    #
    # Cross-compilation results can be included with the --with-cross=file
    # option.
    CROSS_F77_SIZEOF_INTEGER=${CROSS_F77_SIZEOF_INTEGER:-0}
    CROSS_F77_SIZEOF_REAL=${CROSS_F77_SIZEOF_REAL:-0}
    CROSS_F77_SIZEOF_DOUBLE_PRECISION=${CROSS_F77_SIZEOF_DOUBLE_PRECISION:-0}

echo "$as_me:$LINENO: checking for size of Fortran type integer" >&5
echo $ECHO_N "checking for size of Fortran type integer... $ECHO_C" >&6
if test "${pac_cv_f77_sizeof_integer+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


if test "$cross_compiling" = yes ; then
    eval pac_cv_f77_sizeof_integer=$CROSS_F77_SIZEOF_INTEGER
else
    rm -f conftest*
    cat <<EOF > conftestc.c
#include <stdio.h>
#include "confdefs.h"
#ifdef F77_NAME_UPPER
#define cisize_ CISIZE
#define isize_ ISIZE
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define cisize_ cisize
#define isize_ isize
#endif
int cisize_(char *,char*);
int cisize_(char *i1p, char *i2p)
{
    int isize_val=0;
    FILE *f = fopen("conftestval", "w");
    if (!f) return 1;
    isize_val = (int)(i2p - i1p);
    fprintf(f,"%d\n", isize_val );
    fclose(f);
    return 0;
}
EOF
    pac_tmp_compile='$CC -c $CFLAGS $CPPFLAGS conftestc.c >&5'
    if { (eval echo "$as_me:$LINENO: \"$pac_tmp_compile\"") >&5
  (eval $pac_tmp_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftestc.o ; then


        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

        saveLIBS=$LIBS
        LIBS="conftestc.o $LIBS"
                                cat >conftest.f <<EOF
         program main
         integer a(2)
         integer irc
         irc = cisize(a(1),a(2))
         end
EOF
        rm -f conftest$ac_exeext
        rm -f conftestval
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest$ac_exeext ; then
	    if ./conftest$ac_exeext ; then
	        # success
                :
            else
	        # failure
                :
	    fi
        else
	    # failure
            { echo "$as_me:$LINENO: WARNING: Unable to build program to determine size of integer" >&5
echo "$as_me: WARNING: Unable to build program to determine size of integer" >&2;}
        fi
        LIBS=$saveLIBS
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

        if test -s conftestval ; then
            eval pac_cv_f77_sizeof_integer=`cat conftestval`
        else
	    eval pac_cv_f77_sizeof_integer=0
        fi
        rm -f conftest*
    else
        { echo "$as_me:$LINENO: WARNING: Unable to compile the C routine for finding the size of a integer" >&5
echo "$as_me: WARNING: Unable to compile the C routine for finding the size of a integer" >&2;}
    fi
fi # cross-compiling

fi
echo "$as_me:$LINENO: result: $pac_cv_f77_sizeof_integer" >&5
echo "${ECHO_T}$pac_cv_f77_sizeof_integer" >&6

cat >>confdefs.h <<_ACEOF
#define SIZEOF_F77_INTEGER $pac_cv_f77_sizeof_integer
_ACEOF





echo "$as_me:$LINENO: checking for size of Fortran type real" >&5
echo $ECHO_N "checking for size of Fortran type real... $ECHO_C" >&6
if test "${pac_cv_f77_sizeof_real+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


if test "$cross_compiling" = yes ; then
    eval pac_cv_f77_sizeof_real=$CROSS_F77_SIZEOF_REAL
else
    rm -f conftest*
    cat <<EOF > conftestc.c
#include <stdio.h>
#include "confdefs.h"
#ifdef F77_NAME_UPPER
#define cisize_ CISIZE
#define isize_ ISIZE
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define cisize_ cisize
#define isize_ isize
#endif
int cisize_(char *,char*);
int cisize_(char *i1p, char *i2p)
{
    int isize_val=0;
    FILE *f = fopen("conftestval", "w");
    if (!f) return 1;
    isize_val = (int)(i2p - i1p);
    fprintf(f,"%d\n", isize_val );
    fclose(f);
    return 0;
}
EOF
    pac_tmp_compile='$CC -c $CFLAGS $CPPFLAGS conftestc.c >&5'
    if { (eval echo "$as_me:$LINENO: \"$pac_tmp_compile\"") >&5
  (eval $pac_tmp_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftestc.o ; then


        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

        saveLIBS=$LIBS
        LIBS="conftestc.o $LIBS"
                                cat >conftest.f <<EOF
         program main
         real a(2)
         integer irc
         irc = cisize(a(1),a(2))
         end
EOF
        rm -f conftest$ac_exeext
        rm -f conftestval
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest$ac_exeext ; then
	    if ./conftest$ac_exeext ; then
	        # success
                :
            else
	        # failure
                :
	    fi
        else
	    # failure
            { echo "$as_me:$LINENO: WARNING: Unable to build program to determine size of real" >&5
echo "$as_me: WARNING: Unable to build program to determine size of real" >&2;}
        fi
        LIBS=$saveLIBS
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

        if test -s conftestval ; then
            eval pac_cv_f77_sizeof_real=`cat conftestval`
        else
	    eval pac_cv_f77_sizeof_real=0
        fi
        rm -f conftest*
    else
        { echo "$as_me:$LINENO: WARNING: Unable to compile the C routine for finding the size of a real" >&5
echo "$as_me: WARNING: Unable to compile the C routine for finding the size of a real" >&2;}
    fi
fi # cross-compiling

fi
echo "$as_me:$LINENO: result: $pac_cv_f77_sizeof_real" >&5
echo "${ECHO_T}$pac_cv_f77_sizeof_real" >&6

cat >>confdefs.h <<_ACEOF
#define SIZEOF_F77_REAL $pac_cv_f77_sizeof_real
_ACEOF





echo "$as_me:$LINENO: checking for size of Fortran type double precision" >&5
echo $ECHO_N "checking for size of Fortran type double precision... $ECHO_C" >&6
if test "${pac_cv_f77_sizeof_double_precision+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


if test "$cross_compiling" = yes ; then
    eval pac_cv_f77_sizeof_double_precision=$CROSS_F77_SIZEOF_DOUBLE_PRECISION
else
    rm -f conftest*
    cat <<EOF > conftestc.c
#include <stdio.h>
#include "confdefs.h"
#ifdef F77_NAME_UPPER
#define cisize_ CISIZE
#define isize_ ISIZE
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define cisize_ cisize
#define isize_ isize
#endif
int cisize_(char *,char*);
int cisize_(char *i1p, char *i2p)
{
    int isize_val=0;
    FILE *f = fopen("conftestval", "w");
    if (!f) return 1;
    isize_val = (int)(i2p - i1p);
    fprintf(f,"%d\n", isize_val );
    fclose(f);
    return 0;
}
EOF
    pac_tmp_compile='$CC -c $CFLAGS $CPPFLAGS conftestc.c >&5'
    if { (eval echo "$as_me:$LINENO: \"$pac_tmp_compile\"") >&5
  (eval $pac_tmp_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftestc.o ; then


        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

        saveLIBS=$LIBS
        LIBS="conftestc.o $LIBS"
                                cat >conftest.f <<EOF
         program main
         double precision a(2)
         integer irc
         irc = cisize(a(1),a(2))
         end
EOF
        rm -f conftest$ac_exeext
        rm -f conftestval
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest$ac_exeext ; then
	    if ./conftest$ac_exeext ; then
	        # success
                :
            else
	        # failure
                :
	    fi
        else
	    # failure
            { echo "$as_me:$LINENO: WARNING: Unable to build program to determine size of double precision" >&5
echo "$as_me: WARNING: Unable to build program to determine size of double precision" >&2;}
        fi
        LIBS=$saveLIBS
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

        if test -s conftestval ; then
            eval pac_cv_f77_sizeof_double_precision=`cat conftestval`
        else
	    eval pac_cv_f77_sizeof_double_precision=0
        fi
        rm -f conftest*
    else
        { echo "$as_me:$LINENO: WARNING: Unable to compile the C routine for finding the size of a double precision" >&5
echo "$as_me: WARNING: Unable to compile the C routine for finding the size of a double precision" >&2;}
    fi
fi # cross-compiling

fi
echo "$as_me:$LINENO: result: $pac_cv_f77_sizeof_double_precision" >&5
echo "${ECHO_T}$pac_cv_f77_sizeof_double_precision" >&6

cat >>confdefs.h <<_ACEOF
#define SIZEOF_F77_DOUBLE_PRECISION $pac_cv_f77_sizeof_double_precision
_ACEOF




    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    # If we have sizes for real and double, we do not need to call
    # mpir_get_fsize at run time.
    # For the size-defined types (e.g., integer*2), we assume that if the
    # compiler allows it, it has the stated size.
    echo "$as_me:$LINENO: checking whether integer*1 is supported" >&5
echo $ECHO_N "checking whether integer*1 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_integer1+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      integer*1 i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_integer1=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_integer1=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_integer1" >&5
echo "${ECHO_T}$pac_cv_fort_integer1" >&6
    echo "$as_me:$LINENO: checking whether integer*2 is supported" >&5
echo $ECHO_N "checking whether integer*2 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_integer2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      integer*2 i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_integer2=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_integer2=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_integer2" >&5
echo "${ECHO_T}$pac_cv_fort_integer2" >&6
    echo "$as_me:$LINENO: checking whether integer*4 is supported" >&5
echo $ECHO_N "checking whether integer*4 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_integer4+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      integer*4 i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_integer4=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_integer4=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_integer4" >&5
echo "${ECHO_T}$pac_cv_fort_integer4" >&6
    echo "$as_me:$LINENO: checking whether integer*8 is supported" >&5
echo $ECHO_N "checking whether integer*8 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_integer8+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      integer*8 i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_integer8=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_integer8=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_integer8" >&5
echo "${ECHO_T}$pac_cv_fort_integer8" >&6
    echo "$as_me:$LINENO: checking whether integer*16 is supported" >&5
echo $ECHO_N "checking whether integer*16 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_integer16+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      integer*16 i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_integer16=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_integer16=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_integer16" >&5
echo "${ECHO_T}$pac_cv_fort_integer16" >&6
    echo "$as_me:$LINENO: checking whether real*4 is supported" >&5
echo $ECHO_N "checking whether real*4 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_real4+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      real*4 a
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_real4=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_real4=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_real4" >&5
echo "${ECHO_T}$pac_cv_fort_real4" >&6
    echo "$as_me:$LINENO: checking whether real*8 is supported" >&5
echo $ECHO_N "checking whether real*8 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_real8+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      real*8 a
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_real8=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_real8=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_real8" >&5
echo "${ECHO_T}$pac_cv_fort_real8" >&6
    echo "$as_me:$LINENO: checking whether real*16 is supported" >&5
echo $ECHO_N "checking whether real*16 is supported... $ECHO_C" >&6
if test "${pac_cv_fort_real16+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
      program main
      real*16 a
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_fort_real16=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_fort_real16=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_fort_real16" >&5
echo "${ECHO_T}$pac_cv_fort_real16" >&6

    # Create the default datatype names for the standard MPI Fortran types
    MPI_CHARACTER=0x4c00011a


    if test -z "$pac_cv_f77_sizeof_integer" ; then
        { { echo "$as_me:$LINENO: error: Unable to configure with Fortran support because configure could not determine the size of a Fortran INTEGER.  Consider setting CROSS_F77_SIZEOF_INTEGER to the length in bytes of a Fortran INTEGER" >&5
echo "$as_me: error: Unable to configure with Fortran support because configure could not determine the size of a Fortran INTEGER.  Consider setting CROSS_F77_SIZEOF_INTEGER to the length in bytes of a Fortran INTEGER" >&2;}
   { (exit 1); exit 1; }; }
    fi
    len_integer=$pac_cv_f77_sizeof_integer
    # Convert to two digit hex
    len=$len_integer
    #
    # Take len and turn it into two hex digits (there are 8 bits available
    # in the built-in datatype handle for the length; see
    # src/mpid/common/datatype/mpid_datatype.h).  This code is taken
    # from the code in mpich2/configure.in
    if test "$len" -gt 255 ; then
        { { echo "$as_me:$LINENO: error: Type sizes greater than 255 bytes are not supported (type INTEGER is $len bytes)" >&5
echo "$as_me: error: Type sizes greater than 255 bytes are not supported (type INTEGER is $len bytes)" >&2;}
   { (exit 1); exit 1; }; }
    fi
    tmplen=$len
    hexlen=""
    while test $tmplen -gt 0 ; do
        lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)`
        case $lowdigit in
        10) char=a ;;
        11) char=b ;;
        12) char=c ;;
        13) char=d ;;
        14) char=e ;;
        15) char=f ;;
         *) char=$lowdigit ;;
        esac
        hexlen="$char$hexlen"
        tmplen=`expr $tmplen / 16`
    done
    if test $len -lt 16 ; then
        hexlen="0$hexlen"
    fi
    len_integer=$hexlen
    if test "$len_integer" = 0 ; then
        # We have a problem
        { echo "$as_me:$LINENO: WARNING: Unable to determine size of an INTEGER type; using 4" >&5
echo "$as_me: WARNING: Unable to determine size of an INTEGER type; using 4" >&2;}
        # We make the length 4
        len_integer="04"
    fi
    MPI_INTEGER=0x4c00${len_integer}1b
    MPI_REAL=0x4c00${len_integer}1c
    MPI_LOGICAL=0x4c00${len_integer}1d




    if test -z "$pac_cv_f77_sizeof_double_precision" ; then
        { { echo "$as_me:$LINENO: error: Unable to configure with Fortran support because configure could not determine the size of a Fortran DOUBLE PRECISION.  Consider setting CROSS_F77_SIZEOF_DOUBLE_PRECISION to the length in bytes of a Fortran DOUBLE PRECISION" >&5
echo "$as_me: error: Unable to configure with Fortran support because configure could not determine the size of a Fortran DOUBLE PRECISION.  Consider setting CROSS_F77_SIZEOF_DOUBLE_PRECISION to the length in bytes of a Fortran DOUBLE PRECISION" >&2;}
   { (exit 1); exit 1; }; }
    fi
    len_double=$pac_cv_f77_sizeof_double_precision
    # Convert to two digit hex
    len=$len_double
    #
    # Take len and turn it into two hex digits (there are 8 bits available
    # in the built-in datatype handle for the length; see
    # src/mpid/common/datatype/mpid_datatype.h).  This code is taken
    # from the code in mpich2/configure.in
    if test "$len" -gt 255 ; then
        { { echo "$as_me:$LINENO: error: Type sizes greater than 255 bytes are not supported (type DOUBLE is $len bytes)" >&5
echo "$as_me: error: Type sizes greater than 255 bytes are not supported (type DOUBLE is $len bytes)" >&2;}
   { (exit 1); exit 1; }; }
    fi
    tmplen=$len
    hexlen=""
    while test $tmplen -gt 0 ; do
        lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)`
        case $lowdigit in
        10) char=a ;;
        11) char=b ;;
        12) char=c ;;
        13) char=d ;;
        14) char=e ;;
        15) char=f ;;
         *) char=$lowdigit ;;
        esac
        hexlen="$char$hexlen"
        tmplen=`expr $tmplen / 16`
    done
    if test $len -lt 16 ; then
        hexlen="0$hexlen"
    fi
    len_double=$hexlen
    if test "$len_double" = 0 ; then
       # We have a problem
       { echo "$as_me:$LINENO: WARNING: Unable to determine size of a DOUBLE PRECISION type; using 8" >&5
echo "$as_me: WARNING: Unable to determine size of a DOUBLE PRECISION type; using 8" >&2;}
       # We make the length 8
       len_double="08"
    fi
    MPI_COMPLEX=0x4c00${len_double}1e
    MPI_DOUBLE_PRECISION=0x4c00${len_double}1f
    MPI_2INTEGER=0x4c00${len_double}20
    MPI_2REAL=0x4c00${len_double}21





    len_doublecplx=`expr $pac_cv_f77_sizeof_double_precision \* 2`
    if test "$len_doublecplx" = 0 ; then
        # We have a problem
        { echo "$as_me:$LINENO: WARNING: Unable to determine size of a DOUBLE PRECISION type; using 8" >&5
echo "$as_me: WARNING: Unable to determine size of a DOUBLE PRECISION type; using 8" >&2;}
        # We make the length 8*2 (in hex)
        len_doublecplx="10"
    fi
    len=$len_doublecplx
    #
    # Take len and turn it into two hex digits (there are 8 bits available
    # in the built-in datatype handle for the length; see
    # src/mpid/common/datatype/mpid_datatype.h).  This code is taken
    # from the code in mpich2/configure.in
    if test "$len" -gt 255 ; then
        { { echo "$as_me:$LINENO: error: Type sizes greater than 255 bytes are not supported (type DOUBLE COMPLEX is $len bytes)" >&5
echo "$as_me: error: Type sizes greater than 255 bytes are not supported (type DOUBLE COMPLEX is $len bytes)" >&2;}
   { (exit 1); exit 1; }; }
    fi
    tmplen=$len
    hexlen=""
    while test $tmplen -gt 0 ; do
        lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)`
        case $lowdigit in
        10) char=a ;;
        11) char=b ;;
        12) char=c ;;
        13) char=d ;;
        14) char=e ;;
        15) char=f ;;
         *) char=$lowdigit ;;
        esac
        hexlen="$char$hexlen"
        tmplen=`expr $tmplen / 16`
    done
    if test $len -lt 16 ; then
        hexlen="0$hexlen"
    fi
    len_doublecplx=$hexlen

    MPI_DOUBLE_COMPLEX=0x4c00${len_doublecplx}22
    MPI_2DOUBLE_PRECISION=0x4c00${len_doublecplx}23
    MPI_2COMPLEX=0x4c00${len_doublecplx}24




    #
    # Temporary for the vast majority of systems that use 4 byte reals and
    # 8 byte doubles
    # Lengths at this point are in hex, hence "10" = 10 base 16 = 16 base 10.
    if test "$len_double" = "08" ; then
        F77_COMPLEX8=$MPI_COMPLEX
    fi
    if test "$len_doublecplx" = "10" ; then
        F77_COMPLEX16=$MPI_DOUBLE_COMPLEX
    fi
    if test "$len_long_double" = "10" -a "$MPID_NO_LONG_DOUBLE" != "yes" ; then
        F77_COMPLEX32="0x4c002025"
    else
        F77_COMPLEX32="MPI_DATATYPE_NULL"
    fi

    len_2dc=`expr $pac_cv_f77_sizeof_double_precision \* 4`
    firstdigit=0
    seconddigit=0
    while test $len_2dc -ge 16 ; do
        firstdigit=`expr $firstdigit + 1`
        len_2dc=`expr $len_2dc - 16`
    done
    case $len_2dc in
        10) seconddigit=a ;;
        11) seconddigit=b ;;
        12) seconddigit=c ;;
        13) seconddigit=d ;;
        14) seconddigit=e ;;
        15) seconddigit=f ;;
         *) seconddigit=$len_2dc ;;
    esac
    len_2dc="$firstdigit$seconddigit"
    #echo "2double complex = $len_2dc"
    MPI_2DOUBLE_COMPLEX=0x4c00${len_2dc}25

    MPI_F77_PACKED=$MPI_PACKED
    MPI_F77_UB=$MPI_UB
    MPI_F77_LB=$MPI_LB
    MPI_F77_BYTE=$MPI_BYTE




    #
    # We must convert all hex values to decimal (!)
    # It would be nice to use expr to extract the next character rather than
    # the heavier-weight sed, but expr under Tru64 Unix discards leading zeros,
    # even when used only with the match (:) command.  Rather than have
    # configure figure out if expr works, we just use sed.  Sigh.
    for var in CHARACTER INTEGER REAL LOGICAL DOUBLE_PRECISION COMPLEX \
        DOUBLE_COMPLEX 2INTEGER 2REAL 2COMPLEX 2DOUBLE_PRECISION \
        2DOUBLE_COMPLEX F77_PACKED F77_UB F77_LB F77_BYTE; do
        fullvar="MPI_$var"
        eval fullvarvalue=\$$fullvar
        #echo "$fullvar = $fullvarvalue"
        value=0
        fullvarvalue=`echo $fullvarvalue | sed -e 's/..\(.*\)/\1/'`
        for pos in 3 4 5 6 7 8 9 10 ; do
            # This works, even for Tru64, because only a single character
  	    # is extracted
            char=`expr $fullvarvalue : '\(.\)'`
	    # FIXME: Tru64 Unix eliminates leading zeros (!)
 	    # How do we fix something that broken?
	    fullvarvalue=`echo $fullvarvalue | sed -e 's/.\(.*\)/\1/'`
            case $char in
                a) char=10 ;;
	        b) char=11 ;;
	        c) char=12 ;;
	        d) char=13 ;;
	        e) char=14 ;;
	        f) char=15 ;;
            esac
            value=`expr $value \* 16 + $char`
        done
        #echo "$fullvar = $value"
        eval $fullvar=$value
    done
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


    # Now, handle the sized types
    #
    # Preload the C mpi types
    # THESE MUST MATCH THE DEFINITIONS IN MPI.H and MPIF.H
    # We use these to match the optional Fortran types
    char_mpi=${MPI_CHAR:-0}
    short_mpi=${MPI_SHORT:-0}
    int_mpi=${MPI_INT:-0}
    long_mpi=${MPI_LONG:-0}
    long_long_mpi=${MPI_LONG_LONG:-0}
    float_mpi=${MPI_FLOAT:-0}
    double_mpi=${MPI_DOUBLE:-0}
    long_double_mpi=${MPI_LONG_DOUBLE:-0}

    #
    # The following code was correct for MPI-1, which allowed these datatypes
    # to be an alias for another MPI type.  MPI-2 requires these to
    # be distinct types, so these are enumerated
    if test "$use_alias_types" = yes ; then
        for len in 1 2 4 8 16 ; do
            eval F77_INTEGER$len=0
            #eval testval=\$"pac_cv_f77_sizeof_integer_$len"
            eval testval=\$"pac_cv_fort_integer$len"
            if test "$testval" = no ; then continue ; fi
	    testval=$len
            noval="yes"
            echo "$as_me:$LINENO: checking for C type matching Fortran integer*$len" >&5
echo $ECHO_N "checking for C type matching Fortran integer*$len... $ECHO_C" >&6
            for c_type in char short int long "long_long" ; do
	        eval ctypelen=\$"ac_cv_sizeof_$c_type"
  	        if test "$testval" = "$ctypelen" -a "$ctypelen" -gt 0 ; then
	            echo "$as_me:$LINENO: result: $c_type" >&5
echo "${ECHO_T}$c_type" >&6
  	            eval F77_INTEGER$len=\$"${c_type}_mpi"
	            noval="no"
	            break
                fi
            done
            if test "$noval" = "yes" ; then
                echo "$as_me:$LINENO: result: unavailable" >&5
echo "${ECHO_T}unavailable" >&6
            fi
        done

        # Complex is set separately above
        for len in 4 8 16 ; do
            len2=`expr $len + $len`
            eval F77_REAL$len=0
            #eval F77_COMPLEX$len2=0
            #eval testval=\$"pac_cv_f77_sizeof_real_$len"
            eval testval=\$"pac_cv_fort_real$len"
            if test "$testval" = no ; then continue ; fi
	    testval=$len
            noval="yes"
            echo "$as_me:$LINENO: checking for C type matching Fortran real*$len" >&5
echo $ECHO_N "checking for C type matching Fortran real*$len... $ECHO_C" >&6
            for c_type in float double "long_double" ; do
	        eval ctypelen=\$"ac_cv_sizeof_$c_type"
	        if test "$testval" = "$ctypelen" -a "$ctypelen" -gt 0 ; then
	            echo "$as_me:$LINENO: result: $c_type" >&5
echo "${ECHO_T}$c_type" >&6
  	            eval F77_REAL$len=\$"${c_type}_mpi"
	            #eval F77_COMPLEX$len2=\$"${c_type}_cplx_mpi"
                    noval="no"
	            break
                fi
            done
            if test "$noval" = "yes" ; then
                echo "$as_me:$LINENO: result: unavailable" >&5
echo "${ECHO_T}unavailable" >&6
            fi
        done
    else
        # Simply determine which types exist.  These may have been set by the
        # toplevel configure
        for var in INTEGER1 INTEGER2 INTEGER4 INTEGER8 INTEGER16 \
            REAL4 REAL8 REAL16 COMPLEX8 COMPLEX16 COMPLEX32 ; do
  	    eval varname=MPI_$var
            eval varvalue=\$$varname
	    #echo "$varname = $varvalue"
  	    if test "$varvalue" = MPI_DATATYPE_NULL ; then
	        eval F77_$var=0
  	    else
                eval F77_$var=\$$varname
  	    fi
       done
    fi
    # We must convert all hex values to decimal (!)
    for var in INTEGER1 INTEGER2 INTEGER4 INTEGER8 INTEGER16 \
        REAL4 REAL8 REAL16 COMPLEX8 COMPLEX16 COMPLEX32 ; do
        fullvar="F77_$var"
        eval fullvarvalue=\$$fullvar
        if test "$fullvarvalue" = 0 -o -z "$fullvarvalue" ; then
            eval $fullvar=MPI_DATATYPE_NULL
            continue
        fi
        #echo "$fullvar = $fullvarvalue"
        value=0
        # See the comments above on why expr with : cannot be used here
        fullvarvalue=`echo $fullvarvalue | sed -e 's/..\(.*\)/\1/'`
        for pos in 3 4 5 6 7 8 9 10 ; do
            #char=`expr substr $fullvarvalue $pos 1`
            char=`expr $fullvarvalue : '\(.\)'`
	    # We don't test for success of expr here because some expr's are
  	    # buggy and set the status to one on expressions like
            #    expr 00ccc : '\(.\)'
            # while both
            #    expr 00ccc : '\(..\)'
            # and
            #    expr 100cc : '\(.\)'
            # return a zero status.  So the status is set even on success,
            # if the result is a single character that is a zero (!)
	    #rc=$?
    	    #if test "$rc" != 0 ; then
  	      	    #    break
	    #fi
	    fullvarvalue=`echo $fullvarvalue | sed -e 's/.\(.*\)/\1/'`
            case $char in
                a) char=10 ;;
	        b) char=11 ;;
	        c) char=12 ;;
	        d) char=13 ;;
	        e) char=14 ;;
	        f) char=15 ;;
            esac
            value=`expr $value \* 16 + $char`
	    if test $? != 0 ; then
	        { echo "$as_me:$LINENO: WARNING: Failure to evaluate $value \* 16 + $char" >&5
echo "$as_me: WARNING: Failure to evaluate $value \* 16 + $char" >&2;}
	    fi
        done
        #echo "$fullvar = $value"
        eval $fullvar=$value
    done












    noval="yes"
    echo "$as_me:$LINENO: checking for C type matching Fortran integer" >&5
echo $ECHO_N "checking for C type matching Fortran integer... $ECHO_C" >&6
    for c_type in char short int long "long_long" ; do
        eval ctypelen=\$"ac_cv_sizeof_$c_type"
        if test "$pac_cv_f77_sizeof_integer" = "$ctypelen" -a \
          "$ctypelen" -gt 0 ; then
	    c_type=`echo $c_type | sed -e 's/_/ /g'`
	    echo "$as_me:$LINENO: result: $c_type" >&5
echo "${ECHO_T}$c_type" >&6
	    MPI_FINT=$c_type
	    noval="no"
	    break
        fi
    done
    if test "$noval" = "yes" ; then
        # Set a default
        MPI_FINT="int"
        echo "$as_me:$LINENO: result: unavailable" >&5
echo "${ECHO_T}unavailable" >&6
    fi
    # We also need to check the size of MPI_Aint vs MPI_Fint, and
    # define AINT_LARGER_THAN_FINT if aint is larger (this
    # affects code in MPI_Address)
    if test "$ac_cv_sizeof_void_p" != "0" -a \
        "$ac_cv_sizeof_void_p" -gt "$pac_cv_f77_sizeof_integer" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_AINT_LARGER_THAN_FINT 1
_ACEOF

    fi
    # Include a defined value for Fint is int
    if test "$MPI_FINT" = "int" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_FINT_IS_INT 1
_ACEOF

    elif test "$SIZEOF_F77_INTEGER" != "$ac_cv_sizeof_int" ; then
        { echo "$as_me:$LINENO: WARNING: Fortran integers and C ints are not the same size.  The current Fortran binding does not support this case" >&5
echo "$as_me: WARNING: Fortran integers and C ints are not the same size.  The current Fortran binding does not support this case" >&2;}
    fi

    #
    # Set size of MPI_Status.  We may need sizeof_int here as well
    #

    #
    # 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 "$as_me:$LINENO: checking for size of MPI_Status" >&5
echo $ECHO_N "checking for size of MPI_Status... $ECHO_C" >&6
if test "${pac_cv_sizeof_mpi_status+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    if test "$cross_compiling" = yes; then
  pac_cv_sizeof_mpi_status=$default_status_size
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_sizeof_mpi_status=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_sizeof_mpi_status=$default_status_size
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:$LINENO: result: $pac_cv_sizeof_mpi_status" >&5
echo "${ECHO_T}$pac_cv_sizeof_mpi_status" >&6
    SIZEOF_MPI_STATUS=$pac_cv_sizeof_mpi_status
    export SIZEOF_MPI_STATUS


    if test -z "$MPI_STATUS_SIZE" ; then
        if test -n "$SIZEOF_MPI_STATUS" ; then
            # compute from the C sizeof
	    MPI_STATUS_SIZE=`expr $SIZEOF_MPI_STATUS / $ac_cv_sizeof_int`
	    if test "$MPI_STATUS_SIZE" = "0" ; then
	         { echo "$as_me:$LINENO: WARNING: Could not compute the size of MPI_Status" >&5
echo "$as_me: WARNING: Could not compute the size of MPI_Status" >&2;}
	        MPI_STATUS_SIZE=5
            fi
        else
            { echo "$as_me:$LINENO: WARNING: MPI_STATUS_SIZE was not defined!" >&5
echo "$as_me: WARNING: MPI_STATUS_SIZE was not defined!" >&2;}
            # The default size is 5.  See mpi.h.in
            MPI_STATUS_SIZE=5
        fi
    fi


    # Try and compute the values of .true. and .false. in Fortran
    # This code has been removed because the Fortran binding code does
    # not yet support it.

    if test "$cross_compiling" = "no" ; then
        echo "$as_me:$LINENO: checking for values of Fortran logicals" >&5
echo $ECHO_N "checking for values of Fortran logicals... $ECHO_C" >&6
        # Use a Fortran main program.  This simplifies some steps,
	# since getting all of the Fortran libraries (including shared
	# libraries that are not in the default library search path) can
	# be tricky.  Specifically, The PROG_F77_RUN_PROC_FROM_C failed with
        # some installations of the Portland group compiler.
        if test "${pac_cv_prog_f77_true_false_value+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

        # Compile a C routine to print the values of true and false
        cat >conftestc.c <<EOF
#include <stdio.h>
#include "confdefs.h"
#ifdef F77_NAME_UPPER
#define ftest_ FTEST
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define ftest_ ftest
#endif
void ftest_( $MPI_FINT *, $MPI_FINT *);
void ftest_( $MPI_FINT *itrue, $MPI_FINT *ifalse )
{
  FILE *f = fopen("conftestval","w");
  if (!f) exit(1);
  fprintf( f, "%d %d\n", *itrue, *ifalse );
  fclose(f);
}
EOF
        # Create the Fortran program
        cat >conftest.f <<EOF
       program main
       logical itrue, ifalse
       itrue = .TRUE.
       ifalse = .FALSE.
       call ftest( itrue, ifalse )
       end
EOF
        # Compile the two files
        pac_tmp_compile='$CC -c $CFLAGS $CPPFLAGS conftestc.c >&5'
        if { (eval echo "$as_me:$LINENO: \"$pac_tmp_compile\"") >&5
  (eval $pac_tmp_compile) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftestc.o ; then


            ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

            saveLIBS=$LIBS
            LIBS="conftestc.o $LIBS"
            if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest$ac_exeext ; then
	        if ./conftest$ac_exeext ; then
	            # success
		    pac_cv_prog_f77_true_false_value=`cat conftestval`
                else
	            # failure
		    { echo "$as_me:$LINENO: WARNING: Unable to run the program to determine the values of logicals" >&5
echo "$as_me: WARNING: Unable to run the program to determine the values of logicals" >&2;}
		    echo "configure: failed program was:" >&5
		    cat conftest.f >&5
	        fi
            else
	        # failure
                { echo "$as_me:$LINENO: WARNING: Unable to build program to determine values of logicals" >&5
echo "$as_me: WARNING: Unable to build program to determine values of logicals" >&2;}
	        echo "configure: failed program was:" >&5
	        cat conftest.f >&5
            fi
	    LIBS=$saveLIBS
            ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

        else
            { echo "$as_me:$LINENO: WARNING: Unable to compile the C routine for finding the values of logicals" >&5
echo "$as_me: WARNING: Unable to compile the C routine for finding the values of logicals" >&2;}
	    echo "configure: failed program was:" >&5
	    cat conftestc.c >&5
        fi

fi

        true_val="`echo $pac_cv_prog_f77_true_false_value | sed -e 's/ .*//g'`"
        false_val="`echo $pac_cv_prog_f77_true_false_value | sed -e 's/.*  *//g'`"
        if test -n "$true_val" -a -n "$false_val" ; then
	    echo "$as_me:$LINENO: result: True is $true_val and False is $false_val" >&5
echo "${ECHO_T}True is $true_val and False is $false_val" >&6
        else
	    echo "$as_me:$LINENO: result: could not determine" >&5
echo "${ECHO_T}could not determine" >&6
        fi
    else
        # Cross-compiling.  Allow the user to set the values
        if test -n "$CROSS_F77_TRUE_VALUE" -a -n "$CROSS_F77_FALSE_VALUE" ; then
            true_val=$CROSS_F77_TRUE_VALUE
	    false_val=$CROSS_F77_FALSE_VALUE
        fi
    fi
    if test -n "$true_val" -a -n "$false_val" ; then

cat >>confdefs.h <<\_ACEOF
#define F77_TRUE_VALUE_SET 1
_ACEOF


cat >>confdefs.h <<_ACEOF
#define F77_TRUE_VALUE $true_val
_ACEOF


cat >>confdefs.h <<_ACEOF
#define F77_FALSE_VALUE $false_val
_ACEOF

    fi
    #
    # We'd also like to check other values for .TRUE. and .FALSE. to see
    # if the compiler allows (or uses) more than one value (some DEC compilers,
    # for example, used the high (sign) bit to indicate true and false; the
    # rest of the bits were ignored.  For now, we'll assume that there are
    # unique true and false values.

    # Get the ADDRESS_KIND and OFFSET_KIND if possible
    #
    # For Fortran 90, we'll also need MPI_ADDRESS_KIND and MPI_OFFSET_KIND
    # Since our compiler might BE a Fortran 90 compiler, try and determine the
    # values.
    if test -z "$F90" ; then
        echo "$as_me:$LINENO: checking whether Fortran compiler is a Fortran 90 compiler" >&5
echo $ECHO_N "checking whether Fortran compiler is a Fortran 90 compiler... $ECHO_C" >&6
if test "${pac_cv_prog_f77_is_f90+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

        pac_cv_prog_f77_is_f90=no
        cat >>conftest.f90 <<EOF
        program main
        integer, dimension(10) :: n
        integer k
        print *,  range(k)
        end
EOF
        if $F77 -o conftest $FFLAGS conftest.f90 >/dev/null 2>&1 ; then
            if test -x conftest ; then
	        pac_cv_prog_f77_is_f90=yes
            fi
        fi

fi
echo "$as_me:$LINENO: result: $pac_cv_prog_f77_is_f90" >&5
echo "${ECHO_T}$pac_cv_prog_f77_is_f90" >&6
        if test "$pac_cv_prog_f77_is_f90" = yes ; then
            F90=$F77
	    if test -z "$F90FLAGS" ; then
	        F90FLAGS="$FFLAGS"
            fi
        fi
    fi
    if test -n "$F90" ; then

if test "X$pac_save_level" = "X" ; then
    pac_save_CC="$CC"
    pac_save_CXX="$CXX"
    pac_save_F77="$F77"
    pac_save_F90="$F90"
    pac_save_prog_cc_cross="$ac_cv_prog_cc_cross"
    pac_save_prog_f77_cross="$ac_cv_prog_f77_cross"
    pac_save_prog_cxx_cross="$ac_cv_prog_cxx_cross"
    pac_save_prog_f90_cross="$pac_cv_prog_f90_cross"
    if test "X$CPP" = "X" ; then
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    fi
    pac_save_CPP="$CPP"
    CC="${TESTCC:=$CC}"
    CXX="${TESTCXX:=$CXX}"
    F77="${TESTF77:=$F77}"
    F90="${TESTF90:=$F90}"
    if test -z "$TESTCPP" ; then

if test -z "$TESTCPP"; then
  if test "${pac_cv_prog_TESTCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  rm -f conftest.*
  cat > conftest.c <<EOF
  #include <assert.h>
  Syntax Error
EOF
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  TESTCPP="${TESTCC-cc} -E"
  ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out"
  if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
      pac_cv_prog_TESTCPP="$TESTCPP"
  fi
  if test "X$pac_cv_prog_TESTCPP" = "X" ; then
      TESTCPP="${TESTCC-cc} -E -traditional-cpp"
      ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out"
      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
          pac_cv_prog_TESTCPP="$TESTCPP"
      fi
  fi
  if test "X$pac_cv_prog_TESTCPP" = "X" ; then
      TESTCPP="${TESTCC-cc} -nologo -E"
      ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out"
      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
          pac_cv_prog_TESTCPP="$TESTCPP"
      fi
  fi
  if test "X$pac_cv_prog_TESTCPP" = "X" ; then
      # Extract the first word of "cpp", so it can be a program name with args.
set dummy cpp; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_TESTCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $TESTCPP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TESTCPP="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
TESTCPP=$ac_cv_path_TESTCPP

if test -n "$TESTCPP"; then
  echo "$as_me:$LINENO: result: $TESTCPP" >&5
echo "${ECHO_T}$TESTCPP" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  fi
  rm -f conftest.*

fi

else
  pac_cv_prog_TESTCPP="$TESTCPP"
fi

    fi
    CPP="${TESTCPP:=$CPP}"
    pac_save_level="0"
    # Recompute cross_compiling values and set for the current language
    # This is just:


    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    if test "$pac_cross_compiling" = "yes" ; then
        ac_cv_prog_cc_cross=yes
	ac_cv_prog_cc_works=yes
    else
        cat > conftest.$ac_ext <<EOF

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

main(){return(0);}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && 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*
    fi
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    # Ignore Fortran if we aren't using it.
    if test -n "$F77" ; then


        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	if test "$pac_cross_compiling" = "yes" ; then
	    ac_cv_prog_f77_cross=yes
	    ac_cv_prog_f77_works=yes
	else
            cat > conftest.$ac_ext <<EOF

      program conftest
      end

EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext}; then
  ac_cv_prog_f77_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_f77_cross=no
  else
    ac_cv_prog_f77_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_f77_works=no
fi
rm -fr conftest*
	fi
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    fi
    # Ignore C++ if we aren't using it.
    if test -n "$CXX" ; then


        ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

        cat > conftest.$ac_ext <<EOF

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

int main(){return(0);}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_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_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    fi
    # Ignore Fortran 90 if we aren't using it.
    if test -n "$F90" ; then


        ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

	        	if test "$pac_cross_compiling" = "yes" ; then
	    ac_cv_prog_f90_cross=yes
	    ac_cv_prog_f90_works=yes
	else
            cat > conftest.$ac_ext << EOF
      program conftest
      end
EOF
            if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ac_cv_prog_f90_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_f90_cross=no
              else
                  ac_cv_prog_f90_cross=yes
              fi
            else
              echo "configure: failed program was:" >&5
              cat conftest.$ac_ext >&5
              ac_cv_prog_f90_works=no
            fi
	fi
	pac_cv_prog_f90_cross="$ac_cv_prog_f90_cross"
	pac_cv_prog_f90_works="$ac_cv_prog_f90_works"
        rm -fr conftest*
        ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    fi
fi
pac_save_level=`expr $pac_save_level + 1`

        ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

        # Offset kind should be for 8 bytes if possible (Romio prefers that)
        # address should be sizeof void *
        # FIXME: make offset kind match the length of MPI_Offset.
        testsize=$ac_cv_sizeof_void_p
        if test "$testsize" = 0 ; then
            # Set a default
            testsize=4
        fi

# Set the default
ADDRESS_KIND=-1
if test "$pac_cv_prog_f90_cross" = "yes" ; then
    ADDRESS_KIND="$CROSS_F90_ADDRESS_KIND"
else
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

if test -n "$ac_compile" ; then
    echo "$as_me:$LINENO: checking for Fortran 90 integer kind for ${testsize}-byte integers" >&5
echo $ECHO_N "checking for Fortran 90 integer kind for ${testsize}-byte integers... $ECHO_C" >&6
    # Convert bytes to digits
    case ${testsize} in
	1) sellen=2 ;;
	2) sellen=4 ;;
	4) sellen=8 ;;
	8) sellen=16 ;;
       16) sellen=30 ;;
	*) sellen=8 ;;
    esac
    # Check for cached value
    eval testval=\$"pac_cv_prog_f90_int_kind_$sellen"
    if test -n "$testval" ; then
        echo "$as_me:$LINENO: result: $testval (cached)" >&5
echo "${ECHO_T}$testval (cached)" >&6
	ADDRESS_KIND=$testval
    else
        # must compute
        rm -f conftest*
        cat <<EOF > conftest.$ac_ext
      program main
      integer i
      i = selected_int_kind($sellen)
      open(8, file="conftest1.out", form="formatted")
      write (8,*) i
      close(8)
      stop
      end
EOF
        KINDVAL="unavailable"
        eval "pac_cv_prog_f90_int_kind_$sellen"=-1
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest ; then
            ./conftest >>config.log 2>&1
            if test -s conftest1.out ; then
	        # Because of write, there may be a leading blank.
                KINDVAL=`cat conftest1.out | sed 's/ //g'`
 	        eval "pac_cv_prog_f90_int_kind_$sellen"=$KINDVAL
	        ADDRESS_KIND=$KINDVAL
            fi
        fi
        rm -f conftest*
	echo "$as_me:$LINENO: result: $KINDVAL" >&5
echo "${ECHO_T}$KINDVAL" >&6
    fi # not cached
fi # Has Fortran 90
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

fi # is not cross compiling

        if test "$ac_cv_sizeof_void_p" = 8 ; then
            OFFSET_KIND=$ADDRESS_KIND
        else

# Set the default
OFFSET_KIND=-1
if test "$pac_cv_prog_f90_cross" = "yes" ; then
    OFFSET_KIND="$CROSS_F90_OFFSET_KIND"
else
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

if test -n "$ac_compile" ; then
    echo "$as_me:$LINENO: checking for Fortran 90 integer kind for 8-byte integers" >&5
echo $ECHO_N "checking for Fortran 90 integer kind for 8-byte integers... $ECHO_C" >&6
    # Convert bytes to digits
    case 8 in
	1) sellen=2 ;;
	2) sellen=4 ;;
	4) sellen=8 ;;
	8) sellen=16 ;;
       16) sellen=30 ;;
	*) sellen=8 ;;
    esac
    # Check for cached value
    eval testval=\$"pac_cv_prog_f90_int_kind_$sellen"
    if test -n "$testval" ; then
        echo "$as_me:$LINENO: result: $testval (cached)" >&5
echo "${ECHO_T}$testval (cached)" >&6
	OFFSET_KIND=$testval
    else
        # must compute
        rm -f conftest*
        cat <<EOF > conftest.$ac_ext
      program main
      integer i
      i = selected_int_kind($sellen)
      open(8, file="conftest1.out", form="formatted")
      write (8,*) i
      close(8)
      stop
      end
EOF
        KINDVAL="unavailable"
        eval "pac_cv_prog_f90_int_kind_$sellen"=-1
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest ; then
            ./conftest >>config.log 2>&1
            if test -s conftest1.out ; then
	        # Because of write, there may be a leading blank.
                KINDVAL=`cat conftest1.out | sed 's/ //g'`
 	        eval "pac_cv_prog_f90_int_kind_$sellen"=$KINDVAL
	        OFFSET_KIND=$KINDVAL
            fi
        fi
        rm -f conftest*
	echo "$as_me:$LINENO: result: $KINDVAL" >&5
echo "${ECHO_T}$KINDVAL" >&6
    fi # not cached
fi # Has Fortran 90
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

fi # is not cross compiling

        fi
        #
        # Some compilers won't allow a -1 kind (e.g., absoft).  In this case,
        # use a fallback (sizeof(int) kind)
        if test "$ADDRESS_KIND" = "-1" -o "$OFFSET_KIND" = "-1" ; then

# Set the default
simpleintkind=-1
if test "$pac_cv_prog_f90_cross" = "yes" ; then
    simpleintkind=""
else
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

if test -n "$ac_compile" ; then
    echo "$as_me:$LINENO: checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers" >&5
echo $ECHO_N "checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers... $ECHO_C" >&6
    # Convert bytes to digits
    case ${pac_cv_f77_sizeof_integer} in
	1) sellen=2 ;;
	2) sellen=4 ;;
	4) sellen=8 ;;
	8) sellen=16 ;;
       16) sellen=30 ;;
	*) sellen=8 ;;
    esac
    # Check for cached value
    eval testval=\$"pac_cv_prog_f90_int_kind_$sellen"
    if test -n "$testval" ; then
        echo "$as_me:$LINENO: result: $testval (cached)" >&5
echo "${ECHO_T}$testval (cached)" >&6
	simpleintkind=$testval
    else
        # must compute
        rm -f conftest*
        cat <<EOF > conftest.$ac_ext
      program main
      integer i
      i = selected_int_kind($sellen)
      open(8, file="conftest1.out", form="formatted")
      write (8,*) i
      close(8)
      stop
      end
EOF
        KINDVAL="unavailable"
        eval "pac_cv_prog_f90_int_kind_$sellen"=-1
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest ; then
            ./conftest >>config.log 2>&1
            if test -s conftest1.out ; then
	        # Because of write, there may be a leading blank.
                KINDVAL=`cat conftest1.out | sed 's/ //g'`
 	        eval "pac_cv_prog_f90_int_kind_$sellen"=$KINDVAL
	        simpleintkind=$KINDVAL
            fi
        fi
        rm -f conftest*
	echo "$as_me:$LINENO: result: $KINDVAL" >&5
echo "${ECHO_T}$KINDVAL" >&6
    fi # not cached
fi # Has Fortran 90
ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

fi # is not cross compiling

            if test "$simpleintkind" = "-1" ; then
	        # Wild guess; probably means that Fortran 90 is not available
                simpleintkind=4
            fi
            if test "$ADDRESS_KIND" = "-1" ; then
	        ADDRESS_KIND=$simpleintkind
            fi
            if test "$OFFSET_KIND" = "-1" ; then
	        OFFSET_KIND=$simpleintkind
            fi
        fi

pac_save_level=`expr $pac_save_level - 1`
if test "X$pac_save_level" = "X0" ; then
    CC="$pac_save_CC"
    CXX="$pac_save_CXX"
    F77="$pac_save_F77"
    F90="$pac_save_F90"
    CPP="$pac_save_CPP"
    ac_cv_prog_cc_cross="$pac_save_prog_cc_cross"
    ac_cv_prog_f77_cross="$pac_save_prog_f77_cross"
    ac_cv_prog_cxx_cross="$pac_save_prog_cxx_cross"
    pac_cv_prog_f90_cross="$pac_save_prog_f90_cross"
    pac_save_level=""
fi

    fi
    # Make sure that address kind and offset kind have values.
    if test -z "$ADDRESS_KIND" ; then
        ADDRESS_KIND=0
    fi
    if test -z "$OFFSET_KIND" ; then
        OFFSET_KIND=0
    fi



    # Some compilers may require special directives to handle the common
    # block in a library.  In particular, directives are needed for Microsoft
    # Windows to support dynamic library import.  The following six
    # directives may be needed:
    #  CMS\$ATTRIBUTES DLLIMPORT::/MPIPRIV1/
    #  CMS\$ATTRIBUTES DLLIMPORT::/MPIPRIV2/
    #  CMS\$ATTRIBUTES DLLIMPORT::/MPIPRIVC/
    #  CDEC\$ATTRIBUTES DLLIMPORT::/MPIPRIV1/
    #  CDEC\$ATTRIBUTES DLLIMPORT::/MPIPRIV2/
    #  CDEC\$ATTRIBUTES DLLIMPORT::/MPIPRIVC/
    # CMS is for the Microsoft compiler,
    # CDEC is (we believe) for the DEC Fortran compiler.
    # We need to make this a configure-time variable because some compilers
    # (in particular, a version of the Intel Fortran compiler for Linux)
    # will read directives for other compilers and then flag as fatal
    # errors directives that it does not support but does recognize.

    DLLIMPORT=""


    # FIXME:
    # Eventually, need to add
    # SIZEOF_F90_INTEGER
    # SIZEOF_F90_REAL
    # SIZEOF_F90_CHARACTER
    # SIZEOF_F90_DOUBLE_PRECISION
    # We also need to include
    # SIZEOF_F90_MPI_OFFSET
    # SIZEOF_F90_MPI_AINT
    #
    # If other "kinds" are supported, MPI_SIZEOF needs to identify
    # those as well.  This is very difficult to do in a general way.

    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

fi
# ----------------------------------------------------------------------------
# C++ types
if test "$enable_cxx" = "yes" ; then
    ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

    echo "$as_me:$LINENO: checking for bool" >&5
echo $ECHO_N "checking for bool... $ECHO_C" >&6
if test "${ac_cv_type_bool+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((bool *) 0)
  return 0;
if (sizeof (bool))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_bool=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_bool=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_bool" >&5
echo "${ECHO_T}$ac_cv_type_bool" >&6

echo "$as_me:$LINENO: checking size of bool" >&5
echo $ECHO_N "checking size of bool... $ECHO_C" >&6
if test "${ac_cv_sizeof_bool+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_bool" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (bool))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (bool))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (bool))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (bool))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (bool))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_bool=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (bool), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (bool), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
long longval () { return (long) (sizeof (bool)); }
unsigned long ulongval () { return (long) (sizeof (bool)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (bool))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (bool))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (bool))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_bool=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (bool), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (bool), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_bool=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_bool" >&5
echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_BOOL $ac_cv_sizeof_bool
_ACEOF


    ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "$CXX -E" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
echo "$as_me:$LINENO: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


ac_safe=`echo "complex" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for complex" >&5
echo $ECHO_N "checking for complex... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <complex>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 22851 "configure"
#include "confdefs.h"
#include <complex>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  :
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    if test "$ac_cv_header_complex" = "yes" ; then
        # The C++ complex types are all templated.  We finagle this by
        # defining a standin name
        echo "$as_me:$LINENO: checking for Complex" >&5
echo $ECHO_N "checking for Complex... $ECHO_C" >&6
if test "${ac_cv_type_Complex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


int
main ()
{
if ((Complex *) 0)
  return 0;
if (sizeof (Complex))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_Complex=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_Complex=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_Complex" >&5
echo "${ECHO_T}$ac_cv_type_Complex" >&6

echo "$as_me:$LINENO: checking size of Complex" >&5
echo $ECHO_N "checking size of Complex... $ECHO_C" >&6
if test "${ac_cv_sizeof_Complex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_Complex" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (Complex))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (Complex))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (Complex))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (Complex))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (Complex))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_Complex=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (Complex), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (Complex), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>


long longval () { return (long) (sizeof (Complex)); }
unsigned long ulongval () { return (long) (sizeof (Complex)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (Complex))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (Complex))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (Complex))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_Complex=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (Complex), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (Complex), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_Complex=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_Complex" >&5
echo "${ECHO_T}$ac_cv_sizeof_Complex" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_COMPLEX $ac_cv_sizeof_Complex
_ACEOF


        echo "$as_me:$LINENO: checking for DoubleComplex" >&5
echo $ECHO_N "checking for DoubleComplex... $ECHO_C" >&6
if test "${ac_cv_type_DoubleComplex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


int
main ()
{
if ((DoubleComplex *) 0)
  return 0;
if (sizeof (DoubleComplex))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_DoubleComplex=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_DoubleComplex=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_DoubleComplex" >&5
echo "${ECHO_T}$ac_cv_type_DoubleComplex" >&6

echo "$as_me:$LINENO: checking size of DoubleComplex" >&5
echo $ECHO_N "checking size of DoubleComplex... $ECHO_C" >&6
if test "${ac_cv_sizeof_DoubleComplex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_DoubleComplex" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (DoubleComplex))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (DoubleComplex))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (DoubleComplex))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (DoubleComplex))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (DoubleComplex))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_DoubleComplex=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (DoubleComplex), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (DoubleComplex), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>


long longval () { return (long) (sizeof (DoubleComplex)); }
unsigned long ulongval () { return (long) (sizeof (DoubleComplex)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (DoubleComplex))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (DoubleComplex))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (DoubleComplex))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_DoubleComplex=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (DoubleComplex), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (DoubleComplex), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_DoubleComplex=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_DoubleComplex" >&5
echo "${ECHO_T}$ac_cv_sizeof_DoubleComplex" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLECOMPLEX $ac_cv_sizeof_DoubleComplex
_ACEOF


        if test "$MPID_NO_LONG_DOUBLE" != yes ; then
             echo "$as_me:$LINENO: checking for LongDoubleComplex" >&5
echo $ECHO_N "checking for LongDoubleComplex... $ECHO_C" >&6
if test "${ac_cv_type_LongDoubleComplex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


int
main ()
{
if ((LongDoubleComplex *) 0)
  return 0;
if (sizeof (LongDoubleComplex))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_LongDoubleComplex=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_LongDoubleComplex=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_LongDoubleComplex" >&5
echo "${ECHO_T}$ac_cv_type_LongDoubleComplex" >&6

echo "$as_me:$LINENO: checking size of LongDoubleComplex" >&5
echo $ECHO_N "checking size of LongDoubleComplex... $ECHO_C" >&6
if test "${ac_cv_sizeof_LongDoubleComplex+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_LongDoubleComplex" = yes; then
  # The cast to unsigned long works around a bug in the HP C Compiler
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (LongDoubleComplex))) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=0 ac_mid=0
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (LongDoubleComplex))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr $ac_mid + 1`
		    if test $ac_lo -le $ac_mid; then
		      ac_lo= ac_hi=
		      break
		    fi
		    ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (LongDoubleComplex))) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=-1 ac_mid=-1
  while :; do
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (LongDoubleComplex))) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_lo=$ac_mid; break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_hi=`expr '(' $ac_mid ')' - 1`
		       if test $ac_mid -le $ac_hi; then
			 ac_lo= ac_hi=
			 break
		       fi
		       ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (LongDoubleComplex))) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_hi=$ac_mid
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_LongDoubleComplex=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (LongDoubleComplex), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (LongDoubleComplex), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; } ;;
esac
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>


long longval () { return (long) (sizeof (LongDoubleComplex)); }
unsigned long ulongval () { return (long) (sizeof (LongDoubleComplex)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    exit (1);
  if (((long) (sizeof (LongDoubleComplex))) < 0)
    {
      long i = longval ();
      if (i != ((long) (sizeof (LongDoubleComplex))))
	exit (1);
      fprintf (f, "%ld\n", i);
    }
  else
    {
      unsigned long i = ulongval ();
      if (i != ((long) (sizeof (LongDoubleComplex))))
	exit (1);
      fprintf (f, "%lu\n", i);
    }
  exit (ferror (f) || fclose (f) != 0);

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_sizeof_LongDoubleComplex=`cat conftest.val`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (LongDoubleComplex), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (LongDoubleComplex), 77
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
  ac_cv_sizeof_LongDoubleComplex=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_LongDoubleComplex" >&5
echo "${ECHO_T}$ac_cv_sizeof_LongDoubleComplex" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONGDOUBLECOMPLEX $ac_cv_sizeof_LongDoubleComplex
_ACEOF


        fi

        # Datatypes are given by
        # 0x4c00 <length in bytes> (1 byte) <unique num> (1 byte)
        # where the unique nums are
        # 33,34,35,36
        case "$ac_cv_sizeof_bool" in
           1)    MPIR_CXX_BOOL=0x4c000133 ;;
           2)    MPIR_CXX_BOOL=0x4c000233 ;;
           4)    MPIR_CXX_BOOL=0x4c000433 ;;
           8)    MPIR_CXX_BOOL=0x4c000833 ;;
           *) ;;
        esac
        case "$ac_cv_sizeof_Complex" in
           8)    MPIR_CXX_COMPLEX=0x4c000834 ;;
           16)   MPIR_CXX_COMPLEX=0x4c001034 ;;
           *) ;;
        esac
        case "$ac_cv_sizeof_DoubleComplex" in
           8)    MPIR_CXX_DOUBLE_COMPLEX=0x4c000835 ;;
           16)   MPIR_CXX_DOUBLE_COMPLEX=0x4c001035 ;;
           32)   MPIR_CXX_DOUBLE_COMPLEX=0x4c002035 ;;
           *) ;;
        esac
        case "$ac_cv_sizeof_LongDoubleComplex" in
           8)    MPIR_CXX_LONG_DOUBLE_COMPLEX=0x4c000836 ;;
           16)   MPIR_CXX_LONG_DOUBLE_COMPLEX=0x4c001036 ;;
           24)   MPIR_CXX_LONG_DOUBLE_COMPLEX=0x4c001836 ;;
           32)   MPIR_CXX_LONG_DOUBLE_COMPLEX=0x4c002036 ;;
           *) ;;
        esac
    fi
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

fi

# ----------------------------------------------------------------------------

# Is char * the byte address?
echo "$as_me:$LINENO: checking if char * pointers use byte addresses" >&5
echo $ECHO_N "checking if char * pointers use byte addresses... $ECHO_C" >&6
if test "${pac_cv_c_char_p_is_byte+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_char_p_is_byte=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int main(int argc, char **argv ){
char *a, buf;
a = &buf;
if ((long)(a-(char*)0) == (long)(a)) return 0; return 1;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_c_char_p_is_byte=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_char_p_is_byte=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $pac_cv_c_char_p_is_byte" >&5
echo "${ECHO_T}$pac_cv_c_char_p_is_byte" >&6
if test "$pac_cv_char_p_is_byte" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define CHAR_PTR_IS_BYTE 1
_ACEOF

fi
# Get the size for the bsendoverhead
rm -f conftestval
# FIXME This should really use code from bsendutil.c.  Types
# defined in the mpiimpl.h file or in mpi.h have been replaced here.
# The sizeof(void*)-1 allows us to force the first byte of the
# buffer to be aligned.
echo "$as_me:$LINENO: checking for size of MPI_BSEND_OVERHEAD" >&5
echo $ECHO_N "checking for size of MPI_BSEND_OVERHEAD... $ECHO_C" >&6
if test "${pac_cv_mpi_bsend_overhead+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test "$cross_compiling" = yes; then
  pac_cv_mpi_bsend_overhead=128
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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)+sizeof(void*)-1);
  exit(0);
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_mpi_bsend_overhead=`cat conftestval`
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_mpi_bsend_overhead=128
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi

fi
echo "$as_me:$LINENO: result: $pac_cv_mpi_bsend_overhead" >&5
echo "${ECHO_T}$pac_cv_mpi_bsend_overhead" >&6
# If you change the default size (128 above) for pac_cv_mpi_bsend_overhead,
# make the same change in src/binding/f77/configure.in (where there is
# a default value for BSEND_OVERHEAD if no value is provided).
BSEND_OVERHEAD=$pac_cv_mpi_bsend_overhead
export BSEND_OVERHEAD


# Check for special compile characteristics
# If we are either gcc or icc, see if we can use __asm__
# We test on prog_gcc to allow gcc by any name; if we are using
# icc, the value of CC must be icc for this test to pass
if test "$ac_cv_c_compiler_gnu" = "yes" -o "$ac_cv_prog_CC" = "icc" ; then
echo "$as_me:$LINENO: checking for gcc __asm__ and pentium cmpxchgl instruction" >&5
echo $ECHO_N "checking for gcc __asm__ and pentium cmpxchgl instruction... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  echo "$as_me:$LINENO: result: not checking when cross compiling" >&5
echo "${ECHO_T}not checking when cross compiling" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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) : "memory");
return (compval == 20) ? 0 : -1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6

cat >>confdefs.h <<\_ACEOF
#define HAVE_GCC_AND_PENTIUM_ASM 1
_ACEOF

   lac_cv_use_atomic_updates="yes"
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
if test "$lac_cv_use_atomic_updates" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define USE_ATOMIC_UPDATES
_ACEOF

fi

# check for x86_64
if test "$ac_cv_c_compiler_gnu" = "yes" ; then
echo "$as_me:$LINENO: checking for gcc __asm__ and AMD x86_64 cmpxchgq instruction" >&5
echo $ECHO_N "checking for gcc __asm__ and AMD x86_64 cmpxchgq instruction... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  echo "$as_me:$LINENO: result: not checking when cross compiling" >&5
echo "${ECHO_T}not checking when cross compiling" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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; cmpxchgq %3, %1; sete %0"
	: "=q" (ret), "=m" (*p), "=a" (readval)
	: "r" (newval), "m" (*p), "a" (oldval) : "memory");
return (compval == 20) ? 0 : -1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6

cat >>confdefs.h <<\_ACEOF
#define HAVE_GCC_AND_X86_64_ASM 1
_ACEOF

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
if test "$ac_cv_c_compiler_gnu" = "yes" ; then
echo "$as_me:$LINENO: checking for gcc __asm__ and IA64 xchg4 instruction" >&5
echo $ECHO_N "checking for gcc __asm__ and IA64 xchg4 instruction... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
  echo "$as_me:$LINENO: result: not checking when cross compiling" >&5
echo "${ECHO_T}not checking when cross compiling" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

unsigned long _InterlockedExchange(volatile void *ptr, unsigned long x)
{
   unsigned long result;
   __asm__ __volatile ("xchg4 %0=[%1],%2" : "=r" (result)
       : "r" (ptr), "r" (x) : "memory");
   return result;
}
int main(int argc, char *argv[])
{
long val = 1;
volatile long *p = &val;
long oldval = _InterlockedExchange(p, (unsigned long)2);
return (oldval == 1 && val == 2) ? 0 : -1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6

cat >>confdefs.h <<\_ACEOF
#define HAVE_GCC_AND_IA64_ASM 1
_ACEOF

else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
# -----------------------------------------------------------------------------
# Check for support of enable-coverage.  Put this near the end of the tests
# because the coverage options may affect the other tests.
if test "$enable_coverage" = "yes" ; then
    if test "$ac_cv_c_compiler_gnu" = "yes" ; then
        CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
    else
        { echo "$as_me:$LINENO: WARNING: --enable-coverage only supported for GCC" >&5
echo "$as_me: WARNING: --enable-coverage only supported for GCC" >&2;}
    fi
    # Test for the routines that we need to use to ensure that the
    # data files are (usually) written out
    # FIXME: Some versions of Linux provide usleep, but it rounds times
    # up to the next second (!)

for ac_func in usleep
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


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

fi
# -----------------------------------------------------------------------------
# Look for Standard headers
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "memchr" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "free" >/dev/null 2>&1; then
  :
else
  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 <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
		   (('a' <= (c) && (c) <= 'i') \
		     || ('j' <= (c) && (c) <= 'r') \
		     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#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);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then

cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF

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
# stddef.h is sometimes needed for types like wchar_t











for ac_header in stdlib.h stdarg.h sys/types.h inttypes.h limits.h stddef.h errno.h sys/socket.h sys/time.h unistd.h endian.h
do
ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 24935 "configure"
#include "confdefs.h"
#include <$ac_header>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done

echo "$as_me:$LINENO: checking for sys/uio.h" >&5
echo $ECHO_N "checking for sys/uio.h... $ECHO_C" >&6
if test "${ac_cv_header_sys_uio_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_sys_uio_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_header_sys_uio_h=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_header_sys_uio_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_uio_h" >&6
if test "$ac_cv_header_sys_uio_h" = yes ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_UIO_H 1
_ACEOF

fi

# Check for special types
echo "$as_me:$LINENO: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_type_size_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
  :
else

cat >>confdefs.h <<_ACEOF
#define size_t unsigned
_ACEOF

fi


# These are used to support timeouts


for ac_func in setitimer alarm
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

# These are used for error reporting


for ac_func in vsnprintf vsprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$ac_cv_func_vsnprintf" = "yes" ; then

echo "$as_me:$LINENO: checking whether vsnprintf needs a declaration" >&5
echo $ECHO_N "checking whether vsnprintf needs a declaration... $ECHO_C" >&6
if test "${pac_cv_func_decl_vsnprintf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdarg.h>
int
main ()
{
int a=vsnprintf(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_func_decl_vsnprintf=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_func_decl_vsnprintf=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_func_decl_vsnprintf" >&5
echo "${ECHO_T}$pac_cv_func_decl_vsnprintf" >&6
if test "$pac_cv_func_decl_vsnprintf" = "yes" ; then

cat >>confdefs.h <<_ACEOF
#define NEEDS_VSNPRINTF_DECL 1
_ACEOF


fi

fi
# We would like to use strerror in the file namepublisher; it is also used
# in MPIU_Strerror (whose implementation is broken if strerror is not found)

for ac_func in strerror
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


# Use snprintf if possible when creating messages

for ac_func in snprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$ac_cv_func_snprintf" = "yes" ; then

echo "$as_me:$LINENO: checking whether snprintf needs a declaration" >&5
echo $ECHO_N "checking whether snprintf needs a declaration... $ECHO_C" >&6
if test "${pac_cv_func_decl_snprintf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
int a=snprintf(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_func_decl_snprintf=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_func_decl_snprintf=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_func_decl_snprintf" >&5
echo "${ECHO_T}$pac_cv_func_decl_snprintf" >&6
if test "$pac_cv_func_decl_snprintf" = "yes" ; then

cat >>confdefs.h <<_ACEOF
#define NEEDS_SNPRINTF_DECL 1
_ACEOF


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.
# va_copy is currently used only in src/util/dbg_printf.c, in an obsolete
# debugging routine.  We may want to withdraw this (saving the
# test in confdb/aclocal_cc.m4).
echo "$as_me:$LINENO: checking for va_copy" >&5
echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
if test "${pac_cv_func_va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_func_va_copy=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_func_va_copy=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_func_va_copy" >&5
echo "${ECHO_T}$pac_cv_func_va_copy" >&6
if test "$pac_cv_func_va_copy" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_VA_COPY 1
_ACEOF

fi
# We might have __va_copy...
if test "$pac_cv_func_va_copy" != "yes" ; then
    echo "$as_me:$LINENO: checking for __va_copy" >&5
echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
if test "${pac_cv_func___va_copy+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_func___va_copy=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_func___va_copy=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_func___va_copy" >&5
echo "${ECHO_T}$pac_cv_func___va_copy" >&6
    if test "$pac_cv_func___va_copy" = "yes" ; then

cat >>confdefs.h <<\_ACEOF
#define HAVE___VA_COPY 1
_ACEOF

    fi
fi
# Check for alloca function.  May set HAVE_ALLOCA_H and HAVE_ALLOCA
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo "$as_me:$LINENO: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <alloca.h>
int
main ()
{
char *p = (char *) alloca (2 * sizeof (int));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_working_alloca_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_working_alloca_h=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA_H 1
_ACEOF

fi

echo "$as_me:$LINENO: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

int
main ()
{
char *p = (char *) alloca (1);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_alloca_works=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_alloca_works=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6

if test $ac_cv_func_alloca_works = yes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA 1
_ACEOF

else
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble.  Some versions do not even contain alloca or
# contain a buggy version.  If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.

ALLOCA=alloca.$ac_objext

cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1
_ACEOF


echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "webecray" >/dev/null 2>&1; then
  ac_cv_os_cray=yes
else
  ac_cv_os_cray=no
fi
rm -f conftest*

fi
echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then

cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
_ACEOF

    break
fi

  done
fi

echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
int
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}

int
main ()
{
  exit (find_stack_direction () < 0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_stack_direction=1
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_c_stack_direction=-1
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6

cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
_ACEOF


fi


if test "$enable_g_mem" != "yes" ; then
    # Strdup is needed only if memory tracing is not enabled.

for ac_func in strdup
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

    if test "$ac_cv_func_strdup" = "yes" ; then
        # Do we need to declare strdup?

echo "$as_me:$LINENO: checking whether strdup needs a declaration" >&5
echo $ECHO_N "checking whether strdup needs a declaration... $ECHO_C" >&6
if test "${pac_cv_func_decl_strdup+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <string.h>
int
main ()
{
int a=strdup(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_func_decl_strdup=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_func_decl_strdup=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_func_decl_strdup" >&5
echo "${ECHO_T}$pac_cv_func_decl_strdup" >&6
if test "$pac_cv_func_decl_strdup" = "yes" ; then

cat >>confdefs.h <<_ACEOF
#define NEEDS_STRDUP_DECL 1
_ACEOF


fi

    fi
else
    # search.h is used for fancier output from trmem.  Disabled for now,
    # since the tsearch routines have problematic prototypes.

for ac_header in search
do
ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 26376 "configure"
#include "confdefs.h"
#include <$ac_header>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done


for ac_func in tsearch
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

    # Check that we can compile tsearch without error.  Try to compile
    # it with the header and the char * args
    if test "$ac_cv_func_tsearch" = "yes" ; then
        echo "$as_me:$LINENO: checking whether tsearch requires char* args" >&5
echo $ECHO_N "checking whether tsearch requires char* args... $ECHO_C" >&6
if test "${pac_cv_tsearch_charp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <search.h>
    char *tsearch( char *k, char **r, (int (*)())compare ) { return k; }
int
main ()
{
int f=0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_tsearch_charp=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_tsearch_charp=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_tsearch_charp" >&5
echo "${ECHO_T}$pac_cv_tsearch_charp" >&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 <<\_ACEOF
#define USE_TSEARCH_WITH_CHARP 1
_ACEOF

	fi
    fi
    # Note that HPUX and AIX may require _INCLUDE_XOPEN_SOURCE or
    # _XOPEN_SOURCE be defined respectively.
fi
# ----------------------------------------------------------------------------
# Support for timers.  The following code processes the
#  --enable-timer-type=name argument and selects the timer based on
# both that field and what configure is able to determine is available.
# The file src/include/mpichtimer.h is also created.

# ----------------------------------------------------------------------------
# Default type for timer stamp.
MPID_TIMER_TYPE=long


# clock_gettime is the POSIX gettimeofday
# gethrtime is the Solaris high-resolution timer
# Check whether --enable-timer-type or --disable-timer-type was given.
if test "${enable_timer_type+set}" = set; then
  enableval="$enable_timer_type"
  timer_type=$enable_timer_type
fi;

if test -z "$timer_type" ; then
    # Try to pick a timer based on what is available




for ac_func in clock_gettime clock_getres gethrtime gettimeofday
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

    if test "$ac_cv_func_gethrtime" = "yes" ; then
        # Sigh.  The Solaris include files do not define hrtime_t
	# Before we accept this choice, make sure that we can
	# do arithmetic with hrtime_t .
        echo "$as_me:$LINENO: checking that hrtime_t is properly defined for gethrtime" >&5
echo $ECHO_N "checking that hrtime_t is properly defined for gethrtime... $ECHO_C" >&6
if test "${pac_cv_hrtime_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <sys/time.h>

int
main ()
{
hrtime_t t1, t2; t1 = 1; t2 = 2; t1 = t1 + t2;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_hrtime_works=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_hrtime_works=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_hrtime_works" >&5
echo "${ECHO_T}$pac_cv_hrtime_works" >&6
	# A more ambitious test would look to see if casting an
	# hrtime_t to int64_t works, and even more ambitious
	# would check whether long or long long was 64 bits (or even
	# better, the sizeof hrtime_t).
    fi
    if test "$ac_cv_func_gethrtime" = "yes" -a \
            "$pac_cv_hrtime_works" = "yes" ; then
        timer_type=gethrtime
    elif test "$ac_cv_func_clock_gettime" = "yes" -a \
              "$ac_cv_func_clock_getres" = "yes" ; then
	 # Test on both because some systems (e.g., cygwin) provide
	 # clock_gettime but not clock_getres
        timer_type=clock_gettime
    elif test "$ac_cv_func_gettimeofday" = "yes" ; then
        timer_type=gettimeofday
    fi
fi
if test -z "$timer_type" ; then
    { { echo "$as_me:$LINENO: error: No timer found" >&5
echo "$as_me: error: No timer found" >&2;}
   { (exit 1); exit 1; }; }
fi

# Check for valid timer and select datatypes for the time stamp
case "$timer_type" in

    gethrtime)
    MPID_TIMER_TYPE=hrtime_t
    echo "$as_me:$LINENO: checking for gethrtime" >&5
echo $ECHO_N "checking for gethrtime... $ECHO_C" >&6
if test "${ac_cv_func_gethrtime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define gethrtime to an innocuous variant, in case <limits.h> declares gethrtime.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define gethrtime innocuous_gethrtime

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethrtime (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef gethrtime

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethrtime ();
/* 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_gethrtime) || defined (__stub___gethrtime)
choke me
#else
char (*f) () = gethrtime;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != gethrtime;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gethrtime=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_gethrtime=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gethrtime" >&5
echo "${ECHO_T}$ac_cv_func_gethrtime" >&6
if test $ac_cv_func_gethrtime = yes; then
  :
else

         { { echo "$as_me:$LINENO: error: Requested timer gethrtime is not available" >&5
echo "$as_me: error: Requested timer gethrtime is not available" >&2;}
   { (exit 1); exit 1; }; }

fi

    ;;

    clock_gettime)
    missing_function=no
    # Solaris places clock_gettime in the rt library
    echo "$as_me:$LINENO: checking for clock_gettime" >&5
echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
if test "${ac_cv_func_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define clock_gettime innocuous_clock_gettime

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char clock_gettime (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef clock_gettime

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime ();
/* 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_clock_gettime) || defined (__stub___clock_gettime)
choke me
#else
char (*f) () = clock_gettime;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != clock_gettime;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_clock_gettime=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_clock_gettime=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_clock_gettime" >&5
echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
if test $ac_cv_func_clock_gettime = yes; then
  :
else
  missing_function=yes
fi

    if test "$missing_function" = yes ; then
        echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6
if test "${ac_cv_search_clock_gettime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_clock_gettime=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime ();
int
main ()
{
clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_clock_gettime="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_clock_gettime" = no; then
  for ac_lib in rt; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_gettime ();
int
main ()
{
clock_gettime ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_clock_gettime="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6
if test "$ac_cv_search_clock_gettime" != no; then
  test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS"
  missing_function=no
fi

	if test "$missing_function" = yes ; then
             { { echo "$as_me:$LINENO: error: Requested timer clock_gettime (POSIX) is not available" >&5
echo "$as_me: error: Requested timer clock_gettime (POSIX) is not available" >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi
    echo "$as_me:$LINENO: checking for clock_getres" >&5
echo $ECHO_N "checking for clock_getres... $ECHO_C" >&6
if test "${ac_cv_func_clock_getres+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define clock_getres to an innocuous variant, in case <limits.h> declares clock_getres.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define clock_getres innocuous_clock_getres

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char clock_getres (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef clock_getres

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char clock_getres ();
/* 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_clock_getres) || defined (__stub___clock_getres)
choke me
#else
char (*f) () = clock_getres;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != clock_getres;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_clock_getres=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_clock_getres=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_clock_getres" >&5
echo "${ECHO_T}$ac_cv_func_clock_getres" >&6
if test $ac_cv_func_clock_getres = yes; then
  :
else
  missing_function=yes
fi

    if test "$missing_function" = yes ; then
        { { echo "$as_me:$LINENO: error: Requested timer clock_gettime (POSIX) is not available because clock_getres, also needed, is not available" >&5
echo "$as_me: error: Requested timer clock_gettime (POSIX) is not available because clock_getres, also needed, is not available" >&2;}
   { (exit 1); exit 1; }; }
    fi
    MPID_TIMER_TYPE="struct timespec"
    # AIX does not always define struct timespec (!)
    # Make sure that we can use struct timespec
    echo "$as_me:$LINENO: checking whether struct timespec is defined in time.h" >&5
echo $ECHO_N "checking whether struct timespec is defined in time.h... $ECHO_C" >&6
if test "${pac_cv_struct_timespec_defined+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <time.h>
int
main ()
{

    struct timespec t;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_struct_timespec_defined=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_struct_timespec_defined=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $pac_cv_struct_timespec_defined" >&5
echo "${ECHO_T}$pac_cv_struct_timespec_defined" >&6
    if test "$pac_cv_struct_timespec_defined" != "yes" ; then
        # Try again, but with -D_XOPEN_SOURCE=500 (works for AIX)
        echo "$as_me:$LINENO: checking whether struct timespec is defined in time.h with _XOPEN_SOURCE=500" >&5
echo $ECHO_N "checking whether struct timespec is defined in time.h with _XOPEN_SOURCE=500... $ECHO_C" >&6
if test "${pac_cv_struct_timespec_defined_with_xopen500+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#define _XOPEN_SOURCE 500
#include <time.h>
int
main ()
{

    struct timespec t;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_struct_timespec_defined_with_xopen500=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_struct_timespec_defined_with_xopen500=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $pac_cv_struct_timespec_defined_with_xopen500" >&5
echo "${ECHO_T}$pac_cv_struct_timespec_defined_with_xopen500" >&6
	if test "$pac_cv_struct_timespec_defined_with_xopen500" = "yes" ; then
	    # We need to define _XOPEN_SOURCE=500, but we need to ensure that
	    # this is done before any include files are loaded.  At
	    # this point it is really too late to add this definition,
	    # since it may make other tests incompatible.
	    { { echo "$as_me:$LINENO: error: The available timer requires _XOPEN_SOURCE=500.  Add -D_XOPEN_SOURCE=500 to CFLAGS and rerun configure" >&5
echo "$as_me: error: The available timer requires _XOPEN_SOURCE=500.  Add -D_XOPEN_SOURCE=500 to CFLAGS and rerun configure" >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi
    #
    # FreeBSD 4.3 incorrectly puts the header into sys/time.h;
    # time.h is required (see pages 45 and 46 in the POSIX standard).
    # See if we can compile
    echo "$as_me:$LINENO: checking for CLOCK_REALTIME defined in time.h" >&5
echo $ECHO_N "checking for CLOCK_REALTIME defined in time.h... $ECHO_C" >&6
if test "${pac_cv_posix_clock_realtime+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <time.h>
int
main ()
{

    clockid_t cid = CLOCK_REALTIME;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_posix_clock_realtime=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_posix_clock_realtime=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_posix_clock_realtime" >&5
echo "${ECHO_T}$pac_cv_posix_clock_realtime" >&6
    if test "$pac_cv_posix_clock_realtime" = "no" ; then
         { echo "$as_me:$LINENO: WARNING: POSIX timer requires definitions in time.h" >&5
echo "$as_me: WARNING: POSIX timer requires definitions in time.h" >&2;}
	 # Check for the definition in sys/time.h, which is where
	 # OpenBSD and FreeBSD have put it by mistake
         cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <time.h>
#include <sys/time.h>
int
main ()
{

    clockid_t cid = CLOCK_REALTIME;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_posix_clock_realtime=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_posix_clock_realtime=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
	if test "$pac_cv_posix_clock_realtime" = yes ; then
	    { echo "$as_me:$LINENO: WARNING: sys/time.h required for POSIX timer" >&5
echo "$as_me: WARNING: sys/time.h required for POSIX timer" >&2;}

cat >>confdefs.h <<\_ACEOF
#define NEEDS_SYS_TIME_H 1
_ACEOF

	else
	    { { echo "$as_me:$LINENO: error: Cannot find the definition of CLOCK_REALTIME for the POSIX timer" >&5
echo "$as_me: error: Cannot find the definition of CLOCK_REALTIME for the POSIX timer" >&2;}
   { (exit 1); exit 1; }; }
	fi
    fi
    ;;

    gettimeofday)
    MPID_TIMER_TYPE="struct timeval"
    # We may have already tested for gettimeofday.  If we got a "yes",
    # we're good to go
    if test "$ac_cv_func_gettimeofday" != "yes" ; then
        echo "$as_me:$LINENO: checking for gettimeofday" >&5
echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
if test "${ac_cv_func_gettimeofday+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define gettimeofday innocuous_gettimeofday

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gettimeofday (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef gettimeofday

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gettimeofday ();
/* 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_gettimeofday) || defined (__stub___gettimeofday)
choke me
#else
char (*f) () = gettimeofday;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != gettimeofday;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gettimeofday=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_gettimeofday=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
if test $ac_cv_func_gettimeofday = yes; then
  :
else

         { { echo "$as_me:$LINENO: error: Requested timer gettimeofday is not available" >&5
echo "$as_me: error: Requested timer gettimeofday is not available" >&2;}
   { (exit 1); exit 1; }; }

fi

    fi
    ;;

    linux86_cycle|linux86_cycle_2)
    echo "$as_me:$LINENO: checking that linux86 cycle counter is available" >&5
echo $ECHO_N "checking that linux86 cycle counter is available... $ECHO_C" >&6
if test "${pac_cv_linux86_cycle+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

    long long var, *var_ptr=&var;
    __asm__ __volatile__  ( "cpuid ; rdtsc ; mov %%edx,%1 ; mov %%eax,%0"
                            : "=m" (*((char *) (var_ptr))),
                              "=m" (*(((char *) (var_ptr))+4))
                            :: "eax", "ebx", "ecx", "edx" );

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_linux86_cycle=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_linux86_cycle=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_linux86_cycle" >&5
echo "${ECHO_T}$pac_cv_linux86_cycle" >&6
    if test "$pac_cv_linux86_cycle" != "yes" ; then
        { { echo "$as_me:$LINENO: error: Linux86 cycle counter is not available on this system and or with the $CC compiler" >&5
echo "$as_me: error: Linux86 cycle counter is not available on this system and or with the $CC compiler" >&2;}
   { (exit 1); exit 1; }; }
    fi
    MPID_TIMER_TYPE="long long"
    ;;

    gcc_ia64_cycle)
    echo "$as_me:$LINENO: checking that IPF timer is available" >&5
echo $ECHO_N "checking that IPF timer is available... $ECHO_C" >&6
if test "${pac_cv_ia64_cycle+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

    long var, *var_ptr=&var;
#ifdef __INTEL_COMPILER
#include "ia64regs.h"
    var=__getReg(_IA64_REG_AR_ITC);
#else
    __asm__ __volatile__("mov %0=ar.itc" : "=r" (var_ptr));
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_gcc_ia64_cycle=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_gcc_ia64_cycle=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_ia64_cycle" >&5
echo "${ECHO_T}$pac_cv_ia64_cycle" >&6
    if test "$pac_cv_gcc_ia64_cycle" != "yes" ; then
        { { echo "$as_me:$LINENO: error: IPF cycle counter is not available on this system and or with the $CC compiler" >&5
echo "$as_me: error: IPF cycle counter is not available on this system and or with the $CC compiler" >&2;}
   { (exit 1); exit 1; }; }
     fi
     MPID_TIMER_TYPE="long"
     ;;

    linuxalpha_cycle)
    # See the code in mpidtime.c.  This is a trivial test for now.
    echo "$as_me:$LINENO: checking that linux alpha cycle counter is available" >&5
echo $ECHO_N "checking that linux alpha cycle counter is available... $ECHO_C" >&6
if test "${pac_cv_linuxalpha_cycle+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

#error "LinuxAlpha cycle counter not supported"

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_linuxalpha_cycle=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

pac_cv_linuxalpha_cycle=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $pac_cv_linuxalpha_cycle" >&5
echo "${ECHO_T}$pac_cv_linuxalpha_cycle" >&6
    if test "$pac_cv_linuxalpha_cycle" != "yes" ; then
        { { echo "$as_me:$LINENO: error: LinuxAlpha cycle counter is not available on this system  and/or with the $CC compiler" >&5
echo "$as_me: error: LinuxAlpha cycle counter is not available on this system  and/or with the $CC compiler" >&2;}
   { (exit 1); exit 1; }; }
    fi
    MPID_TIMER_TYPE="long"
    ;;

    *)
    { { echo "$as_me:$LINENO: error: Invalid timer type $timer_type" >&5
echo "$as_me: error: Invalid timer type $timer_type" >&2;}
   { (exit 1); exit 1; }; }
    ;;
esac
# Convert timer type to upper case
timer_type=`echo $timer_type | \
    tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
MPICH_TIMER_KIND=USE_$timer_type

# ----------------------------------------------------------------------------
# End of code for timer support (except for ac_ OUTPUT)
# ----------------------------------------------------------------------------
# Setup other replaceable values


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/_/ /'`
	# Make the sizeof AINT available to other configures
	MPI_SIZEOF_AINT=$len
	export MPI_SIZEOF_AINT
        break
    fi
done


# If sizeof(mpi_aint) = sizeof(int), set this value
if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_void_p" ; then

cat >>confdefs.h <<\_ACEOF
#define SIZEOF_INT_IS_AINT 1
_ACEOF

fi
#
# define MPIU_Size_t - used to express the size of objects
# This is used in src/include/mpitypedefs.h to define MPIU_SIZE_T,
# and is used in various parts of ch3 and mpid/common/sock.
# This is used to handle the potential problem that a message is
# too long to fit within an int.  However, we may still need to make
# some more adjustments in the code (this may not be used everywhere
# that it is needed).
#
# FIXME: this should really be in a util configure file, but we don't
# have one at the moment
#
MPIU_SIZE_T="unsigned $MPI_AINT"

cat >>confdefs.h <<_ACEOF
#define MPIU_SIZE_T $MPIU_SIZE_T
_ACEOF


#
# 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 $devicedir/setup_device ; then
    echo sourcing $devicedir/setup_device
    . $devicedir/setup_device
fi
export AR
export RANLIB
export MPILIBNAME
export PMPILIBNAME
export CC
export CPPFLAGS
export LIBS
export CXX
export CXXFLAGS
export FFLAGS
export CFLAGS
export F90FLAGS
export LDFLAGS
# Make sure that any Fortran 77 and Fortran 90 compilers are exported to
# the subdir builds (in particular, ROMIO may try to use the Fortran 90
# compiler to determine the Fortran 90 KINDS for MPI_OFFSET_KIND).
export F77
export F90
#
# -----------------------------------------------------------------------------
# Configure threads first.  This is necessary to obtain all required
# definitions, flags, and libraries that the other subsystems will need
#
#
# -----------------------------------------------------------------------------
MPE_THREAD_DEFAULT=${MPE_THREAD_DEFAULT-posix}


# Check whether --with-thread-package or --without-thread-package was given.
if test "${with_thread_package+set}" = set; then
  withval="$with_thread_package"

else
  with_thread_package=${MPE_THREAD_DEFAULT}
fi;

if test "$with_thread_package" = "yes" ; then
    with_thread_package=posix
fi

case $with_thread_package in
    posix|pthreads)
	with_thread_package=posix

for ac_header in pthread.h
do
ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 27965 "configure"
#include "confdefs.h"
#include <$ac_header>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done


for ac_func in pthread_yield
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

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 "$as_me:$LINENO: checking for library containing pthread_key_create" >&5
echo $ECHO_N "checking for library containing pthread_key_create... $ECHO_C" >&6
if test "${ac_cv_search_pthread_key_create+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_pthread_key_create=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_pthread_key_create="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_pthread_key_create" = no; then
  for ac_lib in pthread; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_pthread_key_create="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_pthread_key_create" >&5
echo "${ECHO_T}$ac_cv_search_pthread_key_create" >&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"
  found=yes
else
  found=no
fi

	if test "$found" != "yes" ; then
	   { { echo "$as_me:$LINENO: error: unable to find pthreads library" >&5
echo "$as_me: error: unable to find pthreads library" >&2;}
   { (exit 1); exit 1; }; }
        elif test "$ac_cv_search_pthread_key_create" = "none required" ; then
	    # Solaris provides a pthread library that does't work
	    # in libc; you must link with -lpthread to get correct
	    # behavior.  Here is a simple test, based on a failure that
	    # we observed
	    echo "$as_me:$LINENO: checking whether pthread routines without explicit lib are broken" >&5
echo $ECHO_N "checking whether pthread routines without explicit lib are broken... $ECHO_C" >&6
	    if test "$cross_compiling" = yes; then
  pac_cv_lib_pthread_broken=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include<pthread.h>
int main() {
    pthread_t id = pthread_self();
    int       rc;
    rc = pthread_equal( id, id );
    if (rc) return 0;
    return 1;}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_lib_pthread_broken=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_lib_pthread_broken=yes
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
  	    echo "$as_me:$LINENO: result: $pac_cv_lib_pthread_broken" >&5
echo "${ECHO_T}$pac_cv_lib_pthread_broken" >&6
	    if test "$pac_cv_lib_pthread_broken" = yes ; then
                # Try again with -lpthread
	        echo "$as_me:$LINENO: checking whether pthread routines with explicit lib are broken" >&5
echo $ECHO_N "checking whether pthread routines with explicit lib are broken... $ECHO_C" >&6
		saveLIBS=$LIBS
		LIBS="$LIBS -lpthread"
	        if test "$cross_compiling" = yes; then
  pac_cv_lib_pthread_broken_explicit=unknown
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include<pthread.h>
int main() {
    pthread_t id = pthread_self();
    int       rc;
    rc = pthread_equal( id, id );
    if (rc) return 0;
    return 1;}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  pac_cv_lib_pthread_broken_explicit=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
pac_cv_lib_pthread_broken_explicit=yes
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
  	    echo "$as_me:$LINENO: result: $pac_cv_lib_pthread_broken_explicit" >&5
echo "${ECHO_T}$pac_cv_lib_pthread_broken_explicit" >&6
	    if test "$pac_cv_lib_pthread_broken_explicit" != no ; then
	        LIBS=$saveLIBS
            fi
	fi
	fi
	THR_LIBS="$THR_LIBS -lpthread"
	;;
    solaris)

for ac_header in thread.h
do
ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

pac_found_header=no
if test "$CPP" != "/lib/cpp" ; then
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  pac_found_header=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi
rm -f conftest.err conftest.$ac_ext
fi
# If cpp failed, see if the compiler accepts the header.
if test "$pac_found_header" != "yes" ; then
    cat >conftest.c<<EOF
#line 28392 "configure"
#include "confdefs.h"
#include <$ac_header>
int conftest() {return 0;}
EOF
    ac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
    if { (eval echo "$as_me:$LINENO: \"$ac_compile_for_cpp\"") >&5
  (eval $ac_compile_for_cpp) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
	pac_found_header=yes
    else
        echo "configure: failed program was:" >&5
        cat conftest.c >&5
    fi
    rm -f conftest*
fi
# Finally, set the ac variable.
if test "$pac_found_header" = "yes" ; then
    eval "ac_cv_header_$ac_safe=yes"
else
    eval "ac_cv_header_$ac_safe=no"
fi

fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done


for ac_func in thr_yield
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

	echo "$as_me:$LINENO: checking for library containing thr_create" >&5
echo $ECHO_N "checking for library containing thr_create... $ECHO_C" >&6
if test "${ac_cv_search_thr_create+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS=$LIBS
ac_cv_search_thr_create=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_thr_create="none required"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_thr_create" = no; then
  for ac_lib in thread; do
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* 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;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_search_thr_create="-l$ac_lib"
break
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
  done
fi
LIBS=$ac_func_search_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_search_thr_create" >&5
echo "${ECHO_T}$ac_cv_search_thr_create" >&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"
  found=yes
else
  found=no
fi

	if test "$found" != "yes" ; then
	   { { echo "$as_me:$LINENO: error: unable to find Solaris threads library" >&5
echo "$as_me: error: unable to find Solaris threads library" >&2;}
   { (exit 1); exit 1; }; }
	fi
	# FIXME: need to add -mt if using solaris compilers
	;;
    no|none)
	with_thread_package=none
	;;
    *)
	{ { echo "$as_me:$LINENO: error: The specified thread package, $with_thread_package, is not supported." >&5
echo "$as_me: error: The specified thread package, $with_thread_package, is not supported." >&2;}
   { (exit 1); exit 1; }; }
	;;
esac






for ac_func in sched_yield yield usleep sleep select
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
{
#endif
/* 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 ();
/* 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
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != $ac_func;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


#
# THR_LDFLAGS are added to the MPI_LDFLAGS (used to link user MPI programs)
# THR_CFLAGS should be used only to compile the MPI library, not to compile
# user programs.  We cannot set CFLAGS to THR_CFLAGS because we will
# use CFLAGS to set MPI_CFLAGS at the end of this configure step.
# FIXME: We need to propagate THR_CFLAGS
if test "$with_thread_package" != "none" ; then
    if $CC -V 2>&1 | grep -i "sun workshop" 2>&1 >/dev/null ; then
        # FIXME: the above should really be done using a feature test
        # FIXME: the C++, F77 and F90 compilers also need the -mt flag
	# However, the reason that we do this here is that the Sun compilers
	# provide non-working versions of the thread mutex routines
	# if -mt is not selected.
	THR_CFLAGS="$THR_CFLAGS -mt"
	THR_LDFLAGS="$THR_LDFLAGS -mt"
    else
	# FIXME: the reentrant flags belong in DEFS, but DEFS doesn't
        # appear to be propagated by MPICH2
	# THR_DEFS="$THR_DEFS -D_REENTRANT -D_THREAD_SAFE"
	THR_CFLAGS="$THR_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
    fi
fi

use_thread_pkg="MPICH_THREAD_PKG_`echo $with_thread_package | \
    tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"

cat >>confdefs.h <<_ACEOF
#define USE_THREAD_PKG $use_thread_pkg
_ACEOF


MPE_THREAD_TYPEDEFS="${srcdir}/src/util/thread/${with_thread_package}_types.i"
MPE_THREAD_FUNCS="${srcdir}/src/util/thread/${with_thread_package}_funcs.i"



# FIXME:
#   Any thread definitions need to be added to correct places for builds,
#   without breaking the configure tests.
# DEFS="$DEFS $THR_DEFS"
# CFLAGS="$CFLAGS $THR_CFLAGS"
# LDFLAGS="$LDFLAGS $THR_LDFLAGS"
# Changing LIBS changes the tests that are performed (e.g., any such
# library must exist when the assignment is made)
# LIBS="$LIBS -lmpe_thread $THR_LIBS"







MPE_THREAD_LIB_NAME=${MPILIBNAME}


MPE_THREAD_SOURCE_FILES="src/util/thread/mpe_thread.c:$srcdir/src/util/thread/mpe_thread_${with_thread_package}.c"
          ac_config_commands="$ac_config_commands default-4"


if test -f src/util/thread/localdefs ; then
    . src/util/thread/localdefs
elif test -f $use_top_srcdir/src/util/thread/localdefs ; then
    . $use_top_srcdir/src/util/thread/localdefs
fi
# -----------------------------------------------------------------------------
# End of thread configure
# -----------------------------------------------------------------------------

#
# Update the cache first with the results of the previous configure steps
# We don't use the subdir cache because ensuring that the cache is consistant
# with the way in which configure wishes to use it is very difficult and
# too prone to error.
# -----------------------------------------------------------------------------
# experiment with creating a cache file
#if test "$CONF_USE_CACHEFILE" = yes ; then
#    basecachefile=`pwd`/cache.base
#    set | grep ac_cv > $basecachefile
#    # Tell other configures to load this file
#    echo "Creating and exporting the base cache file $basecachefile"
#    CONF_BASE_CACHEFILE=$basecachefile
#    export CONF_BASE_CACHEFILE
#fi

# Check whether --enable-base-cache or --disable-base-cache was given.
if test "${enable_base_cache+set}" = set; then
  enableval="$enable_base_cache"

else
  enable_base_cache=default
fi;
# The default case is controlled by the environment variable CONF_USE_CACHEFILE
if test "$enable_base_cache" = "default" ; then
    if test "$CONF_USE_CACHEFILE" = yes ; then
        enable_base_cache=yes
    else
        enable_base_cache=no
    fi
fi
if test "$enable_base_cache" != no ; then
    if test "$enable_base_cache" = yes ; then
        basecachefile=`pwd`/cache.base
    else
        basecachefile=`pwd`/$enable_base_cache
    fi
    set | grep ac_cv > $basecachefile
    # Tell other configures to load this file
    echo "Creating and exporting the base cache file $basecachefile"
    CONF_BASE_CACHEFILE=$basecachefile
    export CONF_BASE_CACHEFILE
fi

# -----------------------------------------------------------------------------

#
# Configure the device second.  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)

if test "$DEBUG_SUBDIR_CACHE" = yes ; then
    set -x
fi
for subsys in $devsubsystems $subsystems ; do
    if test -x $subsys/mpich2setup ; then
        $subsys/mpich2setup
    elif test -x $use_top_srcdir/$subsys/mpich2setup ; then
        $use_top_srcdir/$subsys/mpich2setup
    elif test -x $use_top_srcdir/$subsys/configure ; then
        ac_sub_configure_args=""
	# Strip off the args that we need to update
        for ac_arg in $ac_configure_args ; do
	    # Remove any quotes around the args (added by configure)
	    ac_narg=`expr x$ac_arg : 'x'"'"'\(.*\)'"'"`
	    if test -n "$ac_narg" ; then ac_arg=$ac_narg ; fi
	    case $ac_arg in
	        -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
    | --c=*) ;;
	  --config-cache | -C)
	  ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;;
    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
      ;;
	-*)
        ac_sub_configure_args="$ac_sub_configure_args $ac_arg"
	;;

        CPPFLAGS=*)
	ac_sub_configure_args="$ac_sub_configure_args 'CPPFLAGS=$CPPFLAGS'"
        ;;

    	*)
	    ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
	    esac
        done

	# add in the correct prefix argument
        ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"

	# Create the directories if necessary

#
# Build any intermediate directories
for dir in $subsys ; do
    saveIFS="$IFS"
    IFS="/"
    tmp_curdir=""
    for tmp_subdir in $dir ; do
	tmp_curdir="${tmp_curdir}$tmp_subdir"
	if test ! -d "$tmp_curdir" ; then mkdir "$tmp_curdir" ; fi
        tmp_curdir="${tmp_curdir}/"
    done
    IFS="$saveIFS"
done

	# We use eval to handle quotes around the arguments added by
	# autoconf when saving the args
        if (cd $subsys && eval $use_top_srcdir/$subsys/configure $ac_sub_configure_args ) ; then
	    :
	else
	    { { echo "$as_me:$LINENO: error: Configure of $subsys failed!" >&5
echo "$as_me: error: Configure of $subsys failed!" >&2;}
   { (exit 1); exit 1; }; }
	fi
    fi

    # Check for any localdefs files.  These may be created, so we look in
    # the local directory first.
    if test -f $subsys/localdefs ; then
        . $subsys/localdefs
    elif test -f $use_top_srcdir/$subsys/localdefs ; then
        . $use_top_srcdir/$subsys/localdefs
    fi
done
if test "$DEBUG_SUBDIR_CACHE" = yes -a "$enable_echo" != yes ; then
    set +x
fi

## The MPE configure requires MPI_LIBS, and that requires all of the LIBS
#MPI_LIBS="$MPI_LIBS $LIBS"
#
# 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
#
# Make subsystems available to makefiles.
subsystems="$devsubsystems $subsystems $bindingsubsystems"

#

if test "$enable_f77" != "yes" ; then
    # These are Fortran datatypes ONLY.  Set to null if no Fortran compiler.
    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 "$as_me:$LINENO: WARNING: Could not define Fortran MPI datatypes for C" >&5
echo "$as_me: WARNING: Could not define Fortran MPI datatypes for C" >&2;}

cat >>confdefs.h <<\_ACEOF
#define HAVE_NO_FORTRAN_MPI_TYPES_IN_C 1
_ACEOF

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














# FIXME: 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"
    # Get and export the size of this type if possible
    if test -z "$MPI_SIZEOF_OFFSET" ; then
        # set a default
                echo "$as_me:$LINENO: checking the sizeof MPI_Offset" >&5
echo $ECHO_N "checking the sizeof MPI_Offset... $ECHO_C" >&6
if test "${ac_cv_sizeof_MPI_Offset+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

        ac_cv_sizeof_MPI_Offset=unknown
        rm -f conftest*
        cat >> conftest.c <<EOF
#include <stdio.h>
int main( int argc, char **argv )
{
    $MPI_OFFSET a;
    FILE *f = fopen("conftestval", "w" );
    if (! f) exit(1);
    fprintf( f, "%ld\n", (long)sizeof(a) );
    fclose(f);
    return 0;
}
EOF
        if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest$ac_exeext ; then
            if ./conftest$ac_exeext ; then
                #success
                ac_cv_sizeof_MPI_Offset=`cat conftestval`
            else
                # failure
                { echo "$as_me:$LINENO: WARNING: Unable to run the program to determine the size of MPI_Offset" >&5
echo "$as_me: WARNING: Unable to run the program to determine the size of MPI_Offset" >&2;}
	        echo "configure: failed program was:" >&5
	        cat conftest.c >&5
	    fi
        else
	    # failure
            { echo "$as_me:$LINENO: WARNING: Unable to build the program to determine the size of MPI_Offset" >&5
echo "$as_me: WARNING: Unable to build the program to determine the size of MPI_Offset" >&2;}
	    echo "configure: failed program was:" >&5
	    cat conftest.c >&5
        fi
        rm -f conftest*

fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_MPI_Offset" >&5
echo "${ECHO_T}$ac_cv_sizeof_MPI_Offset" >&6
	if test "$ac_cv_sizeof_MPI_Offset" != "unknown" ; then
  	    MPI_SIZEOF_OFFSET=$ac_cv_sizeof_MPI_Offset
        fi
    fi
    export MPI_SIZEOF_OFFSET
else
    # Make a guess at the appropriate definition for offset.  Try to
    # find a 64bit type.
    if test "$ac_cv_sizeof_long" = 8 ; then
        MPI_OFFSET="long"
	# Make the size of this type available to other configures
	MPI_SIZEOF_OFFSET=8
	export MPI_SIZEOF_OFFSET
    elif test "$ac_cv_sizeof_long_long" = 8 ; then
        MPI_OFFSET="long long"
	# Make the size of this type available to other configures
	MPI_SIZEOF_OFFSET=8
	export MPI_SIZEOF_OFFSET
    else
        MPI_OFFSET=long
    fi
fi

#
# FIXME: we need an explanation of why we need both MPI_OFFSET and
# MPI_OFFSET_TYPEDEF.   Why is MPI_OFFSET_TYPEDEF necessary?
MPI_OFFSET_TYPEDEF="typedef $MPI_OFFSET MPI_Offset;"

#
# Fortran type for an Offset type (needed to define MPI_DISPLACEMENT_CURRENT
# The value for this comes from ROMIO, and is needed in mpif.h.in
# First, we check that this works with both Fortran compilers (if
# they are defined)
#
# If there is not FORTRAN_MPI_OFFSET type (because ROMIO is disabled),
# just use INTEGER
if test -z "$FORTRAN_MPI_OFFSET" ; then
    FORTRAN_MPI_OFFSET=INTEGER
fi
if test "$enable_f77" = yes -a "$enable_f90" = yes ; then
    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    echo "$as_me:$LINENO: checking whether the Fortran Offset type works with Fortran77" >&5
echo $ECHO_N "checking whether the Fortran Offset type works with Fortran77... $ECHO_C" >&6
    cat >conftest.$ac_ext <<_ACEOF
      program main
      $FORTRAN_MPI_OFFSET i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  has_f77_offsettype=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

has_f77_offsetype=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    echo "$as_me:$LINENO: result: $has_f77_offsettype" >&5
echo "${ECHO_T}$has_f77_offsettype" >&6

if test "X$pac_save_level" = "X" ; then
    pac_save_CC="$CC"
    pac_save_CXX="$CXX"
    pac_save_F77="$F77"
    pac_save_F90="$F90"
    pac_save_prog_cc_cross="$ac_cv_prog_cc_cross"
    pac_save_prog_f77_cross="$ac_cv_prog_f77_cross"
    pac_save_prog_cxx_cross="$ac_cv_prog_cxx_cross"
    pac_save_prog_f90_cross="$pac_cv_prog_f90_cross"
    if test "X$CPP" = "X" ; then
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    fi
    pac_save_CPP="$CPP"
    CC="${TESTCC:=$CC}"
    CXX="${TESTCXX:=$CXX}"
    F77="${TESTF77:=$F77}"
    F90="${TESTF90:=$F90}"
    if test -z "$TESTCPP" ; then

if test -z "$TESTCPP"; then
  if test "${pac_cv_prog_TESTCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

  rm -f conftest.*
  cat > conftest.c <<EOF
  #include <assert.h>
  Syntax Error
EOF
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  TESTCPP="${TESTCC-cc} -E"
  ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out"
  if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
      pac_cv_prog_TESTCPP="$TESTCPP"
  fi
  if test "X$pac_cv_prog_TESTCPP" = "X" ; then
      TESTCPP="${TESTCC-cc} -E -traditional-cpp"
      ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out"
      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
          pac_cv_prog_TESTCPP="$TESTCPP"
      fi
  fi
  if test "X$pac_cv_prog_TESTCPP" = "X" ; then
      TESTCPP="${TESTCC-cc} -nologo -E"
      ac_try="$TESTCPP conftest.c >/dev/null 2>conftest.out"
      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } ; then
          pac_cv_prog_TESTCPP="$TESTCPP"
      fi
  fi
  if test "X$pac_cv_prog_TESTCPP" = "X" ; then
      # Extract the first word of "cpp", so it can be a program name with args.
set dummy cpp; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_TESTCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $TESTCPP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TESTCPP="$TESTCPP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TESTCPP="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

  ;;
esac
fi
TESTCPP=$ac_cv_path_TESTCPP

if test -n "$TESTCPP"; then
  echo "$as_me:$LINENO: result: $TESTCPP" >&5
echo "${ECHO_T}$TESTCPP" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  fi
  rm -f conftest.*

fi

else
  pac_cv_prog_TESTCPP="$TESTCPP"
fi

    fi
    CPP="${TESTCPP:=$CPP}"
    pac_save_level="0"
    # Recompute cross_compiling values and set for the current language
    # This is just:


    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

    if test "$pac_cross_compiling" = "yes" ; then
        ac_cv_prog_cc_cross=yes
	ac_cv_prog_cc_works=yes
    else
        cat > conftest.$ac_ext <<EOF

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

main(){return(0);}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && 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*
    fi
    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    # Ignore Fortran if we aren't using it.
    if test -n "$F77" ; then


        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	if test "$pac_cross_compiling" = "yes" ; then
	    ac_cv_prog_f77_cross=yes
	    ac_cv_prog_f77_works=yes
	else
            cat > conftest.$ac_ext <<EOF

      program conftest
      end

EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext}; then
  ac_cv_prog_f77_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_f77_cross=no
  else
    ac_cv_prog_f77_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_f77_works=no
fi
rm -fr conftest*
	fi
        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    fi
    # Ignore C++ if we aren't using it.
    if test -n "$CXX" ; then


        ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

        cat > conftest.$ac_ext <<EOF

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

int main(){return(0);}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_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_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    fi
    # Ignore Fortran 90 if we aren't using it.
    if test -n "$F90" ; then


        ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

	        	if test "$pac_cross_compiling" = "yes" ; then
	    ac_cv_prog_f90_cross=yes
	    ac_cv_prog_f90_works=yes
	else
            cat > conftest.$ac_ext << EOF
      program conftest
      end
EOF
            if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
              ac_cv_prog_f90_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_f90_cross=no
              else
                  ac_cv_prog_f90_cross=yes
              fi
            else
              echo "configure: failed program was:" >&5
              cat conftest.$ac_ext >&5
              ac_cv_prog_f90_works=no
            fi
	fi
	pac_cv_prog_f90_cross="$ac_cv_prog_f90_cross"
	pac_cv_prog_f90_works="$ac_cv_prog_f90_works"
        rm -fr conftest*
        ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

    fi
fi
pac_save_level=`expr $pac_save_level + 1`

    ac_ext=${ac_f90ext-f}
ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f90_compiler_gnu

    echo "$as_me:$LINENO: checking whether the Fortran Offset type works with Fortran90" >&5
echo $ECHO_N "checking whether the Fortran Offset type works with Fortran90... $ECHO_C" >&6
    cat >conftest.$ac_ext <<_ACEOF
      program main
      $FORTRAN_MPI_OFFSET i
      end
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_f90_werror_flag"			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  has_f90_offsettype=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

has_f90_offsetype=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    echo "$as_me:$LINENO: result: $has_f90_offsettype" >&5
echo "${ECHO_T}$has_f90_offsettype" >&6

pac_save_level=`expr $pac_save_level - 1`
if test "X$pac_save_level" = "X0" ; then
    CC="$pac_save_CC"
    CXX="$pac_save_CXX"
    F77="$pac_save_F77"
    F90="$pac_save_F90"
    CPP="$pac_save_CPP"
    ac_cv_prog_cc_cross="$pac_save_prog_cc_cross"
    ac_cv_prog_f77_cross="$pac_save_prog_f77_cross"
    ac_cv_prog_cxx_cross="$pac_save_prog_cxx_cross"
    pac_cv_prog_f90_cross="$pac_save_prog_f90_cross"
    pac_save_level=""
fi

    if test "$has_f77_offsettype" != yes -o "$has_f90_offsettype" != yes ; then
        { echo "$as_me:$LINENO: WARNING: mpif.h is not compatible with both $F77 and $F90.  We \
recommend that you set both F77 and F90 to the same compiler and reconfigure." >&5
echo "$as_me: WARNING: mpif.h is not compatible with both $F77 and $F90.  We \
recommend that you set both F77 and F90 to the same compiler and reconfigure." >&2;}
    fi
fi

#


# -----------------------------------------------------------------------------
# Get the value of MPI_MAX_PROCESSOR_NAME
if test -z "$MPID_MAX_PROCESSOR_NAME" ; then
    if test -z "$MPI_MAX_PROCESSOR_NAME" ; then
       MPI_MAX_PROCESSOR_NAME=128
    fi
    { echo "$as_me:$LINENO: WARNING: The $with_device device did not set the maximum size of a processor name, $MPI_MAX_PROCESSOR_NAME being used." >&5
echo "$as_me: WARNING: The $with_device device did not set the maximum size of a processor name, $MPI_MAX_PROCESSOR_NAME being used." >&2;}
else
    MPI_MAX_PROCESSOR_NAME=$MPID_MAX_PROCESSOR_NAME
fi

# -----------------------------------------------------------------------------
# Set the libraries to use in building programs
if test "$NEEDSPLIB" = "yes" ; then
    EXAMPLE_LIBS="-l$PMPILIBNAME -l$MPILIBNAME $LIBS"
else
    EXAMPLE_LIBS="-l$MPILIBNAME $LIBS"
fi

# default settings for compiler and linker flags
# Note:
#   The MPI_CFLAGS must not contain *all* of the CFLAGS, just the
#   flags needed to compile with the mpi.h header.  Normally, no flags
#   should be required to compile MPI programs (otherwise, users that choose
#   not to use the compile scripts will submit bug reports).
#   For now, we try using no extra Flags.  (Never, ever set MPI_CFLAGS to
#   $CFLAGS)
#
# Unlike MPI_CFLAGS, the linker flags will always be needed to ensure that
# all of the required libraries are present.
MPI_LDFLAGS="$MPI_LDFLAGS $LDFLAGS $THR_LDFLAGS"





#
# Add a definition that is used to help support Windows DLLs (used in mpi.h.in)
MPIU_DLL_SPEC_DEF="#define MPIU_DLL_SPEC"


# Get the location 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




# set and export values that the test/mpi configure will reference to ensure
# that the correct decisions are made since this configure happens before the
# MPICH2 library is built.
MPICH2_ENABLE_F77=$enable_f77
MPICH2_ENABLE_F90=$enable_f90
MPICH2_ENABLE_CXX=$enable_cxx
export MPICH2_ENABLE_F77
export MPICH2_ENABLE_F90
export MPICH2_ENABLE_CXX
MPICH2_BASEF77=$F77
MPICH2_BASECXX=$CXX
MPICH2_BASEF90=$F90
export MPICH2_BASE_F77
export MPICH2_BASE_F90
export MPICH2_BASE_CXX
# MPI_SRCDIR gives the test/mpi configure the location of the source
# files for an MPI implementation
if test -n "$ac_abs_srcdir" ; then
    MPI_SRCDIR=$ac_abs_srcdir
fi
# Pass these two values with "MPI" names to the test configure
MPI_NO_SPAWN=$MPID_NO_SPAWN
export MPI_NO_SPAWN
MPI_NO_RMA=$MPID_NO_RMA
export MPI_NO_RMA


subdirs="$subdirs test/mpi"

          ac_config_commands="$ac_config_commands default-5"


if test -z "$includebuild_dir" ; then
    includebuild_dir=`pwd`/src/include
fi
if test -z "$libbuild_dir" ; then
    libbuild_dir=`pwd`/lib
fi
if test -z "$modincbuild_dir" ; then
   # The include files may be in a different directory from the mpif.h file
   modincbuild_dir=$top_build_dir/src/binding/f90
fi

          ac_config_commands="$ac_config_commands default-6"


# move the mpich2version file into the bin directory of the build tree
          ac_config_commands="$ac_config_commands default-7"


# Move the mpio.h file into the build directories for testing
#export top_srcdir
#export enable_romio
          ac_config_commands="$ac_config_commands default-8"


          ac_config_commands="$ac_config_commands default-9"


          ac_config_commands="$ac_config_commands default-10"


          ac_config_commands="$ac_config_commands default-11"


          ac_config_commands="$ac_config_commands default-12"

          ac_config_commands="$ac_config_commands default-13"


          ac_config_commands="$ac_config_commands default-14"


# ----------------------------------------------------------------------------
# Set the compiler flags.  There are two components to each of the compiler
# flags:
#
# 1. Flags used to compile MPICH2 but not needed to compile user programs,
#    for example, optimization options.
#
# 2. Flags that change the language accepted by the compiler or the code
#    generated by the compiler.  For example, an option to change from
#    32-bit to 64 bit instructions, or to generate only lower-case external
#    names.
#    (An alternate approach is to provide them directly in the variable
#    that names the compiler, e.g., CC for the C compiler.)
#
# Because of the way that configure works, the flags used to compile
# MPICH must be placed in the "usual" places, e.g. CFLAGS (the values
# are captured during the [AC_INIT] step).
#
# Normally, the flags used in 1 and 2 will be the same.  If, for some
# reason, the user needs different flags in the compilation scripts,
# they can override the choice in CFLAGS etc. by setting MPI_CFLAGS.
#
if test -z "$MPI_CFLAGS" -a -n "$CFLAGS" ; then
    MPI_CFLAGS="$CFLAGS"
fi
if test -z "$MPI_CXXFLAGS" -a -n "$CXXFLAGS" ; then
    MPI_CXXFLAGS="$CXXFLAGS"
fi
if test -z "$MPI_FFLAGS" -a -n "$FFLAGS" ; then
    MPI_FFLAGS="$FFLAGS"
fi
if test -z "$MPI_F90FLAGS" -a -n "$F90FLAGS" ; then
    MPI_F90FLAGS="$F90FLAGS"
fi
export MPI_CFLAGS
export MPI_FFLAGS
export MPI_CXXFLAGS
export MPI_F90FLAGS

# For the examples, we want to use the scripts to encourage users
# to use them and to make them work more robustly with shared libraries
# and, for Fortran 90, any special Fortran 90 module features.
if test -z "$MPICC" ; then MPICC='$(bindir)/mpicc' ; fi
if test -z "$MPIF77" ; then MPIF77='$(bindir)/mpif77' ; fi
if test -z "$MPIF90" ; then MPIF90='$(bindir)/mpif90' ; fi
if test -z "$MPICXX" ; then MPICXX='$(bindir)/mpicxx' ; fi






cat >>confdefs.h <<\_ACEOF
#define HAVE_MPICHCONF 1
_ACEOF


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ac_config_files="$ac_config_files Makefile src/Makefile src/include/Makefile src/include/mpichtimer.h src/binding/Makefile src/binding/cxx/Makefile src/binding/cxx/mpicxx.h src/binding/f77/Makefile src/binding/f77/mpif.h src/binding/f77/setbotf.f src/binding/f90/Makefile src/env/mpicc src/env/mpicc.conf src/env/mpicc.bash src/env/mpicxx src/env/mpicxx.conf src/env/mpicxx.bash src/env/mpif77 src/env/mpif77.conf src/env/mpif77.bash src/env/mpif90 src/env/mpif90.conf src/env/mpif90.bash src/env/mpich2version src/env/Makefile src/util/createshlib 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/misc/Makefile src/mpi/pt2pt/Makefile src/mpi/rma/Makefile src/mpi/spawn/Makefile src/mpi/timer/Makefile src/mpi/topo/Makefile src/mpid/Makefile src/mpid/common/Makefile src/mpid/common/datatype/Makefile src/mpid/common/locks/Makefile src/pm/Makefile src/pmi/Makefile src/nameserv/Makefile src/nameserv/file/Makefile src/nameserv/mpd/Makefile src/nameserv/pmi/Makefile src/nameserv/test/Makefile src/util/Makefile src/util/info/Makefile src/util/instrm/Makefile src/util/thread/Makefile src/util/thread/mpe_thread.h src/util/mem/Makefile src/util/msgs/Makefile src/util/param/Makefile src/util/dbg/Makefile src/util/dbg/getfuncstack src/util/osserv/Makefile src/include/mpi.h test/Makefile test/util/Makefile test/basic/Makefile test/commands/Makefile test/commands/cmdtests test/mpid/Makefile test/mpid/ch3/Makefile examples/Makefile examples/f77/Makefile examples/f90/Makefile examples/cxx/Makefile src/util/logging/Makefile src/util/logging/common/Makefile doc/Makefile doc/mansrc/Makefile doc/mansrc/createhtmlindex doc/refman/Makefile doc/installguide/Makefile doc/userguide/Makefile doc/logging/Makefile doc/design/Makefile doc/smpd/Makefile doc/windev/Makefile"
cat >confcache <<\_ACEOF
# 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, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# 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 \
	"s/'/'\\\\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if diff $cache_file confcache >/dev/null 2>&1; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

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

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[	 ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[	 ]*$//;
}'
fi

DEFS=-DHAVE_CONFIG_H

ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_i=`echo "$ac_i" |
	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
  # 2. Add them.
  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs



: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh

# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi


# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`


# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for as_base in sh bash ksh sh5; do
	 case $as_dir in
	 /*)
	   if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
	     CONFIG_SHELL=$as_dir/$as_base
	     export CONFIG_SHELL
	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
	   fi;;
	 esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_executable_p="test -f"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH

exec 6>&1

# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.  Logging --version etc. is OK.
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF

This file was extended by $as_me, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\_ACEOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -q, --quiet      do not print progress messages
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
		   instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
		   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <bug-autoconf@gnu.org>."
_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.59,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  -*)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_option=$1
     ac_need_defaults=false;;
  esac

  case $ac_option in
  # Handling of the options.
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:$LINENO: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
    ac_need_defaults=false;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
#
# INIT-COMMANDS section.
#

enable_f77=$enable_f77
has_exclaim=$has_exclaim
includebuild_dir=$includebuild_dir
libbuild_dir=$libbuild_dir
bashWorks=$bashWorks
enable_f90=$enable_f90
modincbuild_dir=$modincbuild_dir
includebuild_dir=$includebuild_dir
libbuild_dir=$libbuild_dir
bashWorks=$bashWorks
enable_cxx=$enable_cxx
includebuild_dir=$includebuild_dir
libbuild_dir=$libbuild_dir
bashWorks=$bashWorks

    MPE_THREAD_SOURCE_FILES=$MPE_THREAD_SOURCE_FILES


EXTERNAL_SETUPS="$EXTERNAL_SETUPS"
LIBDIR="$libbuild_dir"
MPILIBNAME="$MPILIBNAME"
PMPILIBNAME="$PMPILIBNAME"
AR="$AR"
CC="$CC"
CC_SHL="$CC_SHL"
CPPFLAGS="$CPPFLAGS"
CFLAGS="$CFLAGS"
ENABLE_SHLIB="$ENABLE_SHLIB"
export LIBDIR ; export MPILIBNAME ; export AR ; export CC ; export CPPFLAGS
export PMPILIBNAME
export CFLAGS ; export CC_SHL ; export ENABLE_SHLIB ; export C_LINKPATH_SHL
# For test/mpi/configure
MPI_SRCDIR=$MPI_SRCDIR
MPI_NO_SPAWN=$MPID_NO_SPAWN
export MPI_SRCDIR
export MPI_NO_SPAWN

includebuild_dir=$includebuild_dir
libbuild_dir=$libbuild_dir
bashWorks=$bashWorks

enable_romio=$enable_romio
top_srcdir=$top_srcdir







_ACEOF



cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
  "src/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;;
  "src/include/mpichtimer.h" ) CONFIG_FILES="$CONFIG_FILES src/include/mpichtimer.h" ;;
  "src/binding/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/binding/Makefile" ;;
  "src/binding/cxx/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/binding/cxx/Makefile" ;;
  "src/binding/cxx/mpicxx.h" ) CONFIG_FILES="$CONFIG_FILES src/binding/cxx/mpicxx.h" ;;
  "src/binding/f77/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/binding/f77/Makefile" ;;
  "src/binding/f77/mpif.h" ) CONFIG_FILES="$CONFIG_FILES src/binding/f77/mpif.h" ;;
  "src/binding/f77/setbotf.f" ) CONFIG_FILES="$CONFIG_FILES src/binding/f77/setbotf.f" ;;
  "src/binding/f90/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/binding/f90/Makefile" ;;
  "src/env/mpicc" ) CONFIG_FILES="$CONFIG_FILES src/env/mpicc" ;;
  "src/env/mpicc.conf" ) CONFIG_FILES="$CONFIG_FILES src/env/mpicc.conf" ;;
  "src/env/mpicc.bash" ) CONFIG_FILES="$CONFIG_FILES src/env/mpicc.bash" ;;
  "src/env/mpicxx" ) CONFIG_FILES="$CONFIG_FILES src/env/mpicxx" ;;
  "src/env/mpicxx.conf" ) CONFIG_FILES="$CONFIG_FILES src/env/mpicxx.conf" ;;
  "src/env/mpicxx.bash" ) CONFIG_FILES="$CONFIG_FILES src/env/mpicxx.bash" ;;
  "src/env/mpif77" ) CONFIG_FILES="$CONFIG_FILES src/env/mpif77" ;;
  "src/env/mpif77.conf" ) CONFIG_FILES="$CONFIG_FILES src/env/mpif77.conf" ;;
  "src/env/mpif77.bash" ) CONFIG_FILES="$CONFIG_FILES src/env/mpif77.bash" ;;
  "src/env/mpif90" ) CONFIG_FILES="$CONFIG_FILES src/env/mpif90" ;;
  "src/env/mpif90.conf" ) CONFIG_FILES="$CONFIG_FILES src/env/mpif90.conf" ;;
  "src/env/mpif90.bash" ) CONFIG_FILES="$CONFIG_FILES src/env/mpif90.bash" ;;
  "src/env/mpich2version" ) CONFIG_FILES="$CONFIG_FILES src/env/mpich2version" ;;
  "src/env/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/env/Makefile" ;;
  "src/util/createshlib" ) CONFIG_FILES="$CONFIG_FILES src/util/createshlib" ;;
  "src/mpi/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/Makefile" ;;
  "src/mpi/attr/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/attr/Makefile" ;;
  "src/mpi/coll/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/coll/Makefile" ;;
  "src/mpi/comm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/comm/Makefile" ;;
  "src/mpi/datatype/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/datatype/Makefile" ;;
  "src/mpi/debugger/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/debugger/Makefile" ;;
  "src/mpi/errhan/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/errhan/Makefile" ;;
  "src/mpi/group/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/group/Makefile" ;;
  "src/mpi/init/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/init/Makefile" ;;
  "src/mpi/misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/misc/Makefile" ;;
  "src/mpi/pt2pt/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/pt2pt/Makefile" ;;
  "src/mpi/rma/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/rma/Makefile" ;;
  "src/mpi/spawn/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/spawn/Makefile" ;;
  "src/mpi/timer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/timer/Makefile" ;;
  "src/mpi/topo/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpi/topo/Makefile" ;;
  "src/mpid/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpid/Makefile" ;;
  "src/mpid/common/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpid/common/Makefile" ;;
  "src/mpid/common/datatype/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpid/common/datatype/Makefile" ;;
  "src/mpid/common/locks/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mpid/common/locks/Makefile" ;;
  "src/pm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pm/Makefile" ;;
  "src/pmi/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pmi/Makefile" ;;
  "src/nameserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/nameserv/Makefile" ;;
  "src/nameserv/file/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/nameserv/file/Makefile" ;;
  "src/nameserv/mpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/nameserv/mpd/Makefile" ;;
  "src/nameserv/pmi/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/nameserv/pmi/Makefile" ;;
  "src/nameserv/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/nameserv/test/Makefile" ;;
  "src/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;;
  "src/util/info/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/info/Makefile" ;;
  "src/util/instrm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/instrm/Makefile" ;;
  "src/util/thread/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/thread/Makefile" ;;
  "src/util/thread/mpe_thread.h" ) CONFIG_FILES="$CONFIG_FILES src/util/thread/mpe_thread.h" ;;
  "src/util/mem/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/mem/Makefile" ;;
  "src/util/msgs/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/msgs/Makefile" ;;
  "src/util/param/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/param/Makefile" ;;
  "src/util/dbg/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/dbg/Makefile" ;;
  "src/util/dbg/getfuncstack" ) CONFIG_FILES="$CONFIG_FILES src/util/dbg/getfuncstack" ;;
  "src/util/osserv/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/osserv/Makefile" ;;
  "src/include/mpi.h" ) CONFIG_FILES="$CONFIG_FILES src/include/mpi.h" ;;
  "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
  "test/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/util/Makefile" ;;
  "test/basic/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/basic/Makefile" ;;
  "test/commands/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/commands/Makefile" ;;
  "test/commands/cmdtests" ) CONFIG_FILES="$CONFIG_FILES test/commands/cmdtests" ;;
  "test/mpid/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/mpid/Makefile" ;;
  "test/mpid/ch3/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/mpid/ch3/Makefile" ;;
  "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
  "examples/f77/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/f77/Makefile" ;;
  "examples/f90/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/f90/Makefile" ;;
  "examples/cxx/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/cxx/Makefile" ;;
  "src/util/logging/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/logging/Makefile" ;;
  "src/util/logging/common/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/logging/common/Makefile" ;;
  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
  "doc/mansrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/mansrc/Makefile" ;;
  "doc/mansrc/createhtmlindex" ) CONFIG_FILES="$CONFIG_FILES doc/mansrc/createhtmlindex" ;;
  "doc/refman/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/refman/Makefile" ;;
  "doc/installguide/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/installguide/Makefile" ;;
  "doc/userguide/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/userguide/Makefile" ;;
  "doc/logging/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/logging/Makefile" ;;
  "doc/design/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/design/Makefile" ;;
  "doc/smpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/smpd/Makefile" ;;
  "doc/windev/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/windev/Makefile" ;;
  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
  "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
  "default-3" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-3" ;;
  "default-4" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-4" ;;
  "default-5" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-5" ;;
  "default-6" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-6" ;;
  "default-7" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-7" ;;
  "default-8" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-8" ;;
  "default-9" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-9" ;;
  "default-10" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-10" ;;
  "default-11" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-11" ;;
  "default-12" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-12" ;;
  "default-13" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-13" ;;
  "default-14" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-14" ;;
  "src/include/mpichconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/mpichconf.h" ;;
  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./confstat$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in ." >&2
   { (exit 1); exit 1; }
}

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@DEFS@,$DEFS,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@VERSION@,$VERSION,;t t
s,@CONFIGURE_ARGUMENTS@,$CONFIGURE_ARGUMENTS,;t t
s,@MPIFLIBNAME@,$MPIFLIBNAME,;t t
s,@PMPIFLIBNAME@,$PMPIFLIBNAME,;t t
s,@FWRAPNAME@,$FWRAPNAME,;t t
s,@htmldir@,$htmldir,;t t
s,@docdir@,$docdir,;t t
s,@master_top_builddir@,$master_top_builddir,;t t
s,@master_top_srcdir@,$master_top_srcdir,;t t
s,@DEVICE@,$DEVICE,;t t
s,@INCLUDE_MPIDDEFS_H@,$INCLUDE_MPIDDEFS_H,;t t
s,@MPICXXLIBNAME@,$MPICXXLIBNAME,;t t
s,@logging_dir@,$logging_dir,;t t
s,@logging_name@,$logging_name,;t t
s,@logging_subdirs@,$logging_subdirs,;t t
s,@debugger_dir@,$debugger_dir,;t t
s,@romio_dir@,$romio_dir,;t t
s,@HAVE_ROMIO@,$HAVE_ROMIO,;t t
s,@device_name@,$device_name,;t t
s,@MANY_PM@,$MANY_PM,;t t
s,@pm_name@,$pm_name,;t t
s,@other_pm_names@,$other_pm_names,;t t
s,@pmi_name@,$pmi_name,;t t
s,@mpe_dir@,$mpe_dir,;t t
s,@other_install_dirs@,$other_install_dirs,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@CREATESHLIB@,$CREATESHLIB,;t t
s,@NEEDSPLIB@,$NEEDSPLIB,;t t
s,@NO_WEAK_SYM@,$NO_WEAK_SYM,;t t
s,@NO_WEAK_SYM_TARGET@,$NO_WEAK_SYM_TARGET,;t t
s,@PROFILE_DEF_MPI@,$PROFILE_DEF_MPI,;t t
s,@F77@,$F77,;t t
s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@FLIBS@,$FLIBS,;t t
s,@F77_NAME_MANGLE@,$F77_NAME_MANGLE,;t t
s,@F90@,$F90,;t t
s,@F90FLAGS@,$F90FLAGS,;t t
s,@ac_ct_F90@,$ac_ct_F90,;t t
s,@F77_INCDIR@,$F77_INCDIR,;t t
s,@FINCLUDES@,$FINCLUDES,;t t
s,@F77_LIBDIR_LEADER@,$F77_LIBDIR_LEADER,;t t
s,@MPIFPMPI@,$MPIFPMPI,;t t
s,@F77_IN_C_LIBS@,$F77_IN_C_LIBS,;t t
s,@FC_SHL@,$FC_SHL,;t t
s,@FC_LINKPATH_SHL@,$FC_LINKPATH_SHL,;t t
s,@F77CPP@,$F77CPP,;t t
s,@F90MODEXT@,$F90MODEXT,;t t
s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
s,@F90MODINCFLAG@,$F90MODINCFLAG,;t t
s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
s,@MPIMODNAME@,$MPIMODNAME,;t t
s,@MPICONSTMODNAME@,$MPICONSTMODNAME,;t t
s,@modincdir@,$modincdir,;t t
s,@F90INC@,$F90INC,;t t
s,@F90INCFLAG@,$F90INCFLAG,;t t
s,@F90EXT@,$F90EXT,;t t
s,@F90CPP@,$F90CPP,;t t
s,@F90_SHL@,$F90_SHL,;t t
s,@F90_LINKPATH_SHL@,$F90_LINKPATH_SHL,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@HAVE_CXX_EXCEPTIONS@,$HAVE_CXX_EXCEPTIONS,;t t
s,@CXX_DEFS@,$CXX_DEFS,;t t
s,@CXX_SHL@,$CXX_SHL,;t t
s,@CXX_LINKPATH_SHL@,$CXX_LINKPATH_SHL,;t t
s,@GNUC_VERSION@,$GNUC_VERSION,;t t
s,@GNUC_MINORVERSION@,$GNUC_MINORVERSION,;t t
s,@INCLUDE_MPICXX_H@,$INCLUDE_MPICXX_H,;t t
s,@FORTRAN_BINDING@,$FORTRAN_BINDING,;t t
s,@MPIR_CXX_BOOL@,$MPIR_CXX_BOOL,;t t
s,@MPIR_CXX_COMPLEX@,$MPIR_CXX_COMPLEX,;t t
s,@MPIR_CXX_DOUBLE_COMPLEX@,$MPIR_CXX_DOUBLE_COMPLEX,;t t
s,@MPIR_CXX_LONG_DOUBLE_COMPLEX@,$MPIR_CXX_LONG_DOUBLE_COMPLEX,;t t
s,@bindings@,$bindings,;t t
s,@bindings_dirs@,$bindings_dirs,;t t
s,@FC@,$FC,;t t
s,@PERL@,$PERL,;t t
s,@AR@,$AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ETAGS@,$ETAGS,;t t
s,@ETAGSADD@,$ETAGSADD,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@RANLIB_AFTER_INSTALL@,$RANLIB_AFTER_INSTALL,;t t
s,@MKDIR_P@,$MKDIR_P,;t t
s,@MAKE@,$MAKE,;t t
s,@VPATH@,$VPATH,;t t
s,@SET_CFLAGS@,$SET_CFLAGS,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@BASH@,$BASH,;t t
s,@BUILD_BASH_SCRIPTS@,$BUILD_BASH_SCRIPTS,;t t
s,@CC_SHL@,$CC_SHL,;t t
s,@C_LINK_SHL@,$C_LINK_SHL,;t t
s,@C_LINKPATH_SHL@,$C_LINKPATH_SHL,;t t
s,@SHLIB_EXT@,$SHLIB_EXT,;t t
s,@SHLIB_FROM_LO@,$SHLIB_FROM_LO,;t t
s,@SHLIB_INSTALL@,$SHLIB_INSTALL,;t t
s,@ENABLE_SHLIB@,$ENABLE_SHLIB,;t t
s,@pac_prog@,$pac_prog,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@BUILD_TVDLL@,$BUILD_TVDLL,;t t
s,@CC_SHL_DBG@,$CC_SHL_DBG,;t t
s,@C_LINK_SHL_DBG@,$C_LINK_SHL_DBG,;t t
s,@nameserv_name@,$nameserv_name,;t t
s,@DOCTEXT@,$DOCTEXT,;t t
s,@DOCTEXTSTYLE@,$DOCTEXTSTYLE,;t t
s,@MAKE_DEPEND_C@,$MAKE_DEPEND_C,;t t
s,@GCC@,$GCC,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@INT16_T@,$INT16_T,;t t
s,@INT32_T@,$INT32_T,;t t
s,@INT64_T@,$INT64_T,;t t
s,@MPI_CHAR@,$MPI_CHAR,;t t
s,@MPI_UNSIGNED_CHAR@,$MPI_UNSIGNED_CHAR,;t t
s,@MPI_SHORT@,$MPI_SHORT,;t t
s,@MPI_UNSIGNED_SHORT@,$MPI_UNSIGNED_SHORT,;t t
s,@MPI_INT@,$MPI_INT,;t t
s,@MPI_UNSIGNED_INT@,$MPI_UNSIGNED_INT,;t t
s,@MPI_LONG@,$MPI_LONG,;t t
s,@MPI_UNSIGNED_LONG@,$MPI_UNSIGNED_LONG,;t t
s,@MPI_LONG_LONG@,$MPI_LONG_LONG,;t t
s,@MPI_FLOAT@,$MPI_FLOAT,;t t
s,@MPI_DOUBLE@,$MPI_DOUBLE,;t t
s,@MPI_LONG_DOUBLE@,$MPI_LONG_DOUBLE,;t t
s,@MPI_BYTE@,$MPI_BYTE,;t t
s,@MPI_WCHAR@,$MPI_WCHAR,;t t
s,@MPI_PACKED@,$MPI_PACKED,;t t
s,@MPI_LB@,$MPI_LB,;t t
s,@MPI_UB@,$MPI_UB,;t t
s,@MPI_FLOAT_INT@,$MPI_FLOAT_INT,;t t
s,@MPI_DOUBLE_INT@,$MPI_DOUBLE_INT,;t t
s,@MPI_LONG_INT@,$MPI_LONG_INT,;t t
s,@MPI_SHORT_INT@,$MPI_SHORT_INT,;t t
s,@MPI_2INT@,$MPI_2INT,;t t
s,@MPI_LONG_DOUBLE_INT@,$MPI_LONG_DOUBLE_INT,;t t
s,@MPI_SIGNED_CHAR@,$MPI_SIGNED_CHAR,;t t
s,@MPI_UNSIGNED_LONG_LONG@,$MPI_UNSIGNED_LONG_LONG,;t t
s,@MPI_REAL4@,$MPI_REAL4,;t t
s,@MPI_REAL8@,$MPI_REAL8,;t t
s,@MPI_REAL16@,$MPI_REAL16,;t t
s,@MPI_COMPLEX8@,$MPI_COMPLEX8,;t t
s,@MPI_COMPLEX16@,$MPI_COMPLEX16,;t t
s,@MPI_COMPLEX32@,$MPI_COMPLEX32,;t t
s,@MPI_INTEGER1@,$MPI_INTEGER1,;t t
s,@MPI_INTEGER2@,$MPI_INTEGER2,;t t
s,@MPI_INTEGER4@,$MPI_INTEGER4,;t t
s,@MPI_INTEGER8@,$MPI_INTEGER8,;t t
s,@MPI_INTEGER16@,$MPI_INTEGER16,;t t
s,@MPI_CHARACTER@,$MPI_CHARACTER,;t t
s,@MPI_INTEGER@,$MPI_INTEGER,;t t
s,@MPI_REAL@,$MPI_REAL,;t t
s,@MPI_LOGICAL@,$MPI_LOGICAL,;t t
s,@MPI_COMPLEX@,$MPI_COMPLEX,;t t
s,@MPI_DOUBLE_PRECISION@,$MPI_DOUBLE_PRECISION,;t t
s,@MPI_2INTEGER@,$MPI_2INTEGER,;t t
s,@MPI_2REAL@,$MPI_2REAL,;t t
s,@MPI_DOUBLE_COMPLEX@,$MPI_DOUBLE_COMPLEX,;t t
s,@MPI_2DOUBLE_PRECISION@,$MPI_2DOUBLE_PRECISION,;t t
s,@MPI_2COMPLEX@,$MPI_2COMPLEX,;t t
s,@MPI_2DOUBLE_COMPLEX@,$MPI_2DOUBLE_COMPLEX,;t t
s,@MPI_F77_PACKED@,$MPI_F77_PACKED,;t t
s,@MPI_F77_UB@,$MPI_F77_UB,;t t
s,@MPI_F77_LB@,$MPI_F77_LB,;t t
s,@MPI_F77_BYTE@,$MPI_F77_BYTE,;t t
s,@F77_INTEGER1@,$F77_INTEGER1,;t t
s,@F77_INTEGER2@,$F77_INTEGER2,;t t
s,@F77_INTEGER4@,$F77_INTEGER4,;t t
s,@F77_INTEGER8@,$F77_INTEGER8,;t t
s,@F77_INTEGER16@,$F77_INTEGER16,;t t
s,@F77_REAL4@,$F77_REAL4,;t t
s,@F77_REAL8@,$F77_REAL8,;t t
s,@F77_REAL16@,$F77_REAL16,;t t
s,@F77_COMPLEX8@,$F77_COMPLEX8,;t t
s,@F77_COMPLEX16@,$F77_COMPLEX16,;t t
s,@F77_COMPLEX32@,$F77_COMPLEX32,;t t
s,@SIZEOF_MPI_STATUS@,$SIZEOF_MPI_STATUS,;t t
s,@MPI_STATUS_SIZE@,$MPI_STATUS_SIZE,;t t
s,@TESTCPP@,$TESTCPP,;t t
s,@ADDRESS_KIND@,$ADDRESS_KIND,;t t
s,@OFFSET_KIND@,$OFFSET_KIND,;t t
s,@DLLIMPORT@,$DLLIMPORT,;t t
s,@CXXCPP@,$CXXCPP,;t t
s,@BSEND_OVERHEAD@,$BSEND_OVERHEAD,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@MPID_TIMER_TYPE@,$MPID_TIMER_TYPE,;t t
s,@MPICH_TIMER_KIND@,$MPICH_TIMER_KIND,;t t
s,@MPILIBNAME@,$MPILIBNAME,;t t
s,@PMPILIBNAME@,$PMPILIBNAME,;t t
s,@MPI_AINT@,$MPI_AINT,;t t
s,@THR_DEFS@,$THR_DEFS,;t t
s,@THR_CFLAGS@,$THR_CFLAGS,;t t
s,@THR_CPPFLAGS@,$THR_CPPFLAGS,;t t
s,@THR_LDFLAGS@,$THR_LDFLAGS,;t t
s,@THR_LIBS@,$THR_LIBS,;t t
s,@MPE_THREAD_LIB_NAME@,$MPE_THREAD_LIB_NAME,;t t
s,@subsystems@,$subsystems,;t t
s,@MPI_FINT@,$MPI_FINT,;t t
s,@MPI_OFFSET@,$MPI_OFFSET,;t t
s,@MPI_OFFSET_TYPEDEF@,$MPI_OFFSET_TYPEDEF,;t t
s,@FORTRAN_MPI_OFFSET@,$FORTRAN_MPI_OFFSET,;t t
s,@EXTRA_STATUS_DECL@,$EXTRA_STATUS_DECL,;t t
s,@MPI_MAX_PROCESSOR_NAME@,$MPI_MAX_PROCESSOR_NAME,;t t
s,@EXAMPLE_LIBS@,$EXAMPLE_LIBS,;t t
s,@MPI_CFLAGS@,$MPI_CFLAGS,;t t
s,@MPI_FFLAGS@,$MPI_FFLAGS,;t t
s,@MPI_CXXFLAGS@,$MPI_CXXFLAGS,;t t
s,@MPI_F90FLAGS@,$MPI_F90FLAGS,;t t
s,@MPI_LDFLAGS@,$MPI_LDFLAGS,;t t
s,@MPIU_DLL_SPEC_DEF@,$MPIU_DLL_SPEC_DEF,;t t
s,@MPICVSHOME@,$MPICVSHOME,;t t
s,@EXTERNAL_SRC_DIRS@,$EXTERNAL_SRC_DIRS,;t t
s,@subdirs@,$subdirs,;t t
s,@MPICC@,$MPICC,;t t
s,@MPICXX@,$MPICXX,;t t
s,@MPIF77@,$MPIF77,;t t
s,@MPIF90@,$MPIF90,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
/@MPE_THREAD_TYPEDEFS@/r $MPE_THREAD_TYPEDEFS
s,@MPE_THREAD_TYPEDEFS@,,;t t
/@MPE_THREAD_FUNCS@/r $MPE_THREAD_FUNCS
s,@MPE_THREAD_FUNCS@,,;t t
CEOF

_ACEOF

  cat >>$CONFIG_STATUS <<\_ACEOF
  # 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_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
	cat >$tmp/stdin
	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  { if $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

  ac_builddir=.

if test "$ac_dir" != .; then
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac

# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=`pwd`;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
  case $ac_srcdir in
  .) ac_abs_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
  case $ac_top_srcdir in
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  esac;;
esac


  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
  esac

  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated by config.status.  */
  if test x"$ac_file" = x-; then
    configure_input=
  else
    configure_input="$ac_file.  "
  fi
  configure_input=$configure_input"Generated from `echo $ac_file_in |
				     sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
	 # Absolute (can't be DOS-style, as IFS=:)
	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
	 echo "$f";;
      *) # Relative
	 if test -f "$f"; then
	   # Build tree
	   echo "$f"
	 elif test -f "$srcdir/$f"; then
	   # Source tree
	   echo "$srcdir/$f"
	 else
	   # /dev/null tree
	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
	 fi;;
      esac
    done` || { (exit 1); exit 1; }

  if test x"$ac_file" != x-; then
    { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
  sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF

#
# CONFIG_HEADER section.
#

# 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=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
	cat >$tmp/stdin
	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
	 # Absolute (can't be DOS-style, as IFS=:)
	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
	 # Do quote $f, to prevent DOS paths from being IFS'd.
	 echo "$f";;
      *) # Relative
	 if test -f "$f"; then
	   # Build tree
	   echo "$f"
	 elif test -f "$srcdir/$f"; then
	   # Source tree
	   echo "$srcdir/$f"
	 else
	   # /dev/null tree
	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
	 fi;;
      esac
    done` || { (exit 1); exit 1; }
  # Remove the trailing spaces.
  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in

_ACEOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# 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.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\_ACEOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed

# 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.undefs <<\_ACEOF
s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $tmp/defines.sed.
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#define' lines.
  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $tmp/undefs.sed.
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#undef'
  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\_ACEOF
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
      { if $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF

#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_dest" : 'X\(//\)[^/]' \| \
	 X"$ac_dest" : 'X\(//\)$' \| \
	 X"$ac_dest" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  { if $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

  ac_builddir=.

if test "$ac_dir" != .; then
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac

# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=`pwd`;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
  case $ac_srcdir in
  .) ac_abs_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
  case $ac_top_srcdir in
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  esac;;
esac


  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;}
  case $ac_dest in
    default-1 ) if test $enable_f77 = yes ; then
if test "$bashWorks" = yes ; then cp -f src/env/mpif77.bash src/env/mpif77 ; fi
chmod a+x src/env/mpif77
if test "$has_exclaim" = "yes" ; then
    sed -e 's/^C/\!/g' src/binding/f77/mpif.h > src/include/mpif.h
	cp src/include/mpif.h src/binding/f77/mpif.h
else
    cp src/binding/f77/mpif.h src/include
fi
if test ! -d bin  ; then mkdir bin ; fi
sed -e 's%includedir=.*%includedir='$includebuild_dir% \
   -e 's%libdir=.*%libdir='$libbuild_dir% src/env/mpif77 > bin/mpif77 ;
chmod a+x bin/mpif77
else
    rm -f src/env/mpif77 src/env/mpif77.conf
fi ;;
    default-2 ) if test $enable_f90 = yes ; then
if test "$bashWorks" = yes ; then cp -f src/env/mpif90.bash src/env/mpif90 ; fi
chmod a+x src/env/mpif90
if test ! -d bin  ; then mkdir bin ; fi
sed -e 's%includedir=.*%includedir='$includebuild_dir% \
    -e 's%modincdir=.*%modincdir='$modincbuild_dir% \
    -e 's%libdir=.*%libdir='$libbuild_dir% src/env/mpif90 > bin/mpif90 ;
chmod a+x bin/mpif90
else
    rm -f src/env/mpif90 src/env/mpif90.conf bin/mpif90
fi
 ;;
    default-3 ) if test $enable_cxx = yes ; then
if test "$bashWorks" = yes ; then cp -f src/env/mpicxx.bash src/env/mpicxx ; fi
chmod a+x src/env/mpicxx
cp src/binding/cxx/mpicxx.h src/include
if test ! -d bin  ; then mkdir bin ; fi
sed -e 's%includedir=.*%includedir='$includebuild_dir% \
    -e 's%libdir=.*%libdir='$libbuild_dir% src/env/mpicxx > bin/mpicxx ;
chmod a+x bin/mpicxx
else
    rm -f src/env/mpicxx src/env/mpicxx.conf
fi
 ;;
    default-4 )
    for entry in $MPE_THREAD_SOURCE_FILES ; do
	destfile="`echo $entry | sed -e 's/:.*$//'`"
	srcfile="`echo $entry | sed -e 's/^.*://'`"
	echo "copying $srcfile to $destfile"
	rm -f $destfile
	cat >$destfile <<END
/*
 * WARNING: DO NOT EDIT!  This file is a copy of $srcfile.
 */

END
	cat $srcfile >>$destfile
	chmod a-w $destfile
    done
    if test -f src/util/thread/mpe_thread.h ; then
        echo "moving mpe_thread.h to src/include"
        mv -f src/util/thread/mpe_thread.h src/include/mpe_thread.h
    fi
 ;;
    default-5 )
for prog in $EXTERNAL_SETUPS - ; do
    if test "$prog" != "-" ; then
      dir=`dirname $prog`
      name=`basename $prog`
      (cd $dir && ./$name)
    fi
done ;;
    default-6 )
if test "$bashWorks" = yes ; then cp -f src/env/mpicc.bash src/env/mpicc ; fi
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  ;;
    default-7 )
   chmod a+x src/env/mpich2version ;
   if test ! -d bin  ; then mkdir bin ; fi
   cp src/env/mpich2version bin/mpich2version ;
   chmod a+x bin/mpich2version ;;
    default-8 ) if test "$enable_romio" = "yes" ; then
  rm -f src/include/mpio.h "${use_top_srcdir}/include/mpio.h"
  cp src/mpi/romio/include/mpio.h src/include ; fi ;;
    default-9 ) if grep 'dependencies:' Makefile >/dev/null 2>&1 ; then
    echo "Updating dependency directories .deps"
    find src -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 ;;
    default-10 ) chmod +x doc/mansrc/createhtmlindex ;;
    default-11 ) if [ ! -d lib ] ; then mkdir lib ; fi
date > lib/newconfig ;;
    default-12 ) chmod +x src/util/createshlib ;;
    default-13 ) chmod a+x src/util/dbg/getfuncstack ;;
    default-14 ) chmod a+x test/commands/cmdtests ;;
  esac
done
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF

{ (exit 0); exit 0; }
_ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save


# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

#
# CONFIG_SUBDIRS section.
#
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=*)
      ;;
    --config-cache | -C)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
      ac_prev=prefix ;;
    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  # Always prepend --prefix to ensure using the same prefix
  # in subdir configurations.
  ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"

  ac_popdir=`pwd`
  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    test -d $srcdir/$ac_dir || continue

    { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
echo "$as_me: configuring in $ac_dir" >&6;}
    { if $as_mkdir_p; then
    mkdir -p "$ac_dir"
  else
    as_dir="$ac_dir"
    as_dirs=
    while test ! -d "$as_dir"; do
      as_dirs="$as_dir $as_dirs"
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
    done
    test ! -n "$as_dirs" || mkdir $as_dirs
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
   { (exit 1); exit 1; }; }; }

    ac_builddir=.

if test "$ac_dir" != .; then
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac

# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
  case "$ac_dir" in
  .) ac_abs_builddir=`pwd`;;
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
  case ${ac_top_builddir}. in
  .) ac_abs_top_builddir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
  case $ac_srcdir in
  .) ac_abs_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
  esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
  case $ac_top_srcdir in
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
  esac;;
esac


    cd $ac_dir

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_srcdir/configure.gnu; then
      ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
    elif test -f $ac_srcdir/configure; then
      ac_sub_configure="$SHELL '$ac_srcdir/configure'"
    elif test -f $ac_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&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_top_builddir$cache_file ;;
      esac

      { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
      # The eval makes quoting arguments work.
      eval $ac_sub_configure $ac_sub_configure_args \
	   --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
	{ { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
   { (exit 1); exit 1; }; }
    fi

    cd "$ac_popdir"
  done
fi


echo 'Configuration completed.'
