#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.67.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
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
IFS=$as_save_IFS

     ;;
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
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else
  case \`(set -o) 2>/dev/null\` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi
"
  as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }

exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :

else
  exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null; then :
  as_have_required=yes
else
  as_have_required=no
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :

else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_found=:
  case $as_dir in #(
	 /*)
	   for as_base in sh bash ksh sh5; do
	     # Try only shells that exist, to save several forks.
	     as_shell=$as_dir/$as_base
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS


      if test "x$CONFIG_SHELL" != x; then :
  # We cannot yet assume a decent shell, so we have to provide a
	# neutralization value for shells without unset; and this also
	# works around shells that cannot unset nonexistent variables.
	BASH_ENV=/dev/null
	ENV=/dev/null
	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
	export CONFIG_SHELL
	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi

    if test x$as_have_required = xno; then :
  $as_echo "$0: This script requires a shell more modern than all"
  $as_echo "$0: the shells that I found on your system."
  if test x${ZSH_VERSION+set} = xset ; then
    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
  else
    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
  fi
  exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset

# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  $as_echo "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; 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

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

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

# 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


  as_lineno_1=$LINENO as_lineno_1a=$LINENO
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -p'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -p'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -p'
  fi
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

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

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
	test -d "$1/.";
      else
	case $1 in #(
	-*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

# 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'"


test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1

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

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=

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

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

enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
LDFLAGS_DEPS
LIB_DEPS
MPIFC
MPIF77
MPICXX
MPICC
subdirs
EXTERNAL_SRC_DIRS
MPIU_DLL_SPEC_DEF
MPI_MAX_PROCESSOR_NAME
EXTRA_STATUS_DECL
MPI_OFFSET_DATATYPE
FORTRAN_MPI_OFFSET
MPI_OFFSET_TYPEDEF
MPI_OFFSET
MPI_FINT
subsystems
MPIU_THREAD_LIB_NAME
MPI_AINT_DATATYPE
MPI_AINT_FMT_HEX_SPEC
MPI_AINT_FMT_DEC_SPEC
MPI_AINT
PMPILIBNAME
MPILIBNAME
MPICH_TIMER_KIND
MPID_TIMER_TYPE
ALLOCA
BSEND_OVERHEAD
CXXCPP
REQI8
REQI2
REQI1
REQD
SIZEOF_FC_CHARACTER
SIZEOF_FC_DOUBLE_PRECISION
SIZEOF_FC_REAL
SIZEOF_FC_INTEGER
DLLIMPORT
OFFSET_KIND
ADDRESS_KIND
WTIME_DOUBLE_TYPE
CMB_STATUS_ALIGNMENT
CMB_1INT_ALIGNMENT
MPI_F77_OFFSET
MPI_F77_AINT
MPI_F77_C_LONG_DOUBLE_COMPLEX
MPI_F77_C_DOUBLE_COMPLEX
MPI_F77_C_COMPLEX
MPI_F77_C_FLOAT_COMPLEX
MPI_F77_C_BOOL
MPI_F77_UINT64_T
MPI_F77_UINT32_T
MPI_F77_UINT16_T
MPI_F77_UINT8_T
MPI_F77_INT64_T
MPI_F77_INT32_T
MPI_F77_INT16_T
MPI_F77_INT8_T
MPI_F77_LONG_DOUBLE_INT
MPI_F77_2INT
MPI_F77_SHORT_INT
MPI_F77_LONG_INT
MPI_F77_DOUBLE_INT
MPI_F77_FLOAT_INT
MPI_F77_LONG_LONG
MPI_F77_LONG_LONG_INT
MPI_F77_UNSIGNED_LONG_LONG
MPI_F77_LONG_DOUBLE
MPI_F77_DOUBLE
MPI_F77_FLOAT
MPI_F77_UNSIGNED_LONG
MPI_F77_LONG
MPI_F77_INT
MPI_F77_UNSIGNED
MPI_F77_UNSIGNED_SHORT
MPI_F77_SHORT
MPI_F77_WCHAR
MPI_F77_UNSIGNED_CHAR
MPI_F77_SIGNED_CHAR
MPI_F77_CHAR
MPI_STATUS_SIZE
SIZEOF_MPI_STATUS
F77_COMPLEX32
F77_COMPLEX16
F77_COMPLEX8
F77_REAL16
F77_REAL8
F77_REAL4
F77_INTEGER16
F77_INTEGER8
F77_INTEGER4
F77_INTEGER2
F77_INTEGER1
MPI_F77_BYTE
MPI_F77_LB
MPI_F77_UB
MPI_F77_PACKED
MPI_2DOUBLE_COMPLEX
MPI_2COMPLEX
MPI_2DOUBLE_PRECISION
MPI_DOUBLE_COMPLEX
MPI_2REAL
MPI_2INTEGER
MPI_DOUBLE_PRECISION
MPI_COMPLEX
MPI_LOGICAL
MPI_REAL
MPI_INTEGER
MPI_CHARACTER
MPI_C_LONG_DOUBLE_COMPLEX
MPI_C_DOUBLE_COMPLEX
MPI_C_FLOAT_COMPLEX
MPI_C_BOOL
MPI_UINT64_T
MPI_UINT32_T
MPI_UINT16_T
MPI_UINT8_T
MPI_INT64_T
MPI_INT32_T
MPI_INT16_T
MPI_INT8_T
MPI_INTEGER16
MPI_INTEGER8
MPI_INTEGER4
MPI_INTEGER2
MPI_INTEGER1
MPI_COMPLEX32
MPI_COMPLEX16
MPI_COMPLEX8
MPI_REAL16
MPI_REAL8
MPI_REAL4
MPI_UNSIGNED_LONG_LONG
MPI_SIGNED_CHAR
MPI_LONG_DOUBLE_INT
MPI_2INT
MPI_SHORT_INT
MPI_LONG_INT
MPI_DOUBLE_INT
MPI_FLOAT_INT
MPI_UB
MPI_LB
MPI_PACKED
MPI_WCHAR
MPI_BYTE
MPI_LONG_DOUBLE
MPI_DOUBLE
MPI_FLOAT
MPI_LONG_LONG
MPI_UNSIGNED_LONG
MPI_LONG
MPI_UNSIGNED_INT
MPI_INT
MPI_UNSIGNED_SHORT
MPI_SHORT
MPI_UNSIGNED_CHAR
MPI_CHAR
GCC
MAKE_DEPEND_C
DOCTEXTSTYLE
DOCTEXT
nameserv_name
debugger_dir
C_LINK_SHL_DBG
CC_SHL_DBG
BUILD_TVDLL
DBG_SHLIB_TYPE
LIBTOOL
pac_prog
ENABLE_SHLIB
BUILD_DLLS
BUILD_BASH_SCRIPTS
BASH_SHELL
SET_MAKE
SET_CFLAGS
VPATH
MAKE
MKDIR_P
RANLIB_AFTER_INSTALL
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
XARGS_NODATA_OPT
KILLALL
RANLIB
AR_FLAGS
AR
PERL
bindings_dirs
bindings
MPIR_CXX_LONG_DOUBLE_COMPLEX
MPIR_CXX_DOUBLE_COMPLEX
MPIR_CXX_COMPLEX
MPIR_CXX_BOOL
FORTRAN_BINDING
INCLUDE_MPICXX_H
GNUCXX_MINORVERSION
GNUCXX_VERSION
CXX_LINKPATH_SHL
CXX_SHL
CXX_DEFS
HAVE_CXX_EXCEPTIONS
ac_ct_CXX
CXXFLAGS
CXX
FC_LINKPATH_SHL
FC_SHL
FC_OTHER_LIBS
FCCPP
FCINCFLAG
FCINC
modincdir
MPIBASEMODNAME
MPISIZEOFMODNAME
MPICONSTMODNAME
MPIMODNAME
FCMODINCSPEC
FCMODINCFLAG
FC_WORK_FILES_ARG
FCMODEXT
FCEXT
F77CPP
F77_LINKPATH_SHL
F77_SHL
MPIFPMPI
F77_LIBDIR_LEADER
FINCLUDES
F77_INCDIR
ac_ct_FC
FCFLAGS
FC
F77_OTHER_LIBS
EGREP
F77_NAME_MANGLE
FILE
FLIBS
ac_ct_F77
FFLAGS
F77
PROFILE_DEF_MPI
NO_WEAK_SYM_TARGET
NO_WEAK_SYM
NEEDSPLIB
CREATESHLIB
other_install_dirs
mpe_dir
pmi_name
other_pm_names
pm_name
MANY_PM
device_name
HAVE_ROMIO
romio_dir
opadir
logging_subdirs
logging_name
logging_dir
MPICXXLIBNAME
INCLUDE_MPIDDEFS_H
DEVICE_ARGS
DEVICE_NAME
DEVICE
master_top_srcdir
master_top_builddir
SHLIB_INSTALL
SHLIB_FROM_LO
SHLIB_EXT
C_LINKPATH_SHL
C_LINK_SHL
CC_SHL
FGREP
GREP
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
CPP
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
FWRAPNAME
PMPIFLIBNAME
MPIFLIBNAME
MPICH2LIB_LIBS
MPICH2LIB_LDFLAGS
MPICH2LIB_FCFLAGS
MPICH2LIB_FFLAGS
MPICH2LIB_CXXFLAGS
MPICH2LIB_CPPFLAGS
MPICH2LIB_CFLAGS
WRAPPER_LIBS
WRAPPER_LDFLAGS
WRAPPER_FCFLAGS
WRAPPER_FFLAGS
WRAPPER_CXXFLAGS
WRAPPER_CPPFLAGS
WRAPPER_CFLAGS
USER_LIBS
USER_LDFLAGS
USER_FCFLAGS
USER_FFLAGS
USER_CXXFLAGS
USER_CPPFLAGS
USER_CFLAGS
FROM_MPICH2
CONFIGURE_ARGUMENTS
ABIVERSION
MPICH2_VERSION
MPICH2_NUMVERSION
MPICH2_RELEASE_DATE
CONFIGURE_ARGS_CLEAN
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_lib_depend
enable_echo
enable_coverage
enable_dynamiclibs
enable_error_checking
enable_error_messages
enable_timing
enable_g
with_aint_size
enable_fast
enable_check_compiler_flags
enable_f77
enable_fc
enable_f90
enable_cxx
enable_romio
enable_debuginfo
enable_smpcoll
enable_nmpi_as_mpi
with_device
with_pmi
with_pm
with_logging
with_mpe
enable_mpe
enable_threads
enable_thread_cs
enable_refcount
enable_mutex_timing
enable_handle_allocation
enable_predefined_refcount
enable_weak_symbols
enable_multi_aliases
with_cross
with_namepublisher
with_name_publisher
with_fwrapname
enable_cache
enable_strict
enable_shared
enable_rpath
enable_sharedlibs
with_openpa_prefix
with_atomic_primitives
enable_dependencies
enable_alloca
enable_timer_type
with_thread_package
enable_checkpointing
with_blcr
with_blcr_include
with_blcr_lib
enable_base_cache
'
      ac_precious_vars='build_alias
host_alias
target_alias
FROM_MPICH2
MPICH2LIB_CFLAGS
MPICH2LIB_CPPFLAGS
MPICH2LIB_CXXFLAGS
MPICH2LIB_FFLAGS
MPICH2LIB_FCFLAGS
MPICH2LIB_LDFLAGS
MPICH2LIB_LIBS
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CPP
F77
FFLAGS
FC
FCFLAGS
CXX
CXXFLAGS
CCC
AR_FLAGS
CXXCPP'
ac_subdirs_all='test/mpi'

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# 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.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

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

  case $ac_option in
  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *=)   ac_optarg= ;;
  *)    ac_optarg=yes ;;
  esac

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

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -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)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=no ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -enable-* | --enable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$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 ;;

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$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 ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    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 ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: $ac_useropt"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=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 ;;

  -*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      $as_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'`
  as_fn_error $? "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir
do
  eval ac_val=\$$ac_var
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
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
    $as_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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error $? "pwd does not report name of working directory"


# 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 the parent directory.
  ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_myself" |
    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
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# 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 \`..']

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]
  --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]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then

  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-lib-depend     Turn on library dependencies (experimental)
  --enable-echo           Turn on strong echoing. The default is enable=no.
  --enable-coverage       Turn on coverage analysis using gcc and gcov
  --enable-dynamiclibs    Enable the use of dynamic libraries by the devices
                          that support them
  --enable-error-checking=level
      Control the amount of error checking.
        no        - no error checking
        runtime   - error checking controllable at runtime through environment
                    variables
        all       - error checking always enabled (default)

  --enable-error-messages=level - Control the amount of detail in error messages.
        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.
        none    - Collect no data (default)
        all     - Collect lots of data
        runtime - Runtime control of data collected

  --enable-g=option - Control the level of debugging support in the
                      MPICH implementation.  option is a list of comma
                      separated names including
        none     - No debugging
        handle   - Trace handle operations
        handlealloc - Trace handle allocations
        dbg      - Add compiler flag, -g, to all internal
                   compiler flags, i.e. MPICH2LIB_CFLAGS, MPICH2LIB_CXXFLAGS,
                   MPICH2LIB_FFLAGS, and MPICH2LIB_FCFLAGS.
        debug    - Synonym for dbg
        instr    - Enable instrumentation
        log      - Enable debug event logging
        mem      - Memory usage tracing
        meminit  - Preinitialize memory associated structures and unions to
                   eliminate access warnings from programs like valgrind
        memarena - Check for overwrite errors in memory allocation arena
        mutex    - Enable error checking on pthread mutexes
        mutexnesting - Check for non-nesting of mutexes
        all      - All of the above choices

  --enable-fast=option - Control the level of fast execution in the
                         MPICH implementation.  option is a list of
                         comma separated names including
        defopt   - Default compiler optimization -O2 for all language bindings,
                   i.e. --enable-fast=O2, when neither --enable-fast
                   nor --disable-fast is specified. (default)
        O<n>     - Appends default optimization flags, -O<n>, to all internal
                   compiler flags, i.e. MPICH2LIB_CFLAGS, MPICH2LIB_CXXFLAGS,
                   MPICH2LIB_FFLAGS, and MPICH2LIB_FCFLAGS.
        nochkmsg - No error checking, i.e. --disable-error-checking
        notiming - No timing collection, i.e. --disable-timing.
        ndebug   - Appends -DNDEBUG to MPICH2LIB_CFLAGS.
        all|yes  - "defopt", "nochkmsg", "notiming" and "ndebug" are enabled
                   when --enable-fast is specified without any option.
        none     - None of above options, i.e. --disable-fast. Note that
                   --enable-strict will add the -O2 option even if
                   --enable-fast=none is given.

  --enable-check-compiler-flags
                          enable the checks for all compiler options,
                          xxxFLAGS, MPICH2_xxxFLAGS. Default is on.
  --enable-f77            Enable Fortran 77 bindings
  --enable-fc             Enable Fortran 90 bindings
  --enable-f90            Obsolete option: Use --enable-fc or --disable-fc
                          instead
  --enable-cxx            Enable C++ bindings
  --enable-romio          Enable ROMIO MPI I/O implementation
  --enable-debuginfo      Enable support for debuggers
  --enable-smpcoll        Enable support for SMP/multi-core aware collectives
  --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)
        runtime         - The level of thread support is determined by
                          the arguments to MPI_Init_thread, with
                          MPI_THREAD_MULTIPLE available.  The default option
                          for many communication devices.
        multiple        - Fully multi-threaded (MPI_THREAD_MULTIPLE) always.
                          DO NOT select this option. The option runtime is more
                          efficient and also supports thread_multiple.
                          (multiple aliased to runtime now)
        default         - Make a good choice depending on the communication
                          device.  For ch3:nemesis, this is runtime.

        See also the --enable-thread-cs option for controlling the granularity of
        the concurrency inside of the library

  --enable-thread-cs=type Choose the method used for critical sections and
                          other atomic updates when multiple threads are
                          present. Values may be global (default), per-object,
                          lock-free
  --enable-refcount=type  Choose the method for ensuring atomic updates to the
                          reference counts for MPI objects. Values may be
                          lock, lock-free, none. The default depends on the
                          thread-cs choice; for global it is none (because
                          none is required), for per-object it is lock, and
                          for lock-free it is lock-free
  --enable-mutex-timing   calculate the time spent waiting on mutexes
  --enable-handle-allocation=type
                          Choose the method used for allocating MPI object
                          handles. Values may be 'tls' for thread-local
                          storage or 'mutex' for simple locking. 'mutex' is
                          the default.
  --enable-predefined-refcount
                          control whether predefined objects like
                          MPI_COMM_WORLD are reference counted (default
                          depends on --enable-thread-cs choice)
  --enable-weak-symbols   Use weak symbols to implement PMPI routines
                          (default)
  --enable-multi-aliases  Multiple aliasing to support multiple fortran
                          compilers (default)
  --enable-cache          Turn on configure caching
  --enable-strict         Turn on strict compilation testing
  --enable-shared         Enable shared library builds
  --enable-rpath          Determine whether the rpath is set when programs are
                          compiled and linked when shared libraries are built.
                          The default is yes; use --disable-rpath to turn this
                          feature off; in that case, shared libraries will be
                          found according to the rules for your system (e.g.,
                          in LD_LIBRARY_PATH)
  --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-alloca         Use alloca to allocate temporary memory if available
  --enable-timer-type=name - Select the timer to use for MPI_Wtime and
                             internal timestamps.
        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*
        gcc_ia64_cycle     - IPF ar.itc timer*
	mach_absolute_time - Mach absolute time (alternative to clock_gettime
                             for OSX)
        device - The timer is provided by the device

        *Note that the cycle timers are intended to be used by MPICH2
        developers for internal low-level timing.  Normal users should
        not use these as they are not guaranteed to be accurate in
        certain situations.

        linuxalpha_cycle is no longer supported.

  --enable-checkpointing  Enable application checkpointing
  --enable-base-cache     Enable the use of a simple cache for the subsidiary
                          configure scripts

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-aint-size        Override the size of MPI_AINT (in bytes)
  --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. "no" or
                          "none" are valid values. 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=hydra:mpd:gforker"
                          builds the three process managers hydra, mpd and
                          gforker; only the mpiexec from hydra 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-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)
                                   pmi

  --with-fwrapname=name   Specify name of library containing Fortran interface
                          routines
  --with-openpa-prefix[=DIR]
                          use the OpenPA atomics library installed in DIR,
                          rather than the one included in src/openpa. Pass
                          "embedded" to force usage of the OpenPA source
                          distributed with MPICH2.
  --with-atomic-primitives
                          Force OPA to use a specific atomic primitives
                          implementation. See the src/openpa directory for
                          more info.
  --with-thread-package=package     Thread package to use. Supported thread packages include:
        posix or pthreads - POSIX threads
        solaris - Solaris threads (Solaris OS only)
        win - windows threads
        none - no threads

    If the option is not specified, the default package is
    ${MPIU_THREAD_DEFAULT}.  If the option is specified, but a package
    is not given, then the default is posix

  --with-blcr=path        specify path where blcr include directory and lib
                          directory can be found
  --with-blcr-include=path
                          specify path where blcr include directory can be
                          found
  --with-blcr-lib=path    specify path where blcr lib directory can be found

Some influential environment variables:
  FROM_MPICH2 internal flag to tell subconfigures that they are built from
              within MPICH2
  MPICH2LIB_CFLAGS
              extra CFLAGS used in building MPICH2 libraries
  MPICH2LIB_CPPFLAGS
              extra CPPFLAGS used in building MPICH2 libraries
  MPICH2LIB_CXXFLAGS
              extra CXXFLAGS used in building MPICH2 libraries
  MPICH2LIB_FFLAGS
              extra FFLAGS used in building MPICH2 libraries
  MPICH2LIB_FCFLAGS
              extra FCFLAGS used in building MPICH2 libraries
  MPICH2LIB_LDFLAGS
              extra LDFLAGS used in building MPICH2 libraries
  MPICH2LIB_LIBS
              extra LIBS used in building MPICH2 libraries
  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>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags
  FC          Fortran compiler command
  FCFLAGS     Fortran compiler flags
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  AR_FLAGS    AR command flags
  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.

Report bugs to the package provider.
_ACEOF
ac_status=$?
fi

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

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for guested 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
    else
      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
configure
generated by GNU Autoconf 2.67

Copyright (C) 2010 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
fi

## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##

# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_c_try_compile

# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_c_try_cpp

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_c_try_link

# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_c_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_c_try_run

# ac_fn_f77_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_f77_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_f77_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_f77_try_compile

# ac_fn_f77_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_f77_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_f77_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_f77_try_link

# ac_fn_fc_try_compile LINENO
# ---------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_fc_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_fc_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_fc_try_compile

# ac_fn_fc_try_link LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_fc_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_fc_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_fc_try_link

# ac_fn_fc_try_run LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_fc_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_fc_try_run

# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_compile

# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_link

# ac_fn_cxx_try_run LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_cxx_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_run

# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_c_check_header_mongrel ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if eval "test \"\${$3+set}\"" = set; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_header_compiler=yes
else
  ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  ac_header_preproc=yes
else
  ac_header_preproc=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
  yes:no: )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
  no:yes:* )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_header_mongrel

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_header_compile

# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $2 (); 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 $2

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char $2 ();
/* 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_$2 || defined __stub___$2
choke me
#endif

int
main ()
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_func

# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
ac_fn_c_compute_int ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if test "$cross_compiling" = yes; then
    # Depending upon the size, compute the lo and hi bounds.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_lo=0 ac_mid=0
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_hi=$ac_mid; break
else
  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_hi=-1 ac_mid=-1
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_lo=$ac_mid; break
else
  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  ac_lo= ac_hi=
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_hi=$ac_mid
else
  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
'') ac_retval=1 ;;
esac
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
static long int longval () { return $2; }
static unsigned long int ulongval () { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (($2) < 0)
    {
      long int i = longval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
  ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f conftest.val

  fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_c_compute_int

# ac_fn_c_find_intX_t LINENO BITS VAR
# -----------------------------------
# Finds a signed integer type with width BITS, setting cache variable VAR
# accordingly.
ac_fn_c_find_intX_t ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
$as_echo_n "checking for int$2_t... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=no"
     # Order is important - never check a type that is potentially smaller
     # than half of the expected target width.
     for ac_type in int$2_t 'int' 'long int' \
	 'long long int' 'short int' 'signed char'; do
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
	     enum { N = $2 / 2 - 1 };
int
main ()
{
static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
	        enum { N = $2 / 2 - 1 };
int
main ()
{
static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  case $ac_type in #(
  int$2_t) :
    eval "$3=yes" ;; #(
  *) :
    eval "$3=\$ac_type" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       if eval test \"x\$"$3"\" = x"no"; then :

else
  break
fi
     done
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_find_intX_t

# ac_fn_c_find_uintX_t LINENO BITS VAR
# ------------------------------------
# Finds an unsigned integer type with width BITS, setting cache variable VAR
# accordingly.
ac_fn_c_find_uintX_t ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
$as_echo_n "checking for uint$2_t... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=no"
     # Order is important - never check a type that is potentially smaller
     # than half of the expected target width.
     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  case $ac_type in #(
  uint$2_t) :
    eval "$3=yes" ;; #(
  *) :
    eval "$3=\$ac_type" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       if eval test \"x\$"$3"\" = x"no"; then :

else
  break
fi
     done
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_find_uintX_t

# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
# variable VAR accordingly.
ac_fn_c_check_type ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=no"
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
if (sizeof ($2))
	 return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
if (sizeof (($2)))
	    return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  eval "$3=yes"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_type

# ac_fn_f77_try_run LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
# that executables *can* be run.
ac_fn_f77_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then :
  ac_retval=0
else
  $as_echo "$as_me: program exited with status $ac_status" >&5
       $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_f77_try_run

# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
# ----------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
ac_fn_cxx_compute_int ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if test "$cross_compiling" = yes; then
    # Depending upon the size, compute the lo and hi bounds.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_lo=0 ac_mid=0
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_hi=$ac_mid; break
else
  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_hi=-1 ac_mid=-1
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_lo=$ac_mid; break
else
  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
else
  ac_lo= ac_hi=
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_hi=$ac_mid
else
  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
'') ac_retval=1 ;;
esac
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
static long int longval () { return $2; }
static unsigned long int ulongval () { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (($2) < 0)
    {
      long int i = longval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
  ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f conftest.val

  fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_cxx_compute_int

# ac_fn_cxx_try_cpp LINENO
# ------------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_cpp ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } > conftest.i && {
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       }; then :
  ac_retval=0
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_retval=1
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_cpp

# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
# ---------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
ac_fn_cxx_check_header_mongrel ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if eval "test \"\${$3+set}\"" = set; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
  # Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_header_compiler=yes
else
  ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }

# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <$2>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  ac_header_preproc=yes
else
  ac_header_preproc=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
  yes:no: )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
  no:yes:* )
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
    ;;
esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_cxx_check_header_mongrel

# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_c_check_decl ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  as_decl_name=`echo $2|sed 's/ *(.*//'`
  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
if eval "test \"\${$3+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
#ifndef $as_decl_name
#ifdef __cplusplus
  (void) $as_decl_use;
#else
  (void) $as_decl_name;
#endif
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}

} # ac_fn_c_check_decl
cat >config.log <<_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.67.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
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`
/usr/bin/hostinfo      = `(/usr/bin/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=.
    $as_echo "PATH: $as_dir"
  done
IFS=$as_save_IFS

} >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
    2)
      as_fn_append 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
      as_fn_append ac_configure_args " '$ac_arg'"
      ;;
    esac
  done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    $as_echo "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    $as_echo "## ----------------- ##
## Output variables. ##
## ----------------- ##"
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      $as_echo "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      $as_echo "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	$as_echo "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      $as_echo "## ----------- ##
## confdefs.h. ##
## ----------- ##"
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      $as_echo "$as_me: caught signal $ac_signal"
    $as_echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

$as_echo "/* confdefs.h */" > 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

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


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
  # We do not want a PATH search for config.site.
  case $CONFIG_SITE in #((
    -*)  ac_site_file1=./$CONFIG_SITE;;
    */*) ac_site_file1=$CONFIG_SITE;;
    *)   ac_site_file1=./$CONFIG_SITE;;
  esac
elif test "x$prefix" != xNONE; then
  ac_site_file1=$prefix/share/config.site
  ac_site_file2=$prefix/etc/config.site
else
  ac_site_file1=$ac_default_prefix/share/config.site
  ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
  test "x$ac_site_file" = xNONE && continue
  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file" \
      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
  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 $ac_precious_vars; 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,)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
$as_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
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`$as_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.
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##

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



CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '`


# Try to find the version and release date
if test -s "$srcdir/maint/Version" ; then
    . $srcdir/maint/Version
    export MPICH2_VERSION
else
    as_fn_error $? "Version information not found. Configuration aborted." "$LINENO" 5
fi

# Produce a numeric version assuming the following format:
# Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER]
# Example: 1.0.7rc1 has
#          MAJ = 1
#          MIN = 0
#          REV = 7
#          EXT = rc
#          EXT_NUMBER = 1
#
# Converting to numeric version will convert EXT to a format number:
#          ALPHA (a) = 0
#          BETA (b)  = 1
#          RC (rc)   = 2
#          PATCH (p) = 3
# Regular releases are treated as patch 0
#
# Numeric version will have 1 digit for MAJ, 2 digits for MIN,
# 2 digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER.

V1=`expr $MPICH2_VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
V2=`expr $MPICH2_VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
V3=`expr $MPICH2_VERSION : '[0-9]*\.[0-9]*\.*\([0-9]*\)[a-zA-Z]*[0-9]*'`
V4=`expr $MPICH2_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*\([a-zA-Z]*\)[0-9]*'`
V5=`expr $MPICH2_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*[a-zA-Z]*\([0-9]*\)'`


if test "$V2" -le 9 ; then V2=0$V2 ; fi
if test "$V3" = "" ; then V3=0; fi
if test "$V3" -le 9 ; then V3=0$V3 ; fi
if test "$V4" = "a" ; then
    V4=0
elif test "$V4" = "b" ; then
    V4=1
elif test "$V4" = "rc" ; then
    V4=2
elif test "$V4" = "" ; then
    V4=3
    V5=0
elif test "$V4" = "p" ; then
    V4=3
fi
if test "$V5" -le 9 ; then V5=0$V5 ; fi

MPICH2_NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`



# ABIVERSION is the name used by simplemake, so we reassign the
# libmpich_so_version number to it
ABIVERSION=${libmpich_so_version}
export ABIVERSION
export libmpich_so_version


# Print out the configure options
CONFIGURE_ARGUMENTS="$ac_configure_args"

if test -n "$ac_configure_args" ; then
    echo "Configuring MPICH2 version $MPICH2_VERSION with $ac_configure_args"
else
    echo "Configuring MPICH2 version $MPICH2_VERSION"
fi

# Add the information on the system:
echo "Running on system: `uname -a`"

ac_config_headers="$ac_config_headers src/include/mpichconf.h"




ac_aux_dir=
for ac_dir in confdb "$srcdir"/confdb; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f "$ac_dir/install.sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f "$ac_dir/shtool"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in confdb \"$srcdir\"/confdb" "$LINENO" 5
fi

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.



# Set the FROM_MPICH2 variable to tell subconfigures that they are
# built from within MPICH2
FROM_MPICH2=yes
export FROM_MPICH2


# Save a copy of precious flags as USER_* before any of these flags
# are being modified by configure tests.


	USER_CFLAGS=$CFLAGS
	export USER_CFLAGS



	USER_CPPFLAGS=$CPPFLAGS
	export USER_CPPFLAGS



	USER_CXXFLAGS=$CXXFLAGS
	export USER_CXXFLAGS



	USER_FFLAGS=$FFLAGS
	export USER_FFLAGS



	USER_FCFLAGS=$FCFLAGS
	export USER_FCFLAGS



	USER_LDFLAGS=$LDFLAGS
	export USER_LDFLAGS



	USER_LIBS=$LIBS
	export USER_LIBS




# WRAPPER_xFLAGS are used by mpicc and friends.
#
# WRAPPER_CFLAGS and other compile flags are used for compile options
# that are added by MPICH2, but should be used by applications (such
# as include paths).
#
# All libraries that are detected by MPICH2 as needed for some of its
# functionality (such as -lpthread) should be added to LIBS so
# autoconf link tests can use them. Libraries that are built by MPICH2
# at make time (and hence are not available for autoconf link tests to
# use), such as OPA and MPL, should be added to WRAPPER_LIBS for
# static builds. All libraries in LIBS are added to WRAPPER_LIBS
# (similarly LDFLAGS are added to WRAPPER_LDFLAGS) as well, at the end
# of configure.


	WRAPPER_CFLAGS=$CFLAGS
	export WRAPPER_CFLAGS



	WRAPPER_CPPFLAGS=$CPPFLAGS
	export WRAPPER_CPPFLAGS



	WRAPPER_CXXFLAGS=$CXXFLAGS
	export WRAPPER_CXXFLAGS



	WRAPPER_FFLAGS=$FFLAGS
	export WRAPPER_FFLAGS



	WRAPPER_FCFLAGS=$FCFLAGS
	export WRAPPER_FCFLAGS



	WRAPPER_LDFLAGS=$LDFLAGS
	export WRAPPER_LDFLAGS



	WRAPPER_LIBS=$LIBS
	export WRAPPER_LIBS



WRAPPER_CFLAGS="$CFLAGS $MPICH2_MPICC_FLAGS"
WRAPPER_CPPFLAGS="$CPPFLAGS $MPICH2_MPICPP_FLAGS"
WRAPPER_CXXFLAGS="$CXXFLAGS $MPICH2_MPICXX_FLAGS"
WRAPPER_FFLAGS="$FFLAGS $MPICH2_MPIF77_FLAGS"
WRAPPER_FCFLAGS="$FCFLAGS $MPICH2_MPIFC_FLAGS"
WRAPPER_LDFLAGS="$MPICH2_LDFLAGS"
WRAPPER_LIBS="$MPICH2_LIBS"

# Add MPICH2LIB_* to the appropriate flags







CFLAGS="$CFLAGS $MPICH2LIB_CFLAGS"
CPPFLAGS="$CPPFLAGS $MPICH2LIB_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $MPICH2LIB_CXXFLAGS"
FFLAGS="$FFLAGS $MPICH2LIB_FFLAGS"
FCFLAGS="$FCFLAGS $MPICH2LIB_FCFLAGS"
LDFLAGS="$LDFLAGS $MPICH2LIB_LDFLAGS"
LIBS="$LIBS $MPICH2LIB_LIBS"


# Check whether --enable-lib-depend was given.
if test "${enable_lib_depend+set}" = set; then :
  enableval=$enable_lib_depend;
else
  enable_lib_depend=no
fi


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


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


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


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


# Check whether --enable-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 was given.
if test "${enable_timing+set}" = set; then :
  enableval=$enable_timing;
else
  enable_timing=default
fi


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



# Check whether --with-aint-size was given.
if test "${with_aint_size+set}" = set; then :
  withval=$with_aint_size;
else
  with_aint_size=0
fi


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


# Check whether --enable-check-compiler-flags was given.
if test "${enable_check_compiler_flags+set}" = set; then :
  enableval=$enable_check_compiler_flags;
else
  enable_check_compiler_flags=yes
fi


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


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


# Check whether --enable-f90 was given.
if test "${enable_f90+set}" = set; then :
  enableval=$enable_f90; as_fn_error $? "
--enable-f90 and --disable-f90 are NO longer valid configure options,
use --enable-fc or --disable-fc instead" "$LINENO" 5

fi


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


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


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


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

if test $smpcoll = "yes" ; then

$as_echo "#define USE_SMP_COLLECTIVES 1" >>confdefs.h

fi

# Check whether --enable-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 was given.
if test "${with_device+set}" = set; then :
  withval=$with_device;
else
  with_device=default
fi



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



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



# Check whether --with-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 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 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 was given.
if test "${enable_threads+set}" = set; then :
  enableval=$enable_threads;
else
  enable_threads=default
fi


# Check whether --enable-thread-cs was given.
if test "${enable_thread_cs+set}" = set; then :
  enableval=$enable_thread_cs;
else
  enable_thread_cs=global
fi


# Check whether --enable-refcount was given.
if test "${enable_refcount+set}" = set; then :
  enableval=$enable_refcount;
else
  enable_refcount=default
fi


# Check whether --enable-mutex-timing was given.
if test "${enable_mutex_timing+set}" = set; then :
  enableval=$enable_mutex_timing;
$as_echo "#define MPIU_MUTEX_WAIT_TIME 1" >>confdefs.h

fi


# Check whether --enable-handle-allocation was given.
if test "${enable_handle_allocation+set}" = set; then :
  enableval=$enable_handle_allocation;
else
  enable_handle_allocation=default
fi


# Check whether --enable-predefined-refcount was given.
if test "${enable_predefined_refcount+set}" = set; then :
  enableval=$enable_predefined_refcount;
else
  enable_predefined_refcount=default
fi


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


# Check whether --enable-multi-aliases was given.
if test "${enable_multi_aliases+set}" = set; then :
  enableval=$enable_multi_aliases;
else
  enable_multi_aliases=yes
fi



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



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


# Check whether --with-name-publisher was given.
if test "${with_name_publisher+set}" = set; then :
  withval=$with_name_publisher; with_namepublisher=$with_name_publisher
fi






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



# Find a C compiler.
# We also need to do this before the F77 and FC test to ensure that we
# find the C preprocessor reliably.


	if test -z "${pac_save_CFLAGS_nesting}" ; then
	   pac_save_CFLAGS_nesting=0
	fi
	eval pac_save_CFLAGS_${pac_save_CFLAGS_nesting}='"$CFLAGS"'
	pac_save_CFLAGS_nesting=`expr ${pac_save_CFLAGS_nesting} + 1`

	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
  for ac_prog in gcc icc pgcc xlc xlC pathcc cc
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in gcc icc pgcc xlc xlC pathcc cc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi


test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { { ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  ac_file=''
fi
if test -z "$ac_file"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
$as_echo_n "checking for C compiler default output file name... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
  { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
  if { ac_try='./conftest$ac_cv_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
$as_echo "$cross_compiling" >&6; }

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

int
main ()
{

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

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
else
  CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
$as_echo "$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 -std 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 -std.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 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
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
  x)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
  xno)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :

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


	pac_save_CFLAGS_nesting=`expr ${pac_save_CFLAGS_nesting} - 1`
	eval CFLAGS="\$pac_save_CFLAGS_${pac_save_CFLAGS_nesting}"
	eval pac_save_CFLAGS_${pac_save_CFLAGS_nesting}=""



	if test -z "${pac_save_CFLAGS_nesting}" ; then
	   pac_save_CFLAGS_nesting=0
	fi
	eval pac_save_CFLAGS_${pac_save_CFLAGS_nesting}='"$CFLAGS"'
	pac_save_CFLAGS_nesting=`expr ${pac_save_CFLAGS_nesting} + 1`

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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&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 :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

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

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :

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

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 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

# Bug in autoconf.  Restore cross settings
if test "$pac_cross_compiling" = "yes" -a "$ac_cv_prog_cc_cross" = "no" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Resetting cross compilation to yes" >&5
$as_echo "Resetting cross compilation to yes" >&6; }
    cross_compiling=yes
    ac_cv_prog_cc_cross=yes
    ac_cv_prog_f77_cross=yes
    ac_cv_prog_fc_cross=yes
    ac_cv_prog_cxx_cross=yes
fi

	pac_save_CFLAGS_nesting=`expr ${pac_save_CFLAGS_nesting} - 1`
	eval CFLAGS="\$pac_save_CFLAGS_${pac_save_CFLAGS_nesting}"
	eval pac_save_CFLAGS_${pac_save_CFLAGS_nesting}=""


# compute canonical system types
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
if test "${ac_cv_build+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
if test "${ac_cv_host+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac


# TARGET not needed, MPICH2 isn't a compiler

# Enable better caching control

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



# Set CFLAGS for enable strict if necessary.  Do this *first* because
# it may influence the output of the other tests
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -z "$GREP"; then
  ac_path_GREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in grep ggrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_GREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_GREP"; then
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_GREP=$GREP
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
if test "${ac_cv_path_FGREP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
   then ac_cv_path_FGREP="$GREP -F"
   else
     if test -z "$FGREP"; then
  ac_path_FGREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in fgrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
# Check for GNU ac_path_FGREP and select it if it is found.
  # Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'FGREP' >> "conftest.nl"
    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_FGREP="$ac_path_FGREP"
      ac_path_FGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_FGREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_FGREP"; then
    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_FGREP=$FGREP
fi

   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
$as_echo "$ac_cv_path_FGREP" >&6; }
 FGREP="$ac_cv_path_FGREP"




# Check whether --enable-strict was given.
if test "${enable_strict+set}" = set; then :
  enableval=$enable_strict;
fi


export enable_strict_done
if test "$enable_strict_done" != "yes" ; then

    # Some comments on strict warning options.
    # These were added to reduce warnings:
    #   -Wno-missing-field-initializers  -- We want to allow a struct to be
    #       initialized to zero using "struct x y = {0};" and not require
    #       each field to be initialized individually.
    #   -Wno-unused-parameter -- For portability, some parameters go unused
    #	    when we have different implementations of functions for
    #	    different platforms
    #   -Wno-unused-label -- We add fn_exit: and fn_fail: on all functions,
    #	    but fn_fail may not be used if the function doesn't return an
    #	    error.
    #   -Wno-sign-compare -- read() and write() return bytes read/written
    #       as a signed value, but we often compare this to size_t (or
    #	    msg_sz_t) variables.
    #   -Wno-format-zero-length -- this warning is irritating and useless, since
    #                              a zero-length format string is very well defined
    #   -Wno-type-limits -- There are places where we compare an unsigned to
    #	    a constant that happens to be zero e.g., if x is unsigned and
    #	    MIN_VAL is zero, we'd like to do "MPIU_Assert(x >= MIN_VAL);".
    #       Note this option is not supported by gcc 4.2.  This needs to be added
    #	    after most other warning flags, so that we catch a gcc bug on 32-bit
    #	    that doesn't give a warning that this is unsupported, unless another
    #	    warning is triggered, and then if gives an error.
    # These were removed to reduce warnings:
    #   -Wcast-qual -- Sometimes we need to cast "volatile char*" to
    #	    "char*", e.g., for memcpy.
    #   -Wpadded -- We catch struct padding with asserts when we need to
    #   -Wredundant-decls -- Having redundant declarations is benign and the
    #	    code already has some.
    #   -Waggregate-return -- This seems to be a performance-related warning
    #       aggregate return values are legal in ANSI C, but they may be returned
    #	    in memory rather than through a register.  We do use aggregate return
    #	    values, but they are structs of a single basic type (used to enforce
    #	    type checking for relative vs. absolute ptrs), and with optimization
    #	    the aggregate value is converted to a scalar.
    #   -Wdeclaration-after-statement -- This is a C89
    #       requirement. When compiling with C99, this should be
    #       disabled.
    # the embedded newlines in this string are safe because we evaluate each
    # argument in the for-loop below and append them to the CFLAGS with a space
    # as the separator instead
    pac_common_strict_flags="
        -Wall
        -Wextra
        -Wno-missing-field-initializers
        -Wstrict-prototypes
        -Wmissing-prototypes
        -DGCC_WALL
        -Wno-unused-parameter
        -Wno-unused-label
        -Wshadow
        -Wmissing-declarations
        -Wno-long-long
        -Wfloat-equal
        -Wundef
        -Wno-endif-labels
        -Wpointer-arith
        -Wbad-function-cast
        -Wcast-align
        -Wwrite-strings
        -Wno-sign-compare
        -Wold-style-definition
        -Wno-multichar
        -Wno-deprecated-declarations
        -Wpacked
        -Wnested-externs
        -Winvalid-pch
        -Wno-pointer-sign
        -Wvariadic-macros
        -Wno-format-zero-length
	-Wno-type-limits
    "

    enable_c89=yes
    enable_c99=no
    enable_posix=yes
    enable_opt=yes
    flags="`echo $enable_strict | sed -e 's/:/ /g' -e 's/,/ /g'`"
    for flag in ${flags}; do
        case "$flag" in
	     c89)
		enable_strict_done="yes"
		enable_c89=yes
		;;
	     c99)
		enable_strict_done="yes"
		enable_c99=yes
		;;
	     posix)
		enable_strict_done="yes"
		enable_posix=yes
		;;
	     noposix)
		enable_strict_done="yes"
		enable_posix=no
		;;
	     opt)
		enable_strict_done="yes"
		enable_opt=yes
		;;
	     noopt)
		enable_strict_done="yes"
		enable_opt=no
		;;
	     all|yes)
		enable_strict_done="yes"
		enable_c89=yes
		enable_posix=yes
		enable_opt=yes
	        ;;
	     no)
		# Accept and ignore this value
		:
		;;
	     *)
		if test -n "$flag" ; then
		   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unrecognized value for enable-strict:$flag" >&5
$as_echo "$as_me: WARNING: Unrecognized value for enable-strict:$flag" >&2;}
		fi
		;;
	esac
    done

    pac_cc_strict_flags=""
    if test "${enable_strict_done}" = "yes" ; then
       if test "${enable_opt}" = "yes" ; then
       	  pac_cc_strict_flags="-O2"
       fi
       pac_cc_strict_flags="$pac_cc_strict_flags $pac_common_strict_flags"
       if test "${enable_posix}" = "yes" ; then


	if echo "$pac_cc_strict_flags" | $FGREP -e '-D_POSIX_C_SOURCE=199506L' >/dev/null 2>&1; then :
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') contains '-D_POSIX_C_SOURCE=199506L', not appending" >&5
else
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') does not contain '-D_POSIX_C_SOURCE=199506L', appending" >&5
		pac_cc_strict_flags="$pac_cc_strict_flags -D_POSIX_C_SOURCE=199506L"

fi

       fi
       # We only allow one of strict-C99 or strict-C89 to be
       # enabled. If C99 is enabled, we automatically disable C89.
       if test "${enable_c99}" = "yes" ; then


	if echo "$pac_cc_strict_flags" | $FGREP -e '-std=c99' >/dev/null 2>&1; then :
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') contains '-std=c99', not appending" >&5
else
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') does not contain '-std=c99', appending" >&5
		pac_cc_strict_flags="$pac_cc_strict_flags -std=c99"

fi

       elif test "${enable_c89}" = "yes" ; then


	if echo "$pac_cc_strict_flags" | $FGREP -e '-std=c89' >/dev/null 2>&1; then :
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') contains '-std=c89', not appending" >&5
else
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') does not contain '-std=c89', appending" >&5
		pac_cc_strict_flags="$pac_cc_strict_flags -std=c89"

fi



	if echo "$pac_cc_strict_flags" | $FGREP -e '-Wdeclaration-after-statement' >/dev/null 2>&1; then :
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') contains '-Wdeclaration-after-statement', not appending" >&5
else
  echo "pac_cc_strict_flags(='$pac_cc_strict_flags') does not contain '-Wdeclaration-after-statement', appending" >&5
		pac_cc_strict_flags="$pac_cc_strict_flags -Wdeclaration-after-statement"

fi

       fi
    fi

    # See if the above options work with the compiler
    accepted_flags=""
    for flag in $pac_cc_strict_flags ; do

	if test -z "${pac_save_CFLAGS_nesting}" ; then
	   pac_save_CFLAGS_nesting=0
	fi
	eval pac_save_CFLAGS_${pac_save_CFLAGS_nesting}='"$CFLAGS"'
	pac_save_CFLAGS_nesting=`expr ${pac_save_CFLAGS_nesting} + 1`

	CFLAGS="$CFLAGS $accepted_flags"

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts option $flag" >&5
$as_echo_n "checking whether C compiler accepts option $flag... " >&6; }
pac_opt="$flag"
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

CFLAGS_orig="$CFLAGS"
CFLAGS_opt="$pac_opt $CFLAGS"
pac_result="unknown"

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
CFLAGS="$CFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :


    CFLAGS="$CFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext

# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option
# even though it doesn't support it.  However, when another warning is
# triggered, it gives an error that the option is not recognized.  So we
# need to test with a conftest file that will generate warnings.
#
# add an extra switch, pac_c_check_compiler_option_invalidprototest, to
# disable this test just in case some new compiler does not like it.
#
# Linking with a program with an invalid prototype to ensure a compiler warning.

if test "$pac_result" = "yes" \
     -a "$pac_c_check_compiler_option_prototest" != "no" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler option $flag works with an invalid prototype program" >&5
$as_echo_n "checking whether C compiler option $flag works with an invalid prototype program... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        void main(){ return 0; }

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_result=yes
else
  pac_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
fi
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    CFLAGS="$CFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


            int foo(void);
            int foo(void){return 0;}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


            CFLAGS="$CFLAGS_opt"
            rm -f pac_test5.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test5.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test4.log pac_test5.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test4.log pac_test5.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test4.log pac_test5.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


                pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log pac_test5.log
fi
rm -f pac_test1.log pac_test2.log

CFLAGS="$CFLAGS_orig"
if test "$pac_result" = "yes" ; then
     accepted_flags="$accepted_flags $flag"
else
     :
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



	pac_save_CFLAGS_nesting=`expr ${pac_save_CFLAGS_nesting} - 1`
	eval CFLAGS="\$pac_save_CFLAGS_${pac_save_CFLAGS_nesting}"
	eval pac_save_CFLAGS_${pac_save_CFLAGS_nesting}=""

    done
    pac_cc_strict_flags=$accepted_flags
fi

CFLAGS="$CFLAGS $pac_cc_strict_flags"
export CFLAGS


# Check for shared library support


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


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


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


if test "$enable_sharedlibs" = "default" ; then
   if test "$enable_shared" = "yes" ; then
      case $host in #(
  *-*-darwin*) :
    enable_sharedlibs=gcc-osx ;; #(
  *-*-cygwin*|*-*-mingw*|*-*-pw32*|*-*-cegcc*) :
    enable_sharedlibs=cygwin-gcc ;; #(
  *-*-sunos*) :
    enable_sharedlibs=solaris-gcc ;; #(
  *) :
    enable_sharedlibs=gcc ;;
esac
   else
      enable_sharedlibs=none
   fi
fi

# If --enable-sharedlibs is given, but --enable-shared is not, throw
# an error
if test "$enable_sharedlibs" != "no" -a "$enable_sharedlibs" != "none" ; then
   if test "$enable_shared" = "no" ; then
      as_fn_error $? "--enable-sharedlibs cannot be used without --enable-shared" "$LINENO" 5
   fi
fi

CC_SHL=true
C_LINK_SHL=true
C_LINKPATH_SHL=""
SHLIB_EXT=unknown
SHLIB_FROM_LO=no
SHLIB_INSTALL='$(INSTALL_PROGRAM)'
case "$enable_sharedlibs" in
    no|none)
    ;;
    gcc-osx|osx-gcc)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Creating shared libraries using GNU for Mac OSX" >&5
$as_echo "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)
    # As of 10.5, -Wl,-rpath,dirname should work .  The dirname
    # must be a single directory, not a colon-separated list (use multiple
    # -Wl,-rpath,path for each of the paths in the list).  However, os x
    # apparently records the library full path, so rpath isn't as useful
    # as it is on other systems
    C_LINKPATH_SHL=""
    SHLIB_EXT="dylib"
    enable_sharedlibs="osx-gcc"
    ;;
    gcc)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Creating shared libraries using GNU" >&5
$as_echo "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 .  Test to see which one works.
    for sh_arg in "-fPIC" "-fpic" "-KPIC" ; do

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts option $sh_arg" >&5
$as_echo_n "checking whether C compiler accepts option $sh_arg... " >&6; }
pac_opt="$sh_arg"
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

CFLAGS_orig="$CFLAGS"
CFLAGS_opt="$pac_opt $CFLAGS"
pac_result="unknown"

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
CFLAGS="$CFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :


    CFLAGS="$CFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext

# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option
# even though it doesn't support it.  However, when another warning is
# triggered, it gives an error that the option is not recognized.  So we
# need to test with a conftest file that will generate warnings.
#
# add an extra switch, pac_c_check_compiler_option_invalidprototest, to
# disable this test just in case some new compiler does not like it.
#
# Linking with a program with an invalid prototype to ensure a compiler warning.

if test "$pac_result" = "yes" \
     -a "$pac_c_check_compiler_option_prototest" != "no" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler option $sh_arg works with an invalid prototype program" >&5
$as_echo_n "checking whether C compiler option $sh_arg works with an invalid prototype program... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        void main(){ return 0; }

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_result=yes
else
  pac_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
fi
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    CFLAGS="$CFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


            int foo(void);
            int foo(void){return 0;}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


            CFLAGS="$CFLAGS_opt"
            rm -f pac_test5.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test5.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test4.log pac_test5.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test4.log pac_test5.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test4.log pac_test5.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


                pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log pac_test5.log
fi
rm -f pac_test1.log pac_test2.log

CFLAGS="$CFLAGS_orig"
if test "$pac_result" = "yes" ; then
     works=yes
else
     works=no
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


        if test "$works" = "yes" ; then
           CC_SHL="${CC} ${sh_arg}"
	   break
	fi
    done
    if test "$works" != "yes"; then
       as_fn_error $? "Cannot build shared libraries with this compiler" "$LINENO" 5
    fi
    # This used to have -Wl,-rpath earlier, but that causes problems
    # on many systems.
    if test $enable_rpath = "yes" ; then
        C_LINKPATH_SHL="-Wl,-rpath,"
    fi
    SHLIB_EXT=so
    # We need to test that this isn't osx.  The following is a
    # simple hack
    osname=`uname -s`
    case $osname in
        *Darwin*|*darwin*)
	as_fn_error $? "You must specify --enable-sharedlibs=osx-gcc for Mac OS/X" "$LINENO" 5
        ;;
        *CYGWIN*|*cygwin*)
	as_fn_error $? "You must specify --enable-sharedlibs=cygwin-gcc for Cygwin" "$LINENO" 5
	;;
	*SunOS*)
	as_fn_error $? "You must specify --enable-sharedlibs=solaris-gcc for Solaris with gcc" "$LINENO" 5
	;;
    esac
    ;;

    cygwin|cygwin-gcc|gcc-cygwin)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Creating shared libraries using GNU under CYGWIN" >&5
$as_echo "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)
    # set TRY_LIBTOOL to yes to experiment with libtool.  You are on your
    # own - only send fixes, not bug reports.
    if test "$TRY_LIBTOOL" != yes ; then
        as_fn_error $? "Creating shared libraries using libtool not yet supported" "$LINENO" 5
    else
    # Using libtool requires a heavy-weight process to test for
    # various stuff that libtool needs.  Without this, you'll get a
    # bizarre error message about libtool being unable to find
    # configure.in or configure.ac (!)
        # Libtool expects to see at least enable-shared.
        if test "X$enable_shared" = "X" ; then enable_shared=yes ; fi
	# Initialize libtool
	# This works, but libtool version 2 places the object files
	# in a different place, making it harder to integrate with
	# our base approach.  Disabling for now
	        	as_fn_error $? "To use this test verison, edit aclocal_shl.m4" "$LINENO" 5
        # Likely to be
        # either CC or CC_SHL is libtool $cc
        CC_SHL='${LIBTOOL} --mode=compile ${CC}'
        # CC_LINK_SHL includes the final installation path
        # For many systems, the link may need to include *all* libraries
        # (since many systems don't allow any unsatisfied dependencies)
        # We need to give libtool the .lo file, not the .o files
        SHLIB_FROM_LO=yes
        # We also need to add -no-undefined when the compiler is gcc and
        # we are building under cygwin
        sysname=`uname -s | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
        isCygwin=no
        case "$sysname" in
 	*CYGWIN*) isCygwin=yes ;;
        esac
        if test "$isCygwin" = yes ; then
            C_LINK_SHL='${LIBTOOL} --mode=link ${CC} -no-undefined -rpath ${libdir}'
        else
            C_LINK_SHL='${LIBTOOL} --mode=link ${CC} -rpath ${libdir}'
        fi
	if test $enable_rpath = "yes" ; then
            C_LINKPATH_SHL="-rpath "
        fi
        # We also need a special install process with libtool.  Note that this
        # will also install the static libraries
        SHLIB_INSTALL='$(LIBTOOL) --mode=install $(INSTALL_PROGRAM)'
        # Note we may still need to add
        #'$(LIBTOOL) --mode=finish $(libdir)'
    fi
    ;;
    solaris|solaris-cc)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Creating shared libraries using Solaris" >&5
$as_echo "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'
    if test $enable_rpath = "yes" ; then
        C_LINKPATH_SHL="-R"
    fi
    SHLIB_EXT=so
    enable_sharedlibs="solaris-cc"
    ;;

    solaris-gcc)
    # This is the same as gcc, except for the C_LINKPATH_SHL
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Creating shared libraries using Solaris with gcc" >&5
$as_echo "Creating shared libraries using Solaris with gcc" >&6; }
    C_LINK_SHL='${CC} -shared'
    CC_SHL='${CC} -fPIC'
    if test $enable_rpath = "yes" ; then
        C_LINKPATH_SHL="-R"
    fi
    SHLIB_EXT=so
    enable_sharedlibs="solaris-gcc"
    ;;

    linuxppc-xlc)
    # This is only the beginning of xlc support, thanks to andy@vpac.org
    CC_SHL='${CC} -qmkshrobj'
    # More recent versions allow multiple args, separated by commas
    if test $enable_rpath = "yes" ; then
        C_LINKPATH_SHL="-Wl,-rpath,"
    fi
    #C_LINKPATH_SHL="-Wl,-rpath -Wl,"
    C_LINK_SHL='${CC} -shared -qmkshrobj'
    SHLIB_EXT=so
    # 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.
    ;;

    *)
    as_fn_error $? "Unknown value $enable_sharedlibs for enable-sharedlibs.  Values should be gcc or osx-gcc" "$LINENO" 5
    enable_sharedlibs=no
    ;;
esac
# Check for the shared-library extension

# Not all systems use .so as the extension for shared libraries (cygwin
# and OSX are two important examples).  If we did not set the SHLIB_EXT,
# then try and determine it.  We need this to properly implement
# clean steps that look for libfoo.$SHLIB_EXT .
if test "$SHLIB_EXT" = "unknown" ; then
    osname=`uname -s`
    case $osname in
        *Darwin*|*darwin*) SHLIB_EXT=dylib
        ;;
        *CYGWIN*|*cygwin*) SHLIB_EXT=dll
        ;;
	*Linux*|*LINUX*|*SunOS*) SHLIB_EXT=so
	;;
   esac
fi










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

# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
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
            as_fn_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." "$LINENO" 5
        else
            as_fn_error $? "You cannot do a VPATH build if the source directory has been
    configured.  Remove the $rmmsg in $srcdir." "$LINENO" 5
        fi
    fi
fi
# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
rm -f conftest*


# ----------------------------------------------------------------------------
# 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
# Make the device base name and args available to generated files
DEVICE_NAME=$device_name

DEVICE_ARGS=$device_args

#
# 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

# Set up default compiler optimization
MPI_DEFAULT_COPTS="-O2"
MPI_DEFAULT_CXXOPTS="-O2"
MPI_DEFAULT_FOPTS="-O2"
MPI_DEFAULT_FCOPTS="-O2"

# enable-fast
# strip off multiple options, separated by commas
save_IFS="$IFS"
IFS=","
for option in $enable_fast ; do
    case "$option" in
        defopt)
        enable_default_optimize=yes
        ;;
        nochkmsg)
        enable_fast_nochkmsg=yes
        ;;
        notiming)
        enable_timing=no
        ;;
        ndebug)
        enable_append_ndebug=yes
        ;;
#
# [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.
#
        all|yes)
        enable_default_optimize=yes
        enable_fast_nochkmsg=yes
        # Disable timing/logging stuffs
        enable_timing=no
        enable_append_ndebug=yes
        ;;
        O*)
        # Allows O<n> where <n> can be [0-9] or ' '.
        opt_flags=`echo $option | sed -e 's%\(O0-9 \)%\1%g'`
        if test -n "$opt_flags" ; then
            enable_default_optimize=yes
            MPI_DEFAULT_COPTS="-$option"
            MPI_DEFAULT_CXXOPTS="-$option"
            MPI_DEFAULT_FOPTS="-$option"
            MPI_DEFAULT_FCOPTS="-$option"
        else
	    IFS="$save_IFS"
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown value $option for --enable-fast" >&5
$as_echo "$as_me: WARNING: Unknown value $option for --enable-fast" >&2;}
	    IFS=","
        fi
        ;;
        none|no)
        enable_default_optimize=no
        enable_fast_nochkmsg=no
        # Reset timing/logging stuffs to when --enable-timing isn't specified.
        enable_timing=default
        enable_append_ndebug=no
        ;;
        *)
	IFS="$save_IFS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown value $option for --enable-fast" >&5
$as_echo "$as_me: WARNING: Unknown value $option for --enable-fast" >&2;}
	IFS=","
        ;;
    esac
done
IFS="$save_IFS"

# ----------------------------------------------------------------------------
# Process any enable or with values
# We must do enable-fast first, because it changes the other enable values
if test "$enable_fast_nochkmsg" = "yes" ; then
    #
    if test "$enable_error_checking" != "default" -a "$enable_error_checking" != "no" ; then
        as_fn_error $? "enable-fast overrides enable-error-checking; error-checking option $enable_error_checking ignored" "$LINENO" 5
    fi
    enable_error_checking=no
    # Export a variable that will allow the test suite to detect that
    # MPICH has no error testing
    MPICH_FAST=yes
    export MPICH_FAST
fi

# error-checking
# Change default into the specific value of the default
if test "$enable_error_checking" = "default" ; then
   enable_error_checking=all
fi
case "$enable_error_checking" in
    no)
    # if error checking has been disabled, then automatically disable 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

    ;;
    *)
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown value $enable_error_checking for enable-error-checking" >&5
$as_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"
    ;;
    *)
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown value $enable_error_messages for enable-error-messages" >&5
$as_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
    ;;
    *)
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown value $enable_timing for enable-timing" >&5
$as_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
	    as_fn_error $? "External logging directory $logging_name not found.  Configure aborted" "$LINENO" 5
	    logging_name=none
        elif test ! -s $logging_name/mpilogging.h ; then
	    as_fn_error $? "External logging header $logging_name/mpilogging.h not found.  Configure aborted" "$LINENO" 5
	    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"
	CPPFLAGS="$CPPFLAGS -I$logdir"
	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
        logreldir=src/util/logging/$logging_name
        logging_subsystems="$logging_subsystems $logreldir"
        logging_subdirs=$logging_name
        for dir in $logging_subdirs ; do
            if test ! -d $logdir/$dir ; then
	        as_fn_error $? "$logdir/$dir does not exist.  Configure aborted" "$LINENO" 5
	        logging_name=none
            fi
        done
        for dir in $logging_subsystems ; do
            if test ! -x $srcdir/$dir/configure ; then
	        as_fn_error $? "$logdir/$dir has no configure (required).  Configure aborted" "$LINENO" 5
	        logging_name=none
            fi
            other_install_dirs="${other_install_dirs} $logreldir"
        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
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Timing was disabled.  Logging has been disabled as well." >&5
$as_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
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Timing was enabled with log option but no logging library is available.  Timing has been disabled." >&5
$as_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

$as_echo "#define COLLECT_STATS 1" >>confdefs.h

    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
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The device $with_device does not support MPI dynamic process routines" >&5
$as_echo "$as_me: WARNING: The device $with_device does not support MPI dynamic process routines" >&2;}
fi

# MPL

        { $as_echo "$as_me:${as_lineno-$LINENO}: ===== configuring src/mpl =====" >&5
$as_echo "$as_me: ===== configuring src/mpl =====" >&6;}


# Build any intermediate directories
for dir in src/mpl ; do

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

    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

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""

done

	pac_abs_srcdir=`(cd $srcdir && pwd)`

	if test -f $pac_abs_srcdir/src/mpl/setup ; then
	   . $pac_abs_srcdir/src/mpl/setup
	fi

        pac_subconfigure_file="$pac_abs_srcdir/src/mpl/configure"
	if test -x $pac_subconfigure_file ; then
	   pac_subconfig_args=""

            # Set IFS so ac_configure_args can be tokenized
            # with extra " " tokens being skipped.

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

            IFS="'"
            for pac_arg in $ac_configure_args ; do
                case "$pac_arg" in
                # Ignore any null and leading blank strings.
                ""|" "*)
                    ;;
                *)
                    pac_pval=""
                    # Restore IFS so ac_precious_vars which has
                    # " " as separator can be correctly tokenized

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""

                    for pac_pvar in $ac_precious_vars ; do
                        # check if configure argument token contains the
                        # precious variable, i.e. "name_of_prec_var=".
                        pvar_in_arg=`echo $pac_arg | grep "$pac_pvar="`
                        if test "X$pvar_in_arg" != "X" ; then
                            # check if current precious variable is set in env
                            eval pvar_set=\${$pac_pvar+set}
                            if test "$pvar_set" = "set" ; then
                                # Append 'name_of_prec_var=value_of_prec_var'
                                # to the subconfigure arguments list, where
                                # value_of_prec_var is fetched from the env.
                                eval pac_pval=\${$pac_pvar}
                                pac_subconfig_args="$pac_subconfig_args '$pac_pvar=$pac_pval'"
                                break
                            fi
                        fi
                    done
                    # since the precious variable is not set in the env.,
                    # append the corresponding configure argument token
                    # to the subconfigure argument list.
                    if test "X$pac_pval" = "X" ; then
                        pac_subconfig_args="$pac_subconfig_args '$pac_arg'"
                    fi
                    # reset "'" as IFS to process ac_configure_args

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

                    IFS="'"
                    ;;
                esac
            done
            # Restore IFS.

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""


                      if test "$enable_option_checking" = no ; then
              pac_subconfig_args="$pac_subconfig_args --disable-option-checking"
           fi

	   { $as_echo "$as_me:${as_lineno-$LINENO}: executing: $pac_subconfigure_file $pac_subconfig_args" >&5
$as_echo "$as_me: executing: $pac_subconfigure_file $pac_subconfig_args" >&6;}
	   if (cd src/mpl && eval $pac_subconfigure_file $pac_subconfig_args) ; then
               :
	   else
               as_fn_error $? "MPL configure failed" "$LINENO" 5
	   fi
        else
           if test -e $pac_subconfigure_file ; then
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $pac_subconfigure_file exists but is not executable" >&5
$as_echo "$as_me: WARNING: $pac_subconfigure_file exists but is not executable" >&2;}
           else
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $pac_subconfigure_file does not exist" >&5
$as_echo "$as_me: WARNING: $pac_subconfigure_file does not exist" >&2;}
           fi
	fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: ===== done with src/mpl configure =====" >&5
$as_echo "$as_me: ===== done with src/mpl configure =====" >&6;}

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



        if echo "$WRAPPER_LIBS" | $FGREP -e '-lmpl' >/dev/null 2>&1; then :
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') contains '-lmpl', not prepending" >&5
else
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') does not contain '-lmpl', prepending" >&5
                WRAPPER_LIBS="-lmpl $WRAPPER_LIBS"

fi



	if echo "$CPPFLAGS" | $FGREP -e '-I${master_top_builddir}/src/mpl/include' >/dev/null 2>&1; then :
  echo "CPPFLAGS(='$CPPFLAGS') contains '-I${master_top_builddir}/src/mpl/include', not appending" >&5
else
  echo "CPPFLAGS(='$CPPFLAGS') does not contain '-I${master_top_builddir}/src/mpl/include', appending" >&5
		CPPFLAGS="$CPPFLAGS -I${master_top_builddir}/src/mpl/include"

fi



	if echo "$CPPFLAGS" | $FGREP -e '-I${use_top_srcdir}/src/mpl/include' >/dev/null 2>&1; then :
  echo "CPPFLAGS(='$CPPFLAGS') contains '-I${use_top_srcdir}/src/mpl/include', not appending" >&5
else
  echo "CPPFLAGS(='$CPPFLAGS') does not contain '-I${use_top_srcdir}/src/mpl/include', appending" >&5
		CPPFLAGS="$CPPFLAGS -I${use_top_srcdir}/src/mpl/include"

fi

EXTERNAL_SRC_DIRS="$EXTERNAL_SRC_DIRS src/mpl"
other_install_dirs="$other_install_dirs src/mpl"

# OpenPA

# Check whether --with-openpa-prefix was given.
if test "${with_openpa_prefix+set}" = set; then :
  withval=$with_openpa_prefix;
else
  # see if OPA is already installed on the system

	if test -z "${pac_save_LIBS_nesting}" ; then
	   pac_save_LIBS_nesting=0
	fi
	eval pac_save_LIBS_${pac_save_LIBS_nesting}='"$LIBS"'
	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} + 1`



        if echo "$LIBS" | $FGREP -e '-lopa' >/dev/null 2>&1; then :
  echo "LIBS(='$LIBS') contains '-lopa', not prepending" >&5
else
  echo "LIBS(='$LIBS') does not contain '-lopa', prepending" >&5
                LIBS="-lopa $LIBS"

fi

             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include "opa_primitives.h"

int
main ()
{

OPA_int_t i;
OPA_store_int(i,10);
OPA_fetch_and_incr_int(&i,5);

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  with_openpa_prefix=system
else
  with_openpa_prefix=embedded
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} - 1`
	eval LIBS="\$pac_save_LIBS_${pac_save_LIBS_nesting}"
	eval pac_save_LIBS_${pac_save_LIBS_nesting}=""


fi

# @opadir@ is used in src/Makefile.sm to control whether or not the OPA in
# src/openpa is built and installed
opadir=""


if test "$with_openpa_prefix" = "embedded" ; then
    if test -e "${use_top_srcdir}/src/openpa" ; then
        opadir="openpa"
        EXTERNAL_SRC_DIRS="$EXTERNAL_SRC_DIRS src/openpa"


	if echo "$CPPFLAGS" | $FGREP -e '-I${use_top_srcdir}/src/openpa/src' >/dev/null 2>&1; then :
  echo "CPPFLAGS(='$CPPFLAGS') contains '-I${use_top_srcdir}/src/openpa/src', not appending" >&5
else
  echo "CPPFLAGS(='$CPPFLAGS') does not contain '-I${use_top_srcdir}/src/openpa/src', appending" >&5
		CPPFLAGS="$CPPFLAGS -I${use_top_srcdir}/src/openpa/src"

fi



	if echo "$CPPFLAGS" | $FGREP -e '-I${master_top_builddir}/src/openpa/src' >/dev/null 2>&1; then :
  echo "CPPFLAGS(='$CPPFLAGS') contains '-I${master_top_builddir}/src/openpa/src', not appending" >&5
else
  echo "CPPFLAGS(='$CPPFLAGS') does not contain '-I${master_top_builddir}/src/openpa/src', appending" >&5
		CPPFLAGS="$CPPFLAGS -I${master_top_builddir}/src/openpa/src"

fi


        # OPA defaults to "auto", but in MPICH2 we want "auto_allow_emulation" to
        # easily permit using channels like ch3:sock that don't care about atomics

# Check whether --with-atomic-primitives was given.
if test "${with_atomic_primitives+set}" = set; then :
  withval=$with_atomic_primitives;
else
  with_atomic_primitives=not_specified
fi

        opa_subdir_args=""
        if test "$with_atomic_primitives" = "not_specified" ; then
            opa_subdir_args="--with-atomic-primitives=auto_allow_emulation"
        fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: ===== configuring src/openpa =====" >&5
$as_echo "$as_me: ===== configuring src/openpa =====" >&6;}


# Build any intermediate directories
for dir in src/openpa ; do

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

    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

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""

done

	pac_abs_srcdir=`(cd $srcdir && pwd)`

	if test -f $pac_abs_srcdir/src/openpa/setup ; then
	   . $pac_abs_srcdir/src/openpa/setup
	fi

        pac_subconfigure_file="$pac_abs_srcdir/src/openpa/configure"
	if test -x $pac_subconfigure_file ; then
	   pac_subconfig_args="$opa_subdir_args"

            # Set IFS so ac_configure_args can be tokenized
            # with extra " " tokens being skipped.

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

            IFS="'"
            for pac_arg in $ac_configure_args ; do
                case "$pac_arg" in
                # Ignore any null and leading blank strings.
                ""|" "*)
                    ;;
                *)
                    pac_pval=""
                    # Restore IFS so ac_precious_vars which has
                    # " " as separator can be correctly tokenized

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""

                    for pac_pvar in $ac_precious_vars ; do
                        # check if configure argument token contains the
                        # precious variable, i.e. "name_of_prec_var=".
                        pvar_in_arg=`echo $pac_arg | grep "$pac_pvar="`
                        if test "X$pvar_in_arg" != "X" ; then
                            # check if current precious variable is set in env
                            eval pvar_set=\${$pac_pvar+set}
                            if test "$pvar_set" = "set" ; then
                                # Append 'name_of_prec_var=value_of_prec_var'
                                # to the subconfigure arguments list, where
                                # value_of_prec_var is fetched from the env.
                                eval pac_pval=\${$pac_pvar}
                                pac_subconfig_args="$pac_subconfig_args '$pac_pvar=$pac_pval'"
                                break
                            fi
                        fi
                    done
                    # since the precious variable is not set in the env.,
                    # append the corresponding configure argument token
                    # to the subconfigure argument list.
                    if test "X$pac_pval" = "X" ; then
                        pac_subconfig_args="$pac_subconfig_args '$pac_arg'"
                    fi
                    # reset "'" as IFS to process ac_configure_args

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

                    IFS="'"
                    ;;
                esac
            done
            # Restore IFS.

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""


                      if test "$enable_option_checking" = no ; then
              pac_subconfig_args="$pac_subconfig_args --disable-option-checking"
           fi

	   { $as_echo "$as_me:${as_lineno-$LINENO}: executing: $pac_subconfigure_file $pac_subconfig_args" >&5
$as_echo "$as_me: executing: $pac_subconfigure_file $pac_subconfig_args" >&6;}
	   if (cd src/openpa && eval $pac_subconfigure_file $pac_subconfig_args) ; then
               :
	   else
               as_fn_error $? "OpenPA configure failed" "$LINENO" 5
	   fi
        else
           if test -e $pac_subconfigure_file ; then
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $pac_subconfigure_file exists but is not executable" >&5
$as_echo "$as_me: WARNING: $pac_subconfigure_file exists but is not executable" >&2;}
           else
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $pac_subconfigure_file does not exist" >&5
$as_echo "$as_me: WARNING: $pac_subconfigure_file does not exist" >&2;}
           fi
	fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: ===== done with src/openpa configure =====" >&5
$as_echo "$as_me: ===== done with src/openpa configure =====" >&6;}

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



        if echo "$WRAPPER_LIBS" | $FGREP -e '-lopa' >/dev/null 2>&1; then :
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') contains '-lopa', not prepending" >&5
else
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') does not contain '-lopa', prepending" >&5
                WRAPPER_LIBS="-lopa $WRAPPER_LIBS"

fi


        other_install_dirs="$other_install_dirs src/openpa"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Attempted to use the embedded OpenPA source tree in \"src/openpa\", but it is missing.  Configuration or compilation may fail later." >&5
$as_echo "$as_me: WARNING: Attempted to use the embedded OpenPA source tree in \"src/openpa\", but it is missing.  Configuration or compilation may fail later." >&2;}
    fi
elif test "$with_openpa_prefix" = "system" ; then


        if echo "$WRAPPER_LIBS" | $FGREP -e '-lopa' >/dev/null 2>&1; then :
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') contains '-lopa', not prepending" >&5
else
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') does not contain '-lopa', prepending" >&5
                WRAPPER_LIBS="-lopa $WRAPPER_LIBS"

fi

elif test "$with_openpa_prefix" = "no" ; then
    # The user doesn't want to use OPA.  This may or may not cause MPICH2 to
    # fail to configure/build, depending on many other factors.
    :
else
    # The user specified an already-installed OPA; just sanity check, don't
    # subconfigure it
    if test -s "${with_openpa_prefix}/include/opa_primitives.h" -a -s "${with_openpa_prefix}/include/opa_config.h"; then :
  :
else
  as_fn_error $? "the OpenPA installation in \"${with_openpa_prefix}\" appears broken" "$LINENO" 5
fi


	if echo "$CPPFLAGS" | $FGREP -e '-I${with_openpa_prefix}/include' >/dev/null 2>&1; then :
  echo "CPPFLAGS(='$CPPFLAGS') contains '-I${with_openpa_prefix}/include', not appending" >&5
else
  echo "CPPFLAGS(='$CPPFLAGS') does not contain '-I${with_openpa_prefix}/include', appending" >&5
		CPPFLAGS="$CPPFLAGS -I${with_openpa_prefix}/include"

fi



        if echo "$WRAPPER_LIBS" | $FGREP -e '-lopa' >/dev/null 2>&1; then :
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') contains '-lopa', not prepending" >&5
else
  echo "WRAPPER_LIBS(='$WRAPPER_LIBS') does not contain '-lopa', prepending" >&5
                WRAPPER_LIBS="-lopa $WRAPPER_LIBS"

fi

    if test -d ${with_openpa_prefix}/lib64 ; then


	if echo "$WRAPPER_LDFLAGS" | $FGREP -e '-L${with_openpa_prefix}/lib64' >/dev/null 2>&1; then :
  echo "WRAPPER_LDFLAGS(='$WRAPPER_LDFLAGS') contains '-L${with_openpa_prefix}/lib64', not appending" >&5
else
  echo "WRAPPER_LDFLAGS(='$WRAPPER_LDFLAGS') does not contain '-L${with_openpa_prefix}/lib64', appending" >&5
		WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_openpa_prefix}/lib64"

fi

    fi


	if echo "$WRAPPER_LDFLAGS" | $FGREP -e '-L${with_openpa_prefix}/lib' >/dev/null 2>&1; then :
  echo "WRAPPER_LDFLAGS(='$WRAPPER_LDFLAGS') contains '-L${with_openpa_prefix}/lib', not appending" >&5
else
  echo "WRAPPER_LDFLAGS(='$WRAPPER_LDFLAGS') does not contain '-L${with_openpa_prefix}/lib', appending" >&5
		WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_openpa_prefix}/lib"

fi

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 ;;
            *) as_fn_error $? "Unrecognized thread level from device $MPID_MAX_THREAD_LEVEL" "$LINENO" 5
    	    ;;
        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

$as_echo "#define HAVE_RUNTIME_THREADCHECK 1" >>confdefs.h

    enable_threads=multiple
fi

MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED
case "$enable_threads" in
    single)
    thread_pkg_required=no
    MPICH_THREAD_LEVEL=MPI_THREAD_SINGLE
    ;;
    funneled)
    thread_pkg_required=no
    MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED
    ;;
    serialized)
    # FIXME: Why does serialized require a thread package?
    thread_pkg_required=yes
    MPICH_THREAD_LEVEL=MPI_THREAD_SERIALIZED
    ;;
    multiple)
    thread_pkg_required=yes
    MPICH_THREAD_LEVEL=MPI_THREAD_MULTIPLE
    ;;
    *)
    as_fn_error $? "\"$enable_threads\" is not a valid value for --enable-threads" "$LINENO" 5
    ;;
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" -o "$MPICH_THREAD_LEVEL" = "MPI_THREAD_SERIALIZED" ; 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
   as_fn_error $? "The device $with_device does not support $MPICH_THREAD_LEVEL" "$LINENO" 5
fi

export MPICH_THREAD_LEVEL

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


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

# Check for value thread_cs choice; set the refcount default if necessary
thread_granularity=MPIU_THREAD_GRANULARITY_SINGLE
thread_refcount=MPIU_REFCOUNT_NONE
if test "$enable_threads" = "multiple" ; then
    case $enable_thread_cs in
    global)
    thread_granularity=MPIU_THREAD_GRANULARITY_GLOBAL
    if test "$enable_refcount" = "default" ; then enable_refcount=none ; fi
    ;;
    brief-global|brief_global)
    as_fn_error $? "--enable-thread-cs=brief-global is no longer supported, please select a different granularity" "$LINENO" 5
    ;;
    per-object|per_object)
    thread_granularity=MPIU_THREAD_GRANULARITY_PER_OBJECT
    if test "$enable_refcount" = "default" ; then enable_refcount=lock ; fi
    ;;
    lock-free|lock_free|lockfree)
    thread_granularity=MPIU_THREAD_GRANULARITY_LOCK_FREE
    if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi
    if test "$enable_predefined_refcount" = "default" ; then enable_predefined_refcount=no ; fi
    ;;
    *)
    as_fn_error $? "Unrecognized value $enable_thread_cs for --enable-thread-cs" "$LINENO" 5
    ;;
    esac

    case $enable_refcount in
    lock)
    thread_refcount=MPIU_REFCOUNT_LOCK
    ;;
    lock-free|lock_free|lockfree)
    thread_refcount=MPIU_REFCOUNT_LOCKFREE
    ;;
    none)
    thread_refcount=MPIU_REFCOUNT_NONE
    ;;
    *)
    as_fn_error $? "Unrecognized value $enable_refcount for --enable-refcount" "$LINENO" 5
    ;;
    esac
fi

cat >>confdefs.h <<_ACEOF
#define MPIU_THREAD_GRANULARITY $thread_granularity
_ACEOF


if test "$enable_predefined_refcount" = "no" ; then

$as_echo "#define MPIU_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS 1" >>confdefs.h

fi

case $enable_handle_allocation in
    mutex|default)
        handle_allocation_method=MPIU_HANDLE_ALLOCATION_MUTEX
    ;;
    tls)
        handle_allocation_method=MPIU_HANDLE_ALLOCATION_THREAD_LOCAL
    ;;
    *)
        as_fn_error $? "Unrecognized value $enable_handle_allocation for --enable-handle-allocation" "$LINENO" 5
    ;;
esac

cat >>confdefs.h <<_ACEOF
#define MPIU_HANDLE_ALLOCATION_METHOD $handle_allocation_method
_ACEOF




cat >>confdefs.h <<_ACEOF
#define MPIU_THREAD_REFCOUNT $thread_refcount
_ACEOF


# enable-g
# strip off multiple options, separated by commas
save_IFS="$IFS"
IFS=","
for option in $enable_g ; do
    case "$option" in
        debug|dbg)
        enable_append_g=yes
	;;
        no|none)
	;;
	handlealloc)
	perform_handlealloc=yes
	;;
	handle)

$as_echo "#define MPICH_DEBUG_HANDLES 1" >>confdefs.h

	;;
	instr)
	perform_instr=yes
	;;
	meminit)
	perform_meminit=yes
	;;
	memarena)
	perform_memarena=yes
	perform_memtracing=yes
	;;
	mem)
	perform_memtracing=yes
	;;
	log)
	perform_dbglog=yes
	;;
	mutex)
	perform_dbgmutex=yes
	;;
	mutexnesting)
	perform_mutexnesting=yes
	;;
	all|yes)
	perform_memtracing=yes
	perform_dbglog=yes
	enable_append_g=yes
	perform_meminit=yes
	perform_instr=yes
	perform_dbgmutex=yes
	perform_mutexnesting=yes
	perform_handlealloc=yes
	;;
	*)
	IFS=$save_IFS
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown value $option for enable-g" >&5
$as_echo "$as_me: WARNING: Unknown value $option for enable-g" >&2;}
	IFS=","
	;;
    esac
done
IFS="$save_IFS"

if test "$enable_append_g" = "yes" ; then
    CFLAGS="$CFLAGS -g"
    CXXFLAGS="$CXXFLAGS -g"
    FFLAGS="$FFLAGS -g"
    FCFLAGS="$FCFLAGS -g"
fi
if test "$enable_append_ndebug" = "yes" ; then
    CFLAGS="$CFLAGS -DNDEBUG -DNVALGRIND"
    CXXFLAGS="$CXXFLAGS -DNDEBUG -DNVALGRIND"
    # MPICH2 do NOT assume any preprocessing support from the Fortran compiler,
    # so no Fortran files contain any preprocessing statements.
    # Don't set FFLAGS or FCFLAGS with any -D.
fi
if test -n "$perform_meminit" ; then

$as_echo "#define MPICH_DEBUG_MEMINIT 1" >>confdefs.h

fi
if test "$perform_handlealloc" = yes ; then

$as_echo "#define MPICH_DEBUG_HANDLEALLOC 1" >>confdefs.h

fi
if test "$perform_instr" = yes ; then

$as_echo "#define USE_MPIU_INSTR 1" >>confdefs.h

fi

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

$as_echo "#define USE_MEMORY_TRACING 1" >>confdefs.h

    if test -n "$perform_memarena" ; then

$as_echo "#define MPICH_DEBUG_MEMARENA 1" >>confdefs.h

    fi
fi
if test -n "$perform_mutexnesting" ; then

$as_echo "#define MPICH_DEBUG_MUTEXNESTING 1" >>confdefs.h

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

$as_echo "#define USE_DBG_LOGGING 1" >>confdefs.h

   fi
fi

if test -n "$perform_dbgmutex" ; then

$as_echo "#define MPICH_DEBUG_MUTEX 1" >>confdefs.h

fi

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

$as_echo "#define USE_MPI_FOR_NMPI 1" >>confdefs.h

fi

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

$as_echo "#define HAVE_ROMIO 1" >>confdefs.h

       # 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
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ROMIO src directory is not available" >&5
$as_echo "$as_me: WARNING: ROMIO src directory is not available" >&2;}
   fi
fi
#
# FIXME: If an external device, don't necessarily complain (e.g.,
# if the device is already built)
if test ! -d $devicedir ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Device $device_name is unknown" >&5
$as_echo "$as_me: WARNING: Device $device_name is unknown" >&2;}
elif test ! -x $devicedir/configure ; then
    if test -s $devicedir/configure ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The configure in $devicedir exists but is not executable" >&5
$as_echo "$as_me: WARNING: The configure in $devicedir exists but is not executable" >&2;}
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Device $device_name has no configure" >&5
$as_echo "$as_me: WARNING: Device $device_name has no configure" >&2;}
    fi
    device_name=""
else
    # Add the device to the configure list
    devsubsystems="$devsubsystems $devicereldir"
    # Make device_name available to subdirs
fi
#
# Allow the device to request that the install step invoke the install
# target in the device's Makefile.
if test -n "$device_name" -a "$INSTALL_FROM_DEVICE" = yes ; then
    other_install_dirs="${other_install_dirs} $devicereldir"
fi

#
# with-pm
if test "$with_pm" = "none" ; then
    # add "none" as synonym for "no" to agree with older erroneous docs
    with_pm="no"
fi
if test "$MPID_NO_PM" = yes ; then
    if test "$with_pm" != "default" -a "$with_pm" != no ; then
        as_fn_error $? "The PM chosen ($with_pm) is is not valid for the selected device ($with_device)" "$LINENO" 5
    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=hydra
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
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $use_top_srcdir/src/pm/$pm_name does not exist. PM is unknown" >&5
$as_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
        if test -s $use_top_srcdir/src/pm/$pm_name/configure ; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The configure in $use_top_srcdir/src/pm/$pm_name exists but is not executable" >&5
$as_echo "$as_me: WARNING: The configure in $use_top_srcdir/src/pm/$pm_name exists but is not executable" >&2;}
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pm $pm_name has no configure" >&5
$as_echo "$as_me: WARNING: pm $pm_name has no configure" >&2;}
        fi
        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
    as_fn_error $? "Aborting configure because an error was seen in the selection of process managers" "$LINENO" 5
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

$as_echo "#define USE_HUMAN_READABLE_TOKENS 1" >>confdefs.h

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
        as_fn_error $? "The PMI chosen ($with_pmi) is is not valid for the selected device ($with_device)" "$LINENO" 5
    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
	    as_fn_error $? "The PM chosen ($with_pm) requires the PMI implementation $PM_REQUIRES_PMI but $with_pmi was selected as the PMI implementation." "$LINENO" 5
        fi
    fi
    pmi_name=$with_pmi

    if test ! -d $use_top_srcdir/src/pmi/$pmi_name ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $use_top_srcdir/src/pmi/$pmi_name does not exist. PMI is unknown" >&5
$as_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
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pmi $pmi_name has no configure or Makefile" >&5
$as_echo "$as_me: WARNING: pmi $pmi_name has no configure or Makefile" >&2;}
        pmi_name=""
    else
        subsystems="$subsystems src/pmi/$pmi_name"
    fi
else
    as_fn_error $? "A PMI implementation must be selected or the default used." "$LINENO" 5
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
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No MPE directory available" >&5
$as_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
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No configure available for MPE" >&5
$as_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
	# 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



# 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
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


# Check for whether the compiler defines a symbol that contains the
# function name.  The MPICH2 code, for greater portability, defines
# its own symbols, FCNAME (a string) and FUNCNAME (a token that is not a
# string).  Code should use these symbols where possible.  However,
# some debugging macros may want to use a compiler-provided symbol
# for the function name, and this check makes it possible to
# define such macros in a way that is always correct.

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler defines __func__" >&5
$as_echo_n "checking whether the compiler defines __func__... " >&6; }
if test "${pac_cv_have__func__+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

tmp_am_cross=no
if test "$cross_compiling" = yes; then :
  tmp_am_cross=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#include <string.h>
int foo(void);
int foo(void)
{
    return (strcmp(__func__, "foo") == 0);
}
int main(int argc, char ** argv)
{
    return (foo() ? 0 : 1);
}


_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_have__func__=yes
else
  pac_cv_have__func__=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

if test "$tmp_am_cross" = yes ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#include <string.h>
int foo(void);
int foo(void)
{
    return (strcmp(__func__, "foo") == 0);
}
int main(int argc, char ** argv)
{
    return (foo() ? 0 : 1);
}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_have__func__=yes
else
  pac_cv_have__func__=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have__func__" >&5
$as_echo "$pac_cv_have__func__" >&6; }

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

$as_echo "#define HAVE__FUNC__ /**/" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler defines __FUNC__" >&5
$as_echo_n "checking whether the compiler defines __FUNC__... " >&6; }
if test "${pac_cv_have_cap__func__+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

tmp_am_cross=no
if test "$cross_compiling" = yes; then :
  tmp_am_cross=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#include <string.h>
int foo(void);
int foo(void)
{
    return (strcmp(__FUNC__, "foo") == 0);
}
int main(int argc, char ** argv)
{
    return (foo() ? 0 : 1);
}


_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_have_cap__func__=yes
else
  pac_cv_have_cap__func__=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

if test "$tmp_am_cross" = yes ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#include <string.h>
int foo(void);
int foo(void)
{
    return (strcmp(__FUNC__, "foo") == 0);
}
int main(int argc, char ** argv)
{
    return (foo() ? 0 : 1);
}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_have__func__=yes
else
  pac_cv_have__func__=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_cap__func__" >&5
$as_echo "$pac_cv_have_cap__func__" >&6; }

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

$as_echo "#define HAVE_CAP__FUNC__ /**/" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler sets __FUNCTION__" >&5
$as_echo_n "checking whether the compiler sets __FUNCTION__... " >&6; }
if test "${pac_cv_have__function__+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

tmp_am_cross=no
if test "$cross_compiling" = yes; then :
  tmp_am_cross=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#include <string.h>
int foo(void);
int foo(void)
{
    return (strcmp(__FUNCTION__, "foo") == 0);
}
int main(int argc, char ** argv)
{
    return (foo() ? 0 : 1);
}


_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_have__function__=yes
else
  pac_cv_have__function__=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

if test "$tmp_am_cross" = yes ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#include <string.h>
int foo(void);
int foo(void)
{
    return (strcmp(__FUNCTION__, "foo") == 0);
}
int main(int argc, char ** argv)
{
    return (foo() ? 0 : 1);
}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_have__func__=yes
else
  pac_cv_have__func__=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have__function__" >&5
$as_echo "$pac_cv_have__function__" >&6; }

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

$as_echo "#define HAVE__FUNCTION__ /**/" >>confdefs.h

fi



# Check if $MPI_DEFAULT_COPTS is valid with $CC
if test "$enable_default_optimize" = "yes" \
     -a -n "$MPI_DEFAULT_COPTS" ; then
    if test "$enable_check_compiler_flags" = "yes" ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts option $MPI_DEFAULT_COPTS" >&5
$as_echo_n "checking whether C compiler accepts option $MPI_DEFAULT_COPTS... " >&6; }
pac_opt="$MPI_DEFAULT_COPTS"
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

CFLAGS_orig="$CFLAGS"
CFLAGS_opt="$pac_opt $CFLAGS"
pac_result="unknown"

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
CFLAGS="$CFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :


    CFLAGS="$CFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext

# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option
# even though it doesn't support it.  However, when another warning is
# triggered, it gives an error that the option is not recognized.  So we
# need to test with a conftest file that will generate warnings.
#
# add an extra switch, pac_c_check_compiler_option_invalidprototest, to
# disable this test just in case some new compiler does not like it.
#
# Linking with a program with an invalid prototype to ensure a compiler warning.

if test "$pac_result" = "yes" \
     -a "$pac_c_check_compiler_option_prototest" != "no" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler option $MPI_DEFAULT_COPTS works with an invalid prototype program" >&5
$as_echo_n "checking whether C compiler option $MPI_DEFAULT_COPTS works with an invalid prototype program... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        void main(){ return 0; }

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_result=yes
else
  pac_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
fi
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    CFLAGS="$CFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


            int foo(void);
            int foo(void){return 0;}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


            CFLAGS="$CFLAGS_opt"
            rm -f pac_test5.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test5.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test4.log pac_test5.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test4.log pac_test5.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test4.log pac_test5.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


                pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log pac_test5.log
fi
rm -f pac_test1.log pac_test2.log

CFLAGS="$CFLAGS_orig"
if test "$pac_result" = "yes" ; then

        CFLAGS="$CFLAGS $MPI_DEFAULT_COPTS"

else
     :
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


    else
        CFLAGS="$CFLAGS $MPI_DEFAULT_COPTS"
    fi
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=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of weak symbol alias support" >&5
$as_echo_n "checking for type of weak symbol alias support... " >&6; }
if test "${pac_cv_prog_c_weak_symbols+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

# Test for weak symbol support...
# We can't put # in the message because it causes autoconf to generate
# incorrect code
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
  has_pragma_weak=yes
fi
rm -f core 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

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


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


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

# START of PUSHVAL

if test "${pac_stk_LIBS_level+set}" = set; then :

        pac_stk_LIBS_level=`expr $pac_stk_LIBS_level + 1`

else

    pac_stk_LIBS_level=0

fi
eval "pac_stk_LIBS_$pac_stk_LIBS_level=\$LIBS"
if test "x$pac_stk_LIBS_level" = x""0; then :


eval pac_FirstSavedValueOf_LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level


fi


eval pac_LastSavedValueOf_LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level



# END of PUSHVAL

    LIBS="pac_conftest.$OBJEXT $pac_FirstSavedValueOf_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


extern int PFoo(int);
int main(int argc, char **argv) {
return PFoo(0);}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :



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


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


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

# START of PUSHVAL

if test "${pac_stk_LIBS_level+set}" = set; then :

        pac_stk_LIBS_level=`expr $pac_stk_LIBS_level + 1`

else

    pac_stk_LIBS_level=0

fi
eval "pac_stk_LIBS_$pac_stk_LIBS_level=\$LIBS"
if test "x$pac_stk_LIBS_level" = x""0; then :


eval pac_FirstSavedValueOf_LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level


fi


eval pac_LastSavedValueOf_LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level



# END of PUSHVAL

    LIBS="pac_conftest.$OBJEXT $pac_FirstSavedValueOf_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


extern int Foo(int);
int PFoo(int a) { return a+1;}
int main(int argc, char **argv) {
return Foo(0);}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


            pac_cv_prog_c_weak_symbols="pragma weak"


else


            has_pragma_weak=0
            pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)"


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_LIBS_level+set}" = set; then :

    if test "x$pac_stk_LIBS_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of LIBS\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of LIBS\"" >&2;}

else


eval LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level

                        pac_stk_LIBS_level=`expr $pac_stk_LIBS_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of LIBS\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of LIBS\"" >&2;}

fi

# END of POPVAL

    rm -f pac_conftest.$OBJEXT

else


            has_pragma_weak=0
            pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)"


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



else


        has_pragma_weak=0
        pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)"


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_LIBS_level+set}" = set; then :

    if test "x$pac_stk_LIBS_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of LIBS\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of LIBS\"" >&2;}

else


eval LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level

                        pac_stk_LIBS_level=`expr $pac_stk_LIBS_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of LIBS\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of LIBS\"" >&2;}

fi

# END of POPVAL

    rm -f pac_conftest.$OBJEXT

else


        has_pragma_weak=0
        pragma_extra_message="pragma weak accepted but does not work (probably creates two non-weak entries)"


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

fi
if test -z "$pac_cv_prog_c_weak_symbols" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_prog_c_weak_symbols="pragma _HP_SECONDARY_DEF"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
if test -z "$pac_cv_prog_c_weak_symbols" ; then
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_prog_c_weak_symbols="pragma _CRI duplicate x as y"
fi
rm -f core 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_c_weak_symbols" >&5
$as_echo "$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")
$as_echo "#define HAVE_PRAGMA_WEAK 1" >>confdefs.h

        ;;
        "pragma _HP")
$as_echo "#define HAVE_PRAGMA_HP_SEC_DEF 1" >>confdefs.h

        ;;
        "pragma _CRI")
$as_echo "#define HAVE_PRAGMA_CRI_DUP 1" >>confdefs.h

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

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int foo(int) __attribute__ ((weak));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_attr_weak=yes
else
  pac_cv_attr_weak=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_attr_weak" >&5
$as_echo "$pac_cv_attr_weak" >&6; }
# Note that being able to compile with weak_import doesn't mean that
# it works.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__ ((weak_import)) allowed" >&5
$as_echo_n "checking whether __attribute__ ((weak_import)) allowed... " >&6; }
if test "${pac_cv_attr_weak_import+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int foo(int) __attribute__ ((weak_import));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_attr_weak_import=yes
else
  pac_cv_attr_weak_import=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_attr_weak_import" >&5
$as_echo "$pac_cv_attr_weak_import" >&6; }
# Check if the alias option for weak attributes is allowed
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((weak,alias(...))) allowed" >&5
$as_echo_n "checking whether __attribute__((weak,alias(...))) allowed... " >&6; }
if test "${pac_cv_attr_weak_alias+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int foo(int) __attribute__((weak,alias("__foo")));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_attr_weak_alias=yes
else
  pac_cv_attr_weak_alias=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_attr_weak_alias" >&5
$as_echo "$pac_cv_attr_weak_alias" >&6; }

fi
if test $enable_weak_symbols = "yes" ; then

$as_echo "#define USE_WEAK_SYMBOLS 1" >>confdefs.h

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

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

# Test for multiple weak symbol support...

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


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; }


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

# START of PUSHVAL

if test "${pac_stk_LIBS_level+set}" = set; then :

        pac_stk_LIBS_level=`expr $pac_stk_LIBS_level + 1`

else

    pac_stk_LIBS_level=0

fi
eval "pac_stk_LIBS_$pac_stk_LIBS_level=\$LIBS"
if test "x$pac_stk_LIBS_level" = x""0; then :


eval pac_FirstSavedValueOf_LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level


fi


eval pac_LastSavedValueOf_LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level



# END of PUSHVAL

    LIBS="pac_conftest.$OBJEXT $pac_FirstSavedValueOf_LIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
return PFoo(0) + PFoo_(1) + pfoo_(2);}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


    pac_cv_prog_c_multiple_weak_symbols="yes"


else

        :

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_LIBS_level+set}" = set; then :

    if test "x$pac_stk_LIBS_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of LIBS\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of LIBS\"" >&2;}

else


eval LIBS=\$pac_stk_LIBS_$pac_stk_LIBS_level

                        pac_stk_LIBS_level=`expr $pac_stk_LIBS_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of LIBS\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of LIBS\"" >&2;}

fi

# END of POPVAL

    rm -f pac_conftest.$OBJEXT

else

    :

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


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

$as_echo "#define HAVE_MULTIPLE_PRAGMA_WEAK 1" >>confdefs.h

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
#
# Since F90/F90FLAGS are replaced by FC/FCFLAGS, rather than silently
# substituting them, i.e. FC=$F90 and FCFLAGS=$F90FLAGS, we choose to emit
# an error message and abort to avoid any ambiguous/hidden bug in choosing
# Fortran90 compilers.
if test -n "$F90" -o -n "$F90FLAGS" ; then
    as_fn_error $? "F90 and F90FLAGS are replaced by FC and FCFLAGS respectively in this configure, please unset F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure again." "$LINENO" 5
fi
# ----------------------------------------------------------------------------
# Handle default choices for the Fortran compilers
if test "$enable_f77" = "yes" ; then
    # Check for a Fortran compiler


	if test -z "${pac_save_FFLAGS_nesting}" ; then
	   pac_save_FFLAGS_nesting=0
	fi
	eval pac_save_FFLAGS_${pac_save_FFLAGS_nesting}='"$FFLAGS"'
	pac_save_FFLAGS_nesting=`expr ${pac_save_FFLAGS_nesting} + 1`

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 ifort pgf77 af77 xlf frt cf77 fort77 fl32 fort ifc efc ftn \
             gfortran f77 g77
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_F77+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
  for ac_prog in ifort pgf77 af77 xlf frt cf77 fort77 fl32 fort ifc efc ftn \
             gfortran f77 g77
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$ac_ct_F77" && break
done

  if test "x$ac_ct_F77" = x; then
    F77=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    F77=$ac_ct_F77
  fi
fi


# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
if test "${ac_cv_f77_compiler_gnu+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat > conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

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

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  ac_cv_prog_f77_g=yes
else
  ac_cv_prog_f77_g=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
$as_echo "$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

if test $ac_compiler_gnu = yes; then
  G77=yes
else
  G77=
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


	pac_save_FFLAGS_nesting=`expr ${pac_save_FFLAGS_nesting} - 1`
	eval FFLAGS="\$pac_save_FFLAGS_${pac_save_FFLAGS_nesting}"
	eval pac_save_FFLAGS_${pac_save_FFLAGS_nesting}=""


fi

if test "$enable_f77" = "yes" -a "$F77" = "" ; then
   # No Fortran 77 compiler found; abort
   as_fn_error $? "No Fortran 77 compiler found. If you don't need to
   build any Fortran programs, you can disable Fortran support using
   --disable-f77 and --disable-fc. If you do want to build Fortran
   programs, you need to install a Fortran compiler such as gfortran
   or ifort before you can proceed." "$LINENO" 5
fi

if test "$enable_f77" = yes ; then
    # Check if $MPI_DEFAULT_FOPTS is valid with $F77
    if test "$enable_default_optimize" = "yes" \
         -a -n "$MPI_DEFAULT_FOPTS" ; then
        if test "$enable_check_compiler_flags" = "yes" ; then


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 77 compiler accepts option $MPI_DEFAULT_FOPTS" >&5
$as_echo_n "checking whether Fortran 77 compiler accepts option $MPI_DEFAULT_FOPTS... " >&6; }
pac_opt="$MPI_DEFAULT_FOPTS"
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

FFLAGS_orig="$FFLAGS"
FFLAGS_opt="$pac_opt $FFLAGS"
pac_result="unknown"

cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
FFLAGS="$FFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_f77_try_link "$LINENO"; then :


    FFLAGS="$FFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_f77_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    FFLAGS="$FFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat > conftest.$ac_ext <<_ACEOF


            subroutine try()
            end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        FFLAGS="$FFLAGS_opt"
        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test2.log pac_test4.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test2.log pac_test4.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test2.log pac_test4.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log
fi
rm -f pac_test1.log pac_test2.log

FFLAGS="$FFLAGS_orig"
if test "$pac_result" = "yes" ; then

            FFLAGS="$FFLAGS $MPI_DEFAULT_FOPTS"

else
     :
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


        else
            FFLAGS="$FFLAGS $MPI_DEFAULT_FOPTS"
        fi
    fi
fi

#
# We need to know the name mangling for Fortran before testing for FC
# 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5
$as_echo_n "checking how to get verbose linking output from $F77... " >&6; }
if test "${ac_cv_prog_f77_v+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; 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 "set x $ac_link"
shift
$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
# LIBRARY_PATH; skip all such settings.
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
$as_echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS

rm -rf 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"

# FIXME: we keep getting bitten by quoted arguments; a more general fix
#        that detects unbalanced quotes in FLIBS should be implemented
#        and (ugh) tested at some point.
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'` ;;

  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
  *-cmdline\ * | *-ignore\ * | *-def\ *)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;

  # If we are using Cray Fortran then delete quotes.
  *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
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5
$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
fi
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
$as_echo "$as_me: WARNING: compilation failed" >&2;}
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5
$as_echo "$ac_cv_prog_f77_v" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5
$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; }
if test "${ac_cv_f77_libs+set}" = set; then :
  $as_echo_n "(cached) " >&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 "set x $ac_link"
shift
$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
# LIBRARY_PATH; skip all such settings.
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
$as_echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS

rm -rf 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"

# FIXME: we keep getting bitten by quoted arguments; a more general fix
#        that detects unbalanced quotes in FLIBS should be implemented
#        and (ugh) tested at some point.
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'` ;;

  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
  *-cmdline\ * | *-ignore\ * | *-def\ *)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;

  # If we are using Cray Fortran then delete quotes.
  *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* | -lSystem | -libmil | -little \
	  |-LANG:=* | -LIST:* | -LNO:* | -link)
	  ;;
	-lkernel32)
	  test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
	  ;;
	-[LRuYz])
	  # 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 `$as_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
	  ;;
	-zallextract*| -zdefaultextract)
	  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
	  ;;
	  # 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=`$as_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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5
$as_echo "$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

    # The autoconf macro for finding FLIBS sometimes makes mistakes
    # (particularly with the Fujitsu frt compiler).  This next step
    # first sees if the FLIBS is valid with the Fortran compiler


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts the FLIBS found by autoconf" >&5
$as_echo_n "checking whether $F77 accepts the FLIBS found by autoconf... " >&6; }
pac_cv_f77_flibs_valid=unknown
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
        end


_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid entries in FLIBS" >&5
$as_echo_n "checking for valid entries in FLIBS... " >&6; }
    goodFLIBS=""
    saveFLIBS=$FLIBS
    FLIBS=""
    for arg in $saveFLIBS ; do
        FLIBS="$goodFLIBS $arg"
        if ac_fn_f77_try_link "$LINENO"; then :
  goodFLIBS=$FLIBS
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
    done
    FLIBS=$goodFLIBS
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLIBS" >&5
$as_echo "$FLIBS" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
rm -f 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


    # Now see if FLIBS works with the C compiler


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC links with FLIBS found by autoconf" >&5
$as_echo_n "checking whether $CC links with FLIBS found by autoconf... " >&6; }
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

# Create a simple C program for the tests.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


int
main ()
{
int a;
  ;
  return 0;
}

_ACEOF
# Try to link a C program with all of these libraries
saved_LIBS="$LIBS"
LIBS="$FLIBS $saved_LIBS"
if ac_fn_c_try_link "$LINENO"; then :

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libraries can be used" >&5
$as_echo_n "checking for which libraries can be used... " >&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
    keep_libs=""
    for name in $pac_libs ; do
        LIBS="$saved_LIBS $pac_ldirs $pac_other $name"
        if ac_fn_c_try_link "$LINENO"; then :

            keep_libs="$keep_libs $name"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
    done
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $keep_libs" >&5
$as_echo "$keep_libs" >&6; }
    FLIBS="$pac_ldirs $pac_other $keep_libs"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
LIBS="$saved_LIBS"
rm -f 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



    # Check F77+FLAGS is compatible with CC+CFLAGS before using F77+CC.


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 77 and C objects are compatible" >&5
$as_echo_n "checking whether Fortran 77 and C objects are compatible... " >&6; }
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

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


/* lower */
void c_subpgm( int *rc );
void c_subpgm( int *rc ) { *rc = 1; }

/* lower underscore */
void c_subpgm_( int *rc );
void c_subpgm_( int *rc ) { *rc = 2; }

/* upper */
void C_SUBPGM( int *rc );
void C_SUBPGM( int *rc ) { *rc = 3; }

/* lower doubleunderscore */
void c_subpgm__( int *rc );
void c_subpgm__( int *rc ) { *rc = 4; }

/* mixed */
void C_subpgm( int *rc );
void C_subpgm( int *rc ) { *rc = 5; }

/* mixed underscore */
void C_subpgm_( int *rc );
void C_subpgm_( int *rc ) { *rc = 6; }


_ACEOF
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


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 test
        integer rc
        rc = -1
        call c_subpgm( rc )
        write(6,*) "rc=", rc
        end


_ACEOF
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


pac_linkwithf77=no
pac_linkwithC=no

if test "$pac_linkwithC" != "yes" ; 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

    if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $saved_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

        if ac_fn_f77_try_link "$LINENO"; then :

            pac_linkwithf77=yes
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
        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

        LIBS="$saved_LIBS"
        if test "$pac_linkwithf77" = "yes" ; then
            rm -f pac_conftest.$OBJEXT
        fi

fi
rm -f core conftest.err conftest.$ac_objext
    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

if test "$pac_linkwithf77" != "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

    if ac_fn_f77_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_f77conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_f77conftest.$OBJEXT $FLIBS $saved_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

        if ac_fn_c_try_link "$LINENO"; then :

            pac_linkwithC=yes
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
        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

        LIBS="$saved_LIBS"
        if test "$pac_linkwithC" = "yes" ; then
            rm -f pac_f77conftest.$OBJEXT
        fi

fi
rm -f core conftest.err conftest.$ac_objext
    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

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.$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


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 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


if test "$pac_linkwithf77" != "yes" -a "$pac_linkwithC" != "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    # Extract the first word of "file", so it can be a program name with args.
set dummy file; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_FILE+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$FILE"; then
  ac_cv_prog_FILE="$FILE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_FILE="file"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
FILE=$ac_cv_prog_FILE
if test -n "$FILE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
$as_echo "$FILE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    if test "X$FILE" != "X" ; then
        fobjtype="`${FILE} pac_f77conftest.$OBJEXT | sed -e \"s|pac_f77conftest\.$OBJEXT||g\"`"
        cobjtype="`${FILE} pac_conftest.$OBJEXT | sed -e \"s|pac_conftest\.$OBJEXT||g\"`"
        if test "$fobjtype" != "$cobjtype" ; then
            as_fn_error $? "****  Incompatible Fortran and C Object File Types!  ****
F77 Object File Type produced by \"${F77} ${FFLAGS}\" is : ${fobjtype}.
 C  Object File Type produced by \"${CC} ${CFLAGS}\" is : ${cobjtype}." "$LINENO" 5
        fi
    fi
fi




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker for Fortran main program" >&5
$as_echo_n "checking for linker for Fortran main program... " >&6; }
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

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


int
main ()
{
long long a;
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end 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


_ACEOF
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


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
        double precision d
        print *, "hi"
        end


_ACEOF
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


pac_linkwithf77=no
pac_linkwithC=no

if test "$pac_linkwithC" != "yes" ; 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

    if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $saved_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

        if ac_fn_f77_try_link "$LINENO"; then :

            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Use Fortran to link programs" >&5
$as_echo "Use Fortran to link programs" >&6; }
            pac_linkwithf77=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
        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

        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT

fi
rm -f core conftest.err conftest.$ac_objext
    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

if test "$pac_linkwithf77" != "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

    if ac_fn_f77_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_f77conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_f77conftest.$OBJEXT $FLIBS $saved_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

        if ac_fn_c_try_link "$LINENO"; then :

            pac_linkwithC=yes
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Use C with FLIBS to link programs" >&5
$as_echo "Use C with FLIBS to link programs" >&6; }
            F77LINKER="$CC"
            F77_LDFLAGS="$F77_LDFLAGS $FLIBS"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
        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

        LIBS="$saved_LIBS"
        rm -f pac_f77conftest.$OBJEXT

fi
rm -f core conftest.err conftest.$ac_objext
    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

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.$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


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 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


if test "$pac_linkwithf77" != "yes" -a "$pac_linkwithC" != "yes" ; then
    as_fn_error $? "Could not determine a way to link a Fortran test program!" "$LINENO" 5
fi

    # For name mangle, we need the library flags


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

# Initialize pac_found to indicate if name mangling scheme has been found
pac_found=no
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


        subroutine MY_name( ii )
        return
        end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT f77conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    saved_LIBS="$LIBS"
        LIBS="f77conftest.$OBJEXT $FLIBS $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

    for call in "" __stdcall ; do
        for sym in my_name_ my_name__ my_name MY_NAME MY_name MY_name_ NONE ; do
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                extern void ${call} ${sym}(int);
int
main ()
{
${sym}(0);
  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

                pac_found=yes
                break

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        done
        test "$pac_found" = "yes" && break
    done
    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

    LIBS="$saved_LIBS"
    rm -f f77conftest.$OBJEXT

fi
rm -f core 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

# If we got to here and pac_cv_prog_f77_name_mangle is still NOT definable,
# it may be that the programs have to be linked with the Fortran compiler,
# not the C compiler.  Try reversing the language used for the test
if test  "$pac_found" != "yes" ; 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

    for call in "" __stdcall ; do
        for sym in my_name_ my_name__ my_name MY_NAME MY_name MY_name_ NONE ; do
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                void ${call} ${sym}(int a) {}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT cconftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT cconftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
                saved_LIBS="$LIBS"
                LIBS="cconftest.$OBJEXT $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

                cat > conftest.$ac_ext <<_ACEOF

                          program main
      call my_name(0)
      end

_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :

                    pac_found=yes

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext 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

                LIBS="$saved_LIBS"
                rm -f cconftest.$OBJEXT
                test "$pac_found" = "yes" && break

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
        done
        test "$pac_found" = "yes" && break
    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

fi
if test "$pac_found" = "yes" ; then
    case ${sym} in
        my_name_)
            pac_cv_prog_f77_name_mangle="lower uscore" ;;
        my_name__)
            pac_cv_prog_f77_name_mangle="lower 2uscore" ;;
        my_name)
            pac_cv_prog_f77_name_mangle="lower" ;;
        MY_NAME)
            pac_cv_prog_f77_name_mangle="upper" ;;
        MY_name)
            pac_cv_prog_f77_name_mangle="mixed" ;;
        MY_name_)
            pac_cv_prog_f77_name_mangle="mixed uscore" ;;
        *)
            pac_cv_prog_f77_name_mangle=""
            pac_found=no;
            ;;
    esac
    if test "X$pac_cv_prog_f77_name_mangle" != "X" ; then
        if test "$call" = "__stdcall" ; then
            pac_cv_prog_f77_name_mangle="$pac_cv_prog_f77_name_mangle stdcall"
        fi
    fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_name_mangle" >&5
$as_echo "$pac_cv_prog_f77_name_mangle" >&6; }
case $pac_cv_prog_f77_name_mangle in
    *stdcall)
        F77_STDCALL="__stdcall" ;;
    *)
        F77_STDCALL="" ;;
esac
# Get the standard call definition
# FIXME: This should use F77_STDCALL, not STDCALL (non-conforming name)
F77_STDCALL="$call"

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


# new_name="`echo $name | tr ' ' '_' | tr [a-z] [A-Z]`"
# We could have done the character conversion with 'tr'
# which may not be portable, e.g. solaris's /usr/ucb/bin/tr.
# So use a conservative approach.

# Replace blank with underscore
name_scheme="`echo $pac_cv_prog_f77_name_mangle | sed 's% %_%g'`"
# Turn lowercase into uppercase.
name_scheme="`echo $name_scheme | sed -e 'y%abcdefghijklmnopqrstuvwxyz%ABCDEFGHIJKLMNOPQRSTUVWXYZ%'`"
F77_NAME_MANGLE="F77_NAME_${name_scheme}"
cat >>confdefs.h <<_ACEOF
#define $F77_NAME_MANGLE 1
_ACEOF


if test "X$pac_cv_prog_f77_name_mangle" = "X" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown Fortran naming scheme" >&5
$as_echo "$as_me: WARNING: Unknown Fortran naming scheme" >&2;}
fi













    # Check whether additional libraries are needed when linking with C

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     if test -z "$EGREP"; then
  ac_path_EGREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in egrep; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  $as_echo_n 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    $as_echo 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_EGREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_EGREP"; then
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_EGREP=$EGREP
fi

   fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


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

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_stdc=yes
else
  ac_cv_header_stdc=no
fi
rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.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))
      return 2;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

else
  ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

$as_echo "#define STDC_HEADERS 1" >>confdefs.h

fi




# To simply the code in the cache_check macro, chose the routine name
# first, in case we need it
confname=conf1_
case "$pac_cv_prog_f77_name_mangle" in
    "lower underscore")       confname=conf1_ ;;
    "upper stdcall")          confname=CONF1  ;;
    "upper")                  confname=CONF1  ;;
    "lower doubleunderscore") confname=conf1_ ;;
    "lower")                  confname=conf1  ;;
    "mixed underscore")       confname=conf1_ ;;
    "mixed")                  confname=conf1  ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries to link Fortran main with C stdio routines" >&5
$as_echo_n "checking for libraries to link Fortran main with C stdio routines... " >&6; }
if test "${pac_cv_prog_f77_and_c_stdio_libs+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

pac_cv_prog_f77_and_c_stdio_libs=unknown
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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
int $confname(int a) {
    printf( "The answer is %d\n", a ); fflush(stdout); return 0;
}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    saved_LIBS="$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

    cat > conftest.$ac_ext <<_ACEOF


            program main
            call conf1(0)
            end


_ACEOF
    for extralib in "" "-lSystemStubs" ; do
        LIBS="pac_conftest.$OBJEXT $saved_LIBS $extralib"
        if ac_fn_f77_try_link "$LINENO"; then :

            pac_cv_prog_f77_and_c_stdio_libs="$extralib"; break

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
    done
    if test "X$pac_cv_prog_f77_and_c_stdio_libs" = "X" ; then
        pac_cv_prog_f77_and_c_stdio_libs=none
    fi
    rm -f 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

    LIBS="$saved_LIBS"
    rm -f pac_conftest.$OBJEXT

fi
rm -f core 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_and_c_stdio_libs" >&5
$as_echo "$pac_cv_prog_f77_and_c_stdio_libs" >&6; }
if test "$pac_cv_prog_f77_and_c_stdio_libs" != "none" \
     -a "$pac_cv_prog_f77_and_c_stdio_libs" != "unknown" ; then
    F77_OTHER_LIBS="$F77_OTHER_LIBS $pac_cv_prog_f77_and_c_stdio_libs"
fi



    # Warn about mixed name mangling, since many of the tests will fail
    if test "$pac_cv_prog_f77_name_mangle" = "mixed" ; then
        { $as_echo "$as_me:${as_lineno-$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 FCFLAGS environment variable." >&5
$as_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 FCFLAGS environment variable." >&2;}
        # If Fortran implicitly enabled, disable it now.  Otherwise,
	# abort the configure since warning messages are often lost in
	# the output.
	as_fn_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" "$LINENO" 5
    fi

    # The MPI standard requires that MPI_Init in any language initialize
    # MPI in all languages.  This can be a problem when objects produced
    # by the Fortran compiler require symbols from the Fortran runtime
    # (making linking C-only programs unnecessarily difficult).  What we test
    # here is whether the much more restricted needs of the Fortran
    # initialize can be met with no special use of the Fortran runtime


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran init will work with C" >&5
$as_echo_n "checking whether Fortran init will work with C... " >&6; }
pac_f_init_works_with_c=unknown
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


        subroutine minit()
        common /m1/ vc, vc2
        character*1 vc(1,1), vc2(1)
        common /m2/ vd
        integer vd
        save /m1/, /m2/
        call minitc( vc, vc2, vd )
        end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_f77conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    saved_LIBS="$LIBS"
    # This test checks if Fortran init can be done in pure C environment,
    # i.e. no FLIBS in linking, so don't put FLIBS in LIBS below
        LIBS="pac_f77conftest.$OBJEXT $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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
#ifdef F77_NAME_UPPER
#define minit_ MINIT
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define minit_ minit
#endif
extern void minit_(void);
int main( int argc, char **argv )
{
    minit_();
    return 0;
}
char *v1 = 0;
char *vc2 = 0;
int  v2 = 0;
void minitc_( char *dv1, int d, char *dv2, int d2, int dv3 );
void minitc_( char *dv1, int d, char *dv2, int d2, int dv3 )
{
v1 = dv1;
v2 = dv3;
vc2 = dv2;
*vc2 = ' ';
}


_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_f_init_works_with_c=yes
else
  pac_f_init_works_with_c=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext 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

    LIBS="$saved_LIBS"
    rm -f pac_f77conftest.$OBJEXT

fi
rm -f core 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

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_f_init_works_with_c" >&5
$as_echo "$pac_f_init_works_with_c" >&6; }

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

$as_echo "#define HAVE_MPI_F_INIT_WORKS_WITH_C 1" >>confdefs.h

   fi

fi

# FC 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 fc works with f77.  This value is
# set to no *only* if fc was selected but was not compatible with f77
fc_with_f77=yes
if test "$enable_fc" = "yes" -a "$enable_f77" = yes ; then
    enable_fc=no
    # Check for a Fortran compiler.  Work around bug in autoconf that
    # adds -g to FCFLAGS
    saveFCFLAGS="$FCFLAGS"


	if test -z "${pac_save_FCFLAGS_nesting}" ; then
	   pac_save_FCFLAGS_nesting=0
	fi
	eval pac_save_FCFLAGS_${pac_save_FCFLAGS_nesting}='"$FCFLAGS"'
	pac_save_FCFLAGS_nesting=`expr ${pac_save_FCFLAGS_nesting} + 1`

ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 \
            gfortran g95 ifc efc gfc
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_FC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$FC"; then
  ac_cv_prog_FC="$FC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
FC=$ac_cv_prog_FC
if test -n "$FC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
$as_echo "$FC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$FC" && break
  done
fi
if test -z "$FC"; then
  ac_ct_FC=$FC
  for ac_prog in ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 \
            gfortran g95 ifc efc gfc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_FC"; then
  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_FC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_FC=$ac_cv_prog_ac_ct_FC
if test -n "$ac_ct_FC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
$as_echo "$ac_ct_FC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_FC" && break
done

  if test "x$ac_ct_FC" = x; then
    FC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    FC=$ac_ct_FC
  fi
fi


# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat > conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_fc_compiler_gnu=$ac_compiler_gnu

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
ac_ext=$ac_save_ext
ac_test_FCFLAGS=${FCFLAGS+set}
ac_save_FCFLAGS=$FCFLAGS
FCFLAGS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
$as_echo_n "checking whether $FC accepts -g... " >&6; }
if test "${ac_cv_prog_fc_g+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  FCFLAGS=-g
cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
  ac_cv_prog_fc_g=yes
else
  ac_cv_prog_fc_g=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
$as_echo "$ac_cv_prog_fc_g" >&6; }
if test "$ac_test_FCFLAGS" = set; then
  FCFLAGS=$ac_save_FCFLAGS
elif test $ac_cv_prog_fc_g = yes; then
  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
    FCFLAGS="-g -O2"
  else
    FCFLAGS="-g"
  fi
else
  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
    FCFLAGS="-O2"
  else
    FCFLAGS=
  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


	pac_save_FCFLAGS_nesting=`expr ${pac_save_FCFLAGS_nesting} - 1`
	eval FCFLAGS="\$pac_save_FCFLAGS_${pac_save_FCFLAGS_nesting}"
	eval pac_save_FCFLAGS_${pac_save_FCFLAGS_nesting}=""


    FCFLAGS=$saveFCFLAGS
    if test -n "$FC" ; then
        if test -z "$F77" ; then


	if test -z "${pac_save_FFLAGS_nesting}" ; then
	   pac_save_FFLAGS_nesting=0
	fi
	eval pac_save_FFLAGS_${pac_save_FFLAGS_nesting}='"$FFLAGS"'
	pac_save_FFLAGS_nesting=`expr ${pac_save_FFLAGS_nesting} + 1`

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 ifort pgf77 af77 xlf frt cf77 fort77 fl32 fort ifc efc ftn \
             gfortran f77 g77
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_F77+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
  for ac_prog in ifort pgf77 af77 xlf frt cf77 fort77 fl32 fort ifc efc ftn \
             gfortran f77 g77
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_F77+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$ac_ct_F77" && break
done

  if test "x$ac_ct_F77" = x; then
    F77=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    F77=$ac_ct_F77
  fi
fi


# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
if test "${ac_cv_f77_compiler_gnu+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat > conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

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

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  ac_cv_prog_f77_g=yes
else
  ac_cv_prog_f77_g=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
$as_echo "$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

if test $ac_compiler_gnu = yes; then
  G77=yes
else
  G77=
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


	pac_save_FFLAGS_nesting=`expr ${pac_save_FFLAGS_nesting} - 1`
	eval FFLAGS="\$pac_save_FFLAGS_${pac_save_FFLAGS_nesting}"
	eval pac_save_FFLAGS_${pac_save_FFLAGS_nesting}=""


	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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extension for Fortran 90 programs" >&5
$as_echo_n "checking for extension for Fortran 90 programs... " >&6; }
ac_fc_srcext="f90"
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

cat > conftest.$ac_ext <<_ACEOF

          program main

      end

_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: f90" >&5
$as_echo "f90" >&6; }

else

    ac_fc_srcext="f"
    cat > conftest.$ac_ext <<_ACEOF

              program main

      end

_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: f" >&5
$as_echo "f" >&6; }

else

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown!" >&5
$as_echo "unknown!" >&6; }

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

fi
rm -f core 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




ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) works" >&5
$as_echo_n "checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) works... " >&6; }
cat > conftest.$ac_ext <<_ACEOF


        program conftest
        integer, dimension(10) :: n
        end


_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :

    pac_cv_prog_fc_works="yes"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_fc_works" >&5
$as_echo "$pac_cv_prog_fc_works" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) is a cross-compiler" >&5
$as_echo_n "checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) is a cross-compiler... " >&6; }
    if test "$cross_compiling" = yes; then :
  pac_cv_prog_fc_cross="$cross_compiling"

else
  if ac_fn_fc_try_run "$LINENO"; then :
  pac_cv_prog_fc_cross="no"
else
  pac_cv_prog_fc_cross="yes"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam
fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_fc_cross" >&5
$as_echo "$pac_cv_prog_fc_cross" >&6; }

else

    pac_cv_prog_fc_works="no"
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&5
$as_echo "$as_me: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&2;}

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
# 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




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 90 compiler works with Fortran 77 compiler" >&5
$as_echo_n "checking whether Fortran 90 compiler works with Fortran 77 compiler... " >&6; }
if test "${pac_cv_fc_and_f77+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

pacTestRoutine=foo_abc
eval pacTestRoutine=$testRoutine
pac_cv_fc_and_f77="unknown"
# 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!)
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


        subroutine ${pacTestRoutine}(b)
        integer b
        b = b + 1
        end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :

    # pac_f77compile_ok=yes

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_f77conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # Save original LIBS, prepend previously generated object file to LIBS
    saved_LIBS="$LIBS"
    LIBS="pac_f77conftest.$OBJEXT $LIBS"
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

    cat > conftest.$ac_ext <<_ACEOF


            program main
            integer a
            a = 1
            call ${pacTestRoutine}(a)
            end


_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :
  pac_cv_fc_and_f77=yes
else
  pac_cv_fc_and_f77=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    # Some versions of the Intel compiler produce these two files
    rm -f work.pc work.pcl
    # Restore LIBS
    LIBS="$saved_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

    # remove previously generated object file.
    rm -f pac_f77conftest.$OBJEXT

else

    # pac_f77compile_ok=no
    pac_cv_fc_and_f77=no

fi
rm -f core 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

# Perform the requested action based on whether the test succeeded
if test "$pac_cv_fc_and_f77" = yes ; then
    fc_with_f77=yes
else
    fc_with_f77=no
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: See config.log for the failed test program and its output." >&5
$as_echo "$as_me: WARNING: See config.log for the failed test program and its output." >&2;}
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fc_and_f77" >&5
$as_echo "$pac_cv_fc_and_f77" >&6; }

        if test "$fc_with_f77" != yes ; then
	    enable_fc=no
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The selected Fortran 90 compiler $FC does not work with the selected Fortran 77 compiler $F77.  Use the environment variables FC 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
$as_echo "$as_me: WARNING: The selected Fortran 90 compiler $FC does not work with the selected Fortran 77 compiler $F77.  Use the environment variables FC 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 "$fc_with_f77" = "yes" ; then
            # If we got here, there is a Fortran 90 compiler that we can use
            enable_fc=yes
        fi
    elif test "$pac_cv_prog_fc_works" = no; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --disable-fc to keep configure from searching for a Fortran 90 compiler" >&5
$as_echo "$as_me: WARNING: Use --disable-fc to keep configure from searching for a Fortran 90 compiler" >&2;}
    fi

    if test "$enable_fc" = "yes" -a "$FC" = "" ; then
       # No Fortran 90 compiler found; abort
       as_fn_error $? "No Fortran 90 compiler found. If you don't need
       to build any Fortran 90 programs, you can disable Fortran 90
       support using --disable-fc. If you do want to build Fortran 90
       programs, you need to install a Fortran 90 compiler such as
       gfortran or ifort before you can proceed." "$LINENO" 5
    fi
fi

if test "$enable_fc" = "yes" -a "$enable_f77" != "yes" ; then
   # Fortran 90 support requires compatible Fortran 77 support
   as_fn_error $? "
Fortran 90 support requires compatible Fortran 77 support.
To force the use of the Fortran 90 compiler for Fortran 77,
do not use configure option --disable-f77, and set the environment
variable F77 to the name of the Fortran 90 compiler, or \$FC.
If you do not want any Fortran support, use configure options
--disable-f77 and --disable-fc." "$LINENO" 5
   # 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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 77 accepts ! for comments" >&5
$as_echo_n "checking whether Fortran 77 accepts ! for comments... " >&6; }
if test "${pac_cv_prog_f77_exclaim_comments+set}" = set; then :
  $as_echo_n "(cached) " >&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
if ac_fn_f77_try_compile "$LINENO"; then :

    pac_cv_prog_f77_exclaim_comments="yes"

else

    pac_cv_prog_f77_exclaim_comments="no"

fi
rm -f core 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_exclaim_comments" >&5
$as_echo "$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;checkdir_is_given=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for include directory flag for Fortran" >&5
$as_echo_n "checking for include directory flag for Fortran... " >&6; }
if test "${pac_cv_prog_f77_has_incdir+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

test -d $checkdir || mkdir $checkdir
echo '       call sub()' > $checkdir/conftestf.h
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

saved_FFLAGS="$FFLAGS"
pac_cv_prog_f77_has_incdir="none"
# SGI wants -Wf,-I
for idir in "-I" "-Wf,-I" ; do
    FFLAGS="${idir} $checkdir $saved_FFLAGS"
    cat > conftest.$ac_ext <<_ACEOF


            program main
            include 'conftestf.h'
            end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_prog_f77_has_incdir="$idir"; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
FFLAGS="$saved_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 "$checkdir_is_given" = "yes" ; then
    rm -f $checkdir/conftestf.h
else
    rm -rf $checkdir
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_has_incdir" >&5
$as_echo "$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

    #

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 flag for library directories" >&5
$as_echo_n "checking for Fortran 77 flag for library directories... " >&6; }
if test "${pac_cv_prog_f77_library_dir_flag+set}" = set; then :
  $as_echo_n "(cached) " >&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


        subroutine f1conf
        end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :

    # pac_f77compile_ok=yes

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_f77conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

{ $as_echo "$as_me:$LINENO: test -d conftestdir || mkdir conftestdir" >&5
  (eval test -d conftestdir || mkdir conftestdir) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

{ $as_echo "$as_me:$LINENO: ${AR-ar} ${AR_FLAGS-cr} conftestdir/libf77conftest.a pac_f77conftest.$OBJEXT" >&5
  (eval ${AR-ar} ${AR_FLAGS-cr} conftestdir/libf77conftest.a pac_f77conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

{ $as_echo "$as_me:$LINENO: ${RANLIB-ranlib} conftestdir/libf77conftest.a" >&5
  (eval ${RANLIB-ranlib} conftestdir/libf77conftest.a) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # Save original LIBS, prepend previously generated object file to LIBS
    saved_LIBS="$LIBS"
    LIBS="-lf77conftest $LIBS"
    saved_LDFLAGS="$LDFLAGS"
    pac_cv_prog_f77_library_dir_flag="none"
    for ldir in "-L" "-Wl,-L," ; do
        LDFLAGS="${ldir}conftestdir $saved_LDFLAGS"
        cat > conftest.$ac_ext <<_ACEOF


                program main
                call f1conf
                end


_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :
  pac_cv_prog_f77_library_dir_flag="$ldir";break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    done
    LDFLAGS="$saved_LDFLAGS"
    LIBS="$saved_LIBS"
    rm -rf conftestdir
    rm -f pac_f77conftest.$OBJEXT

fi
rm -f core 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_library_dir_flag" >&5
$as_echo "$pac_cv_prog_f77_library_dir_flag" >&6; }
if test "X$pac_cv_prog_f77_library_dir_flag" != "Xnone" ; then
    F77_LIBDIR_LEADER="$pac_cv_prog_f77_library_dir_flag"

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran allows unused externals" >&5
$as_echo_n "checking whether Fortran allows unused externals... " >&6; }
if test "${pac_cv_prog_f77_allows_unused_externals+set}" = set; then :
  $as_echo_n "(cached) " >&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
        external bar
        end


_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :

    pac_cv_prog_f77_allows_unused_externals="yes"

else

    pac_cv_prog_f77_allows_unused_externals="no"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_allows_unused_externals" >&5
$as_echo "$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="";
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Removed PMPI_WTIME and PMPI_WTICK from mpif.h" >&5
$as_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

    # ------------------------------------------------
    # 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)
	 F77_SHL="$F77 -fPIC"
	 F77_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.
         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
                end


_ACEOF
         saved_FFLAGS="$FFLAGS"
         F77_SHL=false
         for sh_arg in "-shared -fPIC" "-fPIC" "-shared -fpic" "-fpic" "-KPIC" ; do
 	     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 allows $sh_arg" >&5
$as_echo_n "checking whether $F77 allows $sh_arg... " >&6; }
             FFLAGS="$sh_arg $saved_FFLAGS"
             if ac_fn_f77_try_link "$LINENO"; then :

	         F77_SHL="$F77 $sh_arg"
                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
                 break

else

                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
	 done
         FFLAGS="$saved_FFLAGS"
	 if test "$F77_SHL" = "false" ; then
	     as_fn_error $? "Cannot build shared libraries for Fortran with this compiler" "$LINENO" 5
         fi
         rm -f confest.$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

	 if test "$enable_rpath" = yes ; then
	      F77_LINKPATH_SHL="-Wl,-rpath -Wl,"
	 fi
	 ;;

	 cygwin|cygwin-gcc)
	 F77_SHL="$F77 -shared"
	 F77_LINKPATH_SHL=""
	 ;;

	 solaris|solaris-cc)
	 F77_SHL="$F77 -xcode=pic32"
	 if test "$enable_rpath" = yes ; then
             F77_LINKPATH_SHL=-R
         fi
	 ;;

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

	 libtool)
	 F77_SHL='${LIBTOOL} --mode=compile ${F77}'
	 if test "$enable_rpath" = yes ; then
             F77_LINKPATH_SHL="-rpath "
         fi
	 ;;

	 *)
	 F77_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
    # This is needed for Mac OSX 10.5


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 77 compiler processes .F files with C preprocessor" >&5
$as_echo_n "checking whether Fortran 77 compiler processes .F files with C preprocessor... " >&6; }
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

saved_f77_ext=${ac_ext}
ac_ext="F"
saved_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $CPPFLAGS"
cat > conftest.$ac_ext <<_ACEOF


        program main
#define ASIZE 10
        integer a(ASIZE)
        end


_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :

    pac_cv_f77_accepts_F=yes
    F77CPP=""

else

    pac_cv_f77_accepts_F=no
    F77CPP="false"

fi
rm -f core conftest.err conftest.$ac_objext
# Restore Fortran 77's ac_ext but not FFLAGS
ac_ext="$saved_f77_ext"

if test "$pac_cv_f77_accepts_F" != "yes" ; then
    pac_cpp_f77="$ac_cpp -C -P conftest.F > conftest.$ac_ext"

pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: $pac_cpp_f77 > $pac_TESTLOG" >&5
  (eval $pac_cpp_f77 > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :



        if test -s conftest.${ac_ext} ; then
            if ac_fn_f77_try_compile "$LINENO"; then :

                pac_cv_f77_accepts_F="no, use cpp"
                F77CPP="$CPP -C -P"

fi
rm -f core conftest.err conftest.$ac_objext
            rm -f conftest.${ac_ext}
        fi



else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** $pac_cpp_f77 :" >&5
    cat $pac_TESTLOG >&5





fi

rm -f $pac_TESTLOG

fi
FFLAGS="$saved_FFLAGS"
rm -f conftest.F
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

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_f77_accepts_F" >&5
$as_echo "$pac_cv_f77_accepts_F" >&6; }



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

$as_echo "#define HAVE_FORTRAN_BINDING 1" >>confdefs.h

    # 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_fc" = "yes" ; then
    if test "$enable_f77" != "yes" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran 90 requires Fortran 77" >&5
$as_echo "$as_me: WARNING: Fortran 90 requires Fortran 77" >&2;}
        enable_fc=no
    else
        bindingsubsystems="$bindingsubsystems src/binding/f90"
        bindings="$bindings f90"
        bindings_dirs="$bindings_dirs src/binding/f90"
    fi
fi

# Set defaults for these values so that the Makefile in src/bindings/f90
# is valid even if fc is not enabled (this is necessary for the
# distclean target)
MPIMODNAME=mpi
MPICONSTMODNAME=mpi_constants
MPISIZEOFMODNAME=mpi_sizeofs
MPIBASEMODNAME=mpi_base
if test "$enable_fc" = "yes" ; then
    # Determine characteristics of the Fortran 90 compiler
    # Find a Fortran 90 compiler.  Sets FC
    # Work around bug in autoconf that adds -g to FCFLAGS
    saveFCFLAGS="$FCFLAGS"


	if test -z "${pac_save_FCFLAGS_nesting}" ; then
	   pac_save_FCFLAGS_nesting=0
	fi
	eval pac_save_FCFLAGS_${pac_save_FCFLAGS_nesting}='"$FCFLAGS"'
	pac_save_FCFLAGS_nesting=`expr ${pac_save_FCFLAGS_nesting} + 1`

ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 \
            gfortran g95 ifc efc gfc
  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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_FC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$FC"; then
  ac_cv_prog_FC="$FC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
FC=$ac_cv_prog_FC
if test -n "$FC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
$as_echo "$FC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$FC" && break
  done
fi
if test -z "$FC"; then
  ac_ct_FC=$FC
  for ac_prog in ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 \
            gfortran g95 ifc efc gfc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_FC"; then
  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_FC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_FC=$ac_cv_prog_ac_ct_FC
if test -n "$ac_ct_FC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
$as_echo "$ac_ct_FC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_FC" && break
done

  if test "x$ac_ct_FC" = x; then
    FC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    FC=$ac_ct_FC
  fi
fi


# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat > conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_fc_compiler_gnu=$ac_compiler_gnu

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
ac_ext=$ac_save_ext
ac_test_FCFLAGS=${FCFLAGS+set}
ac_save_FCFLAGS=$FCFLAGS
FCFLAGS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
$as_echo_n "checking whether $FC accepts -g... " >&6; }
if test "${ac_cv_prog_fc_g+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  FCFLAGS=-g
cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
  ac_cv_prog_fc_g=yes
else
  ac_cv_prog_fc_g=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
$as_echo "$ac_cv_prog_fc_g" >&6; }
if test "$ac_test_FCFLAGS" = set; then
  FCFLAGS=$ac_save_FCFLAGS
elif test $ac_cv_prog_fc_g = yes; then
  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
    FCFLAGS="-g -O2"
  else
    FCFLAGS="-g"
  fi
else
  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
    FCFLAGS="-O2"
  else
    FCFLAGS=
  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


	pac_save_FCFLAGS_nesting=`expr ${pac_save_FCFLAGS_nesting} - 1`
	eval FCFLAGS="\$pac_save_FCFLAGS_${pac_save_FCFLAGS_nesting}"
	eval pac_save_FCFLAGS_${pac_save_FCFLAGS_nesting}=""




ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) works" >&5
$as_echo_n "checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) works... " >&6; }
cat > conftest.$ac_ext <<_ACEOF


        program conftest
        integer, dimension(10) :: n
        end


_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :

    pac_cv_prog_fc_works="yes"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_fc_works" >&5
$as_echo "$pac_cv_prog_fc_works" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) is a cross-compiler" >&5
$as_echo_n "checking whether the Fortran 90 compiler ($FC $FCFLAGS $LDFLAGS) is a cross-compiler... " >&6; }
    if test "$cross_compiling" = yes; then :
  pac_cv_prog_fc_cross="$cross_compiling"

else
  if ac_fn_fc_try_run "$LINENO"; then :
  pac_cv_prog_fc_cross="no"
else
  pac_cv_prog_fc_cross="yes"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam
fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_fc_cross" >&5
$as_echo "$pac_cv_prog_fc_cross" >&6; }

else

    pac_cv_prog_fc_works="no"
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&5
$as_echo "$as_me: WARNING: installation or configuration problem: Fortran 90 compiler cannot create executables." >&2;}

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
# 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


    FCFLAGS=$saveFCFLAGS
    if test "$pac_cv_prog_fc_works" = no ; then
        # Reject this compiler
        if test -n "$FC" ; then
            fc_rejected=yes
            oldFC="$FC"
            FC=""
        fi
    fi

    # Determine the extension for Fortran 90 files (it isn't always .f90)
    FCEXT=$ac_fc_srcext


    if test -z "$FC" ; then
        if test "$fc_rejected" = "yes" ; then
            as_fn_error $? "Could not find a usable Fortran 90 compiler.  The compiler $oldFC may be incompatible with the Fortran 77 compiler $F77; check the output of configure and consult the installation manuals" "$LINENO" 5
        else
            as_fn_error $? "Could not find a usable Fortran 90 compiler." "$LINENO" 5
        fi
    fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 module extension" >&5
$as_echo_n "checking for Fortran 90 module extension... " >&6; }
if test "${pac_cv_fc_module_ext+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

pac_cv_fc_module_case="unknown"
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

cat > conftest.$ac_ext <<_ACEOF


        module conftest
        integer n
        parameter (n=1)
        end module conftest


_ACEOF
if ac_fn_fc_try_compile "$LINENO"; 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_fc_module_case=lower
                else
                    pac_cv_fc_module_case=upper
                fi
                pac_cv_fc_module_ext=$ext
                pac_MOD=$ext
                break
            fi
        done
        if test -n "$pac_cv_fc_module_ext" ; then break ; fi
    done
    if test -z "$pac_MOD" ; then
        pac_MOD=`ls conftest.* 2>&1 | grep -v conftest.${ac_fc_srcext} | grep -v conftest.o`
        pac_MOD=`echo $pac_MOD | sed -e 's/conftest\.//g'`
        pac_cv_fc_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_fc_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_fc_module_ext="unknown"
        else
            pac_cv_fc_module_ext=$pac_MOD
        fi
    fi

else

    pac_cv_fc_module_ext="unknown"

fi
rm -f core 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fc_module_ext" >&5
$as_echo "$pac_cv_fc_module_ext" >&6; }

if test "$pac_cv_fc_module_ext" = "unknown" ; then
    :
else
    FCMODEXT=$pac_MOD
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 module include flag" >&5
$as_echo_n "checking for Fortran 90 module include flag... " >&6; }
if test "${pac_cv_fc_module_incflag+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

cat > conftest.$ac_ext <<_ACEOF


        module conf
        integer n
        parameter (n=1)
        end module conf


_ACEOF
pac_madedir="no"
if test ! -d conf ; then mkdir conftestdir ; pac_madedir="yes"; fi
if test "$pac_cv_fc_module_case" = "upper" ; then
    pac_module="CONF.$pac_cv_fc_module_ext"
else
    pac_module="conf.$pac_cv_fc_module_ext"
fi
if ac_fn_fc_try_compile "$LINENO"; 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
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build a simple Fortran 90 module" >&5
$as_echo "$as_me: WARNING: Unable to build a simple Fortran 90 module" >&2;}
        # echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
        # cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
        $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    fi

fi
rm -f core conftest.err conftest.$ac_objext
# Remove the conftest* after AC_LANG_CONFTEST
rm -rf conftest.dSYM
rm -f conftest.$ac_ext

cat > conftest.$ac_ext <<_ACEOF
      program main
use conf
      end
_ACEOF

# Save the original FCFLAGS
saved_FCFLAGS="$FCFLAGS"
pac_cv_fc_module_incflag=""
for inchdr in '-I' '-M' '-p' ; do
    FCFLAGS="$saved_FCFLAGS ${inchdr}conftestdir"
    if ac_fn_fc_try_compile "$LINENO"; then :
  pac_cv_fc_module_incflag="$inchdr" ; break
fi
rm -f core conftest.err conftest.$ac_objext
done
if test "X$pac_cv_fc_module_incflag" = "X" ; then
    if test -s conftest.pc ; then
        mv conftest.pc conftestdir/mpimod.pc
        echo "mpimod.pc" > conftestdir/mpimod.pcl
        echo "`pwd`/conftestdir/mpimod.pc" >> conftestdir/mpimod.pcl
        inchdr='-cl,'
        FCFLAGS="$save_FCFLAGS ${inchdr}conftestdir"
        if ac_fn_fc_try_compile "$LINENO"; then :
  pac_fcompile_ok=yes
else
  pac_fcompile_ok=no
fi
rm -f core conftest.err conftest.$ac_objext
        if test "$pac_fcompile_ok" = "yes" ; then
            pac_cv_fc_module_incflag="$inchdr"
            # Not quite right; see the comments that follow
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: -cl,filename where filename contains a list of files and directories" >&5
$as_echo "-cl,filename where filename contains a list of files and directories" >&6; }
            FC_WORK_FILES_ARG="-cl,mpimod.pcl"
            FCMODINCSPEC="-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_fc_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_fc_module_incflag="unknown"
    fi
fi
# Restore the original FCFLAGS
FCFLAGS="$saved_FCFLAGS"
if test "$pac_madedir" = "yes" ; then rm -rf conftestdir ; fi
# Remove the conftest* after AC_LANG_CONFTEST
# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fc_module_incflag" >&5
$as_echo "$pac_cv_fc_module_incflag" >&6; }


FCMODINCFLAG=$pac_cv_fc_module_incflag



    if test "$pac_cv_fc_module_case" = "upper" ; then
        MPIMODNAME=MPI
        MPICONSTMODNAME=MPI_CONSTANTS
	MPISIZEOFMODNAME=MPI_SIZEOFS
	MPIBASEMODNAME=MPI_BASE
    else
        MPIMODNAME=mpi
        MPICONSTMODNAME=mpi_constants
	MPISIZEOFMODNAME=mpi_sizeofs
	MPIBASEMODNAME=mpi_base
    fi




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

    #
    # Assume that all Fortran 90 compilers accept -I for include directories
    FCINC=-I

    FCINCFLAG=-I


    # Check if $MPI_DEFAULT_FCOPTS is valid with $F90
    if test "$enable_default_optimize" = "yes" \
         -a -n "$MPI_DEFAULT_FCOPTS" ; then
        if test "$enable_check_compiler_flags" = "yes" ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 90 compiler accepts option $MPI_DEFAULT_FCOPTS" >&5
$as_echo_n "checking whether Fortran 90 compiler accepts option $MPI_DEFAULT_FCOPTS... " >&6; }
pac_opt="$MPI_DEFAULT_FCOPTS"
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

FCFLAGS_orig="$FCFLAGS"
FCFLAGS_opt="$pac_opt $FCFLAGS"
pac_result="unknown"

cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
FCFLAGS="$FCFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_fc_try_link "$LINENO"; then :


    FCFLAGS="$FCFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_fc_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    FCFLAGS="$FCFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat > conftest.$ac_ext <<_ACEOF


            subroutine try()
            end


_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        FCFLAGS="$FCFLAGS_opt"
        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test2.log pac_test4.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test2.log pac_test4.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test2.log pac_test4.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log
fi
rm -f pac_test1.log pac_test2.log

FCFLAGS="$FCFLAGS_orig"
if test "$pac_result" = "yes" ; then

            FCFLAGS="$FCFLAGS $MPI_DEFAULT_FCOPTS"

else
     :
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


        else
            FCFLAGS="$FCFLAGS $MPI_DEFAULT_FCOPTS"
        fi
    fi

    # 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


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran 90 compiler processes .F90 files with C preprocessor" >&5
$as_echo_n "checking whether Fortran 90 compiler processes .F90 files with C preprocessor... " >&6; }
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

saved_fc_ext=${ac_ext}
ac_ext="F90"
saved_FCFLAGS="$FCFLAGS"
FCFLAGS="$FCFLAGS $CPPFLAGS"
cat > conftest.$ac_ext <<_ACEOF


        program main
#define ASIZE 10
        integer a(ASIZE)
        end


_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :

    pac_cv_fc_accepts_F90=yes
    FCCPP=""

else

    pac_cv_fc_accepts_F90=no
    FCCPP="false"

fi
rm -f core conftest.err conftest.$ac_objext
# Restore Fortran's ac_ext but not FCFLAGS
ac_ext="$saved_fc_ext"

if test "$pac_cv_fc_accepts_F90" != "yes" ; then
    pac_cpp_fc="$ac_cpp -C -P conftest.F90 > conftest.$ac_ext"

pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: $pac_cpp_fc > $pac_TESTLOG" >&5
  (eval $pac_cpp_fc > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :



        if test -s conftest.${ac_ext} ; then
            if ac_fn_fc_try_compile "$LINENO"; then :

                pac_cv_fc_accepts_F90="no, use cpp"
                FCCPP="$CPP -C -P"

fi
rm -f core conftest.err conftest.$ac_objext
            rm -f conftest.${ac_ext}
        fi



else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** $pac_cpp_fc :" >&5
    cat $pac_TESTLOG >&5





fi

rm -f $pac_TESTLOG

fi
FCFLAGS="$saved_FCFLAGS"
rm -f conftest.F90
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

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fc_accepts_F90" >&5
$as_echo "$pac_cv_fc_accepts_F90" >&6; }



    # Check whether additional libraries are needed when linking with C


# To simply the code in the cache_check macro, chose the routine name
# first, in case we need it
confname=conf1_
case "$pac_cv_prog_f77_name_mangle" in
    "lower underscore")       confname=conf1_  ;;
    "upper stdcall")          confname=CONF1   ;;
    upper)                    confname=CONF1   ;;
    "lower doubleunderscore") confname=conf1_  ;;
    lower)                    confname=conf1   ;;
    "mixed underscore")       confname=conf1_  ;;
    mixed)                    confname=conf1   ;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what libraries are needed to link Fortran90 programs with C routines that use stdio" >&5
$as_echo_n "checking what libraries are needed to link Fortran90 programs with C routines that use stdio... " >&6; }
if test "${pac_cv_prog_fc_and_c_stdio_libs+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

pac_cv_prog_fc_and_c_stdio_libs=unknown

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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
int $confname( int a )
{ printf( "The answer is %d\n", a ); fflush(stdout); return 0; }


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    pac_compile_ok=yes

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # Save LIBS and prepend object file to LIBS
    saved_LIBS="$LIBS"
    LIBS="pac_conftest.$OBJEXT $LIBS"
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

    cat > conftest.$ac_ext <<_ACEOF

              program main
call conf1(0)
      end

_ACEOF
if ac_fn_fc_try_link "$LINENO"; then :

        pac_cv_prog_fc_and_c_stdio_libs=none

else

        # Try again with -lSystemStubs
        LIBS="$LIBS -lSystemStubs"
        if ac_fn_fc_try_link "$LINENO"; then :

            pac_cv_prog_fc_and_c_stdio_libs="-lSystemStubs"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    LIBS="$saved_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 pac_conftest.$OBJEXT

fi
rm -f core 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

if test "$pac_cv_prog_fc_and_c_stdio_libs" != none -a \
        "$pac_cv_prog_fc_and_c_stdio_libs" != unknown ; then
    FC_OTHER_LIBS="$FC_OTHER_LIBS $pac_cv_prog_fc_and_c_stdio_libs"
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_fc_and_c_stdio_libs" >&5
$as_echo "$pac_cv_prog_fc_and_c_stdio_libs" >&6; }



    # ------------------------------------------------
    # ------------------------------------------------
    # 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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 compiler vendor" >&5
$as_echo_n "checking for Fortran 90 compiler vendor... " >&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_fc_vendor="unknown"
for arg in --version -V -v ; do
    rm -f conftest.txt

{ $as_echo "$as_me:$LINENO: $FC $arg </dev/null >conftest.txt 2>&1" >&5
  (eval $FC $arg </dev/null >conftest.txt 2>&1) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # 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_fc_vendor=pgi
        elif grep 'Sun Workshop' conftest.txt >/dev/null 2>&1 ; then
            pac_cv_fc_vendor=sun
	elif grep 'Sun Fortran 9' conftest.txt >/dev/null 2>&1 ; then
	    pac_cv_fc_vendor=sun
        elif grep 'Absoft' conftest.txt >/dev/null 2>&1 ; then
            pac_cv_fc_vendor=absoft
        elif grep 'G95' conftest.txt >/dev/null 2>&1 ; then
            pac_cv_fc_vendor=gnu
        elif grep 'GNU Fortran' conftest.txt >/dev/null 2>&1 ; then
            # This is gfortran
            pac_cv_fc_vendor=gnu
        elif grep Intel conftest.txt >/dev/null 2>&1 ; then
            pac_cv_fc_vendor=intel
        fi
    fi
    if test "$pac_cv_fc_vendor" != "unknown" ; then break ; fi
done
if test "$pac_cv_fc_vendor" = "unknown" ; then
    # Try to use the compiler name
    if test "$FC" = "ifort" -o "$FC" = "ifc" ; then
        pac_cv_fc_vendor=intel
    elif test "$FC" = "pgf90" ; then
        pac_cv_fc_vendor=pgi
    elif test "$FC" = "xlf90" -o "$FC" = "xlf90_r" ; then
        pac_cv_fc_vendor=ibm
    elif test "$FC" = "xlf95" -o "$FC" = "xlf95_r" ; then
        pac_cv_fc_vendor=ibm
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fc_vendor" >&5
$as_echo "$pac_cv_fc_vendor" >&6; }
rm -f conftest.txt
# End of checking for F90 compiler vendor


    if test "$ENABLE_SHLIB" != none ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for how to build shared libraries for Fortran 90" >&5
$as_echo_n "checking for how to build shared libraries for Fortran 90... " >&6; }
        case "$ENABLE_SHLIB" in
	 gcc-osx|osx-gcc)
	 FC_SHL="$FC -fPIC"
	 FC_LINKPATH_SHL=""
	 ;;
         gcc)
         if test "$pac_cv_fc_vendor" = gnu -o "$FC" = "g95" ; then
            # If we have the GNU Fortran 95 compiler (untested)
            FC_SHL="$FC -shared -fPIC"
	    if test "$enable_rpath" = yes ; then
                FC_LINKPATH_SHL="-Wl,-rpath -Wl,"
            fi
         else
            case "$pac_cv_fc_vendor" in
	        absoft)
	        FC_SHL="$FC -fPIC"
		if test "$enable_rpath" = yes ; then
                    FC_LINKPATH_SHL="-X -rpath -X "
                fi
	        ;;

	        intel)
	        # Intel implements the GNU options
	        FC_SHL="$FC -shared -fPIC"
		if test "$enable_rpath" = yes ; then
                    FC_LINKPATH_SHL="-Wl,-rpath -Wl,"
		fi
	        ;;

	        pgi)
	        # Portland Group implements the GNU options
	        FC_SHL="$FC -shared -fPIC"
		if test "$enable_rpath" = yes ; then
                    FC_LINKPATH_SHL="-Wl,-rpath -Wl,"
		fi
	        ;;

		sun)
		# Sun studio compiler on Linux
		FC_SHL="$FC -KPIC"
		if test "$enable_rpath" = yes ; then
		    FC_LINKPATH_SHL="-Qoption ld -rpath,"
		fi
		;;

	        *)
	        # Unknown, ignore
	        ;;
            esac
            fi
            ;;
         solaris|solaris-cc)
            # Assume the Solaris F90 compiler, in 32-bit mode
            FC_SHL="$FC -xcode=pic32"
            FC_LINKPATH_SHL=-R
         ;;

	 libtool)
	 FC_SHL='${LIBTOOL} --mode=compile ${FC}'
	 if test "$enable_rpath" = yes ; then
             FC_LINKPATH_SHL="-rpath "
         fi
	 ;;

         *)
         # Unknown, ignore
         ;;
        esac
	if test -n "$FC_SHL" ; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compile with $FC_SHL and link using path argument $FC_LINKPATH_SHL" >&5
$as_echo "Compile with $FC_SHL and link using path argument $FC_LINKPATH_SHL" >&6; }
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine how to link Fortran 90 compiler with shared libraries" >&5
$as_echo "$as_me: WARNING: Unable to determine how to link Fortran 90 compiler with shared libraries" >&2;}
 	    FC_SHL=false
	fi
    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 pathCC
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CXX="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$CXX" && break
done

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

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


	if test -z "${pac_save_CXXFLAGS_nesting}" ; then
	   pac_save_CXXFLAGS_nesting=0
	fi
	eval pac_save_CXXFLAGS_${pac_save_CXXFLAGS_nesting}='"$CXXFLAGS"'
	pac_save_CXXFLAGS_nesting=`expr ${pac_save_CXXFLAGS_nesting} + 1`

	ac_ext=cpp
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 -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ icpc pgCC xlC pathCC 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ icpc pgCC xlC pathCC 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

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

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

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_compiler_gnu=yes
else
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_prog_cxx_g=yes
else
  CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
$as_echo "$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
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


	pac_save_CXXFLAGS_nesting=`expr ${pac_save_CXXFLAGS_nesting} - 1`
	eval CXXFLAGS="\$pac_save_CXXFLAGS_${pac_save_CXXFLAGS_nesting}"
	eval pac_save_CXXFLAGS_${pac_save_CXXFLAGS_nesting}=""


    # Another bug in autoconf.  The checks for the C++ compiler do not
    # ensure that you can link a program that is built with the C++
    # compiler.  We've seen this error with gcc and icc, particularly
    # when those compilers accept C++ language elements but are unable
    # to link programs that are really C++.  For that reason,
    # we've added a test to see if the C++ compiler can produce
    # an executable.

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler $CXX can build an executable" >&5
$as_echo_n "checking whether the C++ compiler $CXX can build an executable... " >&6; }
if test "${pac_cv_cxx_builds_exe+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


 ac_ext=cpp
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

class mytest {
  int a;
public:
  mytest(void) : a(1) {}
  ~mytest(void) {}
};
int
main ()
{
mytest a;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  pac_cv_cxx_builds_exe=yes
else
  ac_cv_builds_exe=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cxx_builds_exe" >&5
$as_echo "$pac_cv_cxx_builds_exe" >&6; }
    if test "$pac_cv_cxx_builds_exe" != yes ; then
        as_fn_error $? "Aborting because C++ compiler does not work.  If you do not need a C++ compiler, configure with --disable-cxx" "$LINENO" 5
    fi
    # Recent failures have come when a standard header is loaded
    # The Intel icpc 10.x compiler fails with <string> if gcc 4.2 is installed.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler works with string" >&5
$as_echo_n "checking whether C++ compiler works with string... " >&6; }
if test "${pac_cv_cxx_compiles_string+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


    ac_ext=cpp
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string>
int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  pac_cv_cxx_compiles_string=yes
else
  pac_cv_cxx_compiles_string=no
fi
rm -f core 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cxx_compiles_string" >&5
$as_echo "$pac_cv_cxx_compiles_string" >&6; }
    if test "$pac_cv_cxx_compiles_string" != yes ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C++ compiler $CXX cannot compile a program containing the <string> header - this may indicate a problem with the C++ installation.  Consider configuing with --disable-cxx" >&5
$as_echo "$as_me: WARNING: The C++ compiler $CXX cannot compile a program containing the <string> header - this may indicate a problem with the C++ installation.  Consider configuing with --disable-cxx" >&2;}
    fi

    ac_ext=cpp
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

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

 ac_ext=cpp
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
try { throw  1; } catch (int i) { return i; }
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_cxx_exceptions=yes
else
  ac_cv_cxx_exceptions=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cpp
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_exceptions" >&5
$as_echo "$ac_cv_cxx_exceptions" >&6; }
if test "$ac_cv_cxx_exceptions" = yes; then

$as_echo "#define HAVE_CXX_EXCEPTIONS /**/" >>confdefs.h

fi

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

 ac_ext=cpp
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_cxx_bool=yes
else
  ac_cv_cxx_bool=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cpp
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_bool" >&5
$as_echo "$ac_cv_cxx_bool" >&6; }
if test "$ac_cv_cxx_bool" != yes; then

$as_echo "#define bool int" >>confdefs.h

fi

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

 ac_ext=cpp
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
namespace Outer { namespace Inner { int i = 0; }}
int
main ()
{
using namespace Outer::Inner; return i;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_cxx_namespaces=yes
else
  ac_cv_cxx_namespaces=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=cpp
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespaces" >&5
$as_echo "$ac_cv_cxx_namespaces" >&6; }
if test "$ac_cv_cxx_namespaces" = yes; then

$as_echo "#define HAVE_NAMESPACES /**/" >>confdefs.h

fi

    if test "$ac_cv_cxx_namespaces" != "yes" ; then
        as_fn_error $? "Namespaces are required for the MPI C++ interface" "$LINENO" 5
    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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <iostream> available" >&5
$as_echo_n "checking whether <iostream> available... " >&6; }
if test "${pac_cv_cxx_has_iostream+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <iostream>

int
main ()
{
using namespace std;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  pac_cv_cxx_has_iostream=yes
else
  pac_cv_cxx_has_iostream=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cxx_has_iostream" >&5
$as_echo "$pac_cv_cxx_has_iostream" >&6; }
    if test "$pac_cv_cxx_has_iostream" = yes ; then
        CXX_DEFS="$CXX_DEFS -DHAVE_CXX_IOSTREAM"
    fi

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

   ac_ext=cpp
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <iostream>
using namespace std;
int
main ()
{
cout << "message\n";
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  ac_cv_cxx_namespace_std=yes
else
  ac_cv_cxx_namespace_std=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_ext=cpp
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespace_std" >&5
$as_echo "$ac_cv_cxx_namespace_std" >&6; }
if test "$ac_cv_cxx_namespace_std" = yes; then

$as_echo "#define HAVE_NAMESPACE_STD /**/" >>confdefs.h

fi

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

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

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

#include <math>

int
main ()
{
using namespace std;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
  pac_cv_cxx_has_math=yes
else
  pac_cv_cxx_has_math=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cxx_has_math" >&5
$as_echo "$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 -dynamiclib -undefined suppress -single_module -flat_namespace"
        CXX_LINKPATH_SHL=""
	;;
	gcc)
        # Assume that the compiler is g++ if gcc style shared libraries chosen
        CXX_SHL="$CXX -shared -fPIC"
	if test "$enable_rpath" = yes ; then
            CXX_LINKPATH_SHL="-Wl,-rpath -Wl,"
        fi
	;;
	cygwin|cygwin-gcc)
        CXX_SHL="$CXX -shared"
        CXX_LINKPATH_SHL=""
	;;
	solaris|solaris-cc)
        CXX_SHL="$CXX -xcode=pic32"
	if test "$enable_rpath" = yes ; then
            CXX_LINKPATH_SHL=-R
        fi
	;;
	libtool)
	CXX_SHL='${LIBTOOL} --mode=compile ${CXX}'
        if test "$enable_rpath" = yes ; then
	    CXX_LINKPATH_SHL="-rpath "
        fi
	;;
	*)
	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.  By default, we set the GNU version to 0.
    # In a cross-compiling environment, these can be set with environment
    # variables, either directly or through the standard "CROSS" variable.
    if test -z "$GNUCXX_VERSION" ; then
        if test -n "$CROSS_GNUCXX_VERSION" ; then
	     GNUCXX_VERSION=$CROSS_GNUCXX_VERSION
        else
             GNUCXX_VERSION=0
        fi
    fi
    if test -z "$GNUCXX_MINORVERSION" ; then
	if test -n "$CROSS_GNUCXX_MINORVERSION" ; then
	     GNUCXX_MINORVERSION=$CROSS_GNUCXX_MINORVERSION
       	else
             GNUCXX_MINORVERSION=0
        fi
    fi
    if test "$cross_compiling" = "no" -a "$ac_compiler_gnu" = "yes" -a \
       "$GNUCXX_VERSION" = 0 -a "$GNUCXX_MINORVERSION" = 0 ; then
         ac_vals=""
	 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU g++ version" >&5
$as_echo_n "checking for GNU g++ version... " >&6; }
         if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_cxx_try_run "$LINENO"; then :
  ac_vals=`cat conftest.out`
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam 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/'`
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $v . $m" >&5
$as_echo "$v . $m" >&6; }
             GNUCXX_VERSION=$v
             GNUCXX_MINORVERSION=$m
         else
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
         fi
    fi



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

$as_echo "#define HAVE_CXX_BINDING 1" >>confdefs.h

    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

if test "$enable_cxx" = yes; then
    # Check if $MPI_DEFAULT_CXXOPTS is valid with $CXX
    if test "$enable_default_optimize" = "yes" \
         -a -n "$MPI_DEFAULT_CXXOPTS" ; then
        if test "$enable_check_compiler_flags" = "yes" ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts option $MPI_DEFAULT_CXXOPTS" >&5
$as_echo_n "checking whether C++ compiler accepts option $MPI_DEFAULT_CXXOPTS... " >&6; }
pac_opt="$MPI_DEFAULT_CXXOPTS"
ac_ext=cpp
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

CXXFLAGS_orig="$CXXFLAGS"
CXXFLAGS_opt="$pac_opt $CXXFLAGS"
pac_result="unknown"

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
CXXFLAGS="$CXXFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_cxx_try_link "$LINENO"; then :


    CXXFLAGS="$CXXFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_cxx_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext

if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    CXXFLAGS="$CXXFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


            int foo(void);
            int foo(void){return 0;}


_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        CXXFLAGS="$CXXFLAGS_opt"
        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test2.log pac_test4.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test2.log pac_test4.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test2.log pac_test4.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log
fi
rm -f pac_test1.log pac_test2.log

CXXFLAGS="$CXXFLAGS_orig"
if test "$pac_result" = "yes" ; then

            CXXFLAGS="$CXXFLAGS $MPI_DEFAULT_CXXOPTS"

else
     :
fi
ac_ext=cpp
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


        else
            CXXFLAGS="$CXXFLAGS $MPI_DEFAULT_CXXOPTS"
        fi
    fi
fi

# Copy the mpicxx.h file to the main include directory
# Move a working version of the mpicxx script to the bin directory
ac_config_commands="$ac_config_commands default-3"



# Bindings dirs is used for the installation target

#
# ----------------------------------------------------------------------------
# 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PERL+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
PERL=$ac_cv_path_PERL
if test -n "$PERL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
$as_echo "$PERL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_AR="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$AR" && break
done

if test -z "$AR" ; then
    as_fn_error $? "The program ar is required for building MPICH2.  Make sure that your path includes ar" "$LINENO" 5
fi

# AR_FLAGS provides a way to potentially improve build performance on Mac OSX
AR_FLAGS=cr
# this logic is lame, should really write a real test at some point
case $host in #(
  # Barry proposes AR_FLAGS="Scq" in trac#754, but that won't work correctly for re-builds
    *-*-darwin*) :
    AR_FLAGS=Scr
 ;; #(
  *) :
     ;;
esac
 # causes AC_SUBST too

# 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_RANLIB="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


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


# Check for the killall program; this can be used in some of the tests
# in test/commands
for ac_prog in killall
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_KILLALL+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$KILLALL"; then
  ac_cv_prog_KILLALL="$KILLALL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_KILLALL="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
KILLALL=$ac_cv_prog_KILLALL
if test -n "$KILLALL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILLALL" >&5
$as_echo "$KILLALL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


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


# Does xargs need the -r option to handle the case where the input
# is empty (gnu utils do, Mac OSX does not accept -r)
xargs_out=`echo "" | xargs ls | wc -l | sed -e 's/ //g'`
if test "$xargs_out" != "0" ; then
    XARGS_NODATA_OPT=-r
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.
# Reject install programs that cannot install multiple files.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
	    rm -rf conftest.one conftest.two conftest.dir
	    echo one > conftest.one
	    echo two > conftest.two
	    mkdir conftest.dir
	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
	      test -s conftest.one && test -s conftest.two &&
	      test -s conftest.dir/conftest.one &&
	      test -s conftest.dir/conftest.two
	    then
	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
	      break 3
	    fi
	  fi
	fi
      done
    done
    ;;
esac

  done
IFS=$as_save_IFS

rm -rf conftest.one conftest.two conftest.dir

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.  Don't cache a
    # value for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    INSTALL=$ac_install_sh
  fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
$as_echo "$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
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: No install program available" >&5
$as_echo "No install program available" >&6; }
else
    # first make any "confdb/install-sh -c" into an absolute path
    # this is a hack, but it's still much cleaner than anything else I could
    # come up with (see tt#1007) [goodell@]
    case "$INSTALL" in #(
  /*) :
    : ;; #(
  *install-sh*) :
    INSTALL="$master_top_srcdir/$INSTALL" ;; #(
  *) :
     ;;
esac

    # Check that this install really works
    rm -f conftest
    echo "Test file" > conftest
    if test ! -d .conftest ; then mkdir .conftest ; fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether install works" >&5
$as_echo_n "checking whether install works... " >&6; }
    if $INSTALL conftest .conftest >/dev/null 2>&1 ; then
        installOk=yes
    else
        installOk=no
    fi
    rm -rf .conftest conftest
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $installOk" >&5
$as_echo "$installOk" >&6; }
    if test "$installOk" = no ; then
        if test -n "$ac_install_sh" ; then
            INSTALL=$ac_install_sh
        else
	    as_fn_error $? "Unable to find working install" "$LINENO" 5
        fi
    fi
fi

#
# On Mac OS/X, install breaks libraries unless used with the -p switch
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
$as_echo "$RANLIB" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    RANLIB=$ac_ct_RANLIB
  fi
else
  RANLIB="$ac_cv_prog_RANLIB"
fi


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




ac_cv_prog_install_breaks_libs=yes

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

     int foo(int); int foo(int a){return a;}

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    if ${AR-ar} ${AR_FLAGS-cr} libconftest.a conftest.$OBJEXT >/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
                saved_LIBS="$LIBS"
                LIBS="libconftest1.a"
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


extern int foo(int);
int main(int argc, char **argv){ return foo(0); }


_ACEOF
if ac_fn_c_try_link "$LINENO"; 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 ac_fn_c_try_link "$LINENO"; then :

                            # Success!  Install works
                            ac_cv_prog_install_breaks_libs="no, with -p"

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
                    fi

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
                LIBS="$saved_LIBS"
            fi
        fi
    fi

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
rm -f libconftest*.a

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_install_breaks_libs" >&5
$as_echo "$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.

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir -p works" >&5
$as_echo_n "checking whether mkdir -p works... " >&6; }
if test "${pac_cv_mkdir_p+set}" = set; then :
  $as_echo_n "(cached) " >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_mkdir_p" >&5
$as_echo "$pac_cv_mkdir_p" >&6; }
if test "$pac_cv_mkdir_p" = "yes" ; then
   MKDIR_P="mkdir -p"
   export MKDIR_P
else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mkdir -p does not work; the install step may fail" >&5
$as_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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_MAKE+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_MAKE="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


  test -n "$MAKE" && break
done

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clock skew breaks make" >&5
$as_echo_n "checking whether clock skew breaks make... " >&6; }
if test "${pac_cv_prog_make_found_clock_skew+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
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
# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
rm -f conftest*

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_make_found_clock_skew" >&5
$as_echo "$pac_cv_prog_make_found_clock_skew" >&6; }
if test "$pac_cv_prog_make_found_clock_skew" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Clock skew found by make.  The configure and build may fail.
Consider building in a local instead of NFS filesystem." >&5
$as_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


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


# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
rm -f conftest
cat > conftest <<.
ALL:
	@echo "success"
.
cat > conftest1 <<.
include conftest
.
pac_str=`$MAKE -f conftest1 2>&1`
# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_make_include" >&5
$as_echo "$pac_cv_prog_make_include" >&6; }
if test "$pac_cv_prog_make_include" = "no" ; then
    :
else
    :
fi


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


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



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for virtual path format" >&5
$as_echo_n "checking for virtual path format... " >&6; }
if test "${pac_cv_prog_make_vpath+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
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
# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
rm -rf conftest*

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_make_vpath" >&5
$as_echo "$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



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make sets CFLAGS" >&5
$as_echo_n "checking whether make sets CFLAGS... " >&6; }
if test "${pac_cv_prog_make_set_cflags+set}" = set; then :
  $as_echo_n "(cached) " >&6
else


# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
rm -f conftest
cat > conftest <<EOF
SHELL=/bin/sh
ALL:
	@echo X\${CFLAGS}X
EOF
pac_str=`$MAKE -f conftest 2>&1`
# This is needed for Mac OSX 10.5
rm -rf conftest.dSYM
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_make_set_cflags" >&5
$as_echo "$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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
	@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
  *@@@%%%=?*=@@@%%%*)
    eval ac_cv_prog_make_${ac_make}_set=yes;;
  *)
    eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
  SET_MAKE=
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_BASH_SHELL+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  case $BASH_SHELL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASH_SHELL="$BASH_SHELL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_BASH_SHELL="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
BASH_SHELL=$ac_cv_path_BASH_SHELL
if test -n "$BASH_SHELL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_SHELL" >&5
$as_echo "$BASH_SHELL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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_SHELL" ; then
    cat >>conftest <<EOF
#! $BASH_SHELL
A[0]="b"
A[1]="c"
rc=1
if test \${A[1]} != "c" ; then rc=2 ; else rc=0 ; fi
exit \$rc
EOF
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $BASH_SHELL supports arrays" >&5
$as_echo_n "checking whether $BASH_SHELL supports arrays... " >&6; }
    chmod +x conftest
    if ./conftest 2>&1 >/dev/null ; then
        bashWorks=yes
    else
        bashWorks=no
    fi
    rm -f conftest*
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bashWorks" >&5
$as_echo "$bashWorks" >&6; }
fi
BUILD_BASH_SCRIPTS=no
if test "$bashWorks" = yes ; then
    BUILD_BASH_SCRIPTS=yes
fi


# ----------------------------------------------------------------------------
# Check for the routines and libraries needed for accessing dynamically
# loaded libraries.
# This is very approximate for now; it is enough to allow use to experiment
# with this feature under Linux.
# ----------------------------------------------------------------------------
BUILD_DLLS=no
if test "$enable_dynamiclibs" = "yes" ; then
    # 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 :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


for ac_header in dlfcn.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_DLFCN_H 1
_ACEOF

fi

done

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; }
if test "${ac_cv_search_dlopen+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' dl; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_dlopen=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_dlopen+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_dlopen+set}" = set; then :

else
  ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
$as_echo "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

    for ac_func in dlopen dlsym
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

    if test "$ac_cv_func_dlopen" = yes -a \
            "$ac_cv_func_dlsym"  = yes -a \
	    "$ac_cv_header_dlfcn_h" = yes ; then

$as_echo "#define USE_DYNAMIC_LIBRARIES 1" >>confdefs.h

	if test "$enable_sharedlibs" = no -o "$enable_sharedlibs" = none -o \
	   -z "$enable_sharedlibs" ; then
            as_fn_error $? "You must specify --enable-sharedlibs=type when building with dynamic libraries" "$LINENO" 5
        fi
    fi


    # Let the DLL code know where we plan to install the libraries.
    # This will make it easier for the user, who may not need
    # to set a search path for the library.
    savePrefix=$prefix
    saveExecprefix=$exec_prefix
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    test "x$exec_prefix" = xNONE && exec_prefix=$prefix
    eval MPICH2_LIBDIR=$libdir
    prefix=$savePrefix
    exec_prefix=$saveExecprefix
    MPICH2_LIBDIR='"'$MPICH2_LIBDIR'"'

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

fi

# 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
     osx-gcc)
         # By default OSX doesn't resolve symbols in dynamic libraries the same
         # way that Linux does, especially in the presence of a mixture of
         # static and dynamic.  If we have a dynamic lib "libA.dylib" that needs
         # a symbol "foo" from a static lib "libB.a" and we build a program with
         # a command like "$CC main.o -lA -lB" then we will get a linking
         # error at *runtime* that looks like this:
         #
         # -------8<-------
         # dyld: lazy symbol binding failed: Symbol not found: _foo
         #   Referenced from: /path/to/lib/libA.dylib
         #   Expected in: flat namespace
         # -------8<-------
         #
         # There might be a better solution for this, but what I've found seems
         # to work so far is to force the OSX static linker to use a "flat
         # namespace" model instead of the default "two-level namespace" model.
         # See the ld(1) and dyld(1) man pages, as well as this Apple document:
         #
         # http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Conceptual/MachOTopics/1-Articles/executing_files.html
         #
         # The alternative solution is to avoid our mixture of static and
         # dynamic libraries altogether and make sure that we provide all
         # dynamic libs for all libraries (including MPL and OPA).
         #
         # [goodell@ 2010-02-09]


	if echo "$LDFLAGS" | $FGREP -e '-Wl,-flat_namespace' >/dev/null 2>&1; then :
  echo "LDFLAGS(='$LDFLAGS') contains '-Wl,-flat_namespace', not appending" >&5
else
  echo "LDFLAGS(='$LDFLAGS') does not contain '-Wl,-flat_namespace', appending" >&5
		LDFLAGS="$LDFLAGS -Wl,-flat_namespace"

fi

     ;;
     cygwin-gcc)
	if test "$PMPILIBNAME_set" = "no" ; then
            # Rename PMPILIBNAME
            PMPILIBNAME=$MPILIBNAME
        else
            if test "$PMPILIBNAME" != "$MPILIBNAME" ; then
                as_fn_error $? "The PMPI and MPI libraries must have the same name when building shared libraries of type $ENABLE_SHLIB" "$LINENO" 5
            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 SHLIB_EXT
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"
	DBG_SHLIB_TYPE=$ENABLE_SHLIB
   else
        # Try to determine how to build the tv shared library
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: for how to build shared library for debugger interface" >&5
$as_echo "for how to build shared library for debugger interface" >&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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_pac_prog+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_pac_prog="yes"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_prog" >&5
$as_echo "$pac_prog" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    # If we are gcc but OS X, set the special type
    # We need a similar setting for cygwin
    if test "$pac_prog" = yes ; then
        osname=`uname -s`
    	case $osname in
             *Darwin*|*darwin*) pac_kinds=gcc-osx
             ;;
	     *) pac_kinds=gcc
	     ;;
	esac
    fi
    pac_prog=""
    # Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_pac_prog+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_pac_prog="yes"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  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
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_prog" >&5
$as_echo "$pac_prog" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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'
    # Make sure we select the correct fpic option

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts option -fPIC" >&5
$as_echo_n "checking whether C compiler accepts option -fPIC... " >&6; }
pac_opt="-fPIC"
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

CFLAGS_orig="$CFLAGS"
CFLAGS_opt="$pac_opt $CFLAGS"
pac_result="unknown"

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
CFLAGS="$CFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :


    CFLAGS="$CFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext

# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option
# even though it doesn't support it.  However, when another warning is
# triggered, it gives an error that the option is not recognized.  So we
# need to test with a conftest file that will generate warnings.
#
# add an extra switch, pac_c_check_compiler_option_invalidprototest, to
# disable this test just in case some new compiler does not like it.
#
# Linking with a program with an invalid prototype to ensure a compiler warning.

if test "$pac_result" = "yes" \
     -a "$pac_c_check_compiler_option_prototest" != "no" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler option -fPIC works with an invalid prototype program" >&5
$as_echo_n "checking whether C compiler option -fPIC works with an invalid prototype program... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        void main(){ return 0; }

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_result=yes
else
  pac_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
fi
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    CFLAGS="$CFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


            int foo(void);
            int foo(void){return 0;}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


            CFLAGS="$CFLAGS_opt"
            rm -f pac_test5.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test5.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test4.log pac_test5.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test4.log pac_test5.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test4.log pac_test5.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


                pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log pac_test5.log
fi
rm -f pac_test1.log pac_test2.log

CFLAGS="$CFLAGS_orig"
if test "$pac_result" = "yes" ; then
     fPIC_OK=yes
else
     fPIC_OK=no
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


    if test "$fPIC_OK" != yes ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts option -fpic" >&5
$as_echo_n "checking whether C compiler accepts option -fpic... " >&6; }
pac_opt="-fpic"
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

CFLAGS_orig="$CFLAGS"
CFLAGS_opt="$pac_opt $CFLAGS"
pac_result="unknown"

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
CFLAGS="$CFLAGS_orig"
rm -f pac_test1.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test1.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :


    CFLAGS="$CFLAGS_opt"
    rm -f pac_test2.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test2.log 2>\&1|g'`"
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test1.log pac_test2.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test1.log pac_test2.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test1.log pac_test2.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


        pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


    pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
rm -f conftest.$ac_ext

# gcc 4.2.4 on 32-bit does not complain about the -Wno-type-limits option
# even though it doesn't support it.  However, when another warning is
# triggered, it gives an error that the option is not recognized.  So we
# need to test with a conftest file that will generate warnings.
#
# add an extra switch, pac_c_check_compiler_option_invalidprototest, to
# disable this test just in case some new compiler does not like it.
#
# Linking with a program with an invalid prototype to ensure a compiler warning.

if test "$pac_result" = "yes" \
     -a "$pac_c_check_compiler_option_prototest" != "no" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler option -fpic works with an invalid prototype program" >&5
$as_echo_n "checking whether C compiler option -fpic works with an invalid prototype program... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        void main(){ return 0; }

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_result=yes
else
  pac_result=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
fi
#
if test "$pac_result" = "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt" >&5
$as_echo_n "checking whether routines compiled with $pac_opt can be linked with ones compiled without $pac_opt... " >&6; }
    pac_result=unknown
    CFLAGS="$CFLAGS_orig"
    rm -f pac_test3.log


# START of PUSHVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level + 1`

else

    pac_stk_ac_compile_level=0

fi
eval "pac_stk_ac_compile_$pac_stk_ac_compile_level=\$ac_compile"
if test "x$pac_stk_ac_compile_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level


fi


eval pac_LastSavedValueOf_ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level



# END of PUSHVAL

ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> pac_test3.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


            int foo(void);
            int foo(void){return 0;}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :



{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        saved_LIBS="$LIBS"
        LIBS="pac_conftest.$OBJEXT $LIBS"

        rm -f pac_test4.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test4.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :


            CFLAGS="$CFLAGS_opt"
            rm -f pac_test5.log


# START of PUSHVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level + 1`

else

    pac_stk_ac_link_level=0

fi
eval "pac_stk_ac_link_$pac_stk_ac_link_level=\$ac_link"
if test "x$pac_stk_ac_link_level" = x""0; then :


eval pac_FirstSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level


fi


eval pac_LastSavedValueOf_ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level



# END of PUSHVAL

ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> pac_test5.log 2>\&1|g'`"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :



pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_test4.log pac_test5.log > $pac_TESTLOG" >&5
  (eval diff -b pac_test4.log pac_test5.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :


    pac_result=yes


else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_test4.log pac_test5.log :" >&5
    cat $pac_TESTLOG >&5
    pac_result=no




fi

rm -f $pac_TESTLOG



else


                pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL




else


            pac_result=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

# START of POPVAL

if test "${pac_stk_ac_link_level+set}" = set; then :

    if test "x$pac_stk_ac_link_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_link\"" >&2;}

else


eval ac_link=\$pac_stk_ac_link_$pac_stk_ac_link_level

                        pac_stk_ac_link_level=`expr $pac_stk_ac_link_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_link\"" >&2;}

fi

# END of POPVAL


        LIBS="$saved_LIBS"
        rm -f pac_conftest.$OBJEXT


else


        pac_result=no


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

# START of POPVAL

if test "${pac_stk_ac_compile_level+set}" = set; then :

    if test "x$pac_stk_ac_compile_level" = x""-1; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Imbalance of PUSHVAL/POPVAL of ac_compile\"" >&2;}

else


eval ac_compile=\$pac_stk_ac_compile_$pac_stk_ac_compile_level

                        pac_stk_ac_compile_level=`expr $pac_stk_ac_compile_level - 1`

fi

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&5
$as_echo "$as_me: WARNING: \"Uninitialized PUSHVAL/POPVAL of ac_compile\"" >&2;}

fi

# END of POPVAL


    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result" >&5
$as_echo "$pac_result" >&6; }
    rm -f pac_test3.log pac_test4.log pac_test5.log
fi
rm -f pac_test1.log pac_test2.log

CFLAGS="$CFLAGS_orig"
if test "$pac_result" = "yes" ; then
     fpic_ok=yes
else
     fpic_ok=no
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


        if test "$fpic_ok" != yes ; then
	     as_fn_error $? "Neither -fpic nor -fPIC accepted by $CC" "$LINENO" 5
        else
	     pac_cc_sharedlibs="$pac_cc_sharedlibs -fpic"
        fi
    else
        pac_cc_sharedlibs="$pac_cc_sharedlibs -fPIC"
    fi
    pac_clink_sharedlibs='gcc -shared'
    pac_type_sharedlibs=gcc
    ;;
    gcc-osx|osx-gcc)
    pac_clink_sharedlibs='${CC} -dynamiclib -undefined suppress -single_module -flat_namespace'
    pac_cc_sharedlibs='${CC} -fPIC'
    pac_type_sharedlibs=gcc-osx
    ;;
    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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LIBTOOL+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_LIBTOOL="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

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


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

    if test "$LIBTOOL" = "false" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find libtool" >&5
$as_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}'
	pac_type_sharedlibs=libtool
    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
DBG_SHLIB_TYPE=$pac_type_sharedlibs


# Not all systems use .so as the extension for shared libraries (cygwin
# and OSX are two important examples).  If we did not set the SHLIB_EXT,
# then try and determine it.  We need this to properly implement
# clean steps that look for libfoo.$SHLIB_EXT .
if test "$SHLIB_EXT" = "unknown" ; then
    osname=`uname -s`
    case $osname in
        *Darwin*|*darwin*) SHLIB_EXT=dylib
        ;;
        *CYGWIN*|*cygwin*) SHLIB_EXT=dll
        ;;
	*Linux*|*LINUX*|*SunOS*) SHLIB_EXT=so
	;;
   esac
fi

	if test "$SHLIB_EXT" = "unknown" ; then
	    # Guess that the extension is .so
	    SHLIB_EXT=so
	fi
	if test "$CC_SHL_DBG" = true ; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5
$as_echo "none found" >&6; }
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Debugger support requires shared libraries" >&5
$as_echo "$as_me: WARNING: Debugger support requires shared libraries" >&2;}
	else
	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Use this to build the debugger shared library: $CC_SHL_DBG" >&5
$as_echo "Use this to build the debugger shared library: $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
       { $as_echo "$as_me:${as_lineno-$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
$as_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




    # The debugger library name cannot be set until we know the extension
    # of shared libraries - the name is so on most Unix system, dylib on OS X.
    debugger_dir=debugger

$as_echo "#define HAVE_DEBUGGER_SUPPORT 1" >>confdefs.h

    # 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
    ##ENVVAR: MPICH_DEBUGLIBNAME - Set this environment variable to
    ## override the default name of the debugger support library.
    ## The default name is libtvmpich2.$SHLIB_EXT (e.g., libtvmpich2.so for
    ## most Unix versions, libtvmpich2.dylib for Mac OSX).
    ##ENVVAR END:
    if test -z "$MPICH_DEBUGLIBNAME" ; then
        DEBUGLIBNAME=libtvmpich2.$SHLIB_EXT
    else
        DEBUGLIBNAME=$MPICH_DEBUGLIBNAME
    fi
    if test "x$exec_prefix" = xNONE ; then
        saveExecPrefix=$exec_prefix
	exec_prefix=$prefix
        eval dlldir=$libdir/$DEBUGLIBNAME
	exec_prefix=$saveExecPrefix
    else
        eval dlldir=$libdir/$DEBUGLIBNAME
    fi
    dlldir='"'$dlldir'"'

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

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) ;;
    # Removed ldap namepublisher hook - we no longer support or distribute
    # the ldap-based name server
    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


$as_echo "#define USE_FILE_FOR_NAMEPUB 1" >>confdefs.h

    ;;

    mpd)
    nameserv_name="mpd"
    # The mpd nameserver is specific to the mpd process manager
    foundMPD=no
    for pm_name in $pm_names ; do
        if test "$pm_name" = "mpd" ; then
	    foundMPD=yes
	    break
	fi
    done
    if test "$foundMPD" = no ; then
        as_fn_error $? "The mpd nameserver requires the mpd process manager" "$LINENO" 5
    fi
    ;;

    *)
    # 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
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown name publisher $with_namepublisher" >&5
$as_echo "$as_me: WARNING: Unknown name publisher $with_namepublisher" >&2;}
    fi
    ;;
    esac
fi
if test -n "$nameserv_name" ; then

$as_echo "#define HAVE_NAMEPUB_SERVICE 1" >>confdefs.h

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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_DOCTEXT+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_DOCTEXT="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_DOCTEXT" && ac_cv_path_DOCTEXT="false"
  ;;
esac
fi
DOCTEXT=$ac_cv_path_DOCTEXT
if test -n "$DOCTEXT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCTEXT" >&5
$as_echo "$DOCTEXT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


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



# ----------------------------------------------------------------------------
# Check for C compiler characteristics
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if test "${ac_cv_c_const+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 cs;
  /* SunOS 4.1.1 cc rejects this.  */
  char const *const *pcpcc;
  char **ppc;
  /* 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";
  pcpcc = &g + (g ? g-g : 0);
  /* HPUX 7.0 cc rejects these. */
  ++pcpcc;
  ppc = (char**) pcpcc;
  pcpcc = (char const *const *) ppc;
  { /* SCO 3.2v4 cc rejects this.  */
    char *t;
    char const *s = 0 ? (char *) 0 : (char const *) 0;

    *t++ = 0;
    if (s) return 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;
    if (!foo) return 0;
  }
  return !cs[0] && !zero.x;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_const=yes
else
  ac_cv_c_const=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then

$as_echo "#define const /**/" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
$as_echo_n "checking for working volatile... " >&6; }
if test "${ac_cv_c_volatile+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

volatile int x;
int * volatile y = (int *) 0;
return !x && !y;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_volatile=yes
else
  ac_cv_c_volatile=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
$as_echo "$ac_cv_c_volatile" >&6; }
if test $ac_cv_c_volatile = no; then

$as_echo "#define volatile /**/" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
if test "${ac_cv_c_restrict+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_restrict=no
   # The order here caters to the fact that C++ does not require restrict.
   for ac_kw in __restrict __restrict__ _Restrict restrict; do
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
typedef int * int_ptr;
	int foo (int_ptr $ac_kw ip) {
	return ip[0];
       }
int
main ()
{
int s[1];
	int * $ac_kw t = s;
	t[0] = 0;
	return foo(t)
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_restrict=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     test "$ac_cv_c_restrict" != no && break
   done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
$as_echo "$ac_cv_c_restrict" >&6; }

 case $ac_cv_c_restrict in
   restrict) ;;
   no) $as_echo "#define restrict /**/" >>confdefs.h
 ;;
   *)  cat >>confdefs.h <<_ACEOF
#define restrict $ac_cv_c_restrict
_ACEOF
 ;;
 esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
if test "${ac_cv_c_inline+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_inline=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  test "$ac_cv_c_inline" != no && break
done

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
$as_echo "$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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__ allowed" >&5
$as_echo_n "checking whether __attribute__ allowed... " >&6; }
if test "${pac_cv_gnu_attr_pure+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int foo(int) __attribute__ ((pure));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_gnu_attr_pure=yes
else
  pac_cv_gnu_attr_pure=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_gnu_attr_pure" >&5
$as_echo "$pac_cv_gnu_attr_pure" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) allowed" >&5
$as_echo_n "checking whether __attribute__((format)) allowed... " >&6; }
if test "${pac_cv_gnu_attr_format+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int foo(char *,...) __attribute__ ((format(printf,1,2)));
int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_gnu_attr_format=yes
else
  pac_cv_gnu_attr_format=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_gnu_attr_format" >&5
$as_echo "$pac_cv_gnu_attr_format" >&6; }
    if test "$pac_cv_gnu_attr_pure" = "yes" -a "$pac_cv_gnu_attr_format" = "yes" ; then

$as_echo "#define HAVE_GCC_ATTRIBUTE 1" >>confdefs.h

    fi
fi

# We need to check for the endianess in order to implement the
# "external32" representations.  This defines "WORDS_BIGENDIAN when
# the system is bigendian.
# As of autoconf 2.62, this macro takes an additional argument for systems
# that can produce object files for either endianess.
# With the as-always-incompatible-with-every-version autoconf, the
# arguments for this macro *changed* in 2.62 to
# (if-bigendian,if-littleendian,unknown,universal)
# The fourth argument is new.
# Also note that the definition emitted by autoheader requires that gcc
# be used to compile the programs - other compilers may not define the
# non-standard __BIG_ENDIAN__ or __LITTLE_ENDIAN__ CPP names on which
# autoconf 2.62 now depends.
byteOrdering=unknown
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_c_bigendian=unknown
    # See if we're dealing with a universal compiler.
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifndef __APPLE_CC__
	       not a universal capable compiler
	     #endif
	     typedef int dummy;

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

	# Check for potential -arch flags.  It is not universal unless
	# there are at least two -arch flags with different values.
	ac_arch=
	ac_prev=
	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
	 if test -n "$ac_prev"; then
	   case $ac_word in
	     i?86 | x86_64 | ppc | ppc64)
	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
		 ac_arch=$ac_word
	       else
		 ac_cv_c_bigendian=universal
		 break
	       fi
	       ;;
	   esac
	   ac_prev=
	 elif test "x$ac_word" = "x-arch"; then
	   ac_prev=arch
	 fi
       done
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    if test $ac_cv_c_bigendian = unknown; then
      # See if sys/param.h defines the BYTE_ORDER macro.
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
	     #include <sys/param.h>

int
main ()
{
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
		     && LITTLE_ENDIAN)
	      bogus endian macros
	     #endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  # It does; now see whether it defined to BIG_ENDIAN or not.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
		#include <sys/param.h>

int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
		 not big endian
		#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_bigendian=yes
else
  ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
    if test $ac_cv_c_bigendian = unknown; then
      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
	      bogus endian macros
	     #endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  # It does; now see whether it defined to _BIG_ENDIAN or not.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <limits.h>

int
main ()
{
#ifndef _BIG_ENDIAN
		 not big endian
		#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_c_bigendian=yes
else
  ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
    if test $ac_cv_c_bigendian = unknown; then
      # Compile a test program.
      if test "$cross_compiling" = yes; then :
  # Try to guess by grepping values from an object file.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
short int ascii_mm[] =
		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
		short int ascii_ii[] =
		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
		int use_ascii (int i) {
		  return ascii_mm[i] + ascii_ii[i];
		}
		short int ebcdic_ii[] =
		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
		short int ebcdic_mm[] =
		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
		int use_ebcdic (int i) {
		  return ebcdic_mm[i] + ebcdic_ii[i];
		}
		extern int foo;

int
main ()
{
return use_ascii (foo) == use_ebcdic (foo);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
	      ac_cv_c_bigendian=yes
	    fi
	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
	      if test "$ac_cv_c_bigendian" = unknown; then
		ac_cv_c_bigendian=no
	      else
		# finding both strings is unlikely to happen, but who knows?
		ac_cv_c_bigendian=unknown
	      fi
	    fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

	     /* Are we little or big endian?  From Harbison&Steele.  */
	     union
	     {
	       long int l;
	       char c[sizeof (long int)];
	     } u;
	     u.l = 1;
	     return u.c[sizeof (long int) - 1] == 1;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_c_bigendian=no
else
  ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
$as_echo "$ac_cv_c_bigendian" >&6; }
 case $ac_cv_c_bigendian in #(
   yes)
     byteOrdering=big;; #(
   no)
     byteOrdering=little ;; #(
   universal)
     byteOrdering=universal
     ;; #(
   *)
     as_fn_error $? "unknown endianness
 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
 esac

case $byteOrdering in
    big)
    # Nothing to do - the c_bigendian macro takes care of it
    :
    ;;
    little)

$as_echo "#define WORDS_LITTLEENDIAN 1" >>confdefs.h

    ;;
    universal)

$as_echo "#define WORDS_UNIVERSAL_ENDIAN 1" >>confdefs.h

    ;;
    unknown)
    as_fn_error $? "Unable to determine endianess" "$LINENO" 5
    ;;
esac

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

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

if test "$cross_compiling" = yes; then :
  pac_cv_prog_c_unaligned_doubles="unknown"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_prog_c_unaligned_doubles="yes"
else
  pac_cv_prog_c_unaligned_doubles="no"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_c_unaligned_doubles" >&5
$as_echo "$pac_cv_prog_c_unaligned_doubles" >&6; }

if test "X$pac_cv_prog_c_unaligned_doubles" = "no" ; then
{ $as_echo "$as_me:${as_lineno-$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
$as_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
# Check for __func__ (defined in C99) or __FUNCTION__ (defined in older GCC)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports __func__" >&5
$as_echo_n "checking whether $CC supports __func__... " >&6; }
if test "${pac_cv_cc_has___func__+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
const char *cp = __func__;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_cc_has___func__=yes
else
  pac_cv_cc_has___func__=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cc_has___func__" >&5
$as_echo "$pac_cv_cc_has___func__" >&6; }
if test "$pac_cv_cc_has___func__" != "yes" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports __FUNCTION__" >&5
$as_echo_n "checking whether $CC supports __FUNCTION__... " >&6; }
if test "${pac_cv_cc_has___FUNCTION__+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{
const char *cp = __FUNCTION__;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_cc_has___FUNCTION__=yes
else
  pac_cv_cc_has___FUNCTION__=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cc_has___FUNCTION__" >&5
$as_echo "$pac_cv_cc_has___FUNCTION__" >&6; }
fi

# ----------------------------------------------------------------------------
# Attempt to support dependency handling
# ----------------------------------------------------------------------------
# Set a default for MAKE_DEPEND_C
MAKE_DEPEND_C=true

# Check whether --enable-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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_GCC+set}" = set; then :
  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_GCC="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
GCC=$ac_cv_prog_GCC
if test -n "$GCC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC" >&5
$as_echo "$GCC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "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
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using gcc to determine dependencies" >&5
$as_echo "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"
    ;;
    *)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $enable_dependencies for MAKE_DEPEND_C" >&5
$as_echo "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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double is supported" >&5
$as_echo_n "checking whether long double is supported... " >&6; }
if test "${pac_cv_have_long_double+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

int
main ()
{
long double a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_have_long_double=yes
else
  pac_cv_have_long_double=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_long_double" >&5
$as_echo "$pac_cv_have_long_double" >&6; }
    if test "$pac_cv_have_long_double" = "yes" ; then

$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h

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

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

int
main ()
{
long long a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_have_long_long=yes
else
  pac_cv_have_long_long=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_long_long" >&5
$as_echo "$pac_cv_have_long_long" >&6; }
    if test "$pac_cv_have_long_long" = "yes" ; then

$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h

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

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

if test "$cross_compiling" = yes; then :
  pac_cv_c_max_integer_align="$CROSS_ALIGN_STRUCT_INT"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 :)
     */
#ifdef HAVE_LONG_LONG_INT
    if (sizeof(int) < 8 && sizeof(long) < 8 && sizeof(long long int) < 8)
	is_eight = 0;
#else
    if (sizeof(int) < 8 && sizeof(long) < 8) is_eight = 0;
#endif

    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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_max_integer_align=`cat ctest.out`
else
  pac_cv_c_max_integer_align="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_max_integer_align" >&5
$as_echo "$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

$as_echo "#define HAVE_LARGEST_STRUCT_ALIGNMENT 1" >>confdefs.h

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

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

if test "$cross_compiling" = yes; then :
  pac_cv_c_max_fp_align="$CROSS_ALIGN_STRUCT_FP"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_max_fp_align=`cat ctest.out`
else
  pac_cv_c_max_fp_align="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_max_fp_align" >&5
$as_echo "$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
    as_fn_error $? "Configure detected unsupported structure alignment rules." "$LINENO" 5
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)

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

if test "$cross_compiling" = yes; then :
  pac_cv_c_max_double_fp_align="$CROSS_ALIGN_STRUCT_DOUBLE_FP"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_max_double_fp_align=`cat ctest.out`
else
  pac_cv_c_max_double_fp_align="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_max_double_fp_align" >&5
$as_echo "$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


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

if test "$cross_compiling" = yes; then :
  pac_cv_c_max_longdouble_fp_align="$CROSS_ALIGN_STRUCT_LONGDOUBLE_FP"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_max_longdouble_fp_align=`cat ctest.out`
else
  pac_cv_c_max_longdouble_fp_align="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_max_longdouble_fp_align" >&5
$as_echo "$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
        { $as_echo "$as_me:${as_lineno-$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
$as_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.

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

if test "$cross_compiling" = yes; then :
  pac_cv_c_double_pos_align="$CROSS_ALIGN_DOUBLE_POS"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_double_pos_align=`cat ctest.out`
else
  pac_cv_c_double_pos_align="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_double_pos_align" >&5
$as_echo "$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.

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

if test "$cross_compiling" = yes; then :
  pac_cv_c_llint_pos_align="$CROSS_ALIGN_LLINT_POS"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_llint_pos_align=`cat ctest.out`
else
  pac_cv_c_llint_pos_align="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_llint_pos_align" >&5
$as_echo "$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

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

if test "$cross_compiling" = yes; then :
  pac_cv_c_double_alignment_exception="$CROSS_ALIGN_DOUBLE_EXCEPTION"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_double_alignment_exception=`cat ctest.out`
else
  pac_cv_c_double_alignment_exception="unknown"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

rm -f ctest.out

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_double_alignment_exception" >&5
$as_echo "$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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alignment restrictions on pointers" >&5
$as_echo_n "checking for alignment restrictions on pointers... " >&6; }
if test "$cross_compiling" = yes; then :
  pac_cv_pointers_have_int_alignment=unknown
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_pointers_have_int_alignment=yes
else
  pac_cv_pointers_have_int_alignment=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


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

$as_echo "#define NEEDS_POINTER_ALIGNMENT_ADJUST 1" >>confdefs.h

   { $as_echo "$as_me:${as_lineno-$LINENO}: result: pointer" >&5
$as_echo "pointer" >&6; }
else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: int or better" >&5
$as_echo "int or better" >&6; }
fi

# There are further alignment checks after we test for int64_t etc. below.

# Get the size of the C types for encoding in the basic datatypes and for
# the specific-sized integers
# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
$as_echo_n "checking size of char... " >&6; }
if test "${ac_cv_sizeof_char+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_char" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (char)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_char=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
$as_echo "$ac_cv_sizeof_char" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned char" >&5
$as_echo_n "checking size of unsigned char... " >&6; }
if test "${ac_cv_sizeof_unsigned_char+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned char))" "ac_cv_sizeof_unsigned_char"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_unsigned_char" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (unsigned char)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_unsigned_char=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_char" >&5
$as_echo "$ac_cv_sizeof_unsigned_char" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
$as_echo_n "checking size of short... " >&6; }
if test "${ac_cv_sizeof_short+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_short" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_short=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
$as_echo "$ac_cv_sizeof_short" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5
$as_echo_n "checking size of unsigned short... " >&6; }
if test "${ac_cv_sizeof_unsigned_short+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_unsigned_short" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (unsigned short)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_unsigned_short=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5
$as_echo "$ac_cv_sizeof_unsigned_short" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
$as_echo_n "checking size of int... " >&6; }
if test "${ac_cv_sizeof_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
$as_echo "$ac_cv_sizeof_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5
$as_echo_n "checking size of unsigned int... " >&6; }
if test "${ac_cv_sizeof_unsigned_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_unsigned_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (unsigned int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_unsigned_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5
$as_echo "$ac_cv_sizeof_unsigned_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
$as_echo_n "checking size of long... " >&6; }
if test "${ac_cv_sizeof_long+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
$as_echo "$ac_cv_sizeof_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
$as_echo_n "checking size of unsigned long... " >&6; }
if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_unsigned_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (unsigned long)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_unsigned_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
if test "${ac_cv_sizeof_long_long+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
$as_echo "$ac_cv_sizeof_long_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
$as_echo_n "checking size of unsigned long long... " >&6; }
if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_unsigned_long_long" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (unsigned long long)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_unsigned_long_long=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
$as_echo_n "checking size of float... " >&6; }
if test "${ac_cv_sizeof_float+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_float" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (float)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_float=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
$as_echo "$ac_cv_sizeof_float" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
$as_echo_n "checking size of double... " >&6; }
if test "${ac_cv_sizeof_double+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_double" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_double=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
$as_echo "$ac_cv_sizeof_double" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
$as_echo_n "checking size of long double... " >&6; }
if test "${ac_cv_sizeof_long_double+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_long_double" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long double)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_double=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
$as_echo "$ac_cv_sizeof_long_double" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
$as_echo_n "checking size of void *... " >&6; }
if test "${ac_cv_sizeof_void_p+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_void_p" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (void *)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_void_p=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
$as_echo "$ac_cv_sizeof_void_p" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF



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

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_stdc=yes
else
  ac_cv_header_stdc=no
fi
rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.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))
      return 2;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

else
  ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

$as_echo "#define STDC_HEADERS 1" >>confdefs.h

fi

for ac_header in stddef.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
if test "x$ac_cv_header_stddef_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STDDEF_H 1
_ACEOF

fi

done

# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
$as_echo_n "checking size of wchar_t... " >&6; }
if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

"; then :

else
  if test "$ac_cv_type_wchar_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (wchar_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_wchar_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
$as_echo "$ac_cv_sizeof_wchar_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
_ACEOF



# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float_int" >&5
$as_echo_n "checking size of float_int... " >&6; }
if test "${ac_cv_sizeof_float_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float_int))" "ac_cv_sizeof_float_int"        "typedef struct { float a; int b; } float_int;
"; then :

else
  if test "$ac_cv_type_float_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (float_int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_float_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float_int" >&5
$as_echo "$ac_cv_sizeof_float_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_FLOAT_INT $ac_cv_sizeof_float_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double_int" >&5
$as_echo_n "checking size of double_int... " >&6; }
if test "${ac_cv_sizeof_double_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double_int))" "ac_cv_sizeof_double_int"        "typedef struct { double a; int b; } double_int;
"; then :

else
  if test "$ac_cv_type_double_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double_int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_double_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double_int" >&5
$as_echo "$ac_cv_sizeof_double_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE_INT $ac_cv_sizeof_double_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long_int" >&5
$as_echo_n "checking size of long_int... " >&6; }
if test "${ac_cv_sizeof_long_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long_int))" "ac_cv_sizeof_long_int"        "typedef struct { long a; int b; } long_int;
"; then :

else
  if test "$ac_cv_type_long_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long_int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
$as_echo "$ac_cv_sizeof_long_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short_int" >&5
$as_echo_n "checking size of short_int... " >&6; }
if test "${ac_cv_sizeof_short_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short_int))" "ac_cv_sizeof_short_int"        "typedef struct { short a; int b; } short_int;
"; then :

else
  if test "$ac_cv_type_short_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short_int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_short_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
$as_echo "$ac_cv_sizeof_short_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of two_int" >&5
$as_echo_n "checking size of two_int... " >&6; }
if test "${ac_cv_sizeof_two_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (two_int))" "ac_cv_sizeof_two_int"        "typedef struct { int a; int b; } two_int;
"; then :

else
  if test "$ac_cv_type_two_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (two_int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_two_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_two_int" >&5
$as_echo "$ac_cv_sizeof_two_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_TWO_INT $ac_cv_sizeof_two_int
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long_double_int" >&5
$as_echo_n "checking size of long_double_int... " >&6; }
if test "${ac_cv_sizeof_long_double_int+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long_double_int))" "ac_cv_sizeof_long_double_int"        "typedef struct { long double a; int b;} long_double_int;
"; then :

else
  if test "$ac_cv_type_long_double_int" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long_double_int)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_double_int=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double_int" >&5
$as_echo "$ac_cv_sizeof_long_double_int" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_DOUBLE_INT $ac_cv_sizeof_long_double_int
_ACEOF



# sys/bitypes.h defines the int16_t etc. on some systems (e.g., OSF1).
# Include it when testing for these types
ac_fn_c_check_header_mongrel "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_bitypes_h" = x""yes; then :
  use_bitypes="#include <sys/bitypes.h>"

$as_echo "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h

fi


# A C99 compliant compiler should have inttypes.h for fixed-size int types
for ac_header in inttypes.h stdint.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


# Check for types
ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
case $ac_cv_c_int8_t in #(
  no|yes) ;; #(
  *)

cat >>confdefs.h <<_ACEOF
#define int8_t $ac_cv_c_int8_t
_ACEOF
;;
esac

ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
case $ac_cv_c_int16_t in #(
  no|yes) ;; #(
  *)

cat >>confdefs.h <<_ACEOF
#define int16_t $ac_cv_c_int16_t
_ACEOF
;;
esac

ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
case $ac_cv_c_int32_t in #(
  no|yes) ;; #(
  *)

cat >>confdefs.h <<_ACEOF
#define int32_t $ac_cv_c_int32_t
_ACEOF
;;
esac

ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
case $ac_cv_c_int64_t in #(
  no|yes) ;; #(
  *)

cat >>confdefs.h <<_ACEOF
#define int64_t $ac_cv_c_int64_t
_ACEOF
;;
esac


# Temporary issue in autoconf integer type checking (remove when
# autoconf fixes this or provides a workaround for it)
if test "$ac_cv_c_int8_t" != no ; then

$as_echo "#define HAVE_INT8_T 1" >>confdefs.h

fi
if test "$ac_cv_c_int16_t" != no ; then

$as_echo "#define HAVE_INT16_T 1" >>confdefs.h

fi
if test "$ac_cv_c_int32_t" != no ; then

$as_echo "#define HAVE_INT32_T 1" >>confdefs.h

fi
if test "$ac_cv_c_int64_t" != no ; then

$as_echo "#define HAVE_INT64_T 1" >>confdefs.h

fi

# The following make these definitions:
#   define _UINT<n>_T 1
# if uint<n>_t is available.  E.g., define _UINT8_T as 1 if uint8_t is available
# if not available, define uint<n>_t as the related C type, e.g.,
#   define uint8_t unsigned char
#
ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
case $ac_cv_c_uint8_t in #(
  no|yes) ;; #(
  *)

$as_echo "#define _UINT8_T 1" >>confdefs.h


cat >>confdefs.h <<_ACEOF
#define uint8_t $ac_cv_c_uint8_t
_ACEOF
;;
  esac

ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
case $ac_cv_c_uint16_t in #(
  no|yes) ;; #(
  *)


cat >>confdefs.h <<_ACEOF
#define uint16_t $ac_cv_c_uint16_t
_ACEOF
;;
  esac

ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
case $ac_cv_c_uint32_t in #(
  no|yes) ;; #(
  *)

$as_echo "#define _UINT32_T 1" >>confdefs.h


cat >>confdefs.h <<_ACEOF
#define uint32_t $ac_cv_c_uint32_t
_ACEOF
;;
  esac

ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
case $ac_cv_c_uint64_t in #(
  no|yes) ;; #(
  *)

$as_echo "#define _UINT64_T 1" >>confdefs.h


cat >>confdefs.h <<_ACEOF
#define uint64_t $ac_cv_c_uint64_t
_ACEOF
;;
  esac


# Temporary issue in autoconf integer type checking (remove when
# autoconf fixes this or provides a workaround for it)
if test "$ac_cv_c_uint8_t" != no ; then

$as_echo "#define HAVE_UINT8_T 1" >>confdefs.h

fi
if test "$ac_cv_c_uint16_t" != no ; then

$as_echo "#define HAVE_UINT16_T 1" >>confdefs.h

fi
if test "$ac_cv_c_uint32_t" != no ; then

$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h

fi
if test "$ac_cv_c_uint64_t" != no ; then

$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h

fi

# Other C99 types.
for ac_header in stdbool.h complex.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
$as_echo_n "checking size of _Bool... " >&6; }
if test "${ac_cv_sizeof__Bool+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool"        "
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif

"; then :

else
  if test "$ac_cv_type__Bool" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (_Bool)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof__Bool=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
$as_echo "$ac_cv_sizeof__Bool" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF__BOOL $ac_cv_sizeof__Bool
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float _Complex" >&5
$as_echo_n "checking size of float _Complex... " >&6; }
if test "${ac_cv_sizeof_float__Complex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float _Complex))" "ac_cv_sizeof_float__Complex"        "
#ifdef HAVE_COMPLEX_H
#include <complex.h>
#endif

"; then :

else
  if test "$ac_cv_type_float__Complex" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (float _Complex)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_float__Complex=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float__Complex" >&5
$as_echo "$ac_cv_sizeof_float__Complex" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_FLOAT__COMPLEX $ac_cv_sizeof_float__Complex
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double _Complex" >&5
$as_echo_n "checking size of double _Complex... " >&6; }
if test "${ac_cv_sizeof_double__Complex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double _Complex))" "ac_cv_sizeof_double__Complex"        "
#ifdef HAVE_COMPLEX_H
#include <complex.h>
#endif

"; then :

else
  if test "$ac_cv_type_double__Complex" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double _Complex)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_double__Complex=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double__Complex" >&5
$as_echo "$ac_cv_sizeof_double__Complex" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE__COMPLEX $ac_cv_sizeof_double__Complex
_ACEOF


# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double _Complex" >&5
$as_echo_n "checking size of long double _Complex... " >&6; }
if test "${ac_cv_sizeof_long_double__Complex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double _Complex))" "ac_cv_sizeof_long_double__Complex"        "
#ifdef HAVE_COMPLEX_H
#include <complex.h>
#endif

"; then :

else
  if test "$ac_cv_type_long_double__Complex" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long double _Complex)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_long_double__Complex=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double__Complex" >&5
$as_echo "$ac_cv_sizeof_long_double__Complex" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_DOUBLE__COMPLEX $ac_cv_sizeof_long_double__Complex
_ACEOF


# we need really could just use the result of AC_CHECK_SIZEOF, but having a
# HAVE_typename macro is useful for consistency
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
if test "x$ac_cv_type__Bool" = x""yes; then :

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


fi
ac_fn_c_check_type "$LINENO" "float _Complex" "ac_cv_type_float__Complex" "$ac_includes_default"
if test "x$ac_cv_type_float__Complex" = x""yes; then :

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


fi
ac_fn_c_check_type "$LINENO" "double _Complex" "ac_cv_type_double__Complex" "$ac_includes_default"
if test "x$ac_cv_type_double__Complex" = x""yes; then :

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


fi
ac_fn_c_check_type "$LINENO" "long double _Complex" "ac_cv_type_long_double__Complex" "$ac_includes_default"
if test "x$ac_cv_type_long_double__Complex" = x""yes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_LONG_DOUBLE__COMPLEX 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 two_int long_double_int     \
    _Bool float__Complex double__Complex long_double__Complex ; 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=\$ac_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 -a \
                   $type != _Bool -a \
                   $type != float__Complex -a \
                   $type != double__Complex -a \
                   $type != long_double__Complex ; then
               as_fn_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" "$LINENO" 5
	   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
         as_fn_error $? "Type sizes greater than 255 bytes are not supported (type $type is $len bytes)" "$LINENO" 5
    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_two_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

# ----------------------------------------------------------------------------

# C99 types
# The predefined types must be distinct types (as opposed to aliases to MPI_INT
# or MPI_WHATEVER) in order to correctly support MPI_Type_{get,set}_name.
#
# FIXME the "basic id" portion should be automatically assigned.  It's too easy
# to have a conflict when this is done by hand.
#
# Because we make up a matching type for the fixed-width types if one doesn't
# exist, we don't ever set these to MPI_DATATYPE_NULL.  If we come across a
# platform where 64-bit sizes aren't supported just add a test like the other
# types.
MPI_INT8_T=0x4c000137
MPI_INT16_T=0x4c000238
MPI_INT32_T=0x4c000439
MPI_INT64_T=0x4c00083a
MPI_UINT8_T=0x4c00013b
MPI_UINT16_T=0x4c00023c
MPI_UINT32_T=0x4c00043d
MPI_UINT64_T=0x4c00083e

# The compiler may or may not support these types, depending on its level of C99
# compliance.  We check for each one individually before assigning a handle
# number.
MPI_C_BOOL=$MPI_DATATYPE_NULL
MPI_C_FLOAT_COMPLEX=$MPI_DATATYPE_NULL
MPI_C_DOUBLE_COMPLEX=$MPI_DATATYPE_NULL
MPI_C_LONG_DOUBLE_COMPLEX=$MPI_DATATYPE_NULL
if test ${len__Bool} != 0 ; then
    MPI_C_BOOL=0x4c00${len__Bool}3f
fi
if test ${len_float__Complex} != 0 ; then
    MPI_C_FLOAT_COMPLEX=0x4c00${len_float__Complex}40
fi
if test ${len_double__Complex} != 0 ; then
    MPI_C_DOUBLE_COMPLEX=0x4c00${len_double__Complex}41
fi
if test ${len_long_double__Complex} != 0 ; then
    MPI_C_LONG_DOUBLE_COMPLEX=0x4c00${len_long_double__Complex}42
fi













export MPI_INT8_T
export MPI_INT16_T
export MPI_INT32_T
export MPI_INT64_T
export MPI_UINT8_T
export MPI_UINT16_T
export MPI_UINT32_T
export MPI_UINT64_T
export MPI_C_BOOL
export MPI_C_FLOAT_COMPLEX
export MPI_C_DOUBLE_COMPLEX
export MPI_C_LONG_DOUBLE_COMPLEX


# ----------------------------------------------------------------------------
# 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:
#    STATUS_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}

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of Fortran type integer" >&5
$as_echo_n "checking for size of Fortran type integer... " >&6; }
if test "${pac_cv_f77_sizeof_integer+set}" = set; then :
  $as_echo_n "(cached) " >&6
else



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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
#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;
}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    # pac_compile_ok=yes

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # Save LIBS and prepend object file to LIBS
    saved_LIBS="$LIBS"
    LIBS="pac_conftest.$OBJEXT $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

    if test "$cross_compiling" = yes; then :

        # Use -9999 as value to emit a warning message after the cache_check.
        eval pac_cv_f77_sizeof_integer=$CROSS_F77_SIZEOF_INTEGER

else
  cat > conftest.$ac_ext <<_ACEOF


            program main
            integer a(2)
            integer irc
            irc = cisize(a(1),a(2))
            end


_ACEOF
if ac_fn_f77_try_run "$LINENO"; then :

        eval pac_cv_f77_sizeof_integer=`cat conftestval`

else

        eval pac_cv_f77_sizeof_integer=0

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
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

    LIBS="$saved_LIBS"
    # remove previously generated object file.
    rm -f pac_conftest.$OBJEXT

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to compile the C routine for finding the size of a integer" >&5
$as_echo "$as_me: WARNING: Unable to compile the C routine for finding the size of a integer" >&2;}

fi
rm -f core 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_f77_sizeof_integer" >&5
$as_echo "$pac_cv_f77_sizeof_integer" >&6; }
if test "$pac_cv_f77_sizeof_integer" = "-9999" ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No value provided for size of integer when cross-compiling" >&5
$as_echo "$as_me: WARNING: No value provided for size of integer when cross-compiling" >&2;}
fi

cat >>confdefs.h <<_ACEOF
#define SIZEOF_F77_INTEGER $pac_cv_f77_sizeof_integer
_ACEOF





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of Fortran type real" >&5
$as_echo_n "checking for size of Fortran type real... " >&6; }
if test "${pac_cv_f77_sizeof_real+set}" = set; then :
  $as_echo_n "(cached) " >&6
else



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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
#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;
}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    # pac_compile_ok=yes

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # Save LIBS and prepend object file to LIBS
    saved_LIBS="$LIBS"
    LIBS="pac_conftest.$OBJEXT $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

    if test "$cross_compiling" = yes; then :

        # Use -9999 as value to emit a warning message after the cache_check.
        eval pac_cv_f77_sizeof_real=$CROSS_F77_SIZEOF_REAL

else
  cat > conftest.$ac_ext <<_ACEOF


            program main
            real a(2)
            integer irc
            irc = cisize(a(1),a(2))
            end


_ACEOF
if ac_fn_f77_try_run "$LINENO"; then :

        eval pac_cv_f77_sizeof_real=`cat conftestval`

else

        eval pac_cv_f77_sizeof_real=0

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
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

    LIBS="$saved_LIBS"
    # remove previously generated object file.
    rm -f pac_conftest.$OBJEXT

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to compile the C routine for finding the size of a real" >&5
$as_echo "$as_me: WARNING: Unable to compile the C routine for finding the size of a real" >&2;}

fi
rm -f core 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_f77_sizeof_real" >&5
$as_echo "$pac_cv_f77_sizeof_real" >&6; }
if test "$pac_cv_f77_sizeof_real" = "-9999" ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No value provided for size of real when cross-compiling" >&5
$as_echo "$as_me: WARNING: No value provided for size of real when cross-compiling" >&2;}
fi

cat >>confdefs.h <<_ACEOF
#define SIZEOF_F77_REAL $pac_cv_f77_sizeof_real
_ACEOF





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of Fortran type double precision" >&5
$as_echo_n "checking for size of Fortran type double precision... " >&6; }
if test "${pac_cv_f77_sizeof_double_precision+set}" = set; then :
  $as_echo_n "(cached) " >&6
else



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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
#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;
}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    # pac_compile_ok=yes

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    # Save LIBS and prepend object file to LIBS
    saved_LIBS="$LIBS"
    LIBS="pac_conftest.$OBJEXT $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

    if test "$cross_compiling" = yes; then :

        # Use -9999 as value to emit a warning message after the cache_check.
        eval pac_cv_f77_sizeof_double_precision=$CROSS_F77_SIZEOF_DOUBLE_PRECISION

else
  cat > conftest.$ac_ext <<_ACEOF


            program main
            double precision a(2)
            integer irc
            irc = cisize(a(1),a(2))
            end


_ACEOF
if ac_fn_f77_try_run "$LINENO"; then :

        eval pac_cv_f77_sizeof_double_precision=`cat conftestval`

else

        eval pac_cv_f77_sizeof_double_precision=0

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
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

    LIBS="$saved_LIBS"
    # remove previously generated object file.
    rm -f pac_conftest.$OBJEXT

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to compile the C routine for finding the size of a double precision" >&5
$as_echo "$as_me: WARNING: Unable to compile the C routine for finding the size of a double precision" >&2;}

fi
rm -f core 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


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_f77_sizeof_double_precision" >&5
$as_echo "$pac_cv_f77_sizeof_double_precision" >&6; }
if test "$pac_cv_f77_sizeof_double_precision" = "-9999" ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No value provided for size of double precision when cross-compiling" >&5
$as_echo "$as_me: WARNING: No value provided for size of double precision when cross-compiling" >&2;}
fi

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.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer*1 is supported" >&5
$as_echo_n "checking whether integer*1 is supported... " >&6; }
if test "${pac_cv_fort_integer1+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      integer*1 i
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_integer1=yes
else
  pac_cv_fort_integer1=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_integer1" >&5
$as_echo "$pac_cv_fort_integer1" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer*2 is supported" >&5
$as_echo_n "checking whether integer*2 is supported... " >&6; }
if test "${pac_cv_fort_integer2+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      integer*2 i
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_integer2=yes
else
  pac_cv_fort_integer2=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_integer2" >&5
$as_echo "$pac_cv_fort_integer2" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer*4 is supported" >&5
$as_echo_n "checking whether integer*4 is supported... " >&6; }
if test "${pac_cv_fort_integer4+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      integer*4 i
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_integer4=yes
else
  pac_cv_fort_integer4=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_integer4" >&5
$as_echo "$pac_cv_fort_integer4" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer*8 is supported" >&5
$as_echo_n "checking whether integer*8 is supported... " >&6; }
if test "${pac_cv_fort_integer8+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      integer*8 i
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_integer8=yes
else
  pac_cv_fort_integer8=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_integer8" >&5
$as_echo "$pac_cv_fort_integer8" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer*16 is supported" >&5
$as_echo_n "checking whether integer*16 is supported... " >&6; }
if test "${pac_cv_fort_integer16+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      integer*16 i
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_integer16=yes
else
  pac_cv_fort_integer16=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_integer16" >&5
$as_echo "$pac_cv_fort_integer16" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether real*4 is supported" >&5
$as_echo_n "checking whether real*4 is supported... " >&6; }
if test "${pac_cv_fort_real4+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      real*4 a
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_real4=yes
else
  pac_cv_fort_real4=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_real4" >&5
$as_echo "$pac_cv_fort_real4" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether real*8 is supported" >&5
$as_echo_n "checking whether real*8 is supported... " >&6; }
if test "${pac_cv_fort_real8+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      real*8 a
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_real8=yes
else
  pac_cv_fort_real8=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_real8" >&5
$as_echo "$pac_cv_fort_real8" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether real*16 is supported" >&5
$as_echo_n "checking whether real*16 is supported... " >&6; }
if test "${pac_cv_fort_real16+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat > conftest.$ac_ext <<_ACEOF
      program main
      real*16 a
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  pac_cv_fort_real16=yes
else
  pac_cv_fort_real16=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort_real16" >&5
$as_echo "$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
        as_fn_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" "$LINENO" 5
    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
        as_fn_error $? "Type sizes greater than 255 bytes are not supported (type INTEGER is $len bytes)" "$LINENO" 5
    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
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine size of an INTEGER type; using 4" >&5
$as_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
        as_fn_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" "$LINENO" 5
    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
        as_fn_error $? "Type sizes greater than 255 bytes are not supported (type DOUBLE is $len bytes)" "$LINENO" 5
    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
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine size of a DOUBLE PRECISION type; using 8" >&5
$as_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
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine size of a DOUBLE PRECISION type; using 8" >&5
$as_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="16"
    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
        as_fn_error $? "Type sizes greater than 255 bytes are not supported (type DOUBLE COMPLEX is $len bytes)" "$LINENO" 5
    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"
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C type matching Fortran integer*$len" >&5
$as_echo_n "checking for C type matching Fortran integer*$len... " >&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
	            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $c_type" >&5
$as_echo "$c_type" >&6; }
  	            eval F77_INTEGER$len=\$"${c_type}_mpi"
	            noval="no"
	            break
                fi
            done
            if test "$noval" = "yes" ; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: unavailable" >&5
$as_echo "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"
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C type matching Fortran real*$len" >&5
$as_echo_n "checking for C type matching Fortran real*$len... " >&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
	            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $c_type" >&5
$as_echo "$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
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: unavailable" >&5
$as_echo "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
	        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failure to evaluate $value \* 16 + $char" >&5
$as_echo "$as_me: WARNING: Failure to evaluate $value \* 16 + $char" >&2;}
	    fi
        done
        #echo "$fullvar = $value"
        eval $fullvar=$value
    done












    noval="yes"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C type matching Fortran integer" >&5
$as_echo_n "checking for C type matching Fortran integer... " >&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'`
	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $c_type" >&5
$as_echo "$c_type" >&6; }
	    MPI_FINT=$c_type
	    noval="no"
	    break
        fi
    done
    if test "$noval" = "yes" ; then
        # Set a default
        MPI_FINT="int"
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: unavailable" >&5
$as_echo "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

$as_echo "#define HAVE_AINT_LARGER_THAN_FINT 1" >>confdefs.h

    fi
    if test "$ac_cv_sizeof_void_p" != 0 -a \
        "$ac_cv_sizeof_void_p" != "$pac_cv_f77_sizeof_integer" ; then

$as_echo "#define HAVE_AINT_DIFFERENT_THAN_FINT 1" >>confdefs.h

    fi

    # Include a defined value for Fint is int
    if test "$MPI_FINT" = "int" ; then

$as_echo "#define HAVE_FINT_IS_INT 1" >>confdefs.h

    elif test "$SIZEOF_F77_INTEGER" != "$ac_cv_sizeof_int" ; then
        # Make this fatal because we do not want to build a broken fortran
	# interface (was error)
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran integers and C ints are not the same size.  The current Fortran binding does not support this case.  Either force the Fortran compiler to use integers of $ac_cv_sizeof_int bytes, or use --disable-f77 on the configure line for MPICH2." >&5
$as_echo "$as_me: WARNING: Fortran integers and C ints are not the same size.  The current Fortran binding does not support this case.  Either force the Fortran compiler to use integers of $ac_cv_sizeof_int bytes, or use --disable-f77 on the configure line for MPICH2." >&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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of MPI_Status" >&5
$as_echo_n "checking for size of MPI_Status... " >&6; }
if test "${pac_cv_sizeof_mpi_status+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

        rm -f pac_mpi_status.h
        cat > pac_mpi_status.h <<_EOF
typedef struct {
    int count;
    int cancelled;
    int MPI_SOURCE;
    int MPI_TAG;
    int MPI_ERROR;
    $EXTRA_STATUS_DECL
} MPI_Status;
_EOF
                                        default_status_size=`expr 5 \* $ac_cv_sizeof_int`
        if ac_fn_c_compute_int "$LINENO" "sizeof(MPI_Status)" "pac_cv_sizeof_mpi_status"        "#include \"pac_mpi_status.h\""; then :

else
  pac_cv_sizeof_mpi_status=$default_status_size
fi

        rm -f pac_mpi_status.h

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_sizeof_mpi_status" >&5
$as_echo "$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
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not compute the size of MPI_Status" >&5
$as_echo "$as_me: WARNING: Could not compute the size of MPI_Status" >&2;}
                MPI_STATUS_SIZE=5
            fi
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPI_STATUS_SIZE was not defined!" >&5
$as_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


    # We must convert all hex values to decimal (!).
    # This is for the C types so they are also available in Fortran
    for var in CHAR SIGNED_CHAR UNSIGNED_CHAR WCHAR SHORT \
                  UNSIGNED_SHORT INT UNSIGNED_INT LONG UNSIGNED_LONG \
                  FLOAT DOUBLE LONG_DOUBLE LONG_LONG_INT \
                  UNSIGNED_LONG_LONG LONG_LONG FLOAT_INT DOUBLE_INT \
                  LONG_INT SHORT_INT "2INT" LONG_DOUBLE_INT \
                  INT8_T INT16_T INT32_T INT64_T            \
                  UINT8_T UINT16_T UINT32_T UINT64_T        \
                  C_BOOL C_FLOAT_COMPLEX C_DOUBLE_COMPLEX   \
                  C_LONG_DOUBLE_COMPLEX AINT OFFSET ; do
        fullvar="MPI_$var"
        fullf77var="MPI_F77_$var"
        eval fullvarvalue=\$$fullvar
        #echo "$fullvar = $fullvarvalue"
        if test "x$fullvarvalue" = "x" -o \
                "x$fullvarvalue" = "xMPI_DATATYPE_NULL" ; then
             eval $fullf77var="MPI_DATATYPE_NULL"
              continue
        fi
        value=0
        fullvarvalue=`echo $fullvarvalue | sed -e 's/..\(.*\)/\1/'`
        offset=0
        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
            # For Fortran, if the value is too big for an unsigned int,
            # we need to make it a signed (negative) int. Currently, the
            # types in this class are the minloc/maxloc types.
            if test $pos = 3 -a $char -ge 8 ; then
                #echo "for $var in position $pos found a value >= 8"
                char=`expr $char - 8`
                offset=-2147483648
            fi
            value=`expr $value \* 16 + $char`
        done
        if test "$offset" != 0 ; then
            #echo "$fullf77var: $value, $offset"
            value=`expr $value + $offset`
        fi
        #echo "$fullf77var = $value"
        eval $fullf77var=$value
    done






    MPI_F77_UNSIGNED=$MPI_F77_UNSIGNED_INT








    MPI_F77_LONG_LONG_INT=$MPI_F77_LONG_LONG


















    # C_COMPLEX is an alias for FLOAT_COMPLEX
    MPI_F77_C_COMPLEX=$MPI_F77_C_FLOAT_COMPLEX



    # these two are not yet defined, but AC_SUBST only cares about them at
    # AC_OUTPUT-time



    # 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.



pac_mpi_fint="$MPI_FINT"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for values of Fortran logicals" >&5
$as_echo_n "checking for values of Fortran logicals... " >&6; }
if test "${pac_cv_prog_f77_true_false_value+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

pac_cv_prog_f77_true_false_value=""
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

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


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
#if defined(HAVE_STDLIB_H) || defined(STDC_HEADERS)
#include <stdlib.h>
#endif
#ifdef F77_NAME_UPPER
#define ftest_ FTEST
#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)
#define ftest_ ftest
#endif
void ftest_( $pac_mpi_fint *, $pac_mpi_fint *);
void ftest_( $pac_mpi_fint *itrue, $pac_mpi_fint *ifalse )
{
  FILE *f = fopen("conftestval","w");
  if (!f) exit(1);
  fprintf( f, "%d %d\n", *itrue, *ifalse );
  fclose(f);
}


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    saved_LIBS="$LIBS"
    LIBS="pac_conftest.$OBJEXT $saved_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

    if test "$cross_compiling" = yes; then :

        # Cross-Compiling.  Allow the user to set the values
        if test -n "$CROSS_F77_TRUE_VALUE" -a -n "$CROSS_F77_FALSE_VALUE" ; then
            pac_cv_prog_f77_true_false_value="$CROSS_F77_TRUE_VALUE $CROSS_F77_FALSE_VALUE"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Either CROSS_F77_TRUE_VALUE=\"$CROSS_F77_TRUE_VALUE\" or CROSS_F77_FALSE_VALUE=\"$CROSS_F77_FALSE_VALUE\" is not set." >&5
$as_echo "$as_me: WARNING: Either CROSS_F77_TRUE_VALUE=\"$CROSS_F77_TRUE_VALUE\" or CROSS_F77_FALSE_VALUE=\"$CROSS_F77_FALSE_VALUE\" is not set." >&2;}
        fi

else
  cat > conftest.$ac_ext <<_ACEOF


            program main
            logical itrue, ifalse
            itrue = .TRUE.
            ifalse = .FALSE.
            call ftest( itrue, ifalse )
            end


_ACEOF
if ac_fn_f77_try_run "$LINENO"; then :

        pac_cv_prog_f77_true_false_value="`cat conftestval`"

else

        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to build/run program to determine Fortran logical values." >&5
$as_echo "$as_me: WARNING: Failed to build/run program to determine Fortran logical values." >&2;}

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
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

    LIBS="$saved_LIBS"
    rm -f pac_conftest.$OBJEXT

fi
rm -f core 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


fi

if test "X$pac_cv_prog_f77_true_false_value" != "X" ; then
    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
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: True is $true_val and False is $false_val" >&5
$as_echo "True is $true_val and False is $false_val" >&6; }
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not determine" >&5
$as_echo "could not determine" >&6; }
    fi
fi
if test -n "$true_val" -a -n "$false_val" ; then

$as_echo "#define F77_TRUE_VALUE_SET 1" >>confdefs.h


cat >>confdefs.h <<_ACEOF
#define F77_TRUE_VALUE $true_val
_ACEOF


cat >>confdefs.h <<_ACEOF
#define F77_FALSE_VALUE $false_val
_ACEOF

fi


    # Check if multiple __attribute__((alias)) is available
    if test "$enable_multi_aliases" = "yes" ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD/POSIX style global symbol lister" >&5
$as_echo_n "checking for BSD/POSIX style global symbol lister... " >&6; }
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 -z "$NM_G"; then
  ac_path_NM_G_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/ccs/bin/elf$PATH_SEPARATOR/usr/ccs/bin$PATH_SEPARATOR/usr/ucb$PATH_SEPARATOR/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_prog in nm; do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_NM_G="$as_dir/$ac_prog$ac_exec_ext"
      { test -f "$ac_path_NM_G" && $as_test_x "$ac_path_NM_G"; } || continue

    # Check if nm accepts -g and BSD or POSIX compatible flag.
    # Use the `sed 1q' to avoid HP-UX's unknown option message:
    #   nm: unknown option "B" ignored
    # Tru64's nm complains that /dev/null is an invalid object file
    #
    # AIX's sed does not accept \+, 1) instead of doing 's|a\+||', do 's|aa*||'
    # or 2) instead of 's|A \+B|AB|g', do 's|A  *B|AB|g'

    # Check if nm accepts -g
    case `${ac_path_NM_G} -g /dev/null 2>&1 | sed '1q'` in
    */dev/null* | *'Invalid file or object type'*)
        ac_path_NM_G="${ac_path_NM_G} -g"
        # Check if nm accepts -B
        case `${ac_path_NM_G} -B /dev/null 2>&1 | sed '1q'` in
        */dev/null* | *'Invalid file or object type'*)
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                int iglobal;

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


                case `${ac_path_NM_G} -B conftest.$OBJEXT | sed -e 's|[0-9][0-9]*  *[A-Z]  *iglobal|XXXX|g'` in
                *XXXX*)
                    pac_path_NM_G="${ac_path_NM_G} -B"
                    pac_path_NM_G_type="BSD"
                    ;;
                esac


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
            ;;
        *)
            # Check if nm accepts -P
            case `${ac_path_NM_G} -P /dev/null 2>&1 | sed '1q'` in
            */dev/null* | *'Invalid file or object type'*)
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

                    int iglobal;

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :


                    case `${ac_path_NM_G} -P conftest.$OBJEXT | sed -e 's|iglobal  *[A-Z]  *[0-9][0-9]*|XXXX|g'` in
                    *XXXX*)
                        pac_path_NM_G="${ac_path_NM_G} -P"
                        pac_path_NM_G_type="POSIX"
                        ;;
                    esac


fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
                ;;
            esac  # Endof case `${ac_path_NM_G} -P
            ;;
        esac   # Endof case `${ac_path_NM_G} -B
        ;;
    esac  # Endof case `${ac_path_NM_G} -g
    if test "X$pac_path_NM_G" != "X" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_path_NM_G_type style,$pac_path_NM_G" >&5
$as_echo "$pac_path_NM_G_type style,$pac_path_NM_G" >&6; }
        NM_G="`echo $pac_path_NM_G | sed -e 's|^.*nm |nm |g'`"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    fi
    ac_cv_path_NM_G=${ac_path_NM_G}
    ac_path_NM_G_found=:

      $ac_path_NM_G_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_NM_G"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
  fi
else
  ac_cv_path_NM_G=$NM_G
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




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 ac_header in stdio.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
if test "x$ac_cv_header_stdio_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STDIO_H 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiple __attribute__((alias)) support" >&5
$as_echo_n "checking for multiple __attribute__((alias)) support... " >&6; }

#Compile the "other" __attribute__ object file.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif

struct mpif_cmblk_t_ { int imember; };
typedef struct mpif_cmblk_t_ mpif_cmblk_t;

/* NOT initialize these structure so it appears in BSS or as COMMON symbols */
mpif_cmblk_t mpifcmb;
mpif_cmblk_t MPIFCMB;

/*
   Do the test in this file instead in the file
   where __attribute__((alias)) is used.
   This is needed for pgcc since pgcc seems to
   define aliased symbols if they are in the same file.
*/
/*
    We can't do the following comparision in one test:

    ilogical = (( &mpifcmb == ptr && &MPIFCMB == ptr ) ? TRUE : FALSE) ;

    because some compiler, like gcc 4.4.2's -O* optimizes the code
    such that the ilogical expression is FALSE. The likely reason is that
    mpifcmb and MPIFCMB are defined in the same scope in which C optimizer
    may have treated them as different objects (with different addresses),
    &mpifcmb != &MPIFCMB, before actually running the test and hence the
    illogical expression is assumed to be always FALSE.  The solution taken
    here is to prevent the optimizer the opportunity to equate &mpifcmb and
    &MPIFCMB (in same scope), e.g. using 2 separate tests and combine the
    test results in a different scope.
*/
int same_addrs1( void *ptr );
int same_addrs1( void *ptr )
{
#if defined(ATTR_ALIAS_DEBUG)
    printf( "others: addr(mpifcmb)=%p, addr(input ptr)=%p\n", &mpifcmb, ptr );
#endif
    return ( &mpifcmb == ptr ? 1 : 0 );
}

int same_addrs2( void *ptr );
int same_addrs2( void *ptr )
{
#if defined(ATTR_ALIAS_DEBUG)
    printf( "others: addr(MPIFCMB)=%p, addr(input ptr)=%p\n", &MPIFCMB, ptr );
#endif
    return ( &MPIFCMB == ptr ? 1 : 0 );
}



_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    rm -f pac_conftest_other.$OBJEXT

{ $as_echo "$as_me:$LINENO: cp conftest.$OBJEXT pac_conftest_other.$OBJEXT" >&5
  (eval cp conftest.$OBJEXT pac_conftest_other.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
    test -s pac_conftest_other.$OBJEXT && pac_c_attr_alias_other=yes

else

    pac_c_attr_alias_other=no

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
pac_c_attr_alias_main=no
if test "$pac_c_attr_alias_other" = "yes" ; then

#   Push LIBS for later restoration.

	if test -z "${pac_save_LIBS_nesting}" ; then
	   pac_save_LIBS_nesting=0
	fi
	eval pac_save_LIBS_${pac_save_LIBS_nesting}='"$LIBS"'
	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} + 1`

    LIBS="pac_conftest_other.$OBJEXT $LIBS"

#   Link the "other" __attribute__ object file.
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif

struct mpif_cmblk_t_ { int imember; };
typedef struct mpif_cmblk_t_ mpif_cmblk_t;

mpif_cmblk_t mpifcmbr = {0};
extern mpif_cmblk_t MPIFCMB __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t mpifcmb __attribute__ ((alias("mpifcmbr")));

extern int same_addrs1( void *ptr );
extern int same_addrs2( void *ptr );


int
main ()
{

    int iaddr = 0;
#if defined(ATTR_ALIAS_DEBUG)
    printf( "main: addr(mpifcmbr) = %p\n", &mpifcmbr );
    printf( "main: addr(mpifcmb) = %p\n", &mpifcmb );
    printf( "main: addr(MPIFCMB) = %p\n", &MPIFCMB );
#endif
    iaddr = same_addrs1( &mpifcmbr ) && same_addrs2( &mpifcmbr );
    FILE *file = fopen( "pac_conftestval", "w" );
    if (!file) return 1;
    fprintf( file, "%d\n", iaddr );

  ;
  return 0;
}

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

        rm -f pac_conftest_main$EXEEXT

{ $as_echo "$as_me:$LINENO: cp conftest$EXEEXT pac_conftest_main$EXEEXT" >&5
  (eval cp conftest$EXEEXT pac_conftest_main$EXEEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }
        test -x pac_conftest_main$EXEEXT && pac_c_attr_alias_main=yes

else

        pac_c_attr_alias_main=no

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
# Restore the previously pushed LIBS

	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} - 1`
	eval LIBS="\$pac_save_LIBS_${pac_save_LIBS_nesting}"
	eval pac_save_LIBS_${pac_save_LIBS_nesting}=""

    rm -f pac_conftest_other.$OBJEXT
fi
if test "$pac_c_attr_alias_main" = "yes" ; then
    if test "$cross_compiling" = "yes" ; then

        # echo "PAC CROSS-COMPILING" dnl
        # POSIX NM = nm -P format dnl
        if test "$pac_path_NM_G_type" = "POSIX" ; then
            addrs=`${pac_path_NM_G} ./pac_conftest_main$EXEEXT | grep -i mpifcmb | sed -e 's% *[a-zA-Z][a-zA-Z]*  *[a-zA-Z]  *\([0-9abcdef][0-9abcdef]*\).*%\1%g'`
        fi

        # BSD NM = nm -B format dnl
        if test "$pac_path_NM_G_type" = "BSD" ; then
            addrs=`${pac_path_NM_G} -g ./pac_conftest_main$EXEEXT | grep -i mpifcmb | sed -e "s% *\([0-9abcdef][0-9abcdef]*\)  *[a-zA-Z]  *[a-zA-Z][a-zA-A]*.*%\1%g"`
        fi


        cmp_addr=""
        diff_addrs=no
        for addr in ${addrs} ; do
            if test "X${cmp_addr}" != "X" ; then
                if test "${cmp_addr}" != "${addr}" ; then
                    diff_addrs=yes
                    break
                fi
            else
                cmp_addr=${addr}
            fi
        done

        if test "$diff_addrs" != "yes" ; then
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NM_G} says yes" >&5
$as_echo "${NM_G} says yes" >&6; }
            pac_c_multi_attr_alias=yes
        else
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NM_G} says no" >&5
$as_echo "${NM_G} says no" >&6; }
            pac_c_multi_attr_alias=no
        fi

    else # if test "$cross_compiling" != "yes"
        rm -f pac_conftestval
        ac_try="./pac_conftest_main$EXEEXT"
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } ; then
            pac_c_attr_alias_val=0
            if test -s pac_conftestval ; then
                eval pac_c_attr_alias_val=`cat pac_conftestval`
            fi
            if test "$pac_c_attr_alias_val" -eq 1 ; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
                pac_c_multi_attr_alias=yes
            else
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
                pac_c_multi_attr_alias=no
            fi
            rm -f pac_conftestval
        fi
    fi
        rm -f pac_conftest_main$EXEEXT
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no! link failure" >&5
$as_echo "no! link failure" >&6; }
    pac_c_multi_attr_alias=no
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



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

cmblksize=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the minimum alignment of Fortran common block of $cmblksize integers" >&5
$as_echo_n "checking the minimum alignment of Fortran common block of $cmblksize integers... " >&6; }
#
#
# First create a fortran CONFTEST which will be used repeatedly.
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 cat > conftest.$ac_ext <<_ACEOF


        program fconftest
        integer isize
        parameter (isize=$cmblksize)
        integer status_array(isize)
        common /mpifcmb/ status_array
        save /mpifcmb/
        end


_ACEOF
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
 # Compile a C dummy.$OBJEXT and link with Fortran test program to create
# a reference linker output file, pac_align0.log, as the base of "diff".
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

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

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    cp conftest.$ac_ext pac_conftest.c

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

	if test -z "${pac_save_LIBS_nesting}" ; then
	   pac_save_LIBS_nesting=0
	fi
	eval pac_save_LIBS_${pac_save_LIBS_nesting}='"$LIBS"'
	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} + 1`

    LIBS="pac_conftest.$OBJEXT $LIBS"
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	if test -z "${pac_save_ac_link_nesting}" ; then
	   pac_save_ac_link_nesting=0
	fi
	eval pac_save_ac_link_${pac_save_ac_link_nesting}='"$ac_link"'
	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} + 1`

    ac_link="`echo $ac_link | sed -e 's|>.*$|> $pac_logfile 2>\&1|g'`"
    pac_logfile="pac_align0.log"
    rm -f $pac_logfile
    if ac_fn_fc_try_link "$LINENO"; then :

        pac_f2c_alignedn_diffbase=yes

else

        pac_f2c_alignedn_diffbase=no

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
    # Be sure NOT to remove the conftest.f which is still needed for later use.
    # rm -f conftest.$ac_ext
    # Restore everything in autoconf that has been overwritten

	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} - 1`
	eval ac_link="\$pac_save_ac_link_${pac_save_ac_link_nesting}"
	eval pac_save_ac_link_${pac_save_ac_link_nesting}=""

    # restore previously pushed LIBS

	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} - 1`
	eval LIBS="\$pac_save_LIBS_${pac_save_LIBS_nesting}"
	eval pac_save_LIBS_${pac_save_LIBS_nesting}=""

    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

    pac_f2c_alignedn_diffbase=no

fi
rm -f core 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

if test "$pac_f2c_alignedn_diffbase" = "yes" ; then
    # Initialize pac_result_str to empty string since part of the test
    # depends on pac_result_str is empty or non-empty string.
    pac_result_str=""
    # Initialize pac_f2c_attr_aligned_str to empty string and
    # it will remain as empty string if the following test fails.
    pac_f2c_attr_aligned_str=""
    for asize in 4 8 16 32 64 128 max ; do
        if test "$asize" != "max" ; then
            pac_attr_aligned_str="__attribute__((aligned($asize)))"
        else
            pac_attr_aligned_str="__attribute__((aligned))"
        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

        #Compile the __attribute__ object file.
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */



struct mpif_cmblk_t_ { $MPI_FINT imembers[$cmblksize]; };

typedef struct mpif_cmblk_t_ mpif_cmblk_t;
mpif_cmblk_t mpifcmbr $pac_attr_aligned_str = {0};

extern mpif_cmblk_t _CMPIFCMB  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   MPIFCMB  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   MPIFCMB_ __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t _Cmpifcmb  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   mpifcmb  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   mpifcmb_ __attribute__ ((alias("mpifcmbr")));


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

            cp conftest.$ac_ext pac_conftest.c

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

	if test -z "${pac_save_LIBS_nesting}" ; then
	   pac_save_LIBS_nesting=0
	fi
	eval pac_save_LIBS_${pac_save_LIBS_nesting}='"$LIBS"'
	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} + 1`

            LIBS="pac_conftest.$OBJEXT $LIBS"
            ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	if test -z "${pac_save_ac_link_nesting}" ; then
	   pac_save_ac_link_nesting=0
	fi
	eval pac_save_ac_link_${pac_save_ac_link_nesting}='"$ac_link"'
	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} + 1`

            ac_link="`echo $ac_link | sed -e 's|>.*$|> $pac_logfile 2>\&1|g'`"
            pac_logfile="pac_align1.log"
            rm -f $pac_logfile
            # Use conftest.f created in CONFTEST.
            if ac_fn_fc_try_link "$LINENO"; then :


pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_align0.log pac_align1.log > $pac_TESTLOG" >&5
  (eval diff -b pac_align0.log pac_align1.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :



                    pac_attr_alignedn=yes



else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_align0.log pac_align1.log :" >&5
    cat $pac_TESTLOG >&5

                    pac_attr_alignedn=no
                    cat $pac_logfile >&5
                    echo "failed C program was:" >&5
                    cat pac_conftest.c >&5
                    echo "failed Fortran program was:" >&5
                    cat conftest.$ac_ext >&5





fi

rm -f $pac_TESTLOG


else

                pac_attr_alignedn=no

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
            # Restore everything in autoconf that has been overwritten

	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} - 1`
	eval ac_link="\$pac_save_ac_link_${pac_save_ac_link_nesting}"
	eval pac_save_ac_link_${pac_save_ac_link_nesting}=""

            # restore previously pushed LIBS

	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} - 1`
	eval LIBS="\$pac_save_LIBS_${pac_save_LIBS_nesting}"
	eval pac_save_LIBS_${pac_save_LIBS_nesting}=""

            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
             # remove previously generated object file and C file.
            rm -f pac_conftest.$OBJEXT pac_conftest.c
            rm -f $pac_logfile
            if test "$pac_attr_alignedn" = yes ; then

                    pac_result_str="$asize"
                    pac_f2c_attr_aligned_str="$pac_attr_aligned_str"
                    break

            fi

else

            pac_attr_alignedn=no

fi
rm -f core 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

    done
    CMB_1INT_ALIGNMENT="$pac_f2c_attr_aligned_str"
else
    pac_result_str=""
    # Since the test fails, set pac_f2c_attr_aligned_str to empty string.
    pac_f2c_attr_aligned_str=""
fi
if test "X$pac_result_str" != "X" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result_str" >&5
$as_echo "$pac_result_str" >&6; }
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
fi
rm -f pac_align0.log



cmblksize=$MPI_STATUS_SIZE
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the minimum alignment of Fortran common block of $cmblksize integers" >&5
$as_echo_n "checking the minimum alignment of Fortran common block of $cmblksize integers... " >&6; }
#
#
# First create a fortran CONFTEST which will be used repeatedly.
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 cat > conftest.$ac_ext <<_ACEOF


        program fconftest
        integer isize
        parameter (isize=$cmblksize)
        integer status_array(isize)
        common /mpifcmb/ status_array
        save /mpifcmb/
        end


_ACEOF
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
 # Compile a C dummy.$OBJEXT and link with Fortran test program to create
# a reference linker output file, pac_align0.log, as the base of "diff".
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

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

_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

    cp conftest.$ac_ext pac_conftest.c

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

	if test -z "${pac_save_LIBS_nesting}" ; then
	   pac_save_LIBS_nesting=0
	fi
	eval pac_save_LIBS_${pac_save_LIBS_nesting}='"$LIBS"'
	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} + 1`

    LIBS="pac_conftest.$OBJEXT $LIBS"
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	if test -z "${pac_save_ac_link_nesting}" ; then
	   pac_save_ac_link_nesting=0
	fi
	eval pac_save_ac_link_${pac_save_ac_link_nesting}='"$ac_link"'
	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} + 1`

    ac_link="`echo $ac_link | sed -e 's|>.*$|> $pac_logfile 2>\&1|g'`"
    pac_logfile="pac_align0.log"
    rm -f $pac_logfile
    if ac_fn_fc_try_link "$LINENO"; then :

        pac_f2c_alignedn_diffbase=yes

else

        pac_f2c_alignedn_diffbase=no

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
    # Be sure NOT to remove the conftest.f which is still needed for later use.
    # rm -f conftest.$ac_ext
    # Restore everything in autoconf that has been overwritten

	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} - 1`
	eval ac_link="\$pac_save_ac_link_${pac_save_ac_link_nesting}"
	eval pac_save_ac_link_${pac_save_ac_link_nesting}=""

    # restore previously pushed LIBS

	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} - 1`
	eval LIBS="\$pac_save_LIBS_${pac_save_LIBS_nesting}"
	eval pac_save_LIBS_${pac_save_LIBS_nesting}=""

    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

    pac_f2c_alignedn_diffbase=no

fi
rm -f core 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

if test "$pac_f2c_alignedn_diffbase" = "yes" ; then
    # Initialize pac_result_str to empty string since part of the test
    # depends on pac_result_str is empty or non-empty string.
    pac_result_str=""
    # Initialize pac_f2c_attr_aligned_str to empty string and
    # it will remain as empty string if the following test fails.
    pac_f2c_attr_aligned_str=""
    for asize in 4 8 16 32 64 128 max ; do
        if test "$asize" != "max" ; then
            pac_attr_aligned_str="__attribute__((aligned($asize)))"
        else
            pac_attr_aligned_str="__attribute__((aligned))"
        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

        #Compile the __attribute__ object file.
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */



struct mpif_cmblk_t_ { $MPI_FINT imembers[$cmblksize]; };

typedef struct mpif_cmblk_t_ mpif_cmblk_t;
mpif_cmblk_t mpifcmbr $pac_attr_aligned_str = {0};

extern mpif_cmblk_t _CMPIFCMB  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   MPIFCMB  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   MPIFCMB_ __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t _Cmpifcmb  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   mpifcmb  __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t   mpifcmb_ __attribute__ ((alias("mpifcmbr")));


_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

            cp conftest.$ac_ext pac_conftest.c

{ $as_echo "$as_me:$LINENO: mv conftest.$OBJEXT pac_conftest.$OBJEXT" >&5
  (eval mv conftest.$OBJEXT pac_conftest.$OBJEXT) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }

	if test -z "${pac_save_LIBS_nesting}" ; then
	   pac_save_LIBS_nesting=0
	fi
	eval pac_save_LIBS_${pac_save_LIBS_nesting}='"$LIBS"'
	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} + 1`

            LIBS="pac_conftest.$OBJEXT $LIBS"
            ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	if test -z "${pac_save_ac_link_nesting}" ; then
	   pac_save_ac_link_nesting=0
	fi
	eval pac_save_ac_link_${pac_save_ac_link_nesting}='"$ac_link"'
	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} + 1`

            ac_link="`echo $ac_link | sed -e 's|>.*$|> $pac_logfile 2>\&1|g'`"
            pac_logfile="pac_align1.log"
            rm -f $pac_logfile
            # Use conftest.f created in CONFTEST.
            if ac_fn_fc_try_link "$LINENO"; then :


pac_TESTLOG="pac_test.log"
rm -f $pac_TESTLOG

if
{ $as_echo "$as_me:$LINENO: diff -b pac_align0.log pac_align1.log > $pac_TESTLOG" >&5
  (eval diff -b pac_align0.log pac_align1.log > $pac_TESTLOG) 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :



                    pac_attr_alignedn=yes



else

    $as_echo "$as_me: program exited with status $ac_status" >&5

        (exit $ac_status)

    $as_echo "*** diff -b pac_align0.log pac_align1.log :" >&5
    cat $pac_TESTLOG >&5

                    pac_attr_alignedn=no
                    cat $pac_logfile >&5
                    echo "failed C program was:" >&5
                    cat pac_conftest.c >&5
                    echo "failed Fortran program was:" >&5
                    cat conftest.$ac_ext >&5





fi

rm -f $pac_TESTLOG


else

                pac_attr_alignedn=no

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
            # Restore everything in autoconf that has been overwritten

	pac_save_ac_link_nesting=`expr ${pac_save_ac_link_nesting} - 1`
	eval ac_link="\$pac_save_ac_link_${pac_save_ac_link_nesting}"
	eval pac_save_ac_link_${pac_save_ac_link_nesting}=""

            # restore previously pushed LIBS

	pac_save_LIBS_nesting=`expr ${pac_save_LIBS_nesting} - 1`
	eval LIBS="\$pac_save_LIBS_${pac_save_LIBS_nesting}"
	eval pac_save_LIBS_${pac_save_LIBS_nesting}=""

            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
             # remove previously generated object file and C file.
            rm -f pac_conftest.$OBJEXT pac_conftest.c
            rm -f $pac_logfile
            if test "$pac_attr_alignedn" = yes ; then

                    if test "$asize" != "max" -a "$asize" -lt "32" ; then
                        if test "X$pac_result_str" = "X" ; then
                            pac_result_str="$asize"
                            pac_f2c_attr_aligned_str="$pac_attr_aligned_str"
                        fi
                        continue
                    else
                        pac_f2c_attr_aligned_str="$pac_attr_aligned_str"
                        if test "X$pac_result_str" != "X" ; then
                            pac_result_str="$pac_result_str, too small! reset to $asize"
                        else
                            pac_result_str="$asize"
                        fi
                        break
                    fi

            fi

else

            pac_attr_alignedn=no

fi
rm -f core 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

    done
    CMB_STATUS_ALIGNMENT="$pac_f2c_attr_aligned_str"
else
    pac_result_str=""
    # Since the test fails, set pac_f2c_attr_aligned_str to empty string.
    pac_f2c_attr_aligned_str=""
fi
if test "X$pac_result_str" != "X" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_result_str" >&5
$as_echo "$pac_result_str" >&6; }
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
fi
rm -f pac_align0.log


            if test "X$CMB_1INT_ALIGNMENT" != "X" \
                 -a "X$CMB_STATUS_ALIGNMENT" != "X" ; then

$as_echo "#define HAVE_C_MULTI_ATTR_ALIAS 1" >>confdefs.h

            fi
        fi
    fi

    # 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 "$FC" ; then

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 is a Fortran 90 compiler" >&5
$as_echo_n "checking whether $F77 is a Fortran 90 compiler... " >&6; }
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

saved_ac_ext=$ac_ext
ac_ext="f90"
cat > conftest.$ac_ext <<_ACEOF


        program main
        integer, dimension(10) :: n
        integer k
        print *,  range(k)
        end


_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :

    pac_cv_prog_f77_is_fc=yes

            FC=$F77
            if test -z "$FCFLAGS" ; then
                FCFLAGS="$FFLAGS"
            fi


else

    pac_cv_prog_f77_is_fc=no


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_f77_is_fc" >&5
$as_echo "$pac_cv_prog_f77_is_fc" >&6; }
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
    if test -n "$FC" ; then
        # Offset kind should be for 8 bytes if possible (Romio prefers that)
        # address should be sizeof void * (unless --with-aint-size has
        # been set)
        # FIXME in the current configure implementation OFFSET_KIND and
        # MPI_Offset won't always agree, but generally will.  The MPI Standard
        # implies that these types must have identical size, so this is a bug
        # waiting to happen.
	if test "$with_aint_size" -gt 0 -a \
	        "$with_aint_size" -gt "$ac_cv_sizeof_void_p" ; then
	    testsize=$with_aint_size
        else
            testsize=$ac_cv_sizeof_void_p
        fi
        if test "$testsize" = 0 ; then
            # Set a default
            testsize=4
        fi

# Set the default
ADDRESS_KIND=-1
if test "$pac_cv_prog_fc_cross" = "yes" ; then
    ADDRESS_KIND="$CROSS_F90_ADDRESS_KIND"
else
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 integer kind for ${testsize}-byte integers" >&5
$as_echo_n "checking for Fortran 90 integer kind for ${testsize}-byte integers... " >&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_fc_int_kind_$sellen"
    if test -n "$testval" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $testval (cached)" >&5
$as_echo "$testval (cached)" >&6; }
        ADDRESS_KIND=$testval
    else
        KINDVAL="unavailable"
        eval "pac_cv_prog_fc_int_kind_$sellen"=-1
        if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat > conftest.$ac_ext <<_ACEOF


                program main
                integer ii
                ii = selected_int_kind($sellen)
                open(8, file="conftest1.out", form="formatted")
                write (8,*) ii
                close(8)
                stop
                end


_ACEOF
if ac_fn_fc_try_run "$LINENO"; then :
  pac_run_ok=yes
else
  pac_run_ok=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

        if test "$pac_run_ok" = "yes" ; then
            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_fc_int_kind_$sellen"=$KINDVAL
                ADDRESS_KIND=$KINDVAL
            fi
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KINDVAL" >&5
$as_echo "$KINDVAL" >&6; }
    fi # not cached
    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 not cross compiling

        if test "$testsize" = 8 ; then
            OFFSET_KIND=$ADDRESS_KIND
        else

# Set the default
OFFSET_KIND=-1
if test "$pac_cv_prog_fc_cross" = "yes" ; then
    OFFSET_KIND="$CROSS_F90_OFFSET_KIND"
else
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 integer kind for 8-byte integers" >&5
$as_echo_n "checking for Fortran 90 integer kind for 8-byte integers... " >&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_fc_int_kind_$sellen"
    if test -n "$testval" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $testval (cached)" >&5
$as_echo "$testval (cached)" >&6; }
        OFFSET_KIND=$testval
    else
        KINDVAL="unavailable"
        eval "pac_cv_prog_fc_int_kind_$sellen"=-1
        if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat > conftest.$ac_ext <<_ACEOF


                program main
                integer ii
                ii = selected_int_kind($sellen)
                open(8, file="conftest1.out", form="formatted")
                write (8,*) ii
                close(8)
                stop
                end


_ACEOF
if ac_fn_fc_try_run "$LINENO"; then :
  pac_run_ok=yes
else
  pac_run_ok=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

        if test "$pac_run_ok" = "yes" ; then
            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_fc_int_kind_$sellen"=$KINDVAL
                OFFSET_KIND=$KINDVAL
            fi
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KINDVAL" >&5
$as_echo "$KINDVAL" >&6; }
    fi # not cached
    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 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_fc_cross" = "yes" ; then
    simpleintkind=""
else
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers" >&5
$as_echo_n "checking for Fortran 90 integer kind for ${pac_cv_f77_sizeof_integer}-byte integers... " >&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_fc_int_kind_$sellen"
    if test -n "$testval" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $testval (cached)" >&5
$as_echo "$testval (cached)" >&6; }
        simpleintkind=$testval
    else
        KINDVAL="unavailable"
        eval "pac_cv_prog_fc_int_kind_$sellen"=-1
        if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat > conftest.$ac_ext <<_ACEOF


                program main
                integer ii
                ii = selected_int_kind($sellen)
                open(8, file="conftest1.out", form="formatted")
                write (8,*) ii
                close(8)
                stop
                end


_ACEOF
if ac_fn_fc_try_run "$LINENO"; then :
  pac_run_ok=yes
else
  pac_run_ok=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

        if test "$pac_run_ok" = "yes" ; then
            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_fc_int_kind_$sellen"=$KINDVAL
                simpleintkind=$KINDVAL
            fi
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KINDVAL" >&5
$as_echo "$KINDVAL" >&6; }
    fi # not cached
    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 not cross compiling

            if test "$simpleintkind" = "-1" ; then
	        # Wild guess; probably means that Fortran 90 is not available
		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine Fortran 90 KIND values for either address-sized integers or offset-sized integers.  Using 4 in that case." >&5
$as_echo "$as_me: WARNING: Unable to determine Fortran 90 KIND values for either address-sized integers or offset-sized integers.  Using 4 in that case." >&2;}
                simpleintkind=4
            fi
            if test "$ADDRESS_KIND" = "-1" ; then
	        ADDRESS_KIND=$simpleintkind
            fi
            if test "$OFFSET_KIND" = "-1" ; then
	        OFFSET_KIND=$simpleintkind
            fi
        fi
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if real*8 is supported in Fortran 90" >&5
$as_echo_n "checking if real*8 is supported in Fortran 90... " >&6; }
if test "${pac_cv_fort90_real8+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

            cat > conftest.$ac_ext <<_ACEOF

                      program main
      real*8 a
      end

_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :

                pac_cv_fort90_real8=yes

else

                pac_cv_fort90_real8=no

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

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_fort90_real8" >&5
$as_echo "$pac_cv_fort90_real8" >&6; }
	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

	WTIME_DOUBLE_TYPE="DOUBLE PRECISION"
	# Save a copy of the original mpi_base.f90 file
	if test "$enable_fc" = "yes" -a "$pac_cv_fort90_real8" = "yes" ; then
	    WTIME_DOUBLE_TYPE="REAL*8"
        fi
	# WTIME_DOUBLE_TYPE is substituted into mpi_base.f90

    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
    # Note, however, that zero value are (in all practical case) invalid
    # for Fortran 90, and indicate a failure.  Test and fail if Fortran 90
    # enabled.
    if test "$enable_fc" = "yes" ; then
        if test "$ADDRESS_KIND" -le 0 -o "$OFFSET_KIND" -le 0 ; then
	    as_fn_error $? "Unable to determine Fortran 90 integer kinds for MPI types.  If you do not need Fortran 90, add --disable-fc to the configure options." "$LINENO" 5
	    # If the above is converted to a warning, you need to change
	    # enable_fc and remote f90 from the bindings
	    enable_fc=no
        fi
    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:
    # We also need to include
    # SIZEOF_FC_MPI_OFFSET
    # SIZEOF_FC_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.

    # To start with, we use the sizes determined for the Fortran 77 values.
    # These must be the same as for the Fortran 90 values.
    CROSS_F90_SIZEOF_INTEGER=${CROSS_F90_SIZEOF_INTEGER:-0}
    CROSS_F90_SIZEOF_REAL=${CROSS_F90_SIZEOF_REAL:-0}
    CROSS_F90_SIZEOF_DOUBLE_PRECISION=${CROSS_F90_SIZEOF_DOUBLE_PRECISION:-0}
    SIZEOF_FC_INTEGER=$CROSS_F90_SIZEOF_INTEGER
    SIZEOF_FC_REAL=$CROSS_F90_SIZEOF_REAL
    SIZEOF_FC_CHARACTER=1
    SIZEOF_FC_DOUBLE_PRECISION=$CROSS_F90_SIZEOF_DOUBLE_PRECISION
    if test "$pac_cv_f77_sizeof_integer" -gt 0 -a \
	    "$SIZEOF_FC_INTEGER" = "0" ; then
        SIZEOF_FC_INTEGER=$pac_cv_f77_sizeof_integer
    fi
    if test "$pac_cv_f77_sizeof_real" -gt 0 -a "$SIZEOF_FC_REAL" = "0" ; then
        SIZEOF_FC_REAL=$pac_cv_f77_sizeof_real
    fi
    if test "$pac_cv_f77_sizeof_double_precision" -gt 0 -a \
       "$SIZEOF_FC_DOUBLE_PRECISION" = "0" ; then
        SIZEOF_FC_DOUBLE_PRECISION=$pac_cv_f77_sizeof_double_precision
    fi





    # REQD is short for "real equal double precision" and is set to the
    # Fortran 90 comment character if true.  This is necessary to
    # allow the mpi_sizeofs module to be built, since if this part of the
    # Fortran standard is violated by the compiler (unfortunately common,
    # as some applications are written to require this non-standard
    # version), the double precision versions of the MPI_SIZEOF routine
    # must be commented out of the module (!).
    REQD=
    if test "$SIZEOF_FC_REAL" = "$SIZEOF_FC_DOUBLE_PRECISION" ; then
        REQD="!"
    fi

    # Is integer*1 supported, and is it a different size than integer?
    REQI1="!"
    if test "$pac_cv_fort_integer1" = yes -a "$SIZEOF_FC_INTEGER" != 1 ; then
        REQI1=
    fi

    # Is integer*2 supported, and is it a different size than integer?
    REQI2="!"
    if test "$pac_cv_fort_integer2" = yes -a "$SIZEOF_FC_INTEGER" != 2 ; then
        REQI2=
    fi

    # Is integer*8 supported, and is it a different size than integer?
    REQI8="!"
    if test "$pac_cv_fort_integer8" = yes -a "$SIZEOF_FC_INTEGER" != 8 ; then
        REQI8=
    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
# ----------------------------------------------------------------------------
# C++ types
if test "$enable_cxx" = "yes" ; then
    ac_ext=cpp
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

    # The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
$as_echo_n "checking size of bool... " >&6; }
if test "${ac_cv_sizeof_bool+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_bool" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (bool)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_bool=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
$as_echo "$ac_cv_sizeof_bool" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_BOOL $ac_cv_sizeof_bool
_ACEOF



    # Find a C type that matches the size of the C++ boolean type
    case "$ac_cv_sizeof_bool" in
    	 $ac_cv_sizeof__Bool)
		bool_type=_Bool
		;;
    	 $ac_cv_sizeof_unsigned_char)
		bool_type="unsigned char"
		;;
    	 $ac_cv_sizeof_unsigned_short)
		bool_type="unsigned short"
		;;
    	 $ac_cv_sizeof_unsigned_int)
		bool_type="unsigned int"
		;;
    	 $ac_cv_sizeof_unsigned_long)
		bool_type="unsigned long"
		;;
    	 $ac_cv_sizeof_unsigned_long_long)
		bool_type="unsigned long long"
		;;
         *)
		as_fn_error $? "unable to determine matching C type for C++ bool" "$LINENO" 5
		;;
    esac

cat >>confdefs.h <<_ACEOF
#define MPIR_CXX_BOOL_CTYPE $bool_type
_ACEOF


    ac_ext=cpp
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :

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

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :

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

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext

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

else
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi

ac_ext=cpp
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_fn_cxx_check_header_mongrel "$LINENO" "complex" "ac_cv_header_complex" "$ac_includes_default"
if test "x$ac_cv_header_complex" = x""yes; then :

fi


    if test "$ac_cv_header_complex" = "yes" ; then
        # The C++ complex types are all templated.  We finagle this by
        # defining a standin name
        # The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of Complex" >&5
$as_echo_n "checking size of Complex... " >&6; }
if test "${ac_cv_sizeof_Complex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (Complex))" "ac_cv_sizeof_Complex"        "#include <stdio.h>
#include <complex>
using namespace std;
#define Complex complex<float>

"; then :

else
  if test "$ac_cv_type_Complex" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (Complex)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_Complex=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_Complex" >&5
$as_echo "$ac_cv_sizeof_Complex" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_COMPLEX $ac_cv_sizeof_Complex
_ACEOF


        # The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of DoubleComplex" >&5
$as_echo_n "checking size of DoubleComplex... " >&6; }
if test "${ac_cv_sizeof_DoubleComplex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (DoubleComplex))" "ac_cv_sizeof_DoubleComplex"        "#include <stdio.h>
#include <complex>
using namespace std;
#define DoubleComplex complex<double>

"; then :

else
  if test "$ac_cv_type_DoubleComplex" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (DoubleComplex)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_DoubleComplex=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_DoubleComplex" >&5
$as_echo "$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
             # The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of LongDoubleComplex" >&5
$as_echo_n "checking size of LongDoubleComplex... " >&6; }
if test "${ac_cv_sizeof_LongDoubleComplex+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (LongDoubleComplex))" "ac_cv_sizeof_LongDoubleComplex"        "#include <stdio.h>
#include <complex>
using namespace std;
#define LongDoubleComplex complex<long double>

"; then :

else
  if test "$ac_cv_type_LongDoubleComplex" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (LongDoubleComplex)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_LongDoubleComplex=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_LongDoubleComplex" >&5
$as_echo "$ac_cv_sizeof_LongDoubleComplex" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONGDOUBLECOMPLEX $ac_cv_sizeof_LongDoubleComplex
_ACEOF


        fi

        # If either complex or double complex have length 0, then mark
        # c++ complex as unavailable
        if test "$ac_cv_sizeof_Complex" != 0 -a \
                "$ac_cv_sizeof_DoubleComplex" != 0 ; then

$as_echo "#define HAVE_CXX_COMPLEX 1" >>confdefs.h

        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


    # Make these available to the collective operations and other code

cat >>confdefs.h <<_ACEOF
#define MPIR_CXX_BOOL_VALUE $MPIR_CXX_BOOL
_ACEOF


cat >>confdefs.h <<_ACEOF
#define MPIR_CXX_COMPLEX_VALUE $MPIR_CXX_COMPLEX
_ACEOF


cat >>confdefs.h <<_ACEOF
#define MPIR_CXX_DOUBLE_COMPLEX_VALUE $MPIR_CXX_DOUBLE_COMPLEX
_ACEOF


cat >>confdefs.h <<_ACEOF
#define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE $MPIR_CXX_LONG_DOUBLE_COMPLEX
_ACEOF


fi

# ----------------------------------------------------------------------------

# Is char * the byte address?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if char * pointers use byte addresses" >&5
$as_echo_n "checking if char * pointers use byte addresses... " >&6; }
if test "${pac_cv_c_char_p_is_byte+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

if test "$cross_compiling" = yes; then :
  pac_cv_char_p_is_byte=unknown
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_c_char_p_is_byte=yes
else
  pac_cv_char_p_is_byte=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_c_char_p_is_byte" >&5
$as_echo "$pac_cv_c_char_p_is_byte" >&6; }
if test "$pac_cv_char_p_is_byte" = "yes" ; then

$as_echo "#define CHAR_PTR_IS_BYTE 1" >>confdefs.h

fi
# ----------------------------------------------------------------------------
#
# Check for the alignment rules moves with types int64_t etc.  These
# are used in the datatype code to perform pack and unpack operations.
# These only determine if different alignments *work*, not whether they
# work efficiently.  The datatype pack code (should) allow the developer
# to include stricter alignment rules than are needed for correctness to
# get better performance.
if test "$ac_cv_c_int64_t" != "no" -o -n "$INT64_T" ; then
    default_int64_t_alignment=${CROSS_INT64_T_ALIGNMENT:-"unknown"}
    if test -z "$INT64_T" ; then
         if test "$ac_cv_c_int64_t" = yes ; then
	     INT64_T="int64_t"
         else
             INT64_T="$ac_cv_int64_t"
         fi
    fi
    # We use the type that we're going use for int64.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alignment restrictions on $MYINT64_T" >&5
$as_echo_n "checking for alignment restrictions on $MYINT64_T... " >&6; }
if test "${pac_cv_int64_t_alignment+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    if test "$cross_compiling" = yes; then :
  pac_cv_int64_t_alignment=$default_int64_t_alignment
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <stdlib.h>
int main(int argc, char **argv )
{
    $INT64_T *p1, v;
    char    *buf_p = (char *)malloc( 64 ), *bp;
    bp = buf_p;
    /* Make bp aligned on 4, not 8 bytes */
    if (!( (long)bp & 0x7 ) ) bp += 4;
    p1 = ($INT64_T *)bp;
    v = -1;
    *p1 = v;
    if (!( (long)bp & 0x3 ) ) bp += 2;
    p1 = ($INT64_T *)bp;
    *p1 = 1;
    if (!( (long)bp & 0x1 ) ) bp += 1;
    p1 = ($INT64_T *)bp;
    *p1 = 1;
    return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_int64_t_alignment=no
else
  pac_cv_int64_t_alignment=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_int64_t_alignment" >&5
$as_echo "$pac_cv_int64_t_alignment" >&6; }
    if test "$pac_cv_int64_t_alignment" = "no" ; then

$as_echo "#define HAVE_ANY_INT64_T_ALIGNMENT 1" >>confdefs.h

    fi
fi

if test "$ac_cv_int32_t" != "no" ; then
    default_int32_t_alignment=${CROSS_INT32_T_ALIGNMENT:-"unknown"}
    if test -z "$INT32_T" ; then
         if test "$ac_cv_c_int32_t" = yes ; then
	     INT32_T="int32_t"
         else
             INT32_T="$ac_cv_int32_t"
         fi
    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alignment restrictions on int32_t" >&5
$as_echo_n "checking for alignment restrictions on int32_t... " >&6; }
if test "${pac_cv_int32_t_alignment+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    if test "$cross_compiling" = yes; then :
  pac_cv_int32_t_alignment=$default_int32_t_alignment
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <stdlib.h>
int main(int argc, char **argv )
{
    $INT32_T *p1, v;
    char    *buf_p = (char *)malloc( 64 ), *bp;
    bp = buf_p;
    /* Make bp aligned on 4, not 8 bytes */
    if (!( (long)bp & 0x7 ) ) bp += 4;
    p1 = ($INT32_T *)bp;
    v = -1;
    *p1 = v;
    if (!( (long)bp & 0x3 ) ) bp += 2;
    p1 = ($INT32_T *)bp;
    *p1 = 1;
    if (!( (long)bp & 0x1 ) ) bp += 1;
    p1 = ($INT32_T *)bp;
    *p1 = 1;
    return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_int32_t_alignment=no
else
  pac_cv_int32_t_alignment=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_int32_t_alignment" >&5
$as_echo "$pac_cv_int32_t_alignment" >&6; }
    if test "$pac_cv_int32_t_alignment" = "no" ; then

$as_echo "#define HAVE_ANY_INT32_T_ALIGNMENT 1" >>confdefs.h

    fi
fi

# Get the size for the bsendoverhead
# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of MPIR_Bsend_data_t" >&5
$as_echo_n "checking size of MPIR_Bsend_data_t... " >&6; }
if test "${ac_cv_sizeof_MPIR_Bsend_data_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (MPIR_Bsend_data_t))" "ac_cv_sizeof_MPIR_Bsend_data_t"        "
#define MPI_Datatype int
#include \"${master_top_srcdir}/src/include/mpibsend.h\"

"; then :

else
  if test "$ac_cv_type_MPIR_Bsend_data_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (MPIR_Bsend_data_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_MPIR_Bsend_data_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_MPIR_Bsend_data_t" >&5
$as_echo "$ac_cv_sizeof_MPIR_Bsend_data_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_MPIR_BSEND_DATA_T $ac_cv_sizeof_MPIR_Bsend_data_t
_ACEOF


BSEND_OVERHEAD=$ac_cv_sizeof_MPIR_Bsend_data_t
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc __asm__ and pentium cmpxchgl instruction" >&5
$as_echo_n "checking for gcc __asm__ and pentium cmpxchgl instruction... " >&6; }
if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not checking when cross compiling" >&5
$as_echo "not checking when cross compiling" >&6; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_GCC_AND_PENTIUM_ASM 1" >>confdefs.h

   lac_cv_use_atomic_updates="yes"
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
if test "$lac_cv_use_atomic_updates" = "yes" ; then

$as_echo "#define USE_ATOMIC_UPDATES /**/" >>confdefs.h

fi

# check for x86_64
if test "$ac_cv_c_compiler_gnu" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc __asm__ and AMD x86_64 cmpxchgq instruction" >&5
$as_echo_n "checking for gcc __asm__ and AMD x86_64 cmpxchgq instruction... " >&6; }
if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not checking when cross compiling" >&5
$as_echo "not checking when cross compiling" >&6; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_GCC_AND_X86_64_ASM 1" >>confdefs.h

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
if test "$ac_cv_c_compiler_gnu" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc __asm__ and IA64 xchg4 instruction" >&5
$as_echo_n "checking for gcc __asm__ and IA64 xchg4 instruction... " >&6; }
if test "$cross_compiling" = yes; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not checking when cross compiling" >&5
$as_echo "not checking when cross compiling" >&6; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_run "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_GCC_AND_IA64_ASM 1" >>confdefs.h

else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam 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"
        WRAPPER_CFLAGS="$WRAPPER_CFLAGS -fprofile-arcs -ftest-coverage"
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-coverage only supported for GCC" >&5
$as_echo "$as_me: WARNING: --enable-coverage only supported for GCC" >&2;}
    fi
    if test "$enable_cxx" = "yes" ; then
        if test "$ac_cv_cxx_compiler_gnu" = "yes" ; then
            CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
            WRAPPER_CXXFLAGS="$WRAPPER_CXXFLAGS -fprofile-arcs -ftest-coverage"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-coverage only supported for GCC" >&5
$as_echo "$as_me: WARNING: --enable-coverage only supported for GCC" >&2;}
        fi
    fi
    # Add similar options for g77 so that the Fortran tests will also
    #
    if test "$enable_f77" = yes ; then
        if test "$ac_cv_f77_compiler_gnu" = "yes" ; then
             FFLAGS="$FFLAGS -fprofile-arcs -ftest-coverage"
             WRAPPER_FFLAGS="$WRAPPER_FFLAGS -fprofile-arcs -ftest-coverage"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-coverage only supported for G77/GFORTRAN" >&5
$as_echo "$as_me: WARNING: --enable-coverage only supported for G77/GFORTRAN" >&2;}
        fi
    fi
    if test "$enable_fc" = yes ; then
        if test "$ac_cv_fc_compiler_gnu" = "yes" ; then
             FCFLAGS="$FCFLAGS -fprofile-arcs -ftest-coverage"
             WRAPPER_FCFLAGS="$WRAPPER_FCFLAGS -fprofile-arcs -ftest-coverage"
        else
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-coverage only supported for GFORTRAN" >&5
$as_echo "$as_me: WARNING: --enable-coverage only supported for GFORTRAN" >&2;}
        fi
    fi
    # On some platforms (e.g., Mac Darwin), we must also *link*
    # with the -fprofile-args -ftest-coverage option.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compilation with coverage analysis enabled works" >&5
$as_echo_n "checking whether compilation with coverage analysis enabled works... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        int main(int argc, char **argv){return 1;}

_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

else

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
        as_fn_error $? "Unable to link programs when coverage analysis enabled" "$LINENO" 5

fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext

    # 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 :
  ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
if test "x$ac_cv_func_usleep" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_USLEEP 1
_ACEOF

fi
done


$as_echo "#define USE_COVERAGE 1" >>confdefs.h

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_stdc=yes
else
  ac_cv_header_stdc=no
fi
rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.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))
      return 2;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

else
  ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then

$as_echo "#define STDC_HEADERS 1" >>confdefs.h

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 string.h inttypes.h limits.h stddef.h errno.h sys/socket.h sys/time.h unistd.h endian.h assert.h sys/param.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/uio.h" >&5
$as_echo_n "checking for sys/uio.h... " >&6; }
if test "${ac_cv_header_sys_uio_h+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

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

int
main ()
{
int a;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_header_sys_uio_h=yes
else
  ac_cv_header_sys_uio_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_uio_h" >&5
$as_echo "$ac_cv_header_sys_uio_h" >&6; }
if test "$ac_cv_header_sys_uio_h" = yes ; then

$as_echo "#define HAVE_SYS_UIO_H 1" >>confdefs.h

fi

# Check for special types
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :

else

cat >>confdefs.h <<_ACEOF
#define size_t unsigned int
_ACEOF

fi


# These are used to support timeouts
for ac_func in setitimer alarm
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_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=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$ac_cv_func_vsnprintf" = "yes" ; then
    # vsnprintf may be declared in stdio.h and may need stdarg.h

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf needs a declaration" >&5
$as_echo_n "checking whether vsnprintf needs a declaration... " >&6; }
if test "${pac_cv_func_decl_vsnprintf+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
#include <stdarg.h>
int vsnprintf(double, int, double, const char *);
int
main ()
{
int a=vsnprintf(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_vsnprintf=yes
else
  pac_cv_func_decl_vsnprintf=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_vsnprintf" >&5
$as_echo "$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 strncasecmp
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
  ac_have_decl=1
else
  ac_have_decl=0
fi

cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRERROR_R $ac_have_decl
_ACEOF

for ac_func in strerror_r
do :
  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
if test "x$ac_cv_func_strerror_r" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STRERROR_R 1
_ACEOF

fi
done

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
$as_echo_n "checking whether strerror_r returns char *... " >&6; }
if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    ac_cv_func_strerror_r_char_p=no
    if test $ac_cv_have_decl_strerror_r = yes; then
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{

	  char buf[100];
	  char x = *strerror_r (0, buf, sizeof buf);
	  char *p = strerror_r (0, buf, sizeof buf);
	  return !p || x;

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_func_strerror_r_char_p=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    else
      # strerror_r is not declared.  Choose between
      # systems that have relatively inaccessible declarations for the
      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
      # former has a strerror_r that returns char*, while the latter
      # has a strerror_r that returns `int'.
      # This test should segfault on the DEC system.
      if test "$cross_compiling" = yes; then :
  :
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
	extern char *strerror_r ();
int
main ()
{
char buf[100];
	  char x = *strerror_r (0, buf, sizeof buf);
	  return ! isalpha (x);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_strerror_r_char_p=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

    fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
if test $ac_cv_func_strerror_r_char_p = yes; then

$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h

fi

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r needs a declaration" >&5
$as_echo_n "checking whether strerror_r needs a declaration... " >&6; }
if test "${pac_cv_func_decl_strerror_r+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
int strerror_r(double, int, double, const char *);
int
main ()
{
int a=strerror_r(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_strerror_r=yes
else
  pac_cv_func_decl_strerror_r=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_strerror_r" >&5
$as_echo "$pac_cv_func_decl_strerror_r" >&6; }
if test "$pac_cv_func_decl_strerror_r" = "yes" ; then

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


fi

fi

# Use snprintf if possible when creating messages
for ac_func in snprintf
do :
  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
if test "x$ac_cv_func_snprintf" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SNPRINTF 1
_ACEOF

fi
done

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf needs a declaration" >&5
$as_echo_n "checking whether snprintf needs a declaration... " >&6; }
if test "${pac_cv_func_decl_snprintf+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int snprintf(double, int, double, const char *);
int
main ()
{
int a=snprintf(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_snprintf=yes
else
  pac_cv_func_decl_snprintf=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_snprintf" >&5
$as_echo "$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

# qsort will be used in MPI_Comm_split, if available
for ac_func in qsort
do :
  ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
if test "x$ac_cv_func_qsort" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_QSORT 1
_ACEOF

fi
done


# 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).
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
$as_echo_n "checking for va_copy... " >&6; }
if test "${pac_cv_func_va_copy+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_func_va_copy=yes
else
  pac_cv_func_va_copy=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_va_copy" >&5
$as_echo "$pac_cv_func_va_copy" >&6; }

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

$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h

else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5
$as_echo_n "checking for __va_copy... " >&6; }
if test "${pac_cv_func___va_copy+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_func___va_copy=yes
else
  pac_cv_func___va_copy=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func___va_copy" >&5
$as_echo "$pac_cv_func___va_copy" >&6; }
    if test "$pac_cv_func___va_copy" = "yes" ; then

$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h

    fi
fi


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable argument list macro functionality" >&5
$as_echo_n "checking for variable argument list macro functionality... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        #include <stdio.h>
        #define conftest_va_arg_macro(...) printf(__VA_ARGS__)

int
main ()
{
conftest_va_arg_macro("a test %d", 3);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

$as_echo "#define HAVE_MACRO_VA_ARGS 1" >>confdefs.h

     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext


# 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!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
$as_echo_n "checking for working alloca.h... " >&6; }
if test "${ac_cv_working_alloca_h+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <alloca.h>
int
main ()
{
char *p = (char *) alloca (2 * sizeof (int));
			  if (p) return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_working_alloca_h=yes
else
  ac_cv_working_alloca_h=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
$as_echo "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then

$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
$as_echo_n "checking for alloca... " >&6; }
if test "${ac_cv_func_alloca_works+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  ifdef 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);
				    if (p) return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_func_alloca_works=yes
else
  ac_cv_func_alloca_works=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
$as_echo "$ac_cv_func_alloca_works" >&6; }

if test $ac_cv_func_alloca_works = yes; then

$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h

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=\${LIBOBJDIR}alloca.$ac_objext

$as_echo "#define C_ALLOCA 1" >>confdefs.h


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
if test "${ac_cv_os_cray+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
$as_echo "$ac_cv_os_cray" >&6; }
if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :

cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
_ACEOF

    break
fi

  done
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
$as_echo_n "checking stack direction for C alloca... " >&6; }
if test "${ac_cv_c_stack_direction+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_c_stack_direction=0
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
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 ()
{
  return find_stack_direction () < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_c_stack_direction=1
else
  ac_cv_c_stack_direction=-1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
$as_echo "$ac_cv_c_stack_direction" >&6; }
cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
_ACEOF


fi

# We don't use alloca unless USE_ALLOCA is also set.
# Check whether --enable-alloca was given.
if test "${enable_alloca+set}" = set; then :
  enableval=$enable_alloca;
else
  enable_alloca=no
fi

if test "$enable_alloca" = yes ; then

$as_echo "#define USE_ALLOCA 1" >>confdefs.h

fi

if test "$enable_g_mem" != "yes" ; then
    # Strdup is needed only if memory tracing is not enabled.
    for ac_func in strdup
do :
  ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
if test "x$ac_cv_func_strdup" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STRDUP 1
_ACEOF

fi
done

    if test "$ac_cv_func_strdup" = "yes" ; then
        # Do we need to declare strdup?

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strdup needs a declaration" >&5
$as_echo_n "checking whether strdup needs a declaration... " >&6; }
if test "${pac_cv_func_decl_strdup+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <string.h>
int strdup(double, int, double, const char *);
int
main ()
{
int a=strdup(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_strdup=yes
else
  pac_cv_func_decl_strdup=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_strdup" >&5
$as_echo "$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_fn_c_check_header_mongrel "$LINENO" "search" "ac_cv_header_search" "$ac_includes_default"
if test "x$ac_cv_header_search" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SEARCH 1
_ACEOF

fi

done

    for ac_func in tsearch
do :
  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
if test "x$ac_cv_func_tsearch" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_TSEARCH 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
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tsearch requires char* args" >&5
$as_echo_n "checking whether tsearch requires char* args... " >&6; }
if test "${pac_cv_tsearch_charp+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <search.h>
    char *tsearch( char *k, char **r, (int (*)())compare ) { return k; }
int
main ()
{
int f=0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_tsearch_charp=yes
else
  pac_cv_tsearch_charp=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_tsearch_charp" >&5
$as_echo "$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

$as_echo "#define USE_TSEARCH_WITH_CHARP 1" >>confdefs.h

	fi
    fi
    # Note that HPUX and AIX may require _INCLUDE_XOPEN_SOURCE or
    # _XOPEN_SOURCE be defined respectively.
fi

# ----------------------------------------------------------------------------
# Look for some non-posix, but commonly provided functions
# ----------------------------------------------------------------------------
# mkstemp() is a better replacement for mktemp()
for ac_func in mkstemp
do :
  ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
if test "x$ac_cv_func_mkstemp" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_MKSTEMP 1
_ACEOF

fi
done

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkstemp needs a declaration" >&5
$as_echo_n "checking whether mkstemp needs a declaration... " >&6; }
if test "${pac_cv_func_decl_mkstemp+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
int mkstemp(double, int, double, const char *);
int
main ()
{
int a=mkstemp(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_mkstemp=yes
else
  pac_cv_func_decl_mkstemp=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_mkstemp" >&5
$as_echo "$pac_cv_func_decl_mkstemp" >&6; }
if test "$pac_cv_func_decl_mkstemp" = "yes" ; then

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


fi

fi
# fdopen() converts from an fd to a FILE*
for ac_func in fdopen
do :
  ac_fn_c_check_func "$LINENO" "fdopen" "ac_cv_func_fdopen"
if test "x$ac_cv_func_fdopen" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_FDOPEN 1
_ACEOF

fi
done

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen needs a declaration" >&5
$as_echo_n "checking whether fdopen needs a declaration... " >&6; }
if test "${pac_cv_func_decl_fdopen+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
int fdopen(double, int, double, const char *);
int
main ()
{
int a=fdopen(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_fdopen=yes
else
  pac_cv_func_decl_fdopen=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_fdopen" >&5
$as_echo "$pac_cv_func_decl_fdopen" >&6; }
if test "$pac_cv_func_decl_fdopen" = "yes" ; then

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


fi

fi
# putenv() sets environment variable
for ac_func in putenv
do :
  ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
if test "x$ac_cv_func_putenv" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_PUTENV 1
_ACEOF

fi
done

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

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether putenv needs a declaration" >&5
$as_echo_n "checking whether putenv needs a declaration... " >&6; }
if test "${pac_cv_func_decl_putenv+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdlib.h>
int putenv(double, int, double, const char *);
int
main ()
{
int a=putenv(1.0,27,1.0,"foo");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_func_decl_putenv=yes
else
  pac_cv_func_decl_putenv=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_decl_putenv" >&5
$as_echo "$pac_cv_func_decl_putenv" >&6; }
if test "$pac_cv_func_decl_putenv" = "yes" ; then

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


fi

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.
# Note that at least the handling of the "device" option must come *after*
# the setup_device script is loaded so that the device can set the appropriate
# fields.  For now, we've split this so that there is an update to the timer
# after the setup_device script is loaded, but we should consider moving
# this entire block.
# ----------------------------------------------------------------------------
# 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 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 mach_absolute_time gettimeofday
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_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 .
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking that hrtime_t is properly defined for gethrtime" >&5
$as_echo_n "checking that hrtime_t is properly defined for gethrtime... " >&6; }
if test "${pac_cv_hrtime_works+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sys/time.h>

int
main ()
{
hrtime_t t1, t2; t1 = 1; t2 = 2; t1 = t1 + t2;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_hrtime_works=yes
else
  pac_cv_hrtime_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_hrtime_works" >&5
$as_echo "$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_mach_absolute_time" = "yes" ; then
        timer_type=mach_absolute_time
    elif test "$ac_cv_func_gettimeofday" = "yes" ; then
        timer_type=gettimeofday
    fi
fi
if test -z "$timer_type" ; then
    as_fn_error $? "No timer found" "$LINENO" 5
fi

# Check for valid timer and select datatypes for the time stamp
case "$timer_type" in

    gethrtime)
    MPID_TIMER_TYPE=hrtime_t
    ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime"
if test "x$ac_cv_func_gethrtime" = x""yes; then :

else

         as_fn_error $? "Requested timer gethrtime is not available" "$LINENO" 5

fi

    ;;

    clock_gettime)
    missing_function=no
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
$as_echo_n "checking for library containing clock_gettime... " >&6; }
if test "${ac_cv_search_clock_gettime+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char clock_gettime ();
int
main ()
{
return clock_gettime ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_clock_gettime+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_clock_gettime+set}" = set; then :

else
  ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
$as_echo "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
  as_fn_error $? "clock_gettime is not available" "$LINENO" 5
fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_getres" >&5
$as_echo_n "checking for library containing clock_getres... " >&6; }
if test "${ac_cv_search_clock_getres+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char clock_getres ();
int
main ()
{
return clock_getres ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rt; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_clock_getres=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_clock_getres+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_clock_getres+set}" = set; then :

else
  ac_cv_search_clock_getres=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_getres" >&5
$as_echo "$ac_cv_search_clock_getres" >&6; }
ac_res=$ac_cv_search_clock_getres
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
  as_fn_error $? "clock_getres is not available" "$LINENO" 5
fi

    MPID_TIMER_TYPE="struct timespec"
    # AIX does not always define struct timespec (!)
    # Make sure that we can use struct timespec
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct timespec is defined in time.h" >&5
$as_echo_n "checking whether struct timespec is defined in time.h... " >&6; }
if test "${pac_cv_struct_timespec_defined+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <time.h>
int
main ()
{

    struct timespec t;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_struct_timespec_defined=yes
else
  pac_cv_struct_timespec_defined=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_struct_timespec_defined" >&5
$as_echo "$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)
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct timespec is defined in time.h with _XOPEN_SOURCE=500" >&5
$as_echo_n "checking whether struct timespec is defined in time.h with _XOPEN_SOURCE=500... " >&6; }
if test "${pac_cv_struct_timespec_defined_with_xopen500+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#define _XOPEN_SOURCE 500
#include <time.h>
int
main ()
{

    struct timespec t;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_struct_timespec_defined_with_xopen500=yes
else
  pac_cv_struct_timespec_defined_with_xopen500=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_struct_timespec_defined_with_xopen500" >&5
$as_echo "$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.
	    as_fn_error $? "The available timer requires _XOPEN_SOURCE=500.  Add -D_XOPEN_SOURCE=500 to CFLAGS and rerun configure" "$LINENO" 5
        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
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_REALTIME defined in time.h" >&5
$as_echo_n "checking for CLOCK_REALTIME defined in time.h... " >&6; }
if test "${pac_cv_posix_clock_realtime+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <time.h>
int
main ()
{

    clockid_t cid = CLOCK_REALTIME;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_posix_clock_realtime=yes
else
  pac_cv_posix_clock_realtime=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_posix_clock_realtime" >&5
$as_echo "$pac_cv_posix_clock_realtime" >&6; }
    if test "$pac_cv_posix_clock_realtime" = "no" ; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: POSIX timer requires definitions in time.h" >&5
$as_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 confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <time.h>
#include <sys/time.h>
int
main ()
{

    clockid_t cid = CLOCK_REALTIME;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_posix_clock_realtime=yes
else
  pac_cv_posix_clock_realtime=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
	if test "$pac_cv_posix_clock_realtime" = yes ; then
	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sys/time.h required for POSIX timer" >&5
$as_echo "$as_me: WARNING: sys/time.h required for POSIX timer" >&2;}

$as_echo "#define NEEDS_SYS_TIME_H 1" >>confdefs.h

	else
	    as_fn_error $? "Cannot find the definition of CLOCK_REALTIME for the POSIX timer" "$LINENO" 5
	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
        ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
if test "x$ac_cv_func_gettimeofday" = x""yes; then :

else

         as_fn_error $? "Requested timer gettimeofday is not available" "$LINENO" 5

fi

    fi
    ;;

    linux86_cycle|linux86_cycle_2)

# The following AC_TRY_RUN statements are needed because x86_64 compilers
# usually know about rdtscp but the cpu may or may not actually implement the
# feature.  This is not cross-compile safe, unfortunately.  In the long run we
# should allow the user to override this with a configure flag.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking that linux86 cycle counter is available" >&5
$as_echo_n "checking that linux86 cycle counter is available... " >&6; }
if test "${pac_cv_linux86_cycle+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

                    long long var, *var_ptr=&var;
                    __asm__ __volatile__("rdtscp; shl \$32, %%rdx; or %%rdx, %%rax" : "=a" (*var_ptr) : : "ecx", "rdx");

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_linux86_cycle=rdtscp
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

                        long long var, *var_ptr=&var;
                        __asm__ __volatile__("push %%rbx ; cpuid ; rdtsc ; pop %%rbx ; shl $32, %%rdx; or %%rdx, %%rax" : "=a" (*var_ptr) : : "ecx", "rdx");

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_linux86_cycle=cpuid_rdtsc64
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

                            long long var, *var_ptr=&var;
                            __asm__ __volatile__("push %%ebx ; cpuid ; rdtsc ; pop %%ebx" : "=A" (*var_ptr) : : "ecx");

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_linux86_cycle=cpuid_rdtsc32
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

                                long long var, *var_ptr=&var;
                                __asm__ __volatile__("rdtsc" : "=A" (*var_ptr));

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_linux86_cycle=rdtsc
else
  pac_cv_linux86_cycle=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

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

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

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

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

int main()
{
    /* rdtscp */
    long long var, *var_ptr=&var;
    __asm__ __volatile__("rdtscp; shl \$32, %%rdx; or %%rdx, %%rax" : "=a" (*var_ptr) : : "ecx", "rdx");
    return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_linux86_cycle=rdtscp
else
  if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int main()
{
    /* cpuid 64 */
    long long var, *var_ptr=&var;
    __asm__ __volatile__("push %%rbx ; cpuid ; rdtsc ; pop %%rbx ; shl $32, %%rdx; or %%rdx, %%rax" : "=a" (*var_ptr) : : "ecx", "rdx");
    return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_linux86_cycle=cpuid_rdtsc64
else
  if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int main()
{
    /* cpuid 32 */
    long long var, *var_ptr=&var;
    __asm__ __volatile__("push %%ebx ; cpuid ; rdtsc ; pop %%ebx" : "=A" (*var_ptr) : : "ecx");
    return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_linux86_cycle=cpuid_rdtsc32
else
  if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int main()
{
    /* simple */
    long long var, *var_ptr=&var;
    __asm__ __volatile__("rdtsc" : "=A" (*var_ptr));
    return 0;
}

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  pac_cv_linux86_cycle=rdtsc
else
  pac_cv_linux86_cycle=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_linux86_cycle" >&5
$as_echo "$pac_cv_linux86_cycle" >&6; }

    case "$pac_cv_linux86_cycle" in
        "rdtscp")

$as_echo "#define LINUX86_CYCLE_RDTSCP 1" >>confdefs.h

	    ;;
        "cpuid_rdtsc64")

$as_echo "#define LINUX86_CYCLE_CPUID_RDTSC64 1" >>confdefs.h

            ;;
        "cpuid_rdtsc32")

$as_echo "#define LINUX86_CYCLE_CPUID_RDTSC32 1" >>confdefs.h

	    ;;
        "rdtsc")

$as_echo "#define LINUX86_CYCLE_RDTSC 1" >>confdefs.h

	    ;;
        *)
            cpu_gcc_x86_cycle=no
	    ;;
    esac

    if test "$cpu_gcc_x86_cycle" = "no" ; then
        as_fn_error $? "Linux86 cycle counter is not available on this system and or with the $CC compiler" "$LINENO" 5
    fi
    MPID_TIMER_TYPE="long long"
    ;;

    gcc_ia64_cycle)
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking that IPF timer is available" >&5
$as_echo_n "checking that IPF timer is available... " >&6; }
if test "${pac_cv_ia64_cycle+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_gcc_ia64_cycle=yes
else
  pac_cv_gcc_ia64_cycle=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_ia64_cycle" >&5
$as_echo "$pac_cv_ia64_cycle" >&6; }
    if test "$pac_cv_gcc_ia64_cycle" != "yes" ; then
        as_fn_error $? "IPF cycle counter is not available on this system and or with the $CC compiler" "$LINENO" 5
     fi
     MPID_TIMER_TYPE="long"
     ;;

    linuxalpha_cycle)
    as_fn_error $? "linuxalpha_cycle is no longer supported" "$LINENO" 5
    ;;

    mach_absolute_time)
    ac_fn_c_check_func "$LINENO" "mach_absolute_time" "ac_cv_func_mach_absolute_time"
if test "x$ac_cv_func_mach_absolute_time" = x""yes; then :

else
  as_fn_error $? "mach_absolute_time is not available" "$LINENO" 5
fi

    ac_fn_c_check_func "$LINENO" "mach_timebase_info" "ac_cv_func_mach_timebase_info"
if test "x$ac_cv_func_mach_timebase_info" = x""yes; then :

else
  as_fn_error $? "mach_timebase_info is not available" "$LINENO" 5
fi

    MPID_TIMER_TYPE="uint64_t"
    ;;

    device)
    # The device selected should export the datatype for the timer
    # in MPID_DEVICE_TIMER_TYPE if something other than long is needed
    if test -n "$MPID_DEVICE_TIMER_TYPE" ; then
       MPID_TIMER_TYPE=$MPID_DEVICE_TIMER_TYPE
    fi
    ;;

    *)
    as_fn_error $? "Invalid timer type $timer_type" "$LINENO" 5
    ;;
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


# Note that aint_size must be used instead of void_p where the desired check
# is on the size of MPI_Aint
aint_size=$ac_cv_sizeof_void_p
if test "$with_aint_size" -gt 0 ; then
   aint_size=$with_aint_size
   if test "$aint_size" != "$ac_cv_sizeof_void_p" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Overriding MPI_Aint to be $aint_size bytes" >&5
$as_echo "Overriding MPI_Aint to be $aint_size bytes" >&6; }
   fi
fi
MPI_AINT=int
for type in int long long_long short ; do
    eval len=\$ac_cv_sizeof_$type
    if test "$len" = "$aint_size" ; then
        MPI_AINT=`echo $type | sed -e 's/_/ /'`
        # Make the sizeof AINT available to other configures
        MPI_SIZEOF_AINT=$len
        export MPI_SIZEOF_AINT
        case $type in
            int)
                MPI_AINT_FMT_DEC_SPEC="%d"
                MPI_AINT_FMT_HEX_SPEC="%x"
                ;;
            long)
                MPI_AINT_FMT_DEC_SPEC="%ld"
                MPI_AINT_FMT_HEX_SPEC="%lx"
                ;;
            long_long)
                MPI_AINT_FMT_DEC_SPEC="%lld"
                MPI_AINT_FMT_HEX_SPEC="%llx"
                ;;
            short)
                MPI_AINT_FMT_DEC_SPEC="%hd"
                MPI_AINT_FMT_HEX_SPEC="%hx"
                ;;
            *)
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to determine format specifiers for MPI_Aint, defaulting to int" >&5
$as_echo "$as_me: WARNING: unable to determine format specifiers for MPI_Aint, defaulting to int" >&2;}
                MPI_AINT_FMT_DEC_SPEC="%d"
                MPI_AINT_FMT_HEX_SPEC="%x"
            ;;
        esac
        export MPI_AINT_FMT_DEC_SPEC MPI_AINT_FMT_HEX_SPEC
        break
    fi
done




# If sizeof(mpi_aint) = sizeof(int), set this value
if test "$ac_cv_sizeof_int" = "$aint_size" ; then

$as_echo "#define SIZEOF_INT_IS_AINT 1" >>confdefs.h

fi

# Find a pointer-sized 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
        case $type in
            int)
                MPIR_PINT_FMT_DEC_SPEC="\"%d\""
                MPIR_UPINT_FMT_DEC_SPEC="\"%u\""
                ;;
            long)
                MPIR_PINT_FMT_DEC_SPEC="\"%ld\""
                MPIR_UPINT_FMT_DEC_SPEC="\"%lu\""
                ;;
            long_long)
                MPIR_PINT_FMT_DEC_SPEC="\"%lld\""
                MPIR_UPINT_FMT_DEC_SPEC="\"%llu\""
                ;;
            short)
                MPIR_PINT_FMT_DEC_SPEC="\"%hd\""
                MPIR_UPINT_FMT_DEC_SPEC="\"%hu\""
                ;;
            *)
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to determine format specifiers for MPIR_Pint, defaulting to int" >&5
$as_echo "$as_me: WARNING: unable to determine format specifiers for MPIR_Pint, defaulting to int" >&2;}
                MPIR_PINT_FMT_DEC_SPEC="\"%d\""
                MPIR_UPINT_FMT_DEC_SPEC="\"%u\""
            ;;
        esac
        MPIR_PINT=`echo $type | sed -e 's/_/ /'`
        break
    fi
done

cat >>confdefs.h <<_ACEOF
#define MPIR_Pint $MPIR_PINT
_ACEOF


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


cat >>confdefs.h <<_ACEOF
#define MPIR_Upint unsigned $MPIR_PINT
_ACEOF


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


# ----------------------------------------------------------------------------
# MPI_AINT datatype
# ----------------------------------------------------------------------------
# Must be done after MPI_Aint type determination but before subconfigures.

# convert to 2-char hex size
case "$MPI_SIZEOF_AINT" in
    4)    len_mpi_aint=04 ;;
    8)    len_mpi_aint=08 ;;
    16)   len_mpi_aint=10 ;;
    *)    as_fn_error $? "Unable to convert MPI_SIZEOF_AINT to a hex string.  This is either because we are building on a very strange platform or there is a bug somewhere in configure." "$LINENO" 5 ;;
esac
# MPI_AINT and MPI_OFFSET are already taken, appending a _DATATYPE suffix
MPI_AINT_DATATYPE=0x4c00${len_mpi_aint}43

export MPI_AINT_DATATYPE

# 0x4c000043 is 1275068483 in decimal, add ($MPI_SIZEOF_AINT * 256) and you get
# the decimal equivalent of the hex number
MPI_F77_AINT=`expr 1275068483 '+' '(' 256 '*' $MPI_SIZEOF_AINT ')'`

export MPI_F77_AINT
# ----------------------------------------------------------------------------

# 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 with 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 test "$ac_cv_sizeof_void_p" -lt "$aint_size" ; then

$as_echo "#define USE_AINT_FOR_ATTRVAL 1" >>confdefs.h

fi
#
# If it is necessary for the device to update some of the variables,
# this step allows that to happen.  Possible variables to update are
#   LIBS - Add libraries needed for linking
#   LDFLAGS - Add other LD flags (e.g., search paths for libraries)
#   CPPFLAGS - Add C preprocessor flags, including -Idir
#   DEFS  - Add C preprocessor definitions, e.g., -Dfoo
# These must be updated, not replaced, so the setup_device script should
# do, e.g.,
#   LIBS="$LIBS -lmywierdlib",
# not
#   LIBS="-lmywierdlib"
# In some cases (particularly for LIBS), we want to perform this update
# *after* the configure step.  This is done by including the file
# localdefs if it exists.  Note that the use of a file *after* the configure
# of subdirectories means that the subdir configures will not get the
# value.  This is normally ok for libraries but not for include paths,
# which is why there is a pre and post step
if test -f $devicedir/setup_device ; then
    echo sourcing $devicedir/setup_device
    . $devicedir/setup_device
fi
# See if we need to update the timer type (which was converted to uppercase)
if test "$timer_type" = "DEVICE" ; then
    # The device selected should export the datatype for the timer
    # in MPID_DEVICE_TIMER_TYPE if something other than long is needed
    if test -n "$MPID_DEVICE_TIMER_TYPE" ; then
       MPID_TIMER_TYPE=$MPID_DEVICE_TIMER_TYPE
    fi
fi

export AR
export AR_FLAGS
export RANLIB
export MPILIBNAME
export PMPILIBNAME
export CC
export CPPFLAGS
export LIBS
export CXX
export CXXFLAGS
export FFLAGS
export CFLAGS
export FCFLAGS
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 FC
#
# -----------------------------------------------------------------------------
# Configure threads first.  This is necessary to obtain all required
# definitions, flags, and libraries that the other subsystems will need
#
#
# -----------------------------------------------------------------------------
MPIU_THREAD_DEFAULT=${MPIU_THREAD_DEFAULT:-posix}


# Check whether --with-thread-package was given.
if test "${with_thread_package+set}" = set; then :
  withval=$with_thread_package;
else
  with_thread_package=${MPIU_THREAD_DEFAULT}
fi


if test "$with_thread_package" = "yes" ; then
   with_thread_package=posix
fi

MPICH2_THREAD_PACKAGE=none
MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_INVALID
case $with_thread_package in
    posix|pthreads)
	with_thread_package=posix
	for ac_header in pthread.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
if test "x$ac_cv_header_pthread_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_PTHREAD_H 1
_ACEOF

fi

done


        # If pthreads library is found, just include it on the link line. We don't try
        # to test if the C compiler needs it or not, since the C++ or Fortran
        # compilers might need it even if the C compiler doesn't
        # (nvcc with gfortran, for example).
        #
        # OSF1 has __pthread_create but not pthread_create (because of
        # inconsistencies in the pthread spec).  Thus, we look for pthread_key_create
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_key_create in -lpthread" >&5
$as_echo_n "checking for pthread_key_create in -lpthread... " >&6; }
if test "${ac_cv_lib_pthread_pthread_key_create+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char pthread_key_create ();
int
main ()
{
return pthread_key_create ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_pthread_pthread_key_create=yes
else
  ac_cv_lib_pthread_pthread_key_create=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_key_create" >&5
$as_echo "$ac_cv_lib_pthread_pthread_key_create" >&6; }
if test "x$ac_cv_lib_pthread_pthread_key_create" = x""yes; then :
  have_pthreads=yes
fi

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


        if echo "$LIBS" | $FGREP -e '-lpthread' >/dev/null 2>&1; then :
  echo "LIBS(='$LIBS') contains '-lpthread', not prepending" >&5
else
  echo "LIBS(='$LIBS') does not contain '-lpthread', prepending" >&5
                LIBS="-lpthread $LIBS"

fi

	fi

        for ac_func in pthread_yield
do :
  ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
if test "x$ac_cv_func_pthread_yield" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_PTHREAD_YIELD 1
_ACEOF

fi
done


        # this check should come after the AC_CHECK_LIB for -lpthread
        ac_fn_c_check_func "$LINENO" "pthread_key_create" "ac_cv_func_pthread_key_create"
if test "x$ac_cv_func_pthread_key_create" = x""yes; then :

else
  as_fn_error $? "unable to find pthreads library" "$LINENO" 5
fi


	# Check for a routine that specify a routine to call on
	# thread exit.  We can use this to release memory that may
	# be allocated by the MPICH2 library in the thread.
	# A complication: pthread_cleanup_push may be a macro; in that
	# case, check_funcs will fail to find it.
	# Under OSX, pthread_cleanup_push and pop are macros that must
	# appear together in the same lexical scope, and hence are
	# really useless in libraries that may allocate data within
	# a user-managed thread.
	for ac_func in pthread_cleanup_push
do :
  ac_fn_c_check_func "$LINENO" "pthread_cleanup_push" "ac_cv_func_pthread_cleanup_push"
if test "x$ac_cv_func_pthread_cleanup_push" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_PTHREAD_CLEANUP_PUSH 1
_ACEOF

fi
done

	if test "$ac_cv_func_pthread_cleanup_push" = "no" ; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_cleanup_push is available (may be a macro in pthread.h)" >&5
$as_echo_n "checking whether pthread_cleanup_push is available (may be a macro in pthread.h)... " >&6; }
if test "${pac_cv_func_pthread_cleanup_push+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <pthread.h>
void f1(void *a) { return; }
int
main ()
{
pthread_cleanup_push( f1, (void *)0 );
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_func_pthread_cleanup_push=yes
else
  pac_cv_func_pthread_cleanup_push=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_func_pthread_cleanup_push" >&5
$as_echo "$pac_cv_func_pthread_cleanup_push" >&6; }
            if test "$pac_cv_func_pthread_cleanup_push" = yes ; then

$as_echo "#define HAVE_PTHREAD_CLEANUP_PUSH_MACRO 1" >>confdefs.h

            fi

        fi
	# Check for PTHREAD_MUTEX_RECURSIVE_NP and PTHREAD_MUTEX_RECURSIVE
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread.h defines PTHREAD_MUTEX_RECURSIVE_NP" >&5
$as_echo_n "checking whether pthread.h defines PTHREAD_MUTEX_RECURSIVE_NP... " >&6; }
if test "${pac_cv_has_pthread_mutex_recursive_np+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
int a=PTHREAD_MUTEX_RECURSIVE_NP;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_has_pthread_mutex_recursive_np=yes
else
  pac_cv_has_pthread_mutex_recursive_np=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_has_pthread_mutex_recursive_np" >&5
$as_echo "$pac_cv_has_pthread_mutex_recursive_np" >&6; }
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread.h defines PTHREAD_MUTEX_RECURSIVE" >&5
$as_echo_n "checking whether pthread.h defines PTHREAD_MUTEX_RECURSIVE... " >&6; }
if test "${pac_cv_has_pthread_mutex_recursive+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
int a=PTHREAD_MUTEX_RECURSIVE;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_has_pthread_mutex_recursive=yes
else
  pac_cv_has_pthread_mutex_recursive=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_has_pthread_mutex_recursive" >&5
$as_echo "$pac_cv_has_pthread_mutex_recursive" >&6; }
        if test "$pac_cv_has_pthread_mutex_recursive_np" = yes ; then

$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE_NP 1" >>confdefs.h

	fi
        if test "$pac_cv_has_pthread_mutex_recursive" = yes ; then

$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h

	fi

        # Check for PTHREAD_MUTEX_ERRORCHECK_NP and PTHREAD_MUTEX_ERRORCHECK
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread.h defines PTHREAD_MUTEX_ERRORCHECK_NP" >&5
$as_echo_n "checking whether pthread.h defines PTHREAD_MUTEX_ERRORCHECK_NP... " >&6; }
if test "${pac_cv_has_pthread_mutex_errorcheck_np+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
int a=PTHREAD_MUTEX_ERRORCHECK_NP;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_has_pthread_mutex_errorcheck_np=yes
else
  pac_cv_has_pthread_mutex_errorcheck_np=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_has_pthread_mutex_errorcheck_np" >&5
$as_echo "$pac_cv_has_pthread_mutex_errorcheck_np" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread.h defines PTHREAD_MUTEX_ERRORCHECK" >&5
$as_echo_n "checking whether pthread.h defines PTHREAD_MUTEX_ERRORCHECK... " >&6; }
if test "${pac_cv_has_pthread_mutex_errorcheck+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
int a=PTHREAD_MUTEX_ERRORCHECK;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_has_pthread_mutex_errorcheck=yes
else
  pac_cv_has_pthread_mutex_errorcheck=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_has_pthread_mutex_errorcheck" >&5
$as_echo "$pac_cv_has_pthread_mutex_errorcheck" >&6; }

        if test "$pac_cv_has_pthread_mutex_errorcheck" = yes ; then

$as_echo "#define PTHREAD_MUTEX_ERRORCHECK_VALUE PTHREAD_MUTEX_ERRORCHECK" >>confdefs.h

        elif test "$pac_cv_has_pthread_mutex_errorcheck_np" = yes ; then

$as_echo "#define PTHREAD_MUTEX_ERRORCHECK_VALUE PTHREAD_MUTEX_ERRORCHECK_NP" >>confdefs.h

        fi

	MPICH2_THREAD_PACKAGE=pthreads
        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_POSIX
	;;
    solaris)
	for ac_header in thread.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
if test "x$ac_cv_header_thread_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_THREAD_H 1
_ACEOF

fi

done

	for ac_func in thr_yield
do :
  ac_fn_c_check_func "$LINENO" "thr_yield" "ac_cv_func_thr_yield"
if test "x$ac_cv_func_thr_yield" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_THR_YIELD 1
_ACEOF

fi
done

	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
$as_echo_n "checking for library containing thr_create... " >&6; }
if test "${ac_cv_search_thr_create+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char thr_create ();
int
main ()
{
return thr_create ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' thread; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_thr_create=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if test "${ac_cv_search_thr_create+set}" = set; then :
  break
fi
done
if test "${ac_cv_search_thr_create+set}" = set; then :

else
  ac_cv_search_thr_create=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
$as_echo "$ac_cv_search_thr_create" >&6; }
ac_res=$ac_cv_search_thr_create
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  found=yes
else
  found=no
fi

	if test "$found" != "yes" ; then
	   as_fn_error $? "unable to find Solaris threads library" "$LINENO" 5
	fi
	# FIXME: need to add -mt if using solaris compilers
	MPICH2_THREAD_PACKAGE=solaris
        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_SOLARIS
	;;
    win|windows)
        with_thread_package=win
        MPICH2_THREAD_PACKAGE=win
        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_WIN
        as_fn_error $? "The 'win' thread package is not supported via autoconf builds at this time." "$LINENO" 5
        ;;
    no|none)
	with_thread_package=none
        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_NONE
	;;
    *)
	as_fn_error $? "The specified thread package, $with_thread_package, is not supported." "$LINENO" 5
	;;
esac

# Define and export the selected thread library so that other packages,
# such as MPE, will know what's used in MPICH2
export MPICH2_THREAD_PACKAGE

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


# check for compiler-support for thread-local storage (MPIU_TLS_SPECIFIER)

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage specifier" >&5
$as_echo_n "checking for thread local storage specifier... " >&6; }
  if test "${ac_cv_tls+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    ax_tls_keywords="__thread __declspec(thread) none"
    for ax_tls_keyword in $ax_tls_keywords; do
       case $ax_tls_keyword in
          none) ac_cv_tls=none ; break ;;
	  *)
             # MPICH2 modification: This was an AC_TRY_COMPILE before, but
             # Darwin with non-standard compilers will accept __thread at
             # compile time but fail to link due to an undefined
             # "__emutls_get_address" symbol unless -lgcc_eh is added to the
             # link line.
             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ax_tls_keyword int bar = 5;
int
main ()
{
++bar;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_tls=$ax_tls_keyword ; break
else
  ac_cv_tls=none
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
          esac
    done

fi


  if test "$ac_cv_tls" != "none"; then
    # MPICH2 modification: this was "TLS" before instead of
    # "MPIU_TLS_SPECIFIER", but TLS had a reasonably high chance of conflicting
    # with a system library.

cat >>confdefs.h <<_ACEOF
#define MPIU_TLS_SPECIFIER $ac_cv_tls
_ACEOF

  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
$as_echo "$ac_cv_tls" >&6; }


for ac_header in sched.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
if test "x$ac_cv_header_sched_h" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_SCHED_H 1
_ACEOF

fi

done

for ac_func in sched_yield yield usleep sleep select getpid
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done


# Check for the Linux functions for controlling processor affinity.
# LINUX: sched_setaffinity
# AIX:   bindprocessor
# OSX (Leopard): thread_policy_set
for ac_func in sched_setaffinity sched_getaffinity bindprocessor thread_policy_set
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

if test "$ac_cv_func_sched_setaffinity" = "yes" ; then
    # Test for the cpu process set type
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpu_set_t available" >&5
$as_echo_n "checking whether cpu_set_t available... " >&6; }
if test "${pac_cv_have_cpu_set_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sched.h>
int
main ()
{
 cpu_set_t t;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_have_cpu_set_t=yes
else
  pac_cv_have_cpu_set_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_cpu_set_t" >&5
$as_echo "$pac_cv_have_cpu_set_t" >&6; }
    if test "$pac_cv_have_cpu_set_t" = yes ; then

$as_echo "#define HAVE_CPU_SET_T 1" >>confdefs.h


	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the CPU_SET and CPU_ZERO macros are defined" >&5
$as_echo_n "checking whether the CPU_SET and CPU_ZERO macros are defined... " >&6; }
if test "${pac_cv_cpu_set_defined+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

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

#include <sched.h>
int
main ()
{
 cpu_set_t t; CPU_ZERO(&t); CPU_SET(1,&t);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  pac_cv_cpu_set_defined=yes
else
  pac_cv_cpu_set_defined=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_cpu_set_defined" >&5
$as_echo "$pac_cv_cpu_set_defined" >&6; }
	if test "$pac_cv_cpu_set_defined" = "yes" ; then

$as_echo "#define HAVE_CPU_SET_MACROS 1" >>confdefs.h

        fi
	# FIXME: Some versions of sched_setaffinity return ENOSYS (!),
	# so we should test for the unfriendly and useless behavior
    fi
fi
if test "$ac_cv_func_thread_policy_set" = yes ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether thread affinity macros defined" >&5
$as_echo_n "checking whether thread affinity macros defined... " >&6; }
if test "${pac_cv_have_thread_affinity_policy+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mach/thread_policy.h>
int
main ()
{

#if !defined(THREAD_AFFINITY_POLICY) || !defined(THREAD_AFFINITY_TAG_NULL)
    :'thread macros not defined

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  pac_cv_have_thread_affinity_policy=yes
else
  pac_cv_have_thread_affinity_policy=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_thread_affinity_policy" >&5
$as_echo "$pac_cv_have_thread_affinity_policy" >&6; }
    if test "$pac_cv_have_thread_affinity_policy" = yes ; then

$as_echo "#define HAVE_OSX_THREAD_AFFINITY 1" >>confdefs.h

    fi
fi

MPIU_THREAD_LIB_NAME=${MPILIBNAME}


# -----------------------------------------------------------------------------
# End of thread configure
# -----------------------------------------------------------------------------


# Checkpointing
# Check whether --enable-checkpointing was given.
if test "${enable_checkpointing+set}" = set; then :
  enableval=$enable_checkpointing;  if test "$enableval" != "no" ; then


# Check whether --with-blcr was given.
if test "${with_blcr+set}" = set; then :
  withval=$with_blcr; if test "${with_blcr}" != "yes" -a "${with_blcr}" != "no" ; then
            # is adding lib64 by default really the right thing to do?  What if
            # we are on a 32-bit host that happens to have both lib dirs available?
            LDFLAGS="$LDFLAGS -L${with_blcr}/lib64 -L${with_blcr}/lib"
            CPPFLAGS="$CPPFLAGS -I${with_blcr}/include"
	    WRAPPER_CFLAGS="$WRAPPER_CFLAGS -I${with_blcr}/include"
        fi
fi


# Check whether --with-blcr-include was given.
if test "${with_blcr_include+set}" = set; then :
  withval=$with_blcr_include; if test "${with_blcr_include}" != "yes" -a "${with_blcr_include}" != "no" ; then
            CPPFLAGS="$CPPFLAGS -I${with_blcr_include}"
            WRAPPER_CFLAGS="$WRAPPER_CFLAGS -I${with_blcr_include}"
        fi
fi


# Check whether --with-blcr-lib was given.
if test "${with_blcr_lib+set}" = set; then :
  withval=$with_blcr_lib; if test "${with_blcr_lib}" != "yes" -a "${with_blcr_lib}" != "no" ; then
            LDFLAGS="$LDFLAGS -L${with_blcr_lib}"
        fi
fi




    failure=no
    ac_fn_c_check_header_mongrel "$LINENO" "libcr.h" "ac_cv_header_libcr_h" "$ac_includes_default"
if test "x$ac_cv_header_libcr_h" = x""yes; then :

else
  failure=yes
fi


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cr_init in -lcr" >&5
$as_echo_n "checking for cr_init in -lcr... " >&6; }
if test "${ac_cv_lib_cr_cr_init+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcr  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char cr_init ();
int
main ()
{
return cr_init ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_cr_cr_init=yes
else
  ac_cv_lib_cr_cr_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cr_cr_init" >&5
$as_echo "$ac_cv_lib_cr_cr_init" >&6; }
if test "x$ac_cv_lib_cr_cr_init" = x""yes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCR 1
_ACEOF

  LIBS="-lcr $LIBS"

else
  failure=yes
fi

    if test "$failure" = "no" ; then
       success=yes
    else
       success=no
    fi

	if test "$success" = "no" ; then
	   as_fn_error $? "'libcr.h or libcr library not found. Did you specify --with-blcr= or --with-blcr-include= or --with-blcr-lib=?'" "$LINENO" 5
	fi


$as_echo "#define ENABLE_CHECKPOINTING 1" >>confdefs.h

      fi
fi


# 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 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)

user_specified_atomic_primitives=no
if test "$DEBUG_SUBDIR_CACHE" = yes ; then
    set -x
fi
for subsys in $devsubsystems $subsystems ; do

        { $as_echo "$as_me:${as_lineno-$LINENO}: ===== configuring $subsys =====" >&5
$as_echo "$as_me: ===== configuring $subsys =====" >&6;}


# Build any intermediate directories
for dir in $subsys ; do

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

    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

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""

done

	pac_abs_srcdir=`(cd $srcdir && pwd)`

	if test -f $pac_abs_srcdir/$subsys/setup ; then
	   . $pac_abs_srcdir/$subsys/setup
	fi

        pac_subconfigure_file="$pac_abs_srcdir/$subsys/configure"
	if test -x $pac_subconfigure_file ; then
	   pac_subconfig_args=""

            # Set IFS so ac_configure_args can be tokenized
            # with extra " " tokens being skipped.

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

            IFS="'"
            for pac_arg in $ac_configure_args ; do
                case "$pac_arg" in
                # Ignore any null and leading blank strings.
                ""|" "*)
                    ;;
                *)
                    pac_pval=""
                    # Restore IFS so ac_precious_vars which has
                    # " " as separator can be correctly tokenized

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""

                    for pac_pvar in $ac_precious_vars ; do
                        # check if configure argument token contains the
                        # precious variable, i.e. "name_of_prec_var=".
                        pvar_in_arg=`echo $pac_arg | grep "$pac_pvar="`
                        if test "X$pvar_in_arg" != "X" ; then
                            # check if current precious variable is set in env
                            eval pvar_set=\${$pac_pvar+set}
                            if test "$pvar_set" = "set" ; then
                                # Append 'name_of_prec_var=value_of_prec_var'
                                # to the subconfigure arguments list, where
                                # value_of_prec_var is fetched from the env.
                                eval pac_pval=\${$pac_pvar}
                                pac_subconfig_args="$pac_subconfig_args '$pac_pvar=$pac_pval'"
                                break
                            fi
                        fi
                    done
                    # since the precious variable is not set in the env.,
                    # append the corresponding configure argument token
                    # to the subconfigure argument list.
                    if test "X$pac_pval" = "X" ; then
                        pac_subconfig_args="$pac_subconfig_args '$pac_arg'"
                    fi
                    # reset "'" as IFS to process ac_configure_args

	if test -z "${pac_save_IFS_nesting}" ; then
	   pac_save_IFS_nesting=0
	fi
	eval pac_save_IFS_${pac_save_IFS_nesting}='"$IFS"'
	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} + 1`

                    IFS="'"
                    ;;
                esac
            done
            # Restore IFS.

	pac_save_IFS_nesting=`expr ${pac_save_IFS_nesting} - 1`
	eval IFS="\$pac_save_IFS_${pac_save_IFS_nesting}"
	eval pac_save_IFS_${pac_save_IFS_nesting}=""


                      if test "$enable_option_checking" = no ; then
              pac_subconfig_args="$pac_subconfig_args --disable-option-checking"
           fi

	   { $as_echo "$as_me:${as_lineno-$LINENO}: executing: $pac_subconfigure_file $pac_subconfig_args" >&5
$as_echo "$as_me: executing: $pac_subconfigure_file $pac_subconfig_args" >&6;}
	   if (cd $subsys && eval $pac_subconfigure_file $pac_subconfig_args) ; then
               :
	   else
               as_fn_error $? "$subsys configure failed" "$LINENO" 5
	   fi
        else
           if test -e $pac_subconfigure_file ; then
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $pac_subconfigure_file exists but is not executable" >&5
$as_echo "$as_me: WARNING: $pac_subconfigure_file exists but is not executable" >&2;}
           else
               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $pac_subconfigure_file does not exist" >&5
$as_echo "$as_me: WARNING: $pac_subconfigure_file does not exist" >&2;}
           fi
	fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: ===== done with $subsys configure =====" >&5
$as_echo "$as_me: ===== done with $subsys configure =====" >&6;}

	# 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 $pac_abs_srcdir/$subsys/localdefs ; then
	   . $pac_abs_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"


# Find the size of OPA_ptr_t. This step needs to come after the OPA
# configure above in order to get the size OPA_ptr_t evaluated for
# this platform.
# The cast to long int 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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of OPA_ptr_t" >&5
$as_echo_n "checking size of OPA_ptr_t... " >&6; }
if test "${ac_cv_sizeof_OPA_ptr_t+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (OPA_ptr_t))" "ac_cv_sizeof_OPA_ptr_t"        "
#include \"${master_top_srcdir}/src/openpa/src/opa_primitives.h\"
pthread_mutex_t *OPA_emulation_lock;

"; then :

else
  if test "$ac_cv_type_OPA_ptr_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (OPA_ptr_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_OPA_ptr_t=0
   fi
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_OPA_ptr_t" >&5
$as_echo "$ac_cv_sizeof_OPA_ptr_t" >&6; }



cat >>confdefs.h <<_ACEOF
#define SIZEOF_OPA_PTR_T $ac_cv_sizeof_OPA_ptr_t
_ACEOF



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
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not define Fortran MPI datatypes for C" >&5
$as_echo "$as_me: WARNING: Could not define Fortran MPI datatypes for C" >&2;}

$as_echo "#define HAVE_NO_FORTRAN_MPI_TYPES_IN_C 1" >>confdefs.h

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














# If ROMIO was successfully configured, then ROMIO will have exported the
# definition of MPI_OFFSET_TYPE through its localdefs file (created by the
# ROMIO configure in src/mpi/romio/localdefs).  If MPI_OFFSET_TYPE was not
# defined, this code attempts to find a good choice for MPI_OFFSET_TYPE
# (As the offset type is used for File operations, the specific type
# really doesn't matter if ROMIO doesn't provide it).
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
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking the sizeof MPI_Offset" >&5
$as_echo_n "checking the sizeof MPI_Offset... " >&6; }
if test "${ac_cv_sizeof_MPI_Offset+set}" = set; then :
  $as_echo_n "(cached) " >&6
else

            ac_cv_sizeof_MPI_Offset=unknown
            if ac_fn_c_compute_int "$LINENO" "sizeof($MPI_OFFSET)" "ac_cv_sizeof_MPI_Offset"        ""; then :

else

                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine the size of MPI_Offset" >&5
$as_echo "$as_me: WARNING: Unable to determine the size of MPI_Offset" >&2;}

fi


fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_MPI_Offset" >&5
$as_echo "$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
    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
    else
        MPI_OFFSET=long
        MPI_SIZEOF_OFFSET=$ac_cv_sizeof_long
    fi
    export MPI_SIZEOF_OFFSET
fi

#
# FIXME: we need an explanation of why we need both MPI_OFFSET and
# MPI_OFFSET_TYPEDEF.   Why is MPI_OFFSET_TYPEDEF necessary?
# This appears to be used by the Windows "winconfigure.wsf" which is used
# to create a multiline definition using an #ifdef check on USE_GCC
# We may wish to use a different approach
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 no 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_fc" = 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

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran Offset type works with Fortran 77" >&5
$as_echo_n "checking whether the Fortran Offset type works with Fortran 77... " >&6; }
    cat > conftest.$ac_ext <<_ACEOF

              program main
      $FORTRAN_MPI_OFFSET i
      end

_ACEOF
if ac_fn_f77_try_compile "$LINENO"; then :
  has_f77_offsettype=yes
else
  has_f77_offsetype=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_f77_offsettype" >&5
$as_echo "$has_f77_offsettype" >&6; }
    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


    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran Offset type works with Fortran 90" >&5
$as_echo_n "checking whether the Fortran Offset type works with Fortran 90... " >&6; }
    cat > conftest.$ac_ext <<_ACEOF

              program main
      $FORTRAN_MPI_OFFSET i
      end

_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
  has_fc_offsettype=yes
else
  has_fc_offsetype=no
fi
rm -f core 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

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_fc_offsettype" >&5
$as_echo "$has_fc_offsettype" >&6; }

    if test "$has_f77_offsettype" != yes -o "$has_fc_offsettype" != yes ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mpif.h is not compatible with both $F77 $FFLAGS and $FC $FCFLAGS.  We recommend that you set both F77 and FC to the same compiler and reconfigure." >&5
$as_echo "$as_me: WARNING: mpif.h is not compatible with both $F77 $FFLAGS and $FC $FCFLAGS.  We recommend that you set both F77 and FC to the same compiler and reconfigure." >&2;}
    fi
fi

#

# ----------------------------------------------------------------------------
# MPI_OFFSET datatype
# ----------------------------------------------------------------------------
# must be done after ROMIO configure step
case "$MPI_SIZEOF_OFFSET" in
    4)    len_mpi_offset=04 ;;
    8)    len_mpi_offset=08 ;;
    16)   len_mpi_offset=10 ;;
    *)    as_fn_error $? "Unable to convert MPI_SIZEOF_OFFSET to a hex string.  This is either because we are building on a very strange platform or there is a bug somewhere in configure." "$LINENO" 5 ;;
esac
MPI_OFFSET_DATATYPE=0x4c00${len_mpi_offset}44

export MPI_OFFSET_DATATYPE

# 0x4c000044 is 1275068484 in decimal, add ($MPI_SIZEOF_OFFSET * 256) and you get
# the decimal equivalent of the hex number
MPI_F77_OFFSET=`expr 1275068484 '+' '(' 256 '*' $MPI_SIZEOF_OFFSET ')'`

export MPI_F77_OFFSET
# ----------------------------------------------------------------------------


#
# See if we can support the type create functions that take
# precision and exponent range.  These need are determined by running
# a configure script in the f90 test directory
if test "$enable_f77" = yes -a "$enable_fc" = yes ; then
    # Create the local directory
    if test ! -d src ; then mkdir src ; fi
    if test ! -d src/binding ; then mkdir src/binding ; fi
    if test ! -d src/binding/f90 ; then mkdir src/binding/f90 ; fi
    export F77
    export FC
    echo "Running Configure for Fortran 90 Type routines"
    # Include any options passed to the top-level configure
    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"

    # The eval below is needed to properly quote the sub-configure arguments.
    # Thanks to Steve Oyanagi at Cray for spotting it when it was missing.
    (cd src/binding/f90 && \
     eval $master_top_srcdir/src/binding/f90/configure $ac_sub_configure_args)
    rc=$?
    if test $rc = 0 ; then

$as_echo "#define HAVE_FC_TYPE_ROUTINES 1" >>confdefs.h

    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to determine Fortran 90 type support; defaults used" >&5
$as_echo "$as_me: WARNING: Unable to determine Fortran 90 type support; defaults used" >&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
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The $with_device device did not set the maximum size of a processor name, $MPI_MAX_PROCESSOR_NAME being used." >&5
$as_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


# Add a definition that is used to help support Windows DLLs (used in mpi.h.in)
MPIU_DLL_SPEC_DEF="#define MPIU_DLL_SPEC"




# 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_CXX=$enable_cxx
MPICH2_ENABLE_F77=$enable_f77
MPICH2_ENABLE_FC=$enable_fc
export MPICH2_ENABLE_CXX
export MPICH2_ENABLE_F77
export MPICH2_ENABLE_FC
# 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-4"


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=`pwd`/src/binding/f90
fi

ac_config_commands="$ac_config_commands default-5"


# Move the mpio.h file into the build directories for testing
#export top_srcdir
#export enable_romio
ac_config_commands="$ac_config_commands default-6"


ac_config_commands="$ac_config_commands default-7"


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"



# 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 "$MPIFC" ; then MPIFC='$(bindir)/mpif90' ; fi
if test -z "$MPICXX" ; then MPICXX='$(bindir)/mpicxx' ; fi






$as_echo "#define HAVE_MPICHCONF 1" >>confdefs.h


# Add the LDFLAGS/LIBS we got so far to WRAPPERs
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS $LDFLAGS"
WRAPPER_LIBS="$WRAPPER_LIBS $LIBS"

# Setup required inter-library dependencies
LIB_DEPS=""
LDFLAGS_DEPS=""
if test "$ENABLE_SHLIB" != "none" -a "$enable_lib_depend" = "yes" ; then
   LIB_DEPS="$WRAPPER_LIBS"
   WRAPPER_LIBS=""
   LDFLAGS_DEPS="$WRAPPER_LDFLAGS"
   # WRAPPER_LDFLAGS are not reset as they point to the position of
   # the dependency libraries when rpath builds are not enabled
fi



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

$as_echo "#define USE_PMI2_API 1" >>confdefs.h

fi

ac_config_files="$ac_config_files Makefile src/Makefile src/include/Makefile src/include/mpich2info.h mpich2-doxygen 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/f77/setbot.c src/binding/f90/Makefile src/binding/f90/mpi_sizeofs.f90 src/binding/f90/mpi_base.f90 src/packaging/Makefile src/packaging/pkgconfig/mpich2-c.pc src/packaging/pkgconfig/mpich2-cxx.pc src/packaging/pkgconfig/mpich2-f77.pc src/packaging/pkgconfig/mpich2-f90.pc src/packaging/pkgconfig/Makefile src/packaging/envmods/mpich2.module src/packaging/envmods/Makefile src/env/mpixxx_opts.conf 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/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/mpix/Makefile src/mpix/comm/Makefile src/mpid/Makefile src/mpid/common/Makefile src/mpid/common/datatype/Makefile src/mpid/common/datatype/dataloop/Makefile src/pm/Makefile src/pmi/Makefile src/pmi/${pmi_name}/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/mem/Makefile src/util/msgs/Makefile src/util/param/Makefile src/util/dbg/Makefile src/util/dbg/getfuncstack src/util/osserv/Makefile src/util/procmap/Makefile src/util/other/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 test/util/timer/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, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     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" &&
      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  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}'

DEFS=-DHAVE_CONFIG_H

ac_libobjs=
ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs



: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $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}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi


as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
else
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    as_echo_n='/usr/ucb/echo -n'
  else
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    as_echo_n_body='eval
      arg=$1;
      case $arg in #(
      *"$as_nl"*)
	expr "X$arg" : "X\\(.*\\)$as_nl";
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
      esac;
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    '
    export as_echo_n_body
    as_echo_n='sh -c $as_echo_n_body as_echo'
  fi
  export as_echo_body
  as_echo='sh -c $as_echo_body as_echo'
fi

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
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
IFS=$as_save_IFS

     ;;
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
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi

# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there.  '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH


# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  $as_echo "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; 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

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

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

# 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

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -p'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -p'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -p'
  fi
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null


# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
	test -d "$1/.";
      else
	case $1 in #(
	-*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

# 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'"


exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by $as_me, which was
generated by GNU Autoconf 2.67.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac

case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac


cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration.  Unless the files
and actions are specified as TAGs, all are instantiated by default.

Usage: $0 [OPTION]... [TAG]...

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
      --config     print configuration, then exit
  -q, --quiet, --silent
                   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 the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.67,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
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=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    $as_echo "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    $as_echo "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    '') as_fn_error $? "missing file argument" ;;
    esac
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h)
    # Conflict between --help and --header
    as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
  --help | --hel | -h )
    $as_echo "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;

  *) as_fn_append ac_config_targets " $1"
     ac_need_defaults=false ;;

  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 || ac_write_fail=1
if \$ac_cs_recheck; then
  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  $as_echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
master_top_srcdir=$master_top_srcdir
enable_f77=$enable_f77
enable_fc=$enable_fc
has_exclaim=$has_exclaim
has_fort_real8=$pac_cv_fort_real8
includebuild_dir=$includebuild_dir
libbuild_dir=$libbuild_dir
bashWorks=$bashWorks
enable_fc=$enable_fc
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

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 || ac_write_fail=1

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "src/include/mpichconf.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/mpichconf.h" ;;
    "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" ;;
    "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/mpich2info.h") CONFIG_FILES="$CONFIG_FILES src/include/mpich2info.h" ;;
    "mpich2-doxygen") CONFIG_FILES="$CONFIG_FILES mpich2-doxygen" ;;
    "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/f77/setbot.c") CONFIG_FILES="$CONFIG_FILES src/binding/f77/setbot.c" ;;
    "src/binding/f90/Makefile") CONFIG_FILES="$CONFIG_FILES src/binding/f90/Makefile" ;;
    "src/binding/f90/mpi_sizeofs.f90") CONFIG_FILES="$CONFIG_FILES src/binding/f90/mpi_sizeofs.f90" ;;
    "src/binding/f90/mpi_base.f90") CONFIG_FILES="$CONFIG_FILES src/binding/f90/mpi_base.f90" ;;
    "src/packaging/Makefile") CONFIG_FILES="$CONFIG_FILES src/packaging/Makefile" ;;
    "src/packaging/pkgconfig/mpich2-c.pc") CONFIG_FILES="$CONFIG_FILES src/packaging/pkgconfig/mpich2-c.pc" ;;
    "src/packaging/pkgconfig/mpich2-cxx.pc") CONFIG_FILES="$CONFIG_FILES src/packaging/pkgconfig/mpich2-cxx.pc" ;;
    "src/packaging/pkgconfig/mpich2-f77.pc") CONFIG_FILES="$CONFIG_FILES src/packaging/pkgconfig/mpich2-f77.pc" ;;
    "src/packaging/pkgconfig/mpich2-f90.pc") CONFIG_FILES="$CONFIG_FILES src/packaging/pkgconfig/mpich2-f90.pc" ;;
    "src/packaging/pkgconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/packaging/pkgconfig/Makefile" ;;
    "src/packaging/envmods/mpich2.module") CONFIG_FILES="$CONFIG_FILES src/packaging/envmods/mpich2.module" ;;
    "src/packaging/envmods/Makefile") CONFIG_FILES="$CONFIG_FILES src/packaging/envmods/Makefile" ;;
    "src/env/mpixxx_opts.conf") CONFIG_FILES="$CONFIG_FILES src/env/mpixxx_opts.conf" ;;
    "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/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/mpix/Makefile") CONFIG_FILES="$CONFIG_FILES src/mpix/Makefile" ;;
    "src/mpix/comm/Makefile") CONFIG_FILES="$CONFIG_FILES src/mpix/comm/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/datatype/dataloop/Makefile") CONFIG_FILES="$CONFIG_FILES src/mpid/common/datatype/dataloop/Makefile" ;;
    "src/pm/Makefile") CONFIG_FILES="$CONFIG_FILES src/pm/Makefile" ;;
    "src/pmi/Makefile") CONFIG_FILES="$CONFIG_FILES src/pmi/Makefile" ;;
    "src/pmi/${pmi_name}/Makefile") CONFIG_FILES="$CONFIG_FILES src/pmi/${pmi_name}/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/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/util/procmap/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/procmap/Makefile" ;;
    "src/util/other/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/other/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" ;;
    "test/util/timer/Makefile") CONFIG_FILES="$CONFIG_FILES test/util/timer/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" ;;

  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  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 against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp=
  trap 'exit_status=$?
  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
  trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
  eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF

# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
# ${srcdir} and @srcdir@ entries 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[	 ]*=[	 ]*/{
h
s///
s/^/:/
s/[	 ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[	 ]*\).*/\1/
G
s/\n//
s/^[^=]*=[	 ]*$//
}'
fi

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"

# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF

# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.

# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
  if test -z "$ac_t"; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any.  Preserve backslash
# newline sequences.

ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  for (key in D) D_is_set[key] = 1
  FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  line = \$ 0
  split(line, arg, " ")
  if (arg[1] == "#") {
    defundef = arg[2]
    mac1 = arg[3]
  } else {
    defundef = substr(arg[1], 2)
    mac1 = arg[2]
  }
  split(mac1, mac2, "(") #)
  macro = mac2[1]
  prefix = substr(line, 1, index(line, defundef) - 1)
  if (D_is_set[macro]) {
    # Preserve the white space surrounding the "#".
    print prefix "define", macro P[macro] D[macro]
    next
  } else {
    # Replace #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.
    if (defundef == "undef") {
      print "/*", prefix defundef, macro, "*/"
      next
    }
  }
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"


eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
      esac
      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
      as_fn_append ac_file_inputs " '$ac_f'"
    done

    # 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.  */
    configure_input='Generated from '`
	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
$as_echo "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`$as_echo "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$tmp/stdin" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  as_dir="$ac_dir"; as_fn_mkdir_p
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  esac
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
  s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&2;}

  rm -f "$tmp/stdin"
  case $ac_file in
  -) cat "$tmp/out" && rm -f "$tmp/out";;
  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
  esac \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 ;;
  :H)
  #
  # CONFIG_HEADER
  #
  if test x"$ac_file" != x-; then
    {
      $as_echo "/* $configure_input  */" \
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
    } >"$tmp/config.h" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
    else
      rm -f "$ac_file"
      mv "$tmp/config.h" "$ac_file" \
	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
    fi
  else
    $as_echo "/* $configure_input  */" \
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
      || as_fn_error $? "could not create -" "$LINENO" 5
  fi
 ;;

  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "default-1":C) 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 "$has_fort_real8" = "yes" ; then
    sed -e 's/DOUBLE PRECISION/REAL*8/g' src/include/mpif.h > src/include/mpif.h.new
    mv src/include/mpif.h.new src/include/mpif.h
    cp src/include/mpif.h src/binding/f77/mpif.h
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":C) if test $enable_fc = 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":C) 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":C)
for prog in $EXTERNAL_SETUPS - ; do
    if test "$prog" != "-" ; then
      dir=`dirname $prog`
      name=`basename $prog`
      (cd $dir && ./$name)
    fi
done ;;
    "default-5":C)
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-6":C) 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-7":C) 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-8":C) chmod +x doc/mansrc/createhtmlindex ;;
    "default-9":C) if [ ! -d lib ] ; then mkdir lib ; fi
date > lib/newconfig ;;
    "default-10":C) chmod +x src/util/createshlib ;;
    "default-11":C) chmod a+x src/util/dbg/getfuncstack ;;
    "default-12":C) chmod a+x test/commands/cmdtests ;;

  esac
done # for ac_tag


as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save

test $ac_write_fail = 0 ||
  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5


# 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 || as_fn_exit 1
fi

#
# CONFIG_SUBDIRS section.
#
if test "$no_recursion" != yes; then

  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
  # so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  eval "set x $ac_configure_args"
  shift
  for ac_arg
  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=*)
      ;;
    --disable-option-checking)
      ;;
    *)
      case $ac_arg in
      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
      esac
      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
    esac
  done

  # Always prepend --prefix to ensure using the same prefix
  # in subdir configurations.
  ac_arg="--prefix=$prefix"
  case $ac_arg in
  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  esac
  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"

  # Pass --silent
  if test "$silent" = yes; then
    ac_sub_configure_args="--silent $ac_sub_configure_args"
  fi

  # Always prepend --disable-option-checking to silence warnings, since
  # different subdirs can have different --enable and --with options.
  ac_sub_configure_args="--disable-option-checking $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

    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
    $as_echo "$ac_msg" >&6
    as_dir="$ac_dir"; as_fn_mkdir_p
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


    cd "$ac_dir"

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f "$ac_srcdir/configure.gnu"; then
      ac_sub_configure=$ac_srcdir/configure.gnu
    elif test -f "$ac_srcdir/configure"; then
      ac_sub_configure=$ac_srcdir/configure
    elif test -f "$ac_srcdir/configure.in"; then
      # This should be Cygnus configure.
      ac_sub_configure=$ac_aux_dir/configure
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
$as_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 name.
	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
      esac

      { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
      # The eval makes quoting arguments work.
      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
    fi

    cd "$ac_popdir"
  done
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


echo 'Configuration completed.'
