1
1
Brian Barrett e422152b55 * make romio compile
* fix typos in ompi/Makefile.am

This commit was SVN r6310.
2005-07-02 17:56:20 +00:00

1844 строки
56 KiB
Plaintext

# Open MPI: Modifications to this file were done on an "let's do the
# minimum possible" basis, not so that we can skip on the work or
# provide any less functionality, but more from a perspective that we
# want to be able to import new versions of ROMIO in as easy a fashion
# as possible. Hence, there are some things in this file that are
# irrelevant / unnecessary in an Open MPI environment, but are
# harmless and are left here solely for the sake of ease of future
# patching/importing.
# Open MPI: added AC#INIT, AC#PREREQ, and AM#INIT_AUTOMAKE
AC_INIT
AC_PREREQ(2.58)
AM_INIT_AUTOMAKE(io-romio, 1.0.0, 'no')
# Open MPI: added AH_TOP
AH_TOP([/*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
])
# Open MPI: added a bunch of AH templates. Could go manually edit all
# AC_DEFINE's down below, but this approach will be significantly
# easier to port forward to future versions of ROMIO.
AH_TEMPLATE([NO_AIO], [Whether we have/want to use libaio or not])
AH_TEMPLATE([AIO_SUN], [Whether we have Sun's libaio or not])
AH_TEMPLATE([SOLARIS], [Whether we're on Solaris or not])
AH_TEMPLATE([NO_FD_IN_AIOCB], [On RS600, set this if we have aio (?)])
AH_TEMPLATE([AIO_HANDLE_IN_AIOCB], [On RS600, set this if we have aio (?)])
AH_TEMPLATE([AIX], [Whether we're on AIX or not])
AH_TEMPLATE([PARAGON], [Whether we're on Paragon or not])
AH_TEMPLATE([FREEBSD], [Whether we're on FreeBSD or not])
AH_TEMPLATE([LINUX], [Whether we're on Linux or not])
AH_TEMPLATE([NEEDS_AIOCB_T], [Whether we need to define aiocb_t type or not])
AH_TEMPLATE([SX4], [Whether we are on SX4 or not])
AH_TEMPLATE([HPUX], [Whether we are on HPUX or not])
AH_TEMPLATE([SPPUX], [Whether we are on SPPUX or not])
AH_TEMPLATE([AIO_PRIORITY_DEFAULT], [Whether we have AIO priority default or not])
AH_TEMPLATE([DEC], [Whether we are on DEC or not])
AH_TEMPLATE([CRAY], [Whether we are on Cray or not])
AH_TEMPLATE([MPISGI], [Will always be undefined / 0])
AH_TEMPLATE([HAVE_MPI_COMBINERS], [Whether we have SGI MPI or not])
AH_TEMPLATE([NO_MPI_SGI_type_is_contig], [Whether we have SGI MPI or not])
AH_TEMPLATE([IRIX], [Whether we are on IRIX or not])
AH_TEMPLATE([AIO_SIGNOTIFY_NONE], [Whether AIO has SIGNOTIFY or not])
AH_TEMPLATE([HAVE_MPI_LONG_LONG_INT], [Whether Open MPI has MPI_LONG_LONG_INT or not])
AH_TEMPLATE([HAVE_MPI_INFO], [Whether Open MPI has MPI_INFO or not])
AH_TEMPLATE([HAVE_MPI_DARRAY_SUBARRAY], [Whether Open MPI has MPI_DARRAY_SUBARRAY or not])
AH_TEMPLATE([HAVE_WEAK_SYMBOLS], [Whether we have weak symbols or not])
AH_TEMPLATE([HAVE_PRAGMA_WEAK], [Whether we have #pragma weak or not])
AH_TEMPLATE([HAVE_PRAGMA_HP_SEC_DEF], [Whether we have #pragma sec_def or not])
AH_TEMPLATE([HAVE_PRAGMA_CRI_DUP], [Whether we have #pragma cri_dup or not])
AH_TEMPLATE([NFS], [Building NFS support or not])
AH_TEMPLATE([UFS], [Building UFS support or not])
AH_TEMPLATE([HFS], [Building HFS support or not])
AH_TEMPLATE([SFS], [Building SFS support or not])
AH_TEMPLATE([XFS], [Building XFS support or not])
AH_TEMPLATE([ROMIO_PVFS], [Building PVFS support or not])
AH_TEMPLATE([PFS], [Building PFS support or not])
AH_TEMPLATE([ROMIO_TESTFS], [Building ROMIO testfs support or not])
AH_TEMPLATE([PIOFS], [Building PIOFS support or not])
AH_TEMPLATE([NEEDS_MPI_TEST], [Will always be undefined / 0])
AH_TEMPLATE([MPICH], [Will always be undefined / 0])
AH_TEMPLATE([MPILAM], [Will always be undefined / 0])
AH_TEMPLATE([MPIHP], [Will always be undefined / 0])
AH_TEMPLATE([HAVE_STATUS_SET_BYTES], [Will always be defined / 1])
AH_TEMPLATE([PRINT_ERR_MSG], [Will always be undefined / 0])
AH_TEMPLATE([HAVE_MPI_OFFSET], [Will always be defined / 1])
AH_TEMPLATE([MPI_FILE_DEFINED], [Will always be undefined / 0])
AH_TEMPLATE([PRINT_ERROR_MSG], [Will always be undefined])
# Open MPI: this configure script doesn't seem to define these
# anywhere, so just do them manually here because "we know better"
# (i.e., Open MPI can be hard-wired to these values).
AC_DEFINE(HAVE_MPI_OFFSET, 1)
# Open MPI: look for top Open MPI directory
AC_MSG_CHECKING([for Open MPI support files])
if test -f "$srcdir/../../../../../config/mca_configure.ac"; then
# This is needed for VPATH builds, so that it will -I the
# appropriate include directory (don't know why automake
# doesn't do this # automatically).
top_ompi_srcdir='$(top_srcdir)/../../../../..'
top_ompi_builddir='$(top_builddir)/../../../../..'
OMPI_CFLAGS='-I$(top_srcdir)/include -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal -I$(top_builddir)/opal -I$(top_srcdir)/orte -I$(top_builddir)/orte -I$(top_srcdir)/ompi -I$(top_builddir)/ompi'" $CPPFLAGS"
found_ompi_headers=1
AC_MSG_RESULT([in Open MPI source tree -- good])
AC_SUBST(top_ompi_srcdir)
AC_SUBST(top_ompi_builddir)
else
AC_MSG_RESULT([not found])
AC_MSG_WARN([*** Could not find Open MPI support files])
AC_MSG_WARN([*** Can only build this version of ROMIO in an Open MPI source tree])
AC_MSG_ERROR([*** Cannot continue])
fi
dnl This is an autoconf script. To rebuild the "configure" script
dnl from this, execute the command "autoconf" in the directory containing
dnl this script. You must have autoconf version 1.4 or later,
dnl but NOT version 2.0 or later
[#!/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]
[-mpibindir=MPI_BIN_DIR]
[-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] [-disable-weak-symbols]
where
FILE_SYSTEM = the file system(s) for which ROMIO is to be configured.
Valid values are pfs, piofs, hfs, xfs, sfs, pvfs, ufs,
and nfs (case-sensitive). They correspond to Intel's PFS,
IBM's PIOFS, HP/Convex's HFS, SGI's XFS, NEC's SFS,
Clemson University's PVFS (for Linux clusters), 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, LINUX, and LINUX_ALPHA. (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, HP MPI 1.3 or higher, LAM,
and Cray MPI.
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
MPI_BIN_DIR = the full path of the directory that contains the MPI
versions of the compilers, such as mpicc and mpif77.
Use only if the ROMIO configure cannot find the
necessary commands
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 -disable-weak-symbols disables the use of weak symbols, even if
available, for building the profiling interface.
"
#
echo " "
# Open MPI: fix version number and append "(Open MPI)"
echo "Configuring ROMIO Version 1.2.5.1 (Open MPI)"
echo " "
# Open MPI: modern versions of GNU auto tools pass in some parameters
# that we don't want to see, so don't look at them at all.
#CONFIGURE_ARGS="$*"
#if test -n "$CONFIGURE_ARGS" ; then
# echo "Configuring with args $CONFIGURE_ARGS"
#fi
#
# rm -f include/*.h
#
NOF77=0
ARCH=""
arch_IRIX=""
MPI=""
MPI_INCLUDE_DIR=""
ROMIO_INCLUDE=""
MPI_LIB=""
LIBNAME=""
TEST_LIBNAME=""
FILE_SYSTEM=""
PREFIX=""
DEBUG=no
MIPS=0
BITS=0
FROM_MPICH=0
CFLAGS=${CFLAGS:-""}
LL="\%lld"
AR_LOCAL=l
HAVE_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=""
NOPROFILE=0
MPIRUN=""
FORTRAN_TEST=""
# Open MPI: This is a Bad Thing to do in Automake-based build systems
#MAKE=${MAKE:-"make"}
# 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=""
TRY_WEAK_SYMBOLS=1
#
known_filesystems="nfs ufs pfs piofs pvfs testfs xfs hfs sfs"
# Open MPI: added "open_mpi_mpi"
known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi open_mpi_mpi"
#
# Defaults
enable_aio=notgiven
# Open MPI: rather than update the below to use modern GNU auto tools
# options for getting command line params, just set the defaults that
# we want here
FROM_MPICH=1
MPI="open_mpi"
NOF77=1
NOPROFILE=1
TRY_WEAK_SYMBOLS=0
# Open MPI: Original form would traverse through $*. But since modern
# GNU auto tools pass in opaque command line params that we should not
# see, add "in $bogus" so that this big statement traverses through
# nothing (and is effectively ignored).
#for arg
for arg in $bogus
do
case $arg in
-arch=* | --arch=*)
ARCH=`echo $arg|sed 's/-*arch=//'`
eval "arch_`echo $ARCH`=1"
;;
-with-file-system=* | --with-file-system=* )
FILE_SYSTEM=`echo $arg|sed 's/-*with-file-system=//' | sed -e 's/\+/ /g'`
for x in $FILE_SYSTEM
do
eval "file_system_`echo $x`=1"
done
;;
-file_system=* | --file_system=* )
# DEPRECATED FORMAT
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
;;
--enable-aio | -enable-aio)
enable_aio=yes
;;
--disable-aio | -disable-aio)
enable_aio=no
;;
-with-mpi=* | --with-mpi=*)
MPI=`echo $arg|sed 's/-*with-mpi=//'`
eval "mpi_`echo $MPI`=1"
;;
-mpi=* | --mpi=*)
# DEPRECATED FORMAT
MPI=`echo $arg|sed 's/-*mpi=//'`
eval "mpi_`echo $MPI`=1"
;;
# OTHER ARGS ARE DEPRECATED AND SHOULD BE PROVIDED THROUGH ENV VARIABLES
-mpiincdir=* | --mpiincdir=*)
MPI_INCLUDE_DIR=`echo $arg|sed 's/-*mpiincdir=//'`
;;
-mpibindir=* | --mpibindir=*)
MPI_BIN_DIR=`echo $arg|sed 's/-*mpibindir=//'`
;;
-mpilib=* | --mpilib=*)
MPI_LIB=`echo $arg|sed 's/-*mpilib=//'`
;;
-mpiolib=* | --mpiolib=*)
LIBNAME=`echo $arg|sed 's/-*mpiolib=//'`
;;
# THE FOLLOWING SHOULD BE PROVIDED THROUGH ENV VARIABLES
-cc=* | --cc=*)
CC=`echo $arg|sed 's/-*cc=//'`
;;
-fc=* | --fc=*)
FC=`echo $arg|sed 's/-*fc=//'`
;;
-f90=* | --f90=*)
F90=`echo A$arg|sed 's/A-*f90=//'`
;;
-f90nag | --f90nag)
FC=f90
F77GETARG="call f90_unix_MP_getarg(i,str)"
F77IARGC="f90_unix_MP_iargc()"
;;
-cflags=* | --cflags=*)
package="`echo $arg|sed 's/-*cflags=//'`"
USER_CFLAGS="$package"
CFLAGS="$package $CFLAGS"
;;
-fflags=* | --fflags=*)
package="`echo $arg|sed 's/-*fflags=//'`"
FFLAGS="$FFLAGS $package"
;;
-make=* | --make=*)
package=`echo $arg|sed 's/-*make=//'`
MAKE="$package"
;;
# END OF VALUES THAT SHOULD BE PROVIDED THROUGH ENV VARIABLES
-nof77 | --nof77 | -disable-f77 | --disable-f77 )
echo "Fortran interface will not be built"
NOF77=1
;;
-debug | --debug | --enable-g | -enable-g)
echo "Configuring for a debugging version"
DEBUG=yes
;;
-ar_nolocal | --ar_nolocal)
AR_LOCAL=''
;;
-noranlib | --noranlib)
RANLIB=':'
;;
-prefix=* | --prefix=*)
PREFIX=`echo $arg|sed 's/-*prefix=//'`
# Use new variable name for prefix
prefix=$PREFIX
;;
-from_mpich | --from_mpich)
FROM_MPICH=1
;;
# Open MPI: Automake-based systems should not do this.
# -ar=* | --ar=*)
# package=`echo $arg|sed 's/-*ar=//'`
# AR="$package"
# ;;
# THESE SHOULD USE CROSS_SIZE_XXX
-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"
;;
# END OF VARIABLE SIZES
-noprofile | --noprofile | --disable-profile | -disable-profile )
echo "profiling interface will not be built"
NOPROFILE=1
;;
-echo | --enable-echo | -enable-echo )
set -x
;;
-disable-weak-symbols|--disable-weak-symbols)
TRY_WEAK_SYMBOLS=0
;;
-enable-* | --enable-* | -disable-* | --disable-* )
# ignore
;;
-with-* | --with-* | -without-* | --without-* )
# ignore
;;
-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
]
#
rm -f config.log
# Open MPI: removed AC#PREPARE
#AC#_PREPARE()
#
dnl
dnl Place the definitions into a configuration file, rather than sedding
dnl them into Makefiles. If you wish to force the definitions into
dnl the Makefiles, comment out this line (with dnl!). You will also need to
dnl remove the dnl from CFLAGS="$CFLAGS $DEFS" near the end of the file and
dnl comment out the line that follows it (CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H").
dnl
AC_CONFIG_HEADER(adio/include/romioconf.h)
#
# Open MPI: machinations with the srcdir are no longer necessary in
# modern versions of the GNU auto tools
dnl PAC_FIXUP_SRCDIR
# Get top_srcdir
#if test -z "$top_srcdir" ; then
# top_srcdir=$srcdir
#fi
#
# Open MPI: machinations with VPATH are no longer necessary in modern
# versions of the GNU auto tools.
dnl PAC_MAKE_VPATH
#
# Check that an arch was set
# If it wasn't set, try to guess using "util/tarch"
#
if test -z "$ARCH" -a -x $srcdir/util/tarch ; then
AC_MSG_CHECKING(for architecture)
ARCH=`$srcdir/util/tarch | sed s/-/_/g`
if test -z "$ARCH" ; then
AC_MSG_RESULT(Unknown!)
print_error "Error: Couldn't guess target architecture, you must"
print_error " set an architecture type with -arch=<value>"
exit 1
fi
# Open MPI: -arch=freebsd doesn't work as a configure flag anymore
# now that we've updated to a modern autoconf. So add a test here
# to do a tech and see if we're on a freebsd-like platform.
if test "$ARCH" = "Macintosh"; then
ARCH="freebsd"
fi
eval "arch_$ARCH=1"
AC_MSG_RESULT($ARCH)
fi
#
# check for valid architecture. Use __ so that _ALPHA_ does not match
# LINUX_ALPHA_
#### WE SHOULD REMOVE THIS SOON
grep __"$ARCH"_ $srcdir/.config_params > /dev/null 2>&1
if test $? != 0 ; then
echo "Unknown architecture $arch... proceeding anyway"
fi
#
#
#
# Find the home directory if not specified
if test "X$srcdir" != "X." -a -s $srcdir/mpi-io/Makefile.in ; then
ROMIO_HOME_TRIAL=$srcdir
else
PAC_GETWD(ROMIO_HOME_TRIAL,mpi-io/Makefile.in)
fi
echo "ROMIO home directory is $ROMIO_HOME_TRIAL"
ROMIO_HOME=$ROMIO_HOME_TRIAL
#
# Open MPI: These are no longer necessary with modern versions of the
# GNU auto tools.
# Create the "autoconf" style directory names...
#
# if test -z "$prefix" ; then prefix=$PREFIX ; fi
# if test -z "$prefix" ; then
# prefix=$ROMIO_HOME
# fi
dnl AC_SUBST(prefix)
# if test -z "$exec_prefix" ; then exec_prefix='${prefix}' ; fi
# exec_prefix is the prefix for directories containing machine-specific
# files such as libraries and executables. For the USER
dnl AC_SUBST(exec_prefix)
#includedir="${prefix}/include"
dnl AC_SUBST(includedir)
# bindir is for executable programs for the USER
#if test -z "$bindir" ; then bindir='${exec_prefix}/bin' ; fi
dnl AC_SUBST(bindir)
# sbindir is for executable programs for the ADMINISTRATOR
#if test -z "$sbindir" ; then sbindir='${exec_prefix}/sbin' ; fi
dnl AC_SUBST(sbindir)
# libdir is for libraries for the USER
#if test -z "$libdir" ; then libdir='${exec_prefix}/lib' ; fi
dnl AC_SUBST(libdir)
# mandir is the root for the man pages
#if test -z "$mandir" ; then mandir='${prefix}/man' ; fi
dnl AC_SUBST(mandir)
# if test -z "$docdir" ; then docdir='${prefix}/doc' ; fi
dnl AC_SUBST(docdir)
#if test -z "$htmldir" ; then htmldir='${prefix}/www' ; fi
dnl AC_SUBST(htmldir)
#
# check for valid file system
if test -n "$FILE_SYSTEM" ; then
for x in $FILE_SYSTEM
do
found=no
for y in $known_filesystems ; do
if test $x = $y ; then
found=yes
break
fi
done
if test "$found" = "no" ; then
echo "Unknown file system $x... proceeding anyway"
fi
done
fi
#
# check for valid MPI implementation
if test -n "$MPI" ; then
found=no
for mpi in $known_mpi_impls ; do
if test "${MPI}_mpi" = "$mpi" ; then
found=yes
break
fi
done
if test $found = no ; 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
#
# Open MPI: need to actually get the C compiler
CFLAGS_save="$CFLAGS"
AC_PROG_CC
CFLAGS="$CFLAGS_save"
# Open MPI: this stuff is not necessary with modern versions of the
# GNU auto tools.
#AR="${AR:-ar} cr$AR_LOCAL"
#if test -z "$RANLIB" ; then
AC_PROG_RANLIB
#fi
# Open MPI: We should not be using this.
#MAKE=${MAKE:-make}
#
# USER_CFLAGS and USER_FFLAGS are used only in test/Makefile.in
if test $DEBUG = "yes"; then
USER_CFLAGS="$CFLAGS -g"
USER_FFLAGS="$FFLAGS -g"
# Open MPI: Don't add any optflags; they come in from the top-level configure
#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 = "yes"; then
if test "$CC" = "gcc"; then
dnl CFLAGS="$CFLAGS -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes -DAIO_SUN"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# CFLAGS="$CFLAGS -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes"
CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DAIO_SUN"
# CFLAGS="$CFLAGS -O"
fi
else
dnl CFLAGS="$CFLAGS -O -DAIO_SUN"
CFLAGS="$CFLAGS -O"
fi
if test "$enable_aio" = "no" ; then
AC_DEFINE(NO_AIO)
else
AC_DEFINE(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 = "yes"; then
if test "$CC" = "gcc" ; then
dnl CFLAGS="$CFLAGS -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes -DAIO_SUN"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# CFLAGS="$CFLAGS -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes"
CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DAIO_SUN"
# CFLAGS="$CFLAGS -O"
fi
else
dnl CFLAGS="$CFLAGS -O -DAIO_SUN"
CFLAGS="$CFLAGS -O"
fi
if test "$enable_aio" = "no" ; then
AC_DEFINE(NO_AIO)
else
AC_DEFINE(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
dnl CFLAGS="$CFLAGS -DSOLARIS"
AC_DEFINE(SOLARIS)
if test $MPI = "mpich" ; then
TEST_CC=mpicc
TEST_F77=mpif77
else
TEST_CC="$CC"
TEST_F77="$F77"
fi
if test "$enable_aio" != "no" ; then
MPI_LIB="$MPI_LIB -laio"
ROMIO_LIBLIST="-laio"
fi
# Open MPI: Automake-based build systems should not do this
# AR="ar cr"
# solaris does not have l option to ar
# solaris f90 does not have 8-byte integer type
# (it does now!!!! 11/29/01)
fi
#
if test -n "$arch_rs6000"; then
F77=$FC
if test -z "$CC"; then
AC_PROGRAMS_CHECK(CC, mpcc, cc)
echo "Using $CC"
fi
if test $NOF77 = 0 && test -z "$FC"; then
AC_PROGRAMS_CHECK(F77, mpxlf, f77)
echo "Using $F77"
fi
if test $DEBUG = "yes"; then
dnl CFLAGS="$CFLAGS -g -DNO_FD_IN_AIOCB -DAIO_HANDLE_IN_AIOCB"
CFLAGS="$CFLAGS -g"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DNO_FD_IN_AIOCB -DAIO_HANDLE_IN_AIOCB"
# CFLAGS="$CFLAGS -O"
fi
# Check that aio is available (many systems appear to have aio
# either installed improperly or turned off).
# The test is the following: if not cross compiling, try to run a
# program that includes a *reference* to aio_write but does not call it
# If the libraries are not set up correctly, then this will fail.
AC_MSG_CHECKING([whether aio routines can be used])
AC_TEST_PROGRAM([
int main( int argc, char **argv )
{
if (argc > 10) aio_write();
return 0;
}
],aio_runs=yes,aio_runs=no,aio_runs=unknown);
AC_MSG_RESULT($aio_runs)
if test "$enable_aio" != "no" -a "$aio_runs" = "no" ; then
enable_aio=no
fi
if test "$enable_aio" = "no" ; then
AC_DEFINE(NO_AIO)
else
AC_DEFINE(NO_FD_IN_AIOCB)
AC_DEFINE(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
dnl CFLAGS="$CFLAGS -DAIX"
AC_DEFINE(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 = "yes"; then
CFLAGS="$CFLAGS -g"
else
if test "$CC" = "icc"; then
# Open MPI: Don't add any optflags; they come in from the top-level configure
# CFLAGS="$CFLAGS -Knoieee -Mvect -O3"
CFLAGS="$CFLAGS -Knoieee -Mvect"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# CFLAGS="$CFLAGS -O"
fi
fi
# Open MPI: Automake-based systems should not do this
# 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
dnl CFLAGS="$CFLAGS -DPARAGON -DNO_AIO"
AC_DEFINE(PARAGON)
AC_DEFINE(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}
dnl TFLOP_FLAGS="-cougar -D__PUMA -DNO_AIO"
TFLOP_FLAGS="-cougar -D__PUMA"
AC_DEFINE(NO_AIO)
if test $DEBUG = "yes"; then
CFLAGS="$CFLAGS -g $TFLOP_FLAGS"
else
if test "$CC" = "pgcc"; then
# Open MPI: Don't add any optflags; they come in from the top-level configure
# CFLAGS="$CFLAGS -Knoieee -Mvect -O3 $TFLOP_FLAGS"
CFLAGS="$CFLAGS -Knoieee -Mvect $TFLOP_FLAGS"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# CFLAGS="$CFLAGS -O $TFLOP_FLAGS"
fi
fi
# Open MPI: Automake-based systems should not do this
# 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" || test -n "$arch_LINUX_ALPHA" || test -n "$arch_netbsd" || test -n "$arch_openbsd" ; then
CC=${CC:-gcc}
if test -n "$arch_freebsd" || test -n "$arch_netbsd" || test -n "$arch_openbsd"; then
F77=${FC:-f77}
dnl CFLAGS="$CFLAGS -DFREEBSD"
AC_DEFINE(FREEBSD)
PAC_HAVE_MOUNT_NFS
# Open MPI: Added the following to check for struct
# fsbuf.f_fstypename. The previous approach did not work on
# OpenBSD 2.8.
if test "$ROMIO_HAVE_MOUNT_NFS" = "1"; then
AC_MSG_CHECKING(struct statfs.f_fstypename)
AC_COMPILE_CHECK([for language syntax],[#include <sys/param.h>
#include <sys/mount.h>
#include <string.h>],[
struct statfs f;
memset(&f, 0, sizeof(f));
strncmp("nfs", f.f_fstypename, 3);],
HAVE_STATFS_F_FSTYPENAME=1)
if test "$HAVE_STATFS_F_FSTYPENAME" = "1"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
# Open MPI: section end
longlongsize=${longlongsize:-0}
# printf doesn't work properly and no integer*8 as far as I can tell
else
F77=${FC:-g77}
dnl CFLAGS="$CFLAGS -DLINUX"
AC_DEFINE(LINUX)
fi
if test $DEBUG = "yes" ; then
if test "$CC" = "gcc" ; then
dnl CFLAGS="$CFLAGS -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes -DNO_AIO"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# CFLAGS="$CFLAGS -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes"
CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
else
dnl CFLAGS="$CFLAGS -g -DNO_AIO"
CFLAGS="$CFLAGS -g"
fi
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DNO_AIO"
# CFLAGS="$CFLAGS -O"
fi
if test "$enable_aio" != "yes" ; then
AC_DEFINE(NO_AIO)
else
# Try to find the aio routines
use_aio=no
AC_HEADER_CHECK(aio.h,has_aio_h=yes,has_aio_h=no)
dnl AC_CHECK_LIB(aio,aio_write,has_aio_write=yes,has_aio_write=no)
add_lib=""
AC_HAVE_LIBRARY(aio,add_lib="-laio")
AC_HAVE_LIBRARY(rt,add_lib="$add_lib -lrt")
AC_HAVE_LIBRARY(pthread,[add_lib="$add_lib -lpthread"
has_pthread=yes],[has_pthread=no])
AC_FUNC_CHECK(aio_write,has_aio_write=yes,has_aio_write=no)
if test "$has_aio_h" = "yes" -a "$has_aio_write" = "yes" -a \
"$has_pthread" = "yes" ; then
use_aio=yes
fi
# Check for aiocb_t as a shorthand for struct aiocb
AC_COMPILE_CHECK([for aiocb_t],
[#include <aio.h>],
[aiocb_t a;],has_aiocb_t=yes,has_aiocb_t=no)
if test "$has_aiocb_t" = "no" ; then
AC_DEFINE(NEEDS_AIOCB_T)
fi
if test "$use_aio" = "yes" ; then
MPI_LIB="$MPI_LIB $add_lib"
ROMIO_LIBLIST="$ROMIO_LIBLIST $add_lib"
else
AC_DEFINE(NO_AIO)
fi
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 = "yes" ; then
dnl CFLAGS="$CFLAGS -g -DNO_AIO -DSX4"
CFLAGS="$CFLAGS -g"
FFLAGS="$FFLAGS -g"
else
USER_FFLAGS="$FFLAGS -Chopt"
dnl CFLAGS="$CFLAGS -O -DNO_AIO -DSX4"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# CFLAGS="$CFLAGS -O"
FFLAGS="$FFLAGS -Chopt"
fi
AC_DEFINE(NO_AIO)
AC_DEFINE(SX4)
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 = "yes"; then
dnl CFLAGS="$CFLAGS -g +w1 -DNO_AIO"
CFLAGS="$CFLAGS -g +w1"
dnl CFLAGS="$CFLAGS -O -DNO_AIO"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DNO_AIO"
# CFLAGS="$CFLAGS -O"
fi
AC_DEFINE(NO_AIO)
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=1
MPI_LIB="$MPI_LIB -lV3"
CC=${CC:-cc -Ae}
F77=${FC:-f77 +U77}
fi
if test $MPI = "hp" ; then
mpi_hp=1
CC=${CC:-mpicc -Ae}
F77=${FC:-mpif77 +U77}
fi
if test $MPI = "lam" && test "$FC" != ""; then
FC="$FC +U77"
fi
FTESTDEFINE="external iargc, getarg"
if test -n "$arch_hpux" ; then
dnl CFLAGS="$CFLAGS -DHPUX -D_LARGEFILE64_SOURCE"
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
AC_DEFINE(HPUX)
if test $MPI = "hp" ; then
F77=${FC:-mpif90 +U77}
else
F77=${FC:-f90 +U77}
fi
else
dnl CFLAGS="$CFLAGS -DSPPUX"
AC_DEFINE(SPPUX)
fi
if test -z "$FILE_SYSTEM" ; then
if test -n "$arch_hpux" ; then
AC_COMPILE_CHECK(struct flock64,[#include <fcntl.h>],[
struct flock64 fl; int i=F_SETLKW64;],flock64_ok="yes",flock64_ok="no")
else
flock64_ok="yes"
fi
if test $flock64_ok = "yes" ; then
file_system_hfs=1
file_system_nfs=1
FILE_SYSTEM="hfs nfs"
echo "configuring for file systems hfs and nfs"
else
file_system_ufs=1
file_system_nfs=1
FILE_SYSTEM="ufs nfs"
echo "no flock64; configuring for file systems ufs and nfs"
fi
fi
MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND"
MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=8)"
if test "$CC" != "gcc" ; then
ROMIO_TCFLAGS="-Ae"
fi
if test "$F77" != "g77" ; then
ROMIO_TFFLAGS="+U77"
fi
fi
#
if test -n "$arch_alpha" || test -n "$arch_ALPHA" ; then
CC=${CC:-cc}
F77=${FC:-f77}
if test $DEBUG = "yes"; then
dnl CFLAGS="$CFLAGS -g -std1 -warnprotos -verbose -DAIO_PRIORITY_DEFAULT"
# Open MPI: it is not a valid assumption that on Alpha architectures
# you are always using the alpha compilers
# CFLAGS="$CFLAGS -g -std1 -warnprotos -verbose"
CFLAGS="$CFLAGS -g -verbose"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DAIO_PRIORITY_DEFAULT"
# CFLAGS="$CFLAGS -O"
fi
AC_DEFINE(AIO_PRIORITY_DEFAULT)
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
dnl CFLAGS="$CFLAGS -DDEC"
AC_DEFINE(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
FTESTDEFINE="integer ilen"
F77GETARG="call pxfgetarg(i, str, ilen, ierr)"
if test $DEBUG = "yes"; then
dnl CFLAGS="$CFLAGS -g -DNO_AIO"
CFLAGS="$CFLAGS -g"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# else
# dnl CFLAGS="$CFLAGS -O -DNO_AIO"
# CFLAGS="$CFLAGS -O"
fi
AC_DEFINE(NO_AIO)
RANLIB=":"
dnl CFLAGS="$CFLAGS -DCRAY -D_UNICOS"
CFLAGS="$CFLAGS -D_UNICOS"
AC_DEFINE(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
dnl CFLAGS="$CFLAGS -DMPISGI -DHAVE_MPI_COMBINERS -DNO_MPI_SGI_type_is_contig"
AC_DEFINE(MPISGI)
AC_DEFINE(HAVE_MPI_COMBINERS)
AC_DEFINE(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
#
PAC_GET_SPECIAL_SYSTEM_INFO
#
# 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"
dnl CFLAGS="$CFLAGS -DIRIX"
AC_DEFINE(IRIX)
fi
#
if test -n "$arch_IRIX"; then
CC=${CC:-cc}
F77=${FC:-f77}
if test $DEBUG = "yes"; then
CFLAGS="$CFLAGS -g -fullwarn"
# Open MPI: Don't add any optflags; they come in from the top-level configure
# 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=":"
dnl CFLAGS="$CFLAGS -DAIO_SIGNOTIFY_NONE"
AC_DEFINE(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
PAC_HAVE_PREAD64
#
if test -z "$FILE_SYSTEM" ; then
file_system_nfs=1
FILE_SYSTEM="nfs"
AC_MSG_CHECKING(for xfs)
AC_COMPILE_CHECK(,[
#include <aio.h>],
[aiocb64_t *t1;],file_system_xfs=1;FILE_SYSTEM="xfs $FILE_SYSTEM";)
if test "$file_system_xfs" = 1 ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
file_system_ufs=1
FILE_SYSTEM="ufs $FILE_SYSTEM"
fi
echo "configuring for file systems $FILE_SYSTEM"
fi
dnl CFLAGS="$CFLAGS -DIRIX"
AC_DEFINE(IRIX)
MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND"
MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=8)"
fi
dnl
dnl
AC_HAVE_FUNCS(memalign)
PAC_TEST_MPIR_STATUS_SET_BYTES
if test $NOF77 = 0 ; then
echo "checking Fortran external names"
PAC_GET_FORTNAMES
if test -n "$WDEF" ; then
CFLAGS="$CFLAGS $WDEF"
fi
rm -f test/mpif.h
if test "$MPI_INCLUDE_DIR" != "." && test $FROM_MPICH = 0 ; then
if test ! -d test ; then mkdir test ; fi
ln -s $MPI_INCLUDE_DIR/mpif.h test
fi
else
F77=":"
fi
#
# Open MPI: we already do this test in the top-level configure
#PAC_C_INLINE
# Header files
PAC_CHECK_HEADERS(unistd.h)
#
PAC_INT_LT_POINTER()
#
PAC_LONG_LONG_64()
#
dnl PAC_LONG_64()
#
if test -n "$longlongsize"; then
if test $FROM_MPICH = 0 ; then
PAC_MPI_LONG_LONG_INT()
else
AC_DEFINE(HAVE_MPI_LONG_LONG_INT)
fi
fi
#
if test -n "$OFFSET_KIND" -a "A$MPI_OFFSET_KIND1" = "A!" ; then
MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND"
MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=$OFFSET_KIND)"
else
if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 ; then
PAC_MPI_OFFSET_KIND()
fi
#
if test "$FORTRAN_MPI_OFFSET" = "integer" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 ; then
PAC_MPI_OFFSET_KIND_4BYTE()
fi
fi
#
# check if MPI_Info functions are defined in the MPI implementation
if test $FROM_MPICH = 0 ; then
PAC_MPI_INFO()
else
AC_DEFINE(HAVE_MPI_INFO)
HAVE_MPI_INFO="#define HAVE_MPI_INFO"
MPI_FINFO1="!"
MPI_FINFO2="!"
MPI_FINFO3="!"
MPI_FINFO4="!"
fi
#
if test -n "$mpi_sgi"; then
if test -z "$HAVE_MPI_INFO" ; then
PAC_CHECK_MPI_SGI_INFO_NULL # is MPI_INFO_NULL defined in mpi.h?
fi
PAC_TEST_MPI_SGI_type_is_contig
PAC_TEST_MPI_COMBINERS
PAC_TEST_MPI_HAVE_OFFSET_KIND
fi
#
# check if darray and subarray constructors are defined in the MPI implementation
if test $FROM_MPICH = 0 ; then
PAC_MPI_DARRAY_SUBARRAY()
else
AC_DEFINE(HAVE_MPI_DARRAY_SUBARRAY)
HAVE_MPI_DARRAY_SUBARRAY="#define HAVE_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
dnl PAC_CHECK_CC_PROTOTYPES(AC_DEFINE(HAVE_PROTOTYPES))
#
#
# Test for weak symbol support...
# We can't put # in the message because it causes autoconf to generate
# incorrect code
HAVE_WEAK_SYMBOLS=0
if test -n "$arch_hpux" || test -n "$arch_sppux" ; then
# multiple secondary definitions not allowed by HP compilers
# Fortran interface for HP already uses one secondary defn.
# therefore, do not use this method for profiling interface.
# build profiling interface explicitly.
TRY_WEAK_SYMBOLS=0
fi
if test $TRY_WEAK_SYMBOLS = 1 ; then
AC_MSG_CHECKING(for weak symbol support)
AC_TRY_LINK([
#pragma weak PFoo = Foo
extern int PFoo(int);
int Foo(a) { return a; }
],[return PFoo(1);],has_pragma_weak=1)
#
# Some systems (Linux ia64 and ecc, for example), support weak symbols
# only within a single object file! This tests that case.
if test "$has_pragma_weak" = 1 ; then
AC_MSG_RESULT([pragma weak])
AC_MSG_CHECKING([that weak symbols are visible to other files])
rm -f conftest*
cat >>conftest1.c <<EOF
extern int PFoo(int);
#pragma weak PFoo = Foo
int Foo(int);
int Foo(a) { return a; }
EOF
cat >>conftest2.c <<EOF
extern int PFoo(int);
int main() {
return PFoo(0);}
EOF
ac_link2='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest1.c conftest2.c $LIBS >conftest.out 2>&1'
if eval $ac_link2 ; then
AC_MSG_RESULT(yes)
else
echo "$ac_link2" >>config.log
echo "Failed program was" >>config.log
cat conftest1.c >>config.log
cat conftest2.c >>config.log
if test -s conftest.out ; then cat conftest.out >> config.log ; fi
AC_MSG_RESULT(no)
has_pragma_weak=0
fi
rm -f conftest*
fi
if test "$has_pragma_weak" = 1 ; then
HAVE_WEAK_SYMBOLS=1
AC_DEFINE(HAVE_WEAK_SYMBOLS)
AC_DEFINE(HAVE_PRAGMA_WEAK)
else
AC_TRY_LINK([
#pragma _HP_SECONDARY_DEF Foo PFoo
int Foo(a) { return a; }
],[return PFoo(1);],has_pragma_hp_secondary=1)
if test "$has_pragma_hp_secondary" = 1 ; then
AC_MSG_RESULT([pragma _HP_SECONDARY_DEF])
HAVE_WEAK_SYMBOLS=1
AC_DEFINE(HAVE_WEAK_SYMBOLS)
AC_DEFINE(HAVE_PRAGMA_HP_SEC_DEF)
else
AC_TRY_LINK([
#pragma _CRI duplicate PFoo as Foo
int Foo(a) { return a; }
],[return PFoo(1);],has_pragma_cri_duplicate=1)
if test "$has_pragma_cri_duplicate" = 1 ; then
AC_MSG_RESULT([pragma _CRI duplicate x as y])
HAVE_WEAK_SYMBOLS=1
AC_DEFINE(HAVE_WEAK_SYMBOLS)
AC_DEFINE(HAVE_PRAGMA_CRI_DUP)
else
AC_MSG_RESULT(no)
fi
fi
fi
fi
AC_SUBST(HAVE_WEAK_SYMBOLS)
#
# if FILE_SYSTEM is not set above, use ufs and nfs as default
#
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
#
if test -n "$file_system_nfs" ; then
# Check for problems with locks
AC_MSG_CHECKING([whether file locks work with NFS])
AC_TEST_PROGRAM([
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
int main()
{
struct flock lock;
int fd, err;
lock.l_type = F_WRLCK;
lock.l_start = 0;
lock.l_whence = SEEK_SET;
lock.l_len = 100;
fd = open("conftest.dat", O_RDWR | O_CREAT, 0644);
err = fcntl(fd, F_SETLKW, &lock);
/* printf("err = %d, errno = %d\n", err, errno); */
close(fd);
return err;
}],nfs_locks_work=yes,nfs_locks_work=no)
AC_MSG_RESULT($nfs_locks_work)
if test "$nfs_locks_work" != "yes" ; then
AC_MSG_WARN([File locks do not work with NFS. See the Installation and
users manual for instructions on fixing this])
fi
fi
if test -n "$file_system_nfs"; then
dnl CFLAGS="$CFLAGS -DNFS"
AC_DEFINE(NFS)
fi
if test -n "$file_system_ufs"; then
dnl CFLAGS="$CFLAGS -DUFS"
AC_DEFINE(UFS)
fi
if test -n "$file_system_hfs"; then
dnl CFLAGS="$CFLAGS -DHFS"
AC_DEFINE(HFS)
fi
if test -n "$file_system_sfs"; then
dnl CFLAGS="$CFLAGS -DSFS"
AC_DEFINE(SFS)
fi
if test -n "$file_system_xfs"; then
dnl CFLAGS="$CFLAGS -DXFS"
AC_DEFINE(XFS)
PAC_GET_XFS_MEMALIGN
fi
if test -n "$file_system_pvfs"; then
# Use ROMIO_PVFS instead of PVFS because FREEBSD defines PVFS.
dnl CFLAGS="$CFLAGS -DROMIO_PVFS"
AC_DEFINE(ROMIO_PVFS)
fi
if test -n "$file_system_pfs"; then
dnl CFLAGS="$CFLAGS -DPFS"
AC_DEFINE(PFS)
fi
if test -n "$file_system_testfs"; then
dnl CFLAGS="$CFLAGS -DROMIO_TESTFS"
AC_DEFINE(ROMIO_TESTFS)
fi
if test -n "$file_system_piofs"; then
dnl CFLAGS="$CFLAGS -DPIOFS"
AC_DEFINE(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
dnl CFLAGS="$CFLAGS -DNEEDS_MPI_TEST -DMPICH"
AC_DEFINE(NEEDS_MPI_TEST)
AC_DEFINE(MPICH)
if test -z "$arch_SX4" ; then
MPIOF_H_INCLUDED=1
fi
fi
if test -n "$mpi_sgi"; then
dnl CFLAGS="$CFLAGS -DMPISGI"
AC_DEFINE(MPISGI)
fi
if test -n "$mpi_lam"; then
dnl CFLAGS="$CFLAGS -DMPILAM"
AC_DEFINE(MPILAM)
fi
if test -n "$mpi_hp"; then
dnl CFLAGS="$CFLAGS -DMPIHP"
AC_DEFINE(MPIHP)
if test "$NOF77" = 0; then
PAC_CHECK_MPIOF_H
fi
fi
#
PAC_FUNC_STRERROR
if test -z "$srcdir" -o "$srcdir" = "." ; then srcdir="$ROMIO_HOME" ; fi
AC_SUBST(srcdir)
if test -z "$LIBNAME"; then
LIBNAME="$ROMIO_HOME/lib/$ARCH/libmpio.a"
fi
#
if test ! -d $ROMIO_HOME/lib ; then
mkdir $ROMIO_HOME/lib
fi
if test ! -d $ROMIO_HOME/lib/$ARCH ; then
mkdir $ROMIO_HOME/lib/$ARCH
fi
#
if test $NOF77 = 1 ; then
F77=":"
else
FORTRAN_TEST="fperf fcoll_test fmisc pfcoll_test"
fi
#
if test $FROM_MPICH = 0 ; then
PAC_TEST_MPI
PAC_NEEDS_FINT
else
NEEDS_MPI_FINT=""
fi
#
if test "$MPI_INCLUDE_DIR" = "." ; then
ROMIO_INCLUDE="-I../include"
else
ROMIO_INCLUDE="-I../include -I$MPI_INCLUDE_DIR"
fi
#
TEST_LIBNAME=$LIBNAME
MPIRUN=mpirun
#
# if MPICH, use mpicc in test programs
# Open MPI: Force extra if clause for simiplified stuff in Open MPI
#
if test "$MPI" = "open_mpi"; then
# Open MPI does have the status set bytes functionality
AC_DEFINE(HAVE_STATUS_SET_BYTES)
# Used in the tests/ subdirectory for after ROMIO is built
TEST_CC=mpicc
TEST_F77=mpif77
MPIRUN=mpirun
MPI_LIB=
ROMIO_INCLUDE=
USER_CFLAGS=
USER_FFLAGS=
TEST_LIBNAME=
#
# if MPICH, use mpicc in test programs
#
elif test $FROM_MPICH = 1 ; then
MPICH_HOME=`dirname $ROMIO_HOME`
if test -z "$MPI_BIN_DIR" ; then MPI_BIN_DIR=$MPICH_HOME/bin ; fi
TEST_CC=$MPI_BIN_DIR/mpicc
MPI_LIB=""
ROMIO_INCLUDE=""
USER_CFLAGS=""
USER_FFLAGS=""
TEST_LIBNAME=""
MPIRUN=$MPI_BIN_DIR/mpirun
if test -n "$arch_SX4" || test -n "$arch_hpux" ; then
TEST_F77=$MPI_BIN_DIR/mpif90
else
TEST_F77=$MPI_BIN_DIR/mpif77
fi
CC=$MPI_BIN_DIR/mpicc
dnl CFLAGS="$CFLAGS -DHAVE_STATUS_SET_BYTES"
AC_DEFINE(HAVE_STATUS_SET_BYTES)
fi
#
if test $MPI != "mpich" ; then
dnl CFLAGS="$CFLAGS -DPRINT_ERR_MSG"
AC_DEFINE(PRINT_ERR_MSG)
fi
#
if test -z "$TEST_CC" ; then
TEST_CC="$CC"
fi
if test -z "$TEST_F77" ; then
TEST_F77="$F77"
fi
#
dnl CFLAGS="$CFLAGS $DEFS"
CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H"
#
# Open MPI: we need libtool
AM_PROG_LIBTOOL
# Open MPI: setup the AM_CONDITIONALs to build the different adio devices
AM_CONDITIONAL(BUILD_HFS, [test -n "`echo $FILE_SYSTEM | grep hfs`"])
AM_CONDITIONAL(BUILD_NFS, [test -n "`echo $FILE_SYSTEM | grep nfs`"])
AM_CONDITIONAL(BUILD_PFS, [test -n "`echo $FILE_SYSTEM | grep pfs`"])
AM_CONDITIONAL(BUILD_PIOFS, [test -n "`echo $FILE_SYSTEM | grep piofs`"])
AM_CONDITIONAL(BUILD_PVFS, [test -n "`echo $FILE_SYSTEM | grep pvfs`"])
AM_CONDITIONAL(BUILD_SFS, [test -n "`echo $FILE_SYSTEM | grep sfs`"])
AM_CONDITIONAL(BUILD_TESTFS, [test -n "`echo $FILE_SYSTEM | grep testfs`"])
AM_CONDITIONAL(BUILD_UFS, [test -n "`echo $FILE_SYSTEM | grep ufs`"])
AM_CONDITIONAL(BUILD_XFS, [test -n "`echo $FILE_SYSTEM | grep xfs`"])
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"
# Open MPI: Add on CFLAGS that we figured out up top. They have
# makefile macros in them, so we couldn't substitute them until now.
CFLAGS="$CFLAGS $OMPI_CFLAGS "'-I$(top_builddir)/include'
AC_SUBST(ARCH)
AC_SUBST(FILE_SYSTEM)
# Open MPI: Automake-based systems should not do this
#AC_SUBST(CC)
#AC_SUBST(CFLAGS)
AC_SUBST(USER_CFLAGS)
AC_SUBST(USER_FFLAGS)
AC_SUBST(MIPS)
AC_SUBST(BITS)
AC_SUBST(MPI)
# Open MPI: Automake-based systems should not do this
#AC_SUBST(AR)
#AC_SUBST(RANLIB)
AC_SUBST(MPI_INCLUDE_DIR)
AC_SUBST(MPI_LIB)
# Open MPI: Automake-based systems should not do this
#AC_SUBST(F77)
AC_SUBST(NOF77)
AC_SUBST(NOPROFILE)
# Open MPI: This is a Bad Thing to do in Automake-based build systems
#AC_SUBST(MAKE)
AC_SUBST(PREFIX)
AC_SUBST(arch_IRIX)
AC_SUBST(ROMIO_HOME)
AC_SUBST(LIBNAME)
AC_SUBST(TEST_LIBNAME)
AC_SUBST(LL)
AC_SUBST(F77GETARG)
AC_SUBST(F77IARGC)
AC_SUBST(FTESTDEFINE)
AC_SUBST(FORTRAN_MPI_OFFSET)
AC_SUBST(FROM_MPICH)
AC_SUBST(NEEDS_MPI_FINT)
AC_SUBST(HAVE_MPI_INFO)
AC_SUBST(BUILD_MPI_INFO)
AC_SUBST(HAVE_MPI_DARRAY_SUBARRAY)
AC_SUBST(BUILD_MPI_ARRAY)
AC_SUBST(DEFINE_MPI_OFFSET)
AC_SUBST(MPI_FINFO1)
AC_SUBST(MPI_FINFO2)
AC_SUBST(MPI_FINFO3)
AC_SUBST(MPI_FINFO4)
AC_SUBST(MPI_FARRAY1)
AC_SUBST(MPI_FARRAY2)
AC_SUBST(MPI_FARRAY3)
AC_SUBST(MPI_FARRAY4)
AC_SUBST(MPI_FARRAY5)
AC_SUBST(MPI_FARRAY6)
AC_SUBST(MPI_FARRAY7)
AC_SUBST(MPI_OFFSET_KIND1)
AC_SUBST(MPI_OFFSET_KIND2)
AC_SUBST(TEST_CC)
AC_SUBST(TEST_F77)
AC_SUBST(ROMIO_INCLUDE)
AC_SUBST(ROMIO_LFLAGS)
AC_SUBST(ROMIO_LIBLIST)
AC_SUBST(ROMIO_TCFLAGS)
AC_SUBST(ROMIO_TCPPFLAGS)
AC_SUBST(ROMIO_TFFLAGS)
AC_SUBST(MPIRUN)
AC_SUBST(FORTRAN_TEST)
# Open MPI: This is no longer necessary with modern versions of the
# GNU auto tools.
#if test ! -d adio ; then mkdir adio ; fi
#if test ! -d adio/include ; then mkdir adio/include ; fi
#if test ! -d mpi2-other ; then mkdir mpi2-other ; fi
#
# Make sure we remove any configuration file incase there is out-of-date data.
# We remove the version in include in case this is a vpath build
# Open MPI: This is no longer necessary with modern versions of the
# GNU auto tools.
#rm -f adio/include/romioconf.h ${top_srcdir}/adio/include/romioconf.h
#
# Create makefiles for all of the adio devices. Only the ones that
# are active will be called by the top level ROMIO make
# Open MPI: revamped the AC_OUTPUT lines to fit our Makefile.am's
AC_CONFIG_FILES([
Makefile
adio/Makefile
adio/ad_nfs/Makefile
adio/ad_ufs/Makefile
adio/ad_xfs/Makefile
adio/ad_hfs/Makefile
adio/ad_sfs/Makefile
adio/ad_pfs/Makefile
adio/ad_ntfs/Makefile
adio/ad_testfs/Makefile
adio/ad_pvfs/Makefile
adio/ad_piofs/Makefile
adio/common/Makefile
adio/include/Makefile
doc/Makefile
include/Makefile
include/mpio.h
include/mpiof.h
mpi-io/Makefile
test/Makefile
test/misc.c
test/large_file.c
test/runtests
util/Makefile
])
AC_OUTPUT
# Open MPI: This is no longer necessary with modern versions of the
# GNU auto tools.
#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/pfcoll_test.f test/fperf.f"
#fi
#export CONFIG_FILES
#./config.status
#CONFIG_FILES=""
# delete the first line created by configure in some files
# Open MPI: we're not using romioinstall
#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/pfcoll_test.f > test/tmp
mv test/tmp test/pfcoll_test.f
if test "$MPIOF_H_INCLUDED" = 1; then
sed 5d test/pfcoll_test.f > test/tmp
mv test/tmp test/pfcoll_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
if test "$ROMIO_NO_BANNER" != "yes" -a "$FROM_MPICH" = 0 ; then
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 " "
fi
if test $FROM_MPICH = 0 ; then
print_error Configure done. Now type make
print_error " "
fi
exit 0