📄 configure.in
字号:
LIBNAME="$top_build_dir/lib/libmpio.a" fi # if test ! -d $top_build_dir/lib ; then mkdir $top_build_dir/lib fielse MPILIBNAME=${MPILIBNAME:-mpich} if test -z "$LIBNAME" ; then if test -d "$master_top_builddir/lib" ; then LIBNAME=$master_top_builddir/lib/lib${MPILIBNAME}.a else LIBNAME="$ROMIO_HOME/lib${MPILIBNAME}.a" fi fifiif test "$FROM_MPICH2" != no ; then # use the error handlers from MPICH2 MPIO_EXTRA_OBJECTS= MPIO_EXTRA_TMP_POBJECTS= MPIO_EXTRA_REAL_POBJECTS= # Use generalized request to get the multiple-completion routines MPIO_REQOBJECTS= MPIO_REQ_TMP_POBJECTS= MPIO_REQ_REAL_POBJECTS=fiAC_SUBST(MPIO_EXTRA_OBJECTS)AC_SUBST(MPIO_EXTRA_TMP_POBJECTS)AC_SUBST(MPIO_EXTRA_REAL_POBJECTS)AC_SUBST(MPIO_REQOBJECTS)AC_SUBST(MPIO_REQ_TMP_POBJECTS)AC_SUBST(MPIO_REQ_REAL_POBJECTS)## Use DOCTEXT instead of doctextAC_CHECK_PROGS(DOCTEXT,doctext,true)AC_SUBST(DOCTEXT)#if test $NOF77 = 1 ; then F77=":"else FORTRAN_TEST="fperf fcoll_test fmisc pfcoll_test" fi#if test $WITHIN_KNOWN_MPI_IMPL = no ; then PAC_TEST_MPI PAC_NEEDS_FINTelse 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=$LIBNAMEMPIRUN=mpirunif test "$MPI" = "open_mpi" ; then # Open MPI does have the status set bytes functionality AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if have MPIR_Status_set_bytes]) # Used in the tests/ subdirectory for after ROMIO is built TEST_CC=mpicc TEST_F77=mpif77 MPIRUN=mpirun MPI_LIB= NOPROFILE=1 ROMIO_INCLUDE= USER_CFLAGS= USER_FFLAGS= TEST_LIBNAME= AC_DEFINE(HAVE_MPI_DARRAY_SUBARRAY,1,[Define if Darray is available]) HAVE_MPI_DARRAY_SUBARRAY="#define HAVE_MPI_DARRAY_SUBARRAY" # Open MPI: see comments in mpi-io/mpioprof.h AC_DEFINE(MPIO_BUILD_PROFILING, 1, [hack to make ROMIO build without profiling])## if MPICH, use mpicc in test programs#elif test "$FROM_MPICH" = yes ; 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 # A later test will insert the mpi2-other/info and array directories based # on the value of BUILD_MPI_xxxx. This lets MPICH2 turn these off, # since MPICH2 provides these routines elsewhere EXTRA_DIRS="mpi-io/fortran" # Some older implementations of the ADI do not include the # MPID_Status_set_bytes routine. This uses either the # environment variable ADI3_WITHOUT_SET_BYTES or the # with arg --without-setbytes if test "$ADI2_WITHOUT_SET_BYTES" != yes -a \ "$with_setbytes" != no ; then AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if have MPIR_Status_set_bytes]) fielif test $FROM_LAM = yes ; then # LAM does have the status set bytes functionality AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if have MPIR_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= EXTRA_DIRS="mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran"elif test $FROM_MPICH2 = yes ; then # For now, separate the mpich2 from mpich cases MPICH_HOME=`dirname $ROMIO_HOME` MPICH_HOME=`dirname $MPICH_HOME` MPICH_HOME=`dirname $MPICH_HOME` if test -z "$MPI_BIN_DIR" ; then MPI_BIN_DIR=$MPICH_HOME/bin ; fi # No special compiler script. # BUT we need the include paths # CC="$CC -I${use_top_srcdir}/src/include -I${top_build_dir}/src/include" # TEST_CC="$CC" # MPI_LIB="$LIBNAME" # To allow ROMIO to work with the LIBTOOL scripts, we want to # work directly with the CC, not the mpicc, compiler. # Note that in the "FROM_MPICH2" case, the CPPFLAGS and INCLUDES are already # properly set #CC=${top_build_dir}/bin/mpicc # # set the compilers to the ones in MPICH2 bin directory (master_top_builddir/bin) TEST_CC=${master_top_builddir}/bin/mpicc TEST_F77=${master_top_builddir}/bin/mpif77 ROMIO_INCLUDE="" USER_CFLAGS="" USER_FFLAGS="" TEST_LIBNAME="" MPIRUN=${master_top_builddir}/bin/mpiexec # # Turn off the building of the Fortran interface and the Info routines EXTRA_DIRS="" AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if status_set_bytes available]) DEFINE_HAVE_MPI_GREQUEST="#define HAVE_MPI_GREQUEST"fi### feature tests: we can't test features if building as part of MPICH because# we don't yet have an implementation against which we can test#if test $WITHIN_KNOWN_MPI_IMPL = no ; then PAC_TEST_MPIR_STATUS_SET_BYTES PAC_TEST_MPI_GREQUEST AC_DEFINE(PRINT_ERR_MSG,1,[Define for printing error messages])fi#if test -z "$TEST_CC" ; then TEST_CC="$CC"fiif test -z "$TEST_F77" ; then TEST_F77="$F77"fi#AC_CHECK_FUNCS(strdup)if test "$ac_cv_func_strdup" = "yes" ; then # Do we need to declare strdup? PAC_FUNC_NEEDS_DECL([#include <string.h>],strdup)fiAC_CHECK_FUNCS(snprintf)if test "$ac_cv_func_snprintf" = "yes" ; then # Do we need to declare snprintf? PAC_FUNC_NEEDS_DECL([#include <stdio.h>],snprintf)fiAC_CHECK_FUNCS(lstat)if test "$ac_cv_func_lstat" = "yes" ; then # Do we need to declare lstat? PAC_FUNC_NEEDS_DECL([#include <unistd.h>],lstat)fiAC_CHECK_FUNCS(readlink)if test "$ac_cv_func_readlink" = "yes" ; then # Do we need to declare readlink? PAC_FUNC_NEEDS_DECL([#include <unistd.h>],readlink)fiAC_CHECK_FUNCS(fsync)if test "$ac_cv_func_fsync" = "yes" ; then # Do we need to declare fsync? PAC_FUNC_NEEDS_DECL([#include <unistd.h>],fsync)fiAC_CHECK_FUNCS(ftruncate)if test "$ac_cv_func_ftruncate" = "yes" ; then # Do we need to declare ftruncate? PAC_FUNC_NEEDS_DECL([#include <unistd.h>],ftruncate)fi## Create the directory lists for the MakefileFILE_SYS_DIRS=""for dir in $FILE_SYSTEM ; do FILE_SYS_DIRS="$FILE_SYS_DIRS adio/ad_$dir"doneEXTRA_SRC_DIRS=""GLUE_DIR=""if test "$FROM_MPICH2" = yes -o "${MPI}_mpi" = "mpich2_mpi"; then GLUE_DIR="mpi-io/glue/mpich2"elif test "$FROM_MPICH" = yes -o "${MPI}_mpi" = "mpich_mpi"; then GLUE_DIR="mpi-io/glue/mpich1"else GLUE_DIR="mpi-io/glue/default"fiif test "$BUILD_MPI_INFO" = 1 ; then EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/info" if test "$NOF77" = 0 -a "$FROM_MPICH2" != yes ; then EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/info/fortran" fifiif test "$BUILD_MPI_ARRAY" = 1 ; then EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/array" if test "$NOF77" = 0 -a "$FROM_MPICH2" != yes ; then EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/array/fortran" fifiif test "$NOF77" = 0 -a "$FROM_MPICH2" != yes ; then EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi-io/fortran"fiAC_SUBST(EXTRA_SRC_DIRS)AC_SUBST(FILE_SYS_DIRS)AC_SUBST(GLUE_DIR)#CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H"#if test -n "$MPIOF_H_INCLUDED"; then F77MPIOINC=""else F77MPIOINC="include 'mpiof.h'"fi# Open MPI: use the exact same restrict test that we use in the# upper-level Open MPI configure script so that we always get the same# #define for "restrict" (there are a small number of files that will# end up including both ROMIO's romioconf.h and opal_config.h, so we# need to #defines to agree).AC_C_RESTRICTPAC_C_GNU_ATTRIBUTE#dnl CFLAGS="$CFLAGS $DEFS"CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H"## Open MPI: we need libtoolAM_PROG_LIBTOOL# Open MPI: setup the AM_CONDITIONALs to build the different adio devices m4_foreach([my_fs], [gridftp, hfs, nfs, panfs, pfs, piofs, pvfs, pvfs2, sfs, testfs, ufs, xfs], [AM_CONDITIONAL(BUILD_[]AS_TR_CPP(my_fs), [test -n "$file_system_]my_fs["])])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'## Open MPI - AM doesn't want the following:# VPATH, CC, CPPFLAGS, CFLAGS, AR, RANLIB, F77, MAKE#VPATH='VPATH = .:${srcdir}'#AC_SUBST(VPATH)AC_SUBST(ARCH)AC_SUBST(FILE_SYSTEM)#AC_SUBST(CC)#AC_SUBST(CPPFLAGS)#AC_SUBST(CFLAGS)AC_SUBST(USER_CFLAGS)AC_SUBST(USER_FFLAGS)AC_SUBST(MIPS)AC_SUBST(BITS)AC_SUBST(MPI)#AC_SUBST(AR)#AC_SUBST(RANLIB)AC_SUBST(MPI_INCLUDE_DIR)AC_SUBST(MPI_LIB)#AC_SUBST(F77)AC_SUBST(NOF77)AC_SUBST(NOPROFILE)#AC_SUBST(MAKE)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(F77MPIOINC)AC_SUBST(FTESTDEFINE)AC_SUBST(FORTRAN_MPI_OFFSET)AC_SUBST(FROM_MPICH)AC_SUBST(FROM_MPICH2)AC_SUBST(FROM_LAM)AC_SUBST(WITHIN_KNOWN_MPI_IMPL)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(DEFINE_HAVE_MPI_GREQUEST)AC_SUBST(MPI_OFFSET_TYPE)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(MPIO_REQOBJECTS)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)dnl# Open MPI - not needed with AM#dnl Dependency handling#AC_SUBST(MAKE_DEPEND_C)# Open MPI - LT / AM does all this for us...#dnl#dnl Support shared libraries#if test -z "$ENABLE_SHLIB" ; then# ENABLE_SHLIB=none#fi#AC_SUBST(ENABLE_SHLIB)#AC_SUBST(CC_SHL)#AC_SUBST(LIBTOOL)# Remove the .a from the library file name (so that we can use .so or# other appropriate suffix)#SHLIBNAME=`echo $LIBNAME | sed 's/\.a//'`#AC_SUBST(SHLIBNAME)#dnl# Open MPI: This is no longer necessary with modern versions of autotools#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#if test ! -d mpi-io ; then mkdir mpi-io ; fi#if test ! -d mpi-io/glue ; then mkdir mpi-io/glue ; 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: no longer needed with modern AC#rm -f adio/include/romioconf.h ${use_top_srcdir}/src/mpi/romio/adio/include/romioconf.h ${use_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 makeAC_OUTPUT_COMMANDS([chmod 755 util/romioinstall test/runtests])# Open MPI: revamp AC_OUTPUT lines to fit Makefile.am'sAC_CONFIG_FILES([ Makefile localdefs adio/Makefile adio/ad_gridftp/Makefile adio/ad_hfs/Makefile adio/ad_nfs/Makefile adio/ad_ntfs/Makefile adio/ad_panfs/Makefile adio/ad_pfs/Makefile adio/ad_piofs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_sfs/Makefile adio/ad_testfs/Makefile adio/ad_ufs/Makefile adio/ad_xfs/Makefile adio/common/Makefile adio/include/Makefile doc/Makefile include/mpio.h include/mpiof.h include/Makefile mpi-io/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall mpi-io/glue/openmpi/Makefile util/Makefile])AC_OUTPUT## Open MPI - don't need to remove this...# rm -f *.o# Open MPI - don't need this extra printf#if test $FROM_MPICH = no -a $FROM_MPICH2 = no ; then# AC_MSG_RESULT([Configure done. Now type make.])#fidnl PAC_SUBDIR_CACHE_CLEANUPexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -