#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf.
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
progname="`echo $0 | sed 's:^\./\./:\./:'`"
print_error() {
    echo "*# $*" 2>&1 ;
    }
usage_msg="
Usage: ${progname} [-file_system=FILE_SYSTEM] [-arch=ARCH_TYPE] [-mpi=MPI_IMPL]
                [-mpiincdir=MPI_INCLUDE_DIR] [-mpilib=MPI_LIBRARY]
                [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] [-nof77] 
                [-cflags=CFLAGS] [-fflags=FFLAGS] [-f90=F90_COMPILER] [-debug] 
                [-make=MAKEPGM] [-mpiolib=MPIO_LIBRARY] [-ar_nolocal] 
                [-noranlib] [-ar=AR_COMMAND] [-prefix=INSTALL_DIR]  
                [-intsize=INTSIZE] [-ptrsize=PTRSIZE] [-longsize=LONGSIZE]
                [-longlongsize=LONGLONGSIZE] [-f90nag] [-noprofile] 
                 
where
   FILE_SYSTEM  = the file system(s) for which ROMIO is to be configured.
                  Valid values are pfs, piofs, hfs, xfs, sfs, ufs, and nfs 
                  (case-sensitive). They correspond to Intel's PFS, 
                  IBM's PIOFS, HP/Convex's HFS, SGI's XFS, NEC's SFS, any Unix 
                  file system, and NFS. 
                  To configure for multiple file systems, use "+" as a 
                  separator; e.g., ufs+nfs
   ARCH_TYPE    = the type of machine for which ROMIO is to be configured.
                  Not needed on most machines, because ROMIO can usually
                  find the arch_type on its own. Needed if you are 
                  cross-compiling for a different architecture.
                  Valid values are sun4, solaris, solaris86, rs6000,
                  paragon, hpux, sppux, IRIX, IRIX32, IRIXN32, IRIX64, SX4, 
                  alpha, freebsd, and LINUX.  (case-sensitive)
   MPI_IMPL     = the MPI implementation with which ROMIO will be used
                  Valid values are mpich, sgi, hp. (case-sensitive)
                  Valid implementations are MPICH 1.1.1 or higher,
                  SGI's MPI 3.1 or higher, and HP MPI 1.3 or higher.
   MPI_INCLUDE_DIR = the full path of the directory where mpi.h is located.
                  Not needed if the directory is in the compiler's 
                  default include path
   MPI_LIBRARY  = name of the file containing the MPI library (full path).
                  Not needed if the library is in the compiler's default
                  list of libraries
   C_COMPILER   = the C compiler to use. If not specified, ROMIO uses a 
                  default compiler depending on the machine.
   FORTRAN_COMPILER = the Fortran compiler to use. If not specified, ROMIO 
                  uses a default compiler depending on the machine.
   CFLAGS       = flags to give to the C compiler
   FFLAGS       = flags to give to the Fortran compiler
   F90_COMPILER = the Fortran 90 compiler to use. If not specified, 
                  ROMIO uses f90.
   MPIO_LIBRARY = name of the MPI-IO library to be built (full path).
                  Default is "this_directory"/lib/ARCH_TYPE/libmpio.a.
   MAKEPGM      = name of the make program to use
   AR_COMMAND   = an alternate archiver (ar) command to use.
   INSTALL_DIR  = directory where ROMIO is to be installed
   INTSIZE      = size of int in bytes.
   PTRSIZE      = size of pointers in bytes.
   LONGSIZE     = size of long in bytes.
   LONGLONGSIZE = size of long long in bytes.
 
The options '-mpiincdir' and '-mpilib' may be needed if the MPI include file
and MPI library are not in the compiler's default path.

The option '-nof77' prevents the compilation of routines that require a
Fortran compiler.  If you select this option, you cannot use the
Fortran interface of MPI-IO.

The option '-f90nag' allows you to use the NAG Fortran 90 compiler 
instead of Fortran 77.

The option '-make' may be used to select an alternate make program. ROMIO
uses "make" by default.

If '-debug' is used, ROMIO will be configured with the '-g' compiler option
for debugging.

The option '-ar_nolocal' prevents the library archive command from
attempting to use the local directory for temporary space.  This option
should be used when (a) there isn't much space (less than 10 MB)
available in the partition where ROMIO resides and (b) there is enough
space in /tmp (or wherever ar places temporary files by default).

The option '-noranlib' causes the 'ranlib' step (needed on some systems
to build an object library) to be skipped.  This is particularly useful
on systems where 'ranlib' is optional (allowed but not needed; because it
is allowed, configure chooses to use it just in case) but can fail (some
'ranlib's are implemented as scripts using 'ar'; if they don't use the
local directory, they can fail (destroying the library in the process) if
the temporary directory (usually '/tmp') does not have enough space.

The option -noprofile prevents the compilation of the profiling interface
of MPI-IO.
"
#
echo " "
echo "Configuring ROMIO Version 1.0.1"
echo " "
CONFIGURE_ARGS="$*"
if test -n "$CONFIGURE_ARGS" ; then
    echo "Configuring with args $CONFIGURE_ARGS"
fi
#
rm -f include/*.h
#
NOF77=0
NOPROFILE=0
ARCH=""
arch_IRIX=""
MPI=""
MPI_INCLUDE_DIR=""
ROMIO_INCLUDE=""
MPI_LIB=""
LIBNAME=""
TEST_LIBNAME=""
FILE_SYSTEM=""
PREFIX=""
DEBUG=0
MIPS=0
BITS=0
FROM_MPICH=0
CFLAGS=""
LL="\%lld"
AR_LOCAL=l
HAS_MPI_INFO=""
BUILD_MPI_INFO=""
MPI_FINFO1=""
MPI_FINFO2=""
MPI_FINFO3=""
MPI_FINFO4=""
MPI_FARRAY1=""
MPI_FARRAY2=""
MPI_FARRAY3=""
MPI_FARRAY4=""
MPI_FARRAY5=""
MPI_FARRAY6=""
MPI_FARRAY7=""
DEFS=""
ROMIO_LFLAGS=""
ROMIO_LIBLIST=""
ROMIO_TCFLAGS=""
ROMIO_TCPPFLAGS=""
ROMIO_TFFLAGS=""
MPIRUN=""
# foll. needed for f77 test programs
F77GETARG="call getarg(i,str)"
F77IARGC="iargc()"
FTESTDEFINE=""
FORTRAN_MPI_OFFSET=""
MPIOF_H_INCLUDED=0
MPI_OFFSET_KIND1="!"
MPI_OFFSET_KIND2="!"
F90=""
TEST_CC=""
TEST_F77=""
#
for arg
do
case $arg in
  -arch=* | --arch=*)
     ARCH=`echo $arg|sed 's/-*arch=//'`
     eval "arch_`echo $ARCH`=1"
     ;;
  -file_system=* | --file_system=*)
     FILE_SYSTEM=`echo $arg|sed 's/-*file_system=//' | sed -e 's/\+/ /g'`
     for x in $FILE_SYSTEM
     do
        eval "file_system_`echo $x`=1"
     done
     ;;
  -mpi=* | --mpi=*)
     MPI=`echo $arg|sed 's/-*mpi=//'`
     eval "mpi_`echo $MPI`=1"
     ;;
  -mpiincdir=* | --mpiincdir=*)  
     MPI_INCLUDE_DIR=`echo $arg|sed 's/-*mpiincdir=//'`
     ;;
  -mpilib=* | --mpilib=*)  
     MPI_LIB=`echo $arg|sed 's/-*mpilib=//'`
     ;;
  -mpiolib=* | --mpiolib=*)  
     LIBNAME=`echo $arg|sed 's/-*mpiolib=//'`
     ;;
  -cc=* | --cc=*)
     CC=`echo $arg|sed 's/-*cc=//'`
     ;;
  -fc=* | --fc=*)
     FC=`echo $arg|sed 's/-*fc=//'`
     ;;
  -cflags=* | --cflags=*)
     package="`echo $arg|sed 's/-*cflags=//'`"
     USER_CFLAGS="$package"
     CFLAGS="$CFLAGS $package" 
     ;;
  -fflags=* | --fflags=*)
     package="`echo $arg|sed 's/-*fflags=//'`"
     FFLAGS="$FFLAGS $package"
     ;;
  -make=* | --make=*)
     package=`echo $arg|sed 's/-*make=//'`
     MAKE="$package"
     ;;
  -nof77 | --nof77)
     echo "Fortran interface will not be built"
     NOF77=1
     ;;
  -debug | --debug)
     echo "Configuring for a debugging version"
     DEBUG=1
     ;;
  -ar_nolocal | --ar_nolocal)
     AR_LOCAL=''
     ;;
  -noranlib | --noranlib)
     RANLIB=':'
     ;;
  -prefix=* | --prefix=*)
     PREFIX=`echo $arg|sed 's/-*prefix=//'`
     ;;
  -f90nag | --f90nag)
     FC=f90
     F77GETARG="call f90_unix_MP_getarg(i,str)"
     F77IARGC="f90_unix_MP_iargc()"
     ;;
  -from_mpich | --from_mpich)
     FROM_MPICH=1
     ;;
   -ar=* | --ar=*)
     package=`echo $arg|sed 's/-*ar=//'`
     AR="$package"
     ;;
  -intsize=* | --intsize=*)
     package=`echo $arg|sed 's/-*intsize=//'`
     intsize="$package"
     ;;
  -ptrsize=* | --ptrsize=*)
     package=`echo $arg|sed 's/-*ptrsize=//'`
     pointersize="$package"
     ;;
  -longsize=* | --longsize=*)
     package=`echo $arg|sed 's/-*longsize=//'`
     longsize="$package"
     ;;
  -longlongsize=* | --longlongsize=*)
     package=`echo $arg|sed 's/-*longlongsize=//'`
     longlongsize="$package"
     ;;
  -noprofile | --noprofile)
     echo "profiling interface will not be built"
     NOPROFILE=1
     ;;
  -f90=* | --f90=*)
     F90=`echo A$arg|sed 's/A-*f90=//'`
     ;;
  -echo)
     set -x
     ;;
  -h | -help | --h | --help | -u | --u)
    (echo "${usage_msg}") >& 2
    exit 1 ;;
  *)
  if test -n "$arg" ; then
     echo "Error: Invalid configure option $arg"
     exit 1;
  fi
  ;;
esac
done

#
trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
trap 'rm -f confdefs*' 0

# NLS nuisances.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi

rm -f conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
unique_file=

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  srcdirdefaulted=yes
  # Try the directory containing this script, then `..'.
  prog=$0
  confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  test "X$confdir" = "X$prog" && confdir=.
  srcdir=$confdir
  if test ! -r $srcdir/$unique_file; then
    srcdir=..
  fi
fi
if test ! -r $srcdir/$unique_file; then
  if test x$srcdirdefaulted = xyes; then
    echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  else
    echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  fi
  exit 1
fi
# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
# But we can't avoid them for `..', to make subdirectories work.
case $srcdir in
  .|/*|~*) ;;
  *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
esac


# Save the original args to write them into config.status later.
configure_args="$*"

#
# Check that an arch was set
# If it wasn't set, try to guess using "util/tarch"
#
if test -z "$ARCH" -a -x util/tarch ; then
    if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for architecture""... $ac_c"
else
echo $ac_n "checking for architecture""... $ac_c" 1>&1
fi
    ARCH=`./util/tarch | sed s/-/_/g`
    if test -z "$ARCH" ; then
       if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""Unknown!"
else
echo "$ac_t""Unknown!" 1>&1
fi
       print_error "Error: Couldn't guess target architecture, you must"
       print_error "       set an architecture type with -arch=<value>"
       exit 1
    fi
    eval "arch_$ARCH=1"
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$ARCH"
else
echo "$ac_t""$ARCH" 1>&1
fi
fi
#
# check for valid architecture
grep _"$ARCH"_ .config_params > /dev/null 2>&1
if test $? != 0 ; then
   echo "Unknown architecture $arch... proceeding anyway"
fi
#
# check for valid file system
if test -n "$FILE_SYSTEM" ; then
   for x in $FILE_SYSTEM
   do
      grep _"$x"_ .config_params > /dev/null 2>&1
      if test $? != 0 ; then
         echo "Unknown file system $x... proceeding anyway"
      fi
   done
fi
#
# check for valid MPI implementation
if test -n "$MPI" ; then
   grep _"$MPI"_mpi .config_params > /dev/null 2>&1
   if test $? != 0 ; then
      echo "Unknown MPI implementation $MPI... proceeding anyway"
   fi
fi
#
# check for valid MPI include directory if specified
if test $FROM_MPICH = 0 ; then
   if test -n "$MPI_INCLUDE_DIR"; then
      if test ! -f "$MPI_INCLUDE_DIR/mpi.h" ; then
         echo "Error: Include file $MPI_INCLUDE_DIR/mpi.h not found"
         exit 1
      fi
   else
#     assume that mpi.h is in the default path
#     set MPI_INCLUDE_DIR to ".", so that it translates to -I. in the
#     compile command. Some compilers complain if it's only -I
      MPI_INCLUDE_DIR=.
   fi
fi
#
# check for valid MPI library if specified
if test $FROM_MPICH = 0 ; then
   if test -n "$MPI_LIB" ; then
      if test ! -f "$MPI_LIB" ; then
         echo "Error: MPI library $MPI_LIB not found"
         exit 1
      fi
   fi
fi
#
#
AR="${AR:-ar} cr$AR_LOCAL"
if test -z "$RANLIB" ; then
    if test -z "$RANLIB"; then
  # Extract the first word of `ranlib', so it can be a program name with args.
  set dummy ranlib; word=$2
  echo checking for $word
  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$word; then
      RANLIB="ranlib"
      break
    fi
  done
  IFS="$saveifs"
fi
test -z "$RANLIB" && RANLIB=":"
test -n "$RANLIB" && test -n "$verbose" && echo "	setting RANLIB to $RANLIB"

fi
MAKE=${MAKE:-make}
#
if test $DEBUG = 1; then
    USER_CFLAGS="$CFLAGS -g"
    USER_FFLAGS="$FFLAGS -g"
else
    USER_CFLAGS="$CFLAGS -O"
    USER_FFLAGS="$FFLAGS -O"
fi
#
if test -n "$arch_sun4" ; then 
    CC=${CC:-gcc}
    F77=${FC:-f77}
    if test $DEBUG = 1; then
	if test $CC = "gcc"; then
           CFLAGS="$CFLAGS -g -D__USE_FIXED_PROTOTYPES__ -Wall -D__AIO_SUN"
	else
           CFLAGS="$CFLAGS -g -D__AIO_SUN"
        fi
    else 
        CFLAGS="$CFLAGS -O -D__AIO_SUN"
    fi
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="ufs nfs"
        echo "configuring for file systems ufs and nfs"
    fi
fi
#
if test -n "$arch_solaris" || test -n "$arch_solaris86" ; then
    CC=${CC:-cc}
    F77=${FC:-f77}
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -v -D__AIO_SUN"
    else 
        CFLAGS="$CFLAGS -O -D__AIO_SUN"
    fi
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="ufs nfs"
        echo "configuring for file systems ufs and nfs"
    fi
    CFLAGS="$CFLAGS -D__SOLARIS"
    if test $MPI = "mpich" ; then
        TEST_CC=mpicc
        TEST_F77=mpif77
        MPI_LIB="-laio"
    else
        TEST_CC="$CC"
        TEST_F77="$F77"
        MPI_LIB="$MPI_LIB -laio"
    fi
    AR="ar cr"
    ROMIO_LIBLIST="-laio"
# solaris does not have l option to ar
# solaris f90 does not have 8-byte integer type
fi
#
if test -n "$arch_rs6000"; then
    F77=$FC
    if test -z "$CC"; then
       for p in mpcc
do
if test -z "$CC"; then
  # Extract the first word of `$p', so it can be a program name with args.
  set dummy $p; word=$2
  echo checking for $word
  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$word; then
      CC="$p"
      break
    fi
  done
  IFS="$saveifs"
fi

test -n "$CC" && test -n "$verbose" && echo "	setting CC to $CC"

test -n "$CC" && break
done
test -n "$CC" || CC="cc"

       echo "Using $CC"
    fi
    if test $NOF77 = 0 && test -z "$FC"; then 
       for p in mpxlf
do
if test -z "$F77"; then
  # Extract the first word of `$p', so it can be a program name with args.
  set dummy $p; word=$2
  echo checking for $word
  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
  for dir in $PATH; do
    test -z "$dir" && dir=.
    if test -f $dir/$word; then
      F77="$p"
      break
    fi
  done
  IFS="$saveifs"
fi

test -n "$F77" && test -n "$verbose" && echo "	setting F77 to $F77"

test -n "$F77" && break
done
test -n "$F77" || F77="f77"

       echo "Using $F77"
    fi
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -D__NO_FD_IN_AIOCB -D__AIO_HANDLE_IN_AIOCB"
    else 
        CFLAGS="$CFLAGS -O -D__NO_FD_IN_AIOCB -D__AIO_HANDLE_IN_AIOCB"
    fi
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        if test $CC = "mpcc" || test $CC = "mpCC" ; then
            file_system_piofs=1
            FILE_SYSTEM="piofs"
            echo "configuring for file systems piofs, ufs, and nfs"
        else 
            echo "configuring for file systems ufs and nfs"
        fi
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="$FILE_SYSTEM ufs nfs"
    fi
    CFLAGS="$CFLAGS -D__AIX"
# assume long long exists.
    longlongsize=${longlongsize:-8} 
    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"
fi    
#
if test -n "$arch_paragon"; then
    CC=${CC:-icc}
    F77=${FC:-if77}
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g"
    else 
	if test $CC = "icc"; then
           CFLAGS="$CFLAGS -Knoieee -Mvect -O3"
	else
           CFLAGS="$CFLAGS -O"
        fi
    fi
    AR="ar860 cr$AR_LOCAL"
    MPI_LIB="$MPI_LIB -nx"
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_pfs=1
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="pfs ufs nfs"
        echo "configuring for file systems pfs, ufs, and nfs"
    fi
    CFLAGS="$CFLAGS -D__PARAGON -D__NO_AIO"
# NO_AIO is if configuring for NFS/UFS. It doesn't affect PFS asynch. I/O.
# long long does not exist
    longlongsize=${longlongsize:-0} 
fi    
#
if test -n "$arch_tflop" || test -n "$arch_tflops"; then
    CC=${CC:-pgcc}
    F77=${FC:-pgf77}
    TFLOP_FLAGS="-cougar -D__PUMA -D__NO_AIO"
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g $TFLOP_FLAGS"
    else
       if test $CC = "pgcc"; then
           CFLAGS="$CFLAGS -Knoieee -Mvect -O3 $TFLOP_FLAGS"
       else
           CFLAGS="$CFLAGS -O $TFLOP_FLAGS"
       fi
    fi
    AR="xar cr$AR_LOCAL"
        RANLIB="xranlib"
    MPI_LIB="$MPI_LIB"
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_ufs=1
        FILE_SYSTEM="ufs"
        echo "configuring for file system ufs"
    fi
fi
#
if test -n "$arch_freebsd" || test -n "$arch_LINUX" ; then
    CC=${CC:-gcc}
    if test -n "$arch_freebsd" ; then
       F77=${FC:-f77}
       CFLAGS="$CFLAGS -D__FREEBSD"
       longlongsize=${longlongsize:-0}
# printf doesn't work properly and no integer*8 as far as I can tell
    else 
       F77=${FC:-g77}
       CFLAGS="$CFLAGS -D__LINUX"
    fi
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -D__NO_AIO"
    else 
        CFLAGS="$CFLAGS -O -D__NO_AIO"
    fi
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="ufs nfs"
        echo "configuring for file systems ufs and nfs"
    fi
fi    
#
if test -n "$arch_SX4" ; then
    CC=${CC:-mpicc}
    F77=${FC:-mpif90}
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -D__NO_AIO -D__SX4"
        FFLAGS="$FFLAGS -g"
    else
        USER_FFLAGS="$FFLAGS -Chopt"
        CFLAGS="$CFLAGS -O -D__NO_AIO -D__SX4"
        FFLAGS="$FFLAGS -Chopt"
    fi
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_sfs=1
        file_system_nfs=1
        FILE_SYSTEM="sfs nfs"
        echo "configuring for file systems sfs and nfs"
    fi
    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"
fi
#
if test -n "$arch_hpux" || test -n "$arch_sppux" ; then
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g +w1 -D__NO_AIO"
    else 
        CFLAGS="$CFLAGS -O -D__NO_AIO"
    fi
    RANLIB=":"
    if test -z "$MPI"; then
        if test -f "/opt/mpi/include/mpi.h" ; then
                echo "assuming that you want to use ROMIO with HP MPI"
                MPI=hp
            else 
                echo "assuming that you want to use ROMIO with MPICH"
                MPI=mpich
            fi            
	fi
    if test $MPI = "mpich" ; then
        MPI=mpich
        mpi_mpich=1
        MPI_LIB="$MPI_LIB -lV3"
        CC=${CC:-cc -Ae}
        F77=${FC:-f77 +U77}
    fi
    if test $MPI = "hp" ; then
        MPI=hp
        mpi_hp=1
        CC=${CC:-mpicc -Ae}
        F77=${FC:-mpif77 +U77}
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_hfs=1
        file_system_nfs=1
        FILE_SYSTEM="hfs nfs"
        echo "configuring for file systems hfs and nfs"
    fi
    FTESTDEFINE="external iargc, getarg"
    if test -n "$arch_hpux" ; then
        CFLAGS="$CFLAGS -D__HPUX -D_LARGEFILE64_SOURCE"
        if test $MPI = "hp" ; then
           F77=${FC:-mpif90 +U77}
        else
           F77=${FC:-f90 +U77}
        fi
    else
        CFLAGS="$CFLAGS -D__SPPUX"
    fi
    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"
    ROMIO_TCFLAGS="-Ae"
    ROMIO_TFFLAGS="+U77"
fi
#
if test -n "$arch_alpha" ; then
    CC=${CC:-cc}
    F77=${FC:-f77}
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -std1 -warnprotos -verbose -D__AIO_PRIORITY_DEFAULT"
    else 
        CFLAGS="$CFLAGS -O -D__AIO_PRIORITY_DEFAULT"
    fi
    MPI_LIB="$MPI_LIB -laio"
    if test -z "$MPI" ; then
        MPI=mpich
        mpi_mpich=1
    fi
    if test -z "$FILE_SYSTEM" ; then
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="ufs nfs"
        echo "configuring for file systems ufs and nfs"
    fi
    CFLAGS="$CFLAGS -D__DEC"
    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"
    ROMIO_LIBLIST="-laio"
fi    
#
if test -n "$arch_CRAY" ; then
    CC=${CC:-cc}
    F77=${FC:-f90}
    NOF77=1
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -D__NO_AIO"
    else 
        CFLAGS="$CFLAGS -O -D__NO_AIO"
    fi
    RANLIB=":"
    CFLAGS="$CFLAGS -D__CRAY"
    if test -z "$MPI" || test -n "$mpi_sgi" ; then
        MPI=cray
        mpi_cray=1
        mpi_sgi=""
# above is to disable configure tests specific to SGI MPI
        CFLAGS="$CFLAGS -D__MPISGI -D__HAS_MPI_COMBINERS -D__NO_MPI_SGI_type_is_contig"
    fi
#       __MPISGI needed because of error in Cray's and SGI's 
#       MPI_Type_get_contents (does not increment reference count).
#       Others needed because __MPISGI needed.
    if test -z "$FILE_SYSTEM" ; then
        file_system_ufs=1
        file_system_nfs=1
        FILE_SYSTEM="ufs nfs"
        echo "configuring for file systems ufs and nfs"
    fi
    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"
fi
#
if test -n "$arch_sgi" ; then
    arch_IRIX=1
    ARCH=IRIX
fi
if test -n "$arch_IRIX64" ; then
    arch_IRIX=1
fi
if test -n "$arch_IRIX32" ; then
    arch_IRIX=1
fi
if test -n "$arch_IRIXN32" ; then
    arch_IRIX=1
fi
if test -n "$arch_sgi5" ; then
    arch_IRIX5=1
    ARCH=IRIX
fi
#

#
if test -n "$arch_IRIX"; then
   if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for IRIX OS version""... $ac_c"
else
echo $ac_n "checking for IRIX OS version""... $ac_c" 1>&1
fi
               osversion=`uname -r | sed 's/\..*//'`
               osvminor=`uname -r | sed 's/[0-9]\.\([0-9]*\)\..*/\1/'`
   if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$osversion"
else
echo "$ac_t""$osversion" 1>&1
fi
      if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for IRIX cpucount""... $ac_c"
else
echo $ac_n "checking for IRIX cpucount""... $ac_c" 1>&1
fi
   cpucount=`hinv | grep '[0-9]* [0-9]* MHZ IP[0-9]* Proc' | cut -f 1 -d' '`
   if test "$cpucount" = "" ; then
     cpucount=`hinv | grep 'Processor [0-9]*:' | wc -l | sed -e 's/ //g'`
   fi
      if test "$cpucount" = "" ; then
     print_error "Could not determine cpucount."
     print_error "Please send "
     hinv
     print_error "to romio-maint@mcs.anl.gov"
     exit 1
   fi
   if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$cpucount"
else
echo "$ac_t""$cpucount" 1>&1
fi
      if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for IRIX cpumodel""... $ac_c"
else
echo $ac_n "checking for IRIX cpumodel""... $ac_c" 1>&1
fi
            cputype=`hinv -t cpu | tail -1 | cut -f 3 -d' '`
   if test -z "$cputype" ; then
        print_error "Could not get cputype from hinv -t cpu command."
        print_error "Please send "
        hinv -t cpu 2>&1
        hinv -t cpu | cut -f 3 -d' ' 2>&1
        print_error "to romio-maint@mcs.anl.gov" 
        exit 1
   fi
   if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$cputype"
else
echo "$ac_t""$cputype" 1>&1
fi
            if test -z "$osversion" ; then
        print_error "Could not determine OS version.  Please send" 
        print_error " " 
        uname -a
        print_error "to romio-maint@mcs.anl.gov" 
        exit 1
   elif test $osversion = 4 ; then
        true
   elif test $osversion = 5 ; then
        true
   elif test $osversion = 6 ; then
        true
   else 
       print_error "Could not recognize the version of IRIX (got $osversion)"
       print_error "ROMIO knows about versions 4, 5 and 6; the version being"
       print_error "returned from uname -r is $osversion."
       print_error "Please send"
       uname -a 2>&1
       hinv 2>&1
       print_error "to romio-maint@mcs.anl.gov"
       exit 1
   fi
   if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for cputype""... $ac_c"
else
echo $ac_n "checking for cputype""... $ac_c" 1>&1
fi
   OLD_ARCH=IRIX
   IRIXARCH="$ARCH_$osversion"
         cputype=`echo $cputype | sed -e 's%.*/%%' -e 's/R//' | tr -d "[A-Z]"`
      case $cputype in 
        3000) ;;
        4000) ;;
        4400) ;;
        4600) ;;
        5000) ;;
        8000) ;;
        10000);;
        *)
        print_error "Unexpected IRIX/MIPS chipset $cputype.  Please send the output"
        print_error " "
        uname -a 2>&1
        hinv 2>&1 
        print_error " " 
        print_error "to romio-maint@mcs.anl.gov" 
        print_error "ROMIO will continue and assume that the cputype is"
        print_error "compatible with a MIPS 4400 processor."
        print_error " " 
        cputype=4400
        ;;
   esac
   if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$cputype"
else
echo "$ac_t""$cputype" 1>&1
fi
   IRIXARCH="$IRIXARCH_$cputype"
   echo "IRIX-specific architecture is $IRIXARCH"
fi

#
# special case 'sgi5' for use on MESHINE which is much like an SGI running
# irix 5 with r4400 chips, but does not have 'hinv', so above code doesn't
# work
if test -n "$arch_sgi5"; then
   osversion=5
   cputype=4400
   IRIXARCH="$ARCH_$osversion"
   IRIXARCH="$IRIXARCH_$cputype"
# now set arch_IRIX to 1
   arch_IRIX=1
   echo "IRIX-specific architecture is $IRIXARCH"
   CFLAGS="$CFLAGS -D__IRIX"
fi
#
if test -n "$arch_IRIX"; then
    CC=${CC:-cc}
    F77=${FC:-f77}
    if test $DEBUG = 1; then
        CFLAGS="$CFLAGS -g -fullwarn"
    else 
        CFLAGS="$CFLAGS -O"
    fi
   if test $osversion = 4 ; then
	RANLIB="ar ts"
        if test -n "$mpi_sgi"; then
            echo "Error: SGI's MPI doesn't work with IRIX 4.x"
            exit 1
        fi
   elif test $osversion = 5 ; then
        if test -n "$mpi_sgi"; then
            echo "Error: SGI's MPI doesn't work with IRIX 5.x"
            exit 1
        fi
   elif test $osversion = 6 ; then
	if test -z "$MPI"; then
            if test -f "/usr/include/mpi.h" ; then
                echo "assuming that you want to use ROMIO with SGI's MPI"
                MPI=sgi
                mpi_sgi=1
            else 
                echo "assuming that you want to use ROMIO with MPICH"
                MPI=mpich
                mpi_mpich=1
            fi            
	fi
        RANLIB=":"
        CFLAGS="$CFLAGS -D__AIO_SIGNOTIFY_NONE"
	if test $cputype -ge 5000 ; then
            MIPS=4
        else 
            MIPS=3
        fi
   fi
   if test -n "$mpi_sgi" && test -z "$MPI_LIB" ; then
       MPI_LIB="-lmpi"
   fi
#  check if pread64 is defined
   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if pread64 is defined""... $ac_c"
else
echo $ac_n "checking if pread64 is defined""... $ac_c" 1>&1
fi
  rm -f conftest.c
  cat > conftest.c <<EOF
#include <unistd.h>
     main()
     {
         int fd=0, buf=0, i=0;
         off64_t off=0;
         pread64(fd, &buf, i, off);
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS conftest.c > /dev/null 2>&1
  if test -x a.out ; then
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      
{
test -n "$verbose" && \
echo "	defining __HAS_PREAD64"
echo "#define" __HAS_PREAD64 1 >> confdefs.h
DEFS="$DEFS -D__HAS_PREAD64=1"
}

  else
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
  fi
rm -f a.out conftest.c

#
   if test -z "$FILE_SYSTEM" ; then
       file_system_nfs=1
       FILE_SYSTEM="nfs"
       if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for xfs""... $ac_c"
else
echo $ac_n "checking for xfs""... $ac_c" 1>&1
fi
       cat > conftest.c <<EOF
#include "confdefs.h"

#include <aio.h>
int main() { exit(0); }
int t() { aiocb64_t *t1; }
EOF
if eval $compile; then
  rm -rf conftest*
  file_system_xfs=1;FILE_SYSTEM="xfs $FILE_SYSTEM";

fi
rm -f conftest*

       if test "$file_system_xfs" = 1 ; then 
          if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
       else
          if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
          file_system_ufs=1
          FILE_SYSTEM="ufs $FILE_SYSTEM"
       fi
       echo "configuring for file systems $FILE_SYSTEM"
   fi
   CFLAGS="$CFLAGS -D__IRIX"
   MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
   MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"
fi
if test $NOF77 = 0 ; then
    echo "checking Fortran external names"
    
   rm -f confftest.f confftest.o
   cat > confftest.f <<EOF
       subroutine mpir_init_fop( a )
       integer a
       a = 1
       return
       end
EOF
   $F77 $FFLAGS -c confftest.f > /dev/null 2>&1
   if test ! -s confftest.o ; then
        print_error "Unable to test Fortran compiler"
        print_error "(compiling a test program failed to produce an "
        print_error "object file)."
	NOF77=1
   elif test -z "$FORTRANNAMES" ; then
    if test $arch_CRAY ; then
     # Cray doesn't accept -a ...
     nameform1=`strings confftest.o | grep mpir_init_fop_  | head -1`
     nameform2=`strings confftest.o | grep MPIR_INIT_FOP   | head -1`
     nameform3=`strings confftest.o | grep mpir_init_fop   | head -1`
     nameform4=`strings confftest.o | grep mpir_init_fop__ | head -1`
    else
     nameform1=`strings -a confftest.o | grep mpir_init_fop_  | head -1`
     nameform2=`strings -a confftest.o | grep MPIR_INIT_FOP   | head -1`
     nameform3=`strings -a confftest.o | grep mpir_init_fop   | head -1`
     nameform4=`strings -a confftest.o | grep mpir_init_fop__ | head -1`
    fi
    rm -f confftest.f confftest.o
    if test -n "$nameform4" ; then
	echo "Fortran externals are lower case and have two trailing underscores"
	FORTRANNAMES="FORTRANDOUBLEUNDERSCORE"
    elif test -n "$nameform1" ; then
        # We don't set this in CFLAGS; it is a default case
        echo "Fortran externals have a trailing underscore and are lowercase"
	FORTRANNAMES="FORTRANUNDERSCORE"
    elif test -n "$nameform2" ; then
	echo "Fortran externals are uppercase"     
	FORTRANNAMES="FORTRANCAPS" 
    elif test -n "$nameform3" ; then
	echo "Fortran externals are lower case"
	FORTRANNAMES="FORTRANNOUNDERSCORE"
    else
	print_error "Unable to determine the form of Fortran external names"
	print_error "Make sure that the compiler $F77 can be run on this system"
	print_error "Turning off Fortran (-nof77 being assumed)."
	NOF77=1
    fi
    fi
    if test -n "$FORTRANNAMES" ; then
        WDEF="-D$FORTRANNAMES"
    fi
    
    if test -n "$WDEF" ; then
        CFLAGS="$CFLAGS $WDEF"
    fi
    rm -f test/mpif.h
    if test "$MPI_INCLUDE_DIR" != "." && test $FROM_MPICH = 0 ; then
        ln -s $MPI_INCLUDE_DIR/mpif.h test
    fi
else 
    F77=":"
fi
#

if test -z "$intsize" ; then
    if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for size of int""... $ac_c"
else
echo $ac_n "checking for size of int""... $ac_c" 1>&1
fi
/bin/rm -f conftestval
cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
main() { 
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf( f, "%d\n", sizeof(int));
  exit(0);
}
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  Pac_CV_NAME=`cat conftestval`

else
  Pac_CV_NAME=""
fi
rm -fr conftest*
/bin/rm -f conftestval
if test -n "$Pac_CV_NAME" -a "$Pac_CV_NAME" != 0 ; then
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$Pac_CV_NAME"
else
echo "$ac_t""$Pac_CV_NAME" 1>&1
fi
else
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""unavailable"
else
echo "$ac_t""unavailable" 1>&1
fi
fi
intsize=$Pac_CV_NAME

fi
if test -z "$pointersize" ; then
    if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for size of void *""... $ac_c"
else
echo $ac_n "checking for size of void *""... $ac_c" 1>&1
fi
/bin/rm -f conftestval
cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
main() { 
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf( f, "%d\n", sizeof(void *));
  exit(0);
}
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  Pac_CV_NAME=`cat conftestval`

else
  Pac_CV_NAME=""
fi
rm -fr conftest*
/bin/rm -f conftestval
if test -n "$Pac_CV_NAME" -a "$Pac_CV_NAME" != 0 ; then
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$Pac_CV_NAME"
else
echo "$ac_t""$Pac_CV_NAME" 1>&1
fi
else
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""unavailable"
else
echo "$ac_t""unavailable" 1>&1
fi
fi
pointersize=$Pac_CV_NAME

fi
if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for int large enough for pointers""... $ac_c"
else
echo $ac_n "checking for int large enough for pointers""... $ac_c" 1>&1
fi
if test -n "$pointersize" -a -n "$intsize" ; then
    if test $pointersize -le $intsize ; then
       if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
    else
       
{
test -n "$verbose" && \
echo "	defining __INT_LT_POINTER"
echo "#define" __INT_LT_POINTER 1 >> confdefs.h
DEFS="$DEFS -D__INT_LT_POINTER=1"
}

       if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
    fi
else
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""cannot determine; assuming it is;"
else
echo "$ac_t""cannot determine; assuming it is;" 1>&1
fi
    echo "use '-intsize' and '-ptrsize' to indicate otherwise"
fi

#

if test -n "$longlongsize" ; then
    if test "$longlongsize" = 8 ; then
       echo "defining MPI_Offset as long long in C and integer*8 in Fortran" 
       
{
test -n "$verbose" && \
echo "	defining __HAVE_LONG_LONG_64"
echo "#define" __HAVE_LONG_LONG_64 1 >> confdefs.h
DEFS="$DEFS -D__HAVE_LONG_LONG_64=1"
}

       DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"
       FORTRAN_MPI_OFFSET="integer*8"
       LL="\%lld"
    elif test "$longlongsize" = "int" ; then  # a hack to set MPI_Offset as int
       echo "defining MPI_Offset as int in C and integer in Fortran"
       DEFINE_MPI_OFFSET="typedef int MPI_Offset;"
       FORTRAN_MPI_OFFSET="integer"
       
{
test -n "$verbose" && \
echo "	defining __MPI_OFFSET_IS_INT"
echo "#define" __MPI_OFFSET_IS_INT 1 >> confdefs.h
DEFS="$DEFS -D__MPI_OFFSET_IS_INT=1"
}

       LL="\%d"
       MPI_OFFSET_KIND1="!"
       MPI_OFFSET_KIND2="!"
    else 
       echo "defining MPI_Offset as long in C and integer in Fortran" 
       DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
       FORTRAN_MPI_OFFSET="integer"
       LL="\%ld"
       MPI_OFFSET_KIND1="!"
       MPI_OFFSET_KIND2="!"
    fi
else
   if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for size of long long""... $ac_c"
else
echo $ac_n "checking for size of long long""... $ac_c" 1>&1
fi
/bin/rm -f conftestval
cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
main() { 
  FILE *f=fopen("conftestval","w");
  if (!f) exit(1);
  fprintf( f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  Pac_CV_NAME=`cat conftestval`

else
  Pac_CV_NAME=""
fi
rm -fr conftest*
/bin/rm -f conftestval
if test -n "$Pac_CV_NAME" -a "$Pac_CV_NAME" != 0 ; then
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$Pac_CV_NAME"
else
echo "$ac_t""$Pac_CV_NAME" 1>&1
fi
else
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""unavailable"
else
echo "$ac_t""unavailable" 1>&1
fi
fi
longlongsize=$Pac_CV_NAME

   if test -n "$longlongsize" ; then
      if test "$longlongsize" = 8 ; then
         if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if the compiler prints long longs correctly with %lld""... $ac_c"
else
echo $ac_n "checking if the compiler prints long longs correctly with %lld""... $ac_c" 1>&1
fi
rm -f conftestll
cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
main() {
  long long i=8; 
  FILE *f=fopen("conftestll","w");
  if (!f) exit(1);
  fprintf( f, "%lld\n", i);
  exit(0);
}
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  Pac_CV_NAME=`cat conftestll`

else
  Pac_CV_NAME=""
fi
rm -fr conftest*
rm -f conftestll
if test "$Pac_CV_NAME" = 8 ; then
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
    
{
test -n "$verbose" && \
echo "	defining __HAVE_LONG_LONG_64"
echo "#define" __HAVE_LONG_LONG_64 1 >> confdefs.h
DEFS="$DEFS -D__HAVE_LONG_LONG_64=1"
}

    DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"
    FORTRAN_MPI_OFFSET="integer*8"
    echo "defining MPI_Offset as long long in C and integer*8 in Fortran"
    LL="\%lld"
else
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
    if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if the compiler prints long longs correctly with %ld""... $ac_c"
else
echo $ac_n "checking if the compiler prints long longs correctly with %ld""... $ac_c" 1>&1
fi
    cat > conftest.c <<EOF
#include "confdefs.h"
#include <stdio.h>
    main() {
      long long i=8; 
      FILE *f=fopen("conftestll","w");
      if (!f) exit(1);
      fprintf( f, "%ld\n", i);
      exit(0);
    }
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  Pac_CV_NAME=`cat conftestll`

else
  Pac_CV_NAME=""
fi
rm -fr conftest*
    rm -f conftestll
    if test "$Pac_CV_NAME" = 8 ; then
       if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
       
{
test -n "$verbose" && \
echo "	defining __HAVE_LONG_LONG_64"
echo "#define" __HAVE_LONG_LONG_64 1 >> confdefs.h
DEFS="$DEFS -D__HAVE_LONG_LONG_64=1"
}

       DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"
       FORTRAN_MPI_OFFSET="integer*8"
       echo "defining MPI_Offset as long long in C and integer*8 in Fortran"
       LL="\%ld"
    else
       if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no!!"
else
echo "$ac_t""no!!" 1>&1
fi
       echo "the compiler doesn't print long longs correctly!"
       echo "defining MPI_Offset as long in C and integer in Fortran" 
       DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
       FORTRAN_MPI_OFFSET="integer"
       LL="\%ld"
       MPI_OFFSET_KIND1="!"
       MPI_OFFSET_KIND2="!"
    fi
fi

      else
         echo "defining MPI_Offset as long in C and integer in Fortran" 
         DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
         FORTRAN_MPI_OFFSET="integer"
         LL="\%ld"
         MPI_OFFSET_KIND1="!"
         MPI_OFFSET_KIND2="!"
      fi
   else 
      rm -f ltest.c
      cat > ltest.c <<EOF
        main()
        {
           long long i=8;
           return 0;
        }
EOF
      rm -f a.out
      $CC $USER_CFLAGS ltest.c > /dev/null 2>&1
      if test -x a.out ; then
         echo "assuming size of long long is 8bytes; use '-longlongsize' to indicate otherwise"
         rm -f a.out ltest.c
         echo "defining MPI_Offset as long long in C and integer*8 in Fortran" 
         
{
test -n "$verbose" && \
echo "	defining __HAVE_LONG_LONG_64"
echo "#define" __HAVE_LONG_LONG_64 1 >> confdefs.h
DEFS="$DEFS -D__HAVE_LONG_LONG_64=1"
}

         DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"
         FORTRAN_MPI_OFFSET="integer*8"
         LL="\%lld"
      else 
         echo "assuming long long is not available; use '-longlongsize' to indicate otherwise"
         echo "defining MPI_Offset as long in C and integer in Fortran" 
         DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
         FORTRAN_MPI_OFFSET="integer"
         LL="\%ld"
         MPI_OFFSET_KIND1="!"
         MPI_OFFSET_KIND2="!"
      fi
   fi
fi

#
#
if test -n "$longlongsize"; then
   if test $FROM_MPICH = 0 ; then
       
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if MPI_LONG_LONG_INT is defined in mpi.h""... $ac_c"
else
echo $ac_n "checking if MPI_LONG_LONG_INT is defined in mpi.h""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
         long long i;   
         MPI_Init(&argc,&argv);
         MPI_Send(&i, 1, MPI_LONG_LONG_INT, 0, 0, MPI_COMM_WORLD);
         MPI_Finalize(); 
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      
{
test -n "$verbose" && \
echo "	defining __HAVE_MPI_LONG_LONG_INT"
echo "#define" __HAVE_MPI_LONG_LONG_INT 1 >> confdefs.h
DEFS="$DEFS -D__HAVE_MPI_LONG_LONG_INT=1"
}

  else
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
  fi
  rm -f a.out mpitest.c

   else
       
{
test -n "$verbose" && \
echo "	defining __HAVE_MPI_LONG_LONG_INT"
echo "#define" __HAVE_MPI_LONG_LONG_INT 1 >> confdefs.h
DEFS="$DEFS -D__HAVE_MPI_LONG_LONG_INT=1"
}

   fi
fi
#
if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" ; then
   if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking for Fortran 90 KIND parameter for 8-byte integers""... $ac_c"
else
echo $ac_n "checking for Fortran 90 KIND parameter for 8-byte integers""... $ac_c" 1>&1
fi
rm -f kind.f kind.o kind
cat <<EOF > kind.f
      program main
      integer i
      i = selected_int_kind(16)
      open(8, file="k.out", form="formatted")
      write (8,*) i
      close(8)
      stop
      end
EOF
if test -z "$F90" ; then
   F90=f90
fi
KINDVAL=""
if $F90 -o kind kind.f >/dev/null 2>&1 ; then
    ./kind >/dev/null 2>&1
    KINDVAL=`cat k.out`
fi
rm -f kind k.out kind.f kind.o
if test -n "$KINDVAL" -a "$KINDVAL" != "-1" -a "$KINDVAL" != " -1" ; then
   if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""$KINDVAL"
else
echo "$ac_t""$KINDVAL" 1>&1
fi
   MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"
   MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=$KINDVAL)"
else
    if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""unavailable"
else
echo "$ac_t""unavailable" 1>&1
fi
fi

fi
#
# check if MPI_Info functions are defined in the MPI implementation
if test $FROM_MPICH = 0 ; then
   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if MPI_Info functions are defined in the MPI implementation""... $ac_c"
else
echo $ac_n "checking if MPI_Info functions are defined in the MPI implementation""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
         MPI_Info info;
         MPI_Init(&argc,&argv);
         MPI_Info_create(&info);
         MPI_Finalize(); 
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      
{
test -n "$verbose" && \
echo "	defining __HAS_MPI_INFO"
echo "#define" __HAS_MPI_INFO 1 >> confdefs.h
DEFS="$DEFS -D__HAS_MPI_INFO=1"
}

      HAS_MPI_INFO="#define __HAS_MPI_INFO"
      MPI_FINFO1="!"
      MPI_FINFO2="!"
      MPI_FINFO3="!"
      MPI_FINFO4="!"
  else
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
      BUILD_MPI_INFO=1
      MPI_FINFO1="      INTEGER MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL"
      MPI_FINFO2="      PARAMETER (MPI_MAX_INFO_KEY=255, MPI_MAX_INFO_VAL=1024)"
      MPI_FINFO3="      INTEGER MPI_INFO_NULL"
      MPI_FINFO4="      PARAMETER (MPI_INFO_NULL=0)"
  fi
  rm -f a.out mpitest.c

else
   
{
test -n "$verbose" && \
echo "	defining __HAS_MPI_INFO"
echo "#define" __HAS_MPI_INFO 1 >> confdefs.h
DEFS="$DEFS -D__HAS_MPI_INFO=1"
}

   HAS_MPI_INFO="#define __HAS_MPI_INFO"
   MPI_FINFO1="!"
   MPI_FINFO2="!"
   MPI_FINFO3="!"
   MPI_FINFO4="!"
fi   
#
if test -n "$mpi_sgi"; then
   if test -z "$HAS_MPI_INFO" ; then
      
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if MPI_INFO_NULL is defined in mpi.h""... $ac_c"
else
echo $ac_n "checking if MPI_INFO_NULL is defined in mpi.h""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
	int i;
	i = MPI_INFO_NULL;
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      cp adio/sgi/mpi3.1/*.h include
  else
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
  fi
  rm -f a.out mpitest.c
  # is MPI_INFO_NULL defined in mpi.h?
   fi
   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if MPI_SGI_type_is_contig is defined""... $ac_c"
else
echo $ac_n "checking if MPI_SGI_type_is_contig is defined""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
         MPI_Datatype type;
         int i;

         MPI_Init(&argc,&argv);
         i = MPI_SGI_type_is_contig(type);
         MPI_Finalize(); 
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
     if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
  else
     if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
     
{
test -n "$verbose" && \
echo "	defining __NO_MPI_SGI_type_is_contig"
echo "#define" __NO_MPI_SGI_type_is_contig 1 >> confdefs.h
DEFS="$DEFS -D__NO_MPI_SGI_type_is_contig=1"
}

  fi
  rm -f a.out mpitest.c

   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if MPI-2 combiners are defined in mpi.h""... $ac_c"
else
echo $ac_n "checking if MPI-2 combiners are defined in mpi.h""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
         int i;

         MPI_Init(&argc,&argv);
         i = MPI_COMBINER_STRUCT;
         MPI_Finalize(); 
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
     if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
     
{
test -n "$verbose" && \
echo "	defining __HAS_MPI_COMBINERS"
echo "#define" __HAS_MPI_COMBINERS 1 >> confdefs.h
DEFS="$DEFS -D__HAS_MPI_COMBINERS=1"
}

  else
     if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
  fi
  rm -f a.out mpitest.c

fi
#
# check if darray and subarray constructors are defined in the MPI implementation
if test $FROM_MPICH = 0 ; then
   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if darray and subarray constructors are defined in the MPI implementation""... $ac_c"
else
echo $ac_n "checking if darray and subarray constructors are defined in the MPI implementation""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
         int i=4;
         MPI_Datatype t;
         MPI_Init(&argc,&argv);
         MPI_Type_create_darray(i, i, i, &i, &i, &i, &i, i, MPI_INT, &t);
         MPI_Type_create_subarray(i, &i, &i, &i, i, MPI_INT, &t);
         MPI_Finalize(); 
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      
{
test -n "$verbose" && \
echo "	defining __HAS_MPI_DARRAY_SUBARRAY"
echo "#define" __HAS_MPI_DARRAY_SUBARRAY 1 >> confdefs.h
DEFS="$DEFS -D__HAS_MPI_DARRAY_SUBARRAY=1"
}

      HAS_MPI_DARRAY_SUBARRAY="#define __HAS_MPI_DARRAY_SUBARRAY"
      MPI_FARRAY1="!"
      MPI_FARRAY2="!"
      MPI_FARRAY3="!"
      MPI_FARRAY4="!"
      MPI_FARRAY5="!"
      MPI_FARRAY6="!"
      MPI_FARRAY7="!"
  else
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
      BUILD_MPI_ARRAY=1
      MPI_FARRAY1="      INTEGER MPI_ORDER_C, MPI_ORDER_FORTRAN"
      MPI_FARRAY2="      PARAMETER (MPI_ORDER_C=56, MPI_ORDER_FORTRAN=57)"
      MPI_FARRAY3="      INTEGER MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC"
      MPI_FARRAY4="      INTEGER MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG"
      MPI_FARRAY5="      PARAMETER (MPI_DISTRIBUTE_BLOCK=121, MPI_DISTRIBUTE_CYCLIC=122)"
      MPI_FARRAY6="      PARAMETER (MPI_DISTRIBUTE_NONE=123)"
      MPI_FARRAY7="      PARAMETER (MPI_DISTRIBUTE_DFLT_DARG=-49767)"
  fi
  rm -f a.out mpitest.c

else
   
{
test -n "$verbose" && \
echo "	defining __HAS_MPI_DARRAY_SUBARRAY"
echo "#define" __HAS_MPI_DARRAY_SUBARRAY 1 >> confdefs.h
DEFS="$DEFS -D__HAS_MPI_DARRAY_SUBARRAY=1"
}

   HAS_MPI_DARRAY_SUBARRAY="#define __HAS_MPI_DARRAY_SUBARRAY"
   MPI_FARRAY1="!"
   MPI_FARRAY2="!"
   MPI_FARRAY3="!"
   MPI_FARRAY4="!"
   MPI_FARRAY5="!"
   MPI_FARRAY6="!"
   MPI_FARRAY7="!"
fi   
#
# Check to see if the compiler accepts prototypes
#
if test -n "$file_system_nfs"; then
    CFLAGS="$CFLAGS -D__NFS"
fi
if test -n "$file_system_ufs"; then
    CFLAGS="$CFLAGS -D__UFS"
fi
if test -n "$file_system_hfs"; then
    CFLAGS="$CFLAGS -D__HFS"
fi
if test -n "$file_system_sfs"; then
    CFLAGS="$CFLAGS -D__SFS"
fi
if test -n "$file_system_xfs"; then
    CFLAGS="$CFLAGS -D__XFS"
fi
if test -n "$file_system_pfs"; then
    CFLAGS="$CFLAGS -D__PFS"
fi
if test -n "$file_system_piofs"; then
    CFLAGS="$CFLAGS -D__PIOFS"
    USER_CFLAGS="$USER_CFLAGS -bI:/usr/include/piofs/piofs.exp"
    ROMIO_LFLAGS="$USER_FFLAGS -bI:/usr/include/piofs/piofs.exp"
    USER_FFLAGS="$USER_FFLAGS -bI:/usr/include/piofs/piofs.exp"
fi
if test -n "$mpi_mpich"; then
   CFLAGS="$CFLAGS -D__NEEDS_MPI_TEST -D__MPICH"
   if test -z "$arch_SX4" ; then
      MPIOF_H_INCLUDED=1
   fi
fi
if test -n "$mpi_sgi"; then
   CFLAGS="$CFLAGS -D__MPISGI"
fi
if test -n "$mpi_hp"; then
   CFLAGS="$CFLAGS -D__MPIHP"
   if test "$NOF77" = 0; then
      
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if mpiof.h is included in mpif.h""... $ac_c"
else
echo $ac_n "checking if mpiof.h is included in mpif.h""... $ac_c" 1>&1
fi
  rm -f mpitest.f
  cat > mpitest.f <<EOF
      program main
      implicit none
      include 'mpif.h'
      integer i
      i = MPI_MODE_RDWR
      stop
      end
EOF
  rm -f a.out
  $F77 $FFLAGS -I$MPI_INCLUDE_DIR mpitest.f $MPI_LIB > /dev/null 2>&1
  if test -x a.out ; then
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      MPIOF_H_INCLUDED=1
  else
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
  fi
  rm -f a.out mpitest.f

   fi
fi

ROMIO_HOME_TRIAL=$PWD
if test "${ROMIO_HOME_TRIAL}" != "" -a -d "${ROMIO_HOME_TRIAL}" ; then 
    if test -r ${ROMIO_HOME_TRIAL}/.foo$$ ; then
        /bin/rm -f ${ROMIO_HOME_TRIAL}/.foo$$
        /bin/rm -f .foo$$
    fi
    if test -r ${ROMIO_HOME_TRIAL}/.foo$$ -o -r .foo$$ ; then
        ROMIO_HOME_TRIAL=
    else
        echo "test" > ${ROMIO_HOME_TRIAL}/.foo$$
        if test ! -r .foo$$ ; then
            /bin/rm -f ${ROMIO_HOME_TRIAL}/.foo$$
            ROMIO_HOME_TRIAL=
        else
            /bin/rm -f ${ROMIO_HOME_TRIAL}/.foo$$
        fi
    fi
fi
if test "${ROMIO_HOME_TRIAL}" = "" ; then
    ROMIO_HOME_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'`
fi
if test ! -r ${ROMIO_HOME_TRIAL}/mpi-io/Makefile.in ; then
        ROMIO_HOME_TRIAL=`pwd`
    if test ! -r ${ROMIO_HOME_TRIAL}/mpi-io/Makefile.in ; then
        print_error "Cannot determine the root directory!" 
        exit 1
    fi
    ROMIO_HOME_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'`
    if test ! -d ${ROMIO_HOME_TRIAL} ; then 
        print_error "Warning: your default path uses the automounter; this may"
        print_error "cause some problems if you use other NFS-connected systems.
"
        ROMIO_HOME_TRIAL=`pwd`
    fi
fi
if test -z "${ROMIO_HOME_TRIAL}" ; then
    ROMIO_HOME_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'`
    if test ! -d ${ROMIO_HOME_TRIAL} ; then 
        print_error "Warning: your default path uses the automounter; this may"
        print_error "cause some problems if you use other NFS-connected systems.
"
        ROMIO_HOME_TRIAL=`pwd`
    fi
fi

echo "ROMIO home directory is $ROMIO_HOME_TRIAL"
ROMIO_HOME=$ROMIO_HOME_TRIAL
if test -z "$LIBNAME"; then
LIBNAME="$ROMIO_HOME/lib/$ARCH/libmpio.a"
fi
#
if test ! -d lib ; then 
   mkdir lib
fi
if test ! -d lib/$ARCH ; then 
   mkdir lib/$ARCH
fi
#
if test $NOF77 = 1 ; then
   F77=":"
fi
#
if test $FROM_MPICH = 0 ; then
   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if a simple MPI program compiles and links""... $ac_c"
else
echo $ac_n "checking if a simple MPI program compiles and links""... $ac_c" 1>&1
fi
  rm -f mpitest.c
  cat > mpitest.c <<EOF
#include "mpi.h"
     main(int argc, char **argv)
     {
         MPI_Init(&argc,&argv);
         MPI_Finalize(); 
     }
EOF
  rm -f a.out
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR mpitest.c $MPI_LIB > /dev/null 2>&1
  if test ! -x a.out ; then
      echo " "
      print_error "Unable to compile a simple MPI program"
      print_error "Use the -mpi, -mpiincdir, and -mpilib options to configure to specify the"
      print_error "MPI implementation, the include path for mpi.h, and the MPI library to link"
      rm -f a.out mpitest.c
      exit 1
  else
      rm -f a.out mpitest.c
  fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi

   
  if test -z "$ac_echo_n" ; then
ac_echo_n=yes
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
ac_echo_test=`echo foo 1>&1`
if test -z "$ac_echo_test" ; then
     print_error "Your sh shell does not handle the output redirection"
     print_error "1>&1 correctly.  Configure will work around this problem,"
     print_error "but you should report the problem to your vendor."
fi

fi
if test -z "$ac_echo_test" -a 1 = 1 ; then
echo $ac_n "checking if MPI_Fint is defined in the MPI implementation""... $ac_c"
else
echo $ac_n "checking if MPI_Fint is defined in the MPI implementation""... $ac_c" 1>&1
fi
  cat > mpitest1.c <<EOF
#include "mpi.h"
     main()
     {
         MPI_Fint i;
         i = 0;
     }
EOF
  rm -f mpitest1.o
  $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -c mpitest1.c > /dev/null 2>&1
  if test ! -s mpitest1.o ; then
      NEEDS_MPI_FINT="#define __NEEDS_MPI_FINT"
      CFLAGS="$CFLAGS -D__NEEDS_MPI_FINT"
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""no"
else
echo "$ac_t""no" 1>&1
fi
      rm -f mpitest1.o mpitest1.c
  else
      NEEDS_MPI_FINT=""
      if test -z "$ac_echo_test" -a 1 = 1 ; then
echo "$ac_t""yes"
else
echo "$ac_t""yes" 1>&1
fi
      rm -f mpitest1.o mpitest1.c
  fi

else
   NEEDS_MPI_FINT=""
fi
#
if test "$MPI_INCLUDE_DIR" = "." ; then
   ROMIO_INCLUDE="-I$ROMIO_HOME/include"
else 
   ROMIO_INCLUDE="-I$ROMIO_HOME/include -I$MPI_INCLUDE_DIR"
fi
#
TEST_LIBNAME=$LIBNAME
MPIRUN=mpirun
#
# if MPICH, use mpicc in test programs
#
if test $FROM_MPICH = 1 ; then
   MPICH_HOME=`dirname $ROMIO_HOME`
   TEST_CC=$MPICH_HOME/bin/mpicc
   MPI_LIB=""
   ROMIO_INCLUDE=""
   USER_CFLAGS=""
   USER_FFLAGS=""
   TEST_LIBNAME=""
   MPIRUN=$MPICH_HOME/bin/mpirun
   if test -n "$arch_SX4" || test -n "$arch_hpux" ; then
      TEST_F77=$MPICH_HOME/bin/mpif90
   else
      TEST_F77=$MPICH_HOME/bin/mpif77
   fi
   CC=$MPICH_HOME/bin/mpicc
fi
#
if test -z "$TEST_CC" ; then
   TEST_CC="$CC"
fi
if test -z "$TEST_F77" ; then
   TEST_F77="$F77"
fi
#
CFLAGS="$CFLAGS $DEFS"
#
echo "setting CC to $CC"
echo "setting F77 to $F77"
echo "setting TEST_CC to $TEST_CC"
echo "setting TEST_F77 to $TEST_F77"
echo "setting CFLAGS to $CFLAGS"
echo "setting USER_CFLAGS to $USER_CFLAGS"
echo "setting USER_FFLAGS to $USER_FFLAGS"
#























































# Set default prefixes.
if test -n "$prefix"; then
  test -z "$exec_prefix" && exec_prefix='${prefix}'
  prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
fi
if test -n "$exec_prefix"; then
  prsub="$prsub
s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
fi
# Quote sed substitution magic chars in DEFS.
cat >conftest.def <<EOF
$DEFS
EOF
escape_ampersand_and_backslash='s%[&\\]%\\&%g'
DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
rm -f conftest.def
# Substitute for predefined variables.

trap 'rm -f config.status; exit 1' 1 3 15
echo creating config.status
rm -f config.status
cat > config.status <<EOF
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $configure_args

for arg
do
  case "\$arg" in
    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
    exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
    *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  esac
done

trap 'rm -f Makefile mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h; exit 1' 1 3 15
RANLIB='$RANLIB'
CC='$CC'
F77='$F77'
FILE_SYSTEM='$FILE_SYSTEM'
CFLAGS='$CFLAGS'
USER_CFLAGS='$USER_CFLAGS'
USER_FFLAGS='$USER_FFLAGS'
MIPS='$MIPS'
BITS='$BITS'
MPI='$MPI'
AR='$AR'
MPI_INCLUDE_DIR='$MPI_INCLUDE_DIR'
MPI_LIB='$MPI_LIB'
NOF77='$NOF77'
NOPROFILE='$NOPROFILE'
MAKE='$MAKE'
PREFIX='$PREFIX'
arch_IRIX='$arch_IRIX'
ROMIO_HOME='$ROMIO_HOME'
LIBNAME='$LIBNAME'
TEST_LIBNAME='$TEST_LIBNAME'
LL='$LL'
F77GETARG='$F77GETARG'
F77IARGC='$F77IARGC'
FTESTDEFINE='$FTESTDEFINE'
FORTRAN_MPI_OFFSET='$FORTRAN_MPI_OFFSET'
FROM_MPICH='$FROM_MPICH'
NEEDS_MPI_FINT='$NEEDS_MPI_FINT'
HAS_MPI_INFO='$HAS_MPI_INFO'
BUILD_MPI_INFO='$BUILD_MPI_INFO'
HAS_MPI_DARRAY_SUBARRAY='$HAS_MPI_DARRAY_SUBARRAY'
BUILD_MPI_ARRAY='$BUILD_MPI_ARRAY'
DEFINE_MPI_OFFSET='$DEFINE_MPI_OFFSET'
MPI_FINFO1='$MPI_FINFO1'
MPI_FINFO2='$MPI_FINFO2'
MPI_FINFO3='$MPI_FINFO3'
MPI_FINFO4='$MPI_FINFO4'
MPI_FARRAY1='$MPI_FARRAY1'
MPI_FARRAY2='$MPI_FARRAY2'
MPI_FARRAY3='$MPI_FARRAY3'
MPI_FARRAY4='$MPI_FARRAY4'
MPI_FARRAY5='$MPI_FARRAY5'
MPI_FARRAY6='$MPI_FARRAY6'
MPI_FARRAY7='$MPI_FARRAY7'
MPI_OFFSET_KIND1='$MPI_OFFSET_KIND1'
MPI_OFFSET_KIND2='$MPI_OFFSET_KIND2'
TEST_CC='$TEST_CC'
TEST_F77='$TEST_F77'
ROMIO_INCLUDE='$ROMIO_INCLUDE'
ROMIO_LFLAGS='$ROMIO_LFLAGS'
ROMIO_LIBLIST='$ROMIO_LIBLIST'
ROMIO_TCFLAGS='$ROMIO_TCFLAGS'
ROMIO_TCPPFLAGS='$ROMIO_TCPPFLAGS'
ROMIO_TFFLAGS='$ROMIO_TFFLAGS'
MPIRUN='$MPIRUN'
LIBS='$LIBS'
srcdir='$srcdir'
DEFS='$DEFS'
prefix='$prefix'
exec_prefix='$exec_prefix'
prsub='$prsub'
extrasub='$extrasub'
EOF
cat >> config.status <<\EOF

top_srcdir=$srcdir

CONFIG_FILES=${CONFIG_FILES-"Makefile mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h"}
for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
  srcdir=$top_srcdir
  # Remove last slash and all that follows it.  Not all systems have dirname.
  dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  if test "$dir" != "$file"; then
    test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
    test ! -d $dir && mkdir $dir
  fi
  echo creating $file
  rm -f $file
  echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
cat $top_srcdir/${file}.in | sed -e "
$prsub
$extrasub
s%@RANLIB@%$RANLIB%g
s%@CC@%$CC%g
s%@F77@%$F77%g
s%@FILE_SYSTEM@%$FILE_SYSTEM%g
s%@CFLAGS@%$CFLAGS%g
s%@USER_CFLAGS@%$USER_CFLAGS%g
s%@USER_FFLAGS@%$USER_FFLAGS%g
s%@MIPS@%$MIPS%g
s%@BITS@%$BITS%g
s%@MPI@%$MPI%g
s%@AR@%$AR%g
s%@MPI_INCLUDE_DIR@%$MPI_INCLUDE_DIR%g
s%@MPI_LIB@%$MPI_LIB%g
s%@NOF77@%$NOF77%g
s%@NOPROFILE@%$NOPROFILE%g
s%@MAKE@%$MAKE%g
s%@PREFIX@%$PREFIX%g
s%@arch_IRIX@%$arch_IRIX%g
s%@ROMIO_HOME@%$ROMIO_HOME%g
s%@LIBNAME@%$LIBNAME%g
s%@TEST_LIBNAME@%$TEST_LIBNAME%g
s%@LL@%$LL%g
s%@F77GETARG@%$F77GETARG%g
s%@F77IARGC@%$F77IARGC%g
s%@FTESTDEFINE@%$FTESTDEFINE%g
s%@FORTRAN_MPI_OFFSET@%$FORTRAN_MPI_OFFSET%g
s%@FROM_MPICH@%$FROM_MPICH%g
s%@NEEDS_MPI_FINT@%$NEEDS_MPI_FINT%g
s%@HAS_MPI_INFO@%$HAS_MPI_INFO%g
s%@BUILD_MPI_INFO@%$BUILD_MPI_INFO%g
s%@HAS_MPI_DARRAY_SUBARRAY@%$HAS_MPI_DARRAY_SUBARRAY%g
s%@BUILD_MPI_ARRAY@%$BUILD_MPI_ARRAY%g
s%@DEFINE_MPI_OFFSET@%$DEFINE_MPI_OFFSET%g
s%@MPI_FINFO1@%$MPI_FINFO1%g
s%@MPI_FINFO2@%$MPI_FINFO2%g
s%@MPI_FINFO3@%$MPI_FINFO3%g
s%@MPI_FINFO4@%$MPI_FINFO4%g
s%@MPI_FARRAY1@%$MPI_FARRAY1%g
s%@MPI_FARRAY2@%$MPI_FARRAY2%g
s%@MPI_FARRAY3@%$MPI_FARRAY3%g" | sed -e "
s%@MPI_FARRAY4@%$MPI_FARRAY4%g
s%@MPI_FARRAY5@%$MPI_FARRAY5%g
s%@MPI_FARRAY6@%$MPI_FARRAY6%g
s%@MPI_FARRAY7@%$MPI_FARRAY7%g
s%@MPI_OFFSET_KIND1@%$MPI_OFFSET_KIND1%g
s%@MPI_OFFSET_KIND2@%$MPI_OFFSET_KIND2%g
s%@TEST_CC@%$TEST_CC%g
s%@TEST_F77@%$TEST_F77%g
s%@ROMIO_INCLUDE@%$ROMIO_INCLUDE%g
s%@ROMIO_LFLAGS@%$ROMIO_LFLAGS%g
s%@ROMIO_LIBLIST@%$ROMIO_LIBLIST%g
s%@ROMIO_TCFLAGS@%$ROMIO_TCFLAGS%g
s%@ROMIO_TCPPFLAGS@%$ROMIO_TCPPFLAGS%g
s%@ROMIO_TFFLAGS@%$ROMIO_TFFLAGS%g
s%@MPIRUN@%$MPIRUN%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@DEFS@%$DEFS%
" >> $file
fi; done


exit 0
EOF
chmod +x config.status
${CONFIG_SHELL-/bin/sh} ./config.status

if test "$NOF77" = 0; then
    CONFIG_FILES="$CONFIG_FILES mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/fperf.f"
fi
if test -n "$file_system_nfs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_nfs/Makefile"
fi
if test -n "$file_system_ufs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_ufs/Makefile"
fi
if test -n "$file_system_xfs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_xfs/Makefile"
fi
if test -n "$file_system_hfs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_hfs/Makefile"
fi
if test -n "$file_system_sfs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_sfs/Makefile"
fi
if test -n "$file_system_pfs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_pfs/Makefile"
fi
if test -n "$file_system_piofs"; then
    CONFIG_FILES="$CONFIG_FILES adio/ad_piofs/Makefile"
fi
export CONFIG_FILES
./config.status
CONFIG_FILES=""
# delete the first line created by configure in some files
sed 1d util/romioinstall > util/tmp
mv util/tmp util/romioinstall
chmod 755 util/romioinstall
if test "$NOF77" = 0; then
   sed 1d test/fcoll_test.f > test/tmp
   mv test/tmp test/fcoll_test.f
   if test "$MPIOF_H_INCLUDED" = 1; then
      sed 5d test/fcoll_test.f > test/tmp
      mv test/tmp test/fcoll_test.f
   fi
   sed 1d test/fperf.f > test/tmp
   mv test/tmp test/fperf.f
   if test "$MPIOF_H_INCLUDED" = 1; then
      sed 5d test/fperf.f > test/tmp
      mv test/tmp test/fperf.f
   fi
   sed 1d test/fmisc.f > test/tmp
   mv test/tmp test/fmisc.f
   if test "$MPIOF_H_INCLUDED" = 1; then
      sed 5d test/fmisc.f > test/tmp
      mv test/tmp test/fmisc.f
   fi
fi
sed 1d test/misc.c > test/tmp
mv test/tmp test/misc.c
sed 1d test/large_file.c > test/tmp
mv test/tmp test/large_file.c
sed 1d include/mpio.h > include/tmp
mv include/tmp include/mpio.h
sed 1d include/mpiof.h > include/tmp
mv include/tmp include/mpiof.h
sed 1d test/runtests > test/tmp
mv test/tmp test/runtests
#
chmod 755 test/runtests
#
rm -f *.o
print_error " "
print_error Please register your copy of ROMIO with us by sending email
print_error to majordomo@mcs.anl.gov with the message
print_error subscribe romio-users
print_error This will enable us to notify you of new releases of ROMIO
print_error as well as bug fixes.
print_error " "
if test $FROM_MPICH = 0 ; then
   print_error Configure done. Now type make
   print_error " "
fi
exit 0
