⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境
💻 IN
字号:
dnldnl Caching is usually WRONG for systems with cross-mounted file systemsdnl (the cache file may correspond to a different system).  Since configurednl is not on a performance-critical path, go for robustness over speed.dnldefine([AC_CACHE_LOAD], )dnldefine([AC_CACHE_SAVE], )dnldnldnlAH_BOTTOM([/* Define WINDOWS specific features *//*   Windows' open() opens an ASCII file by default, add Windows specific   flag O_BINARY to open()'s argument*/#ifdef HAVE_WINDOWS_H#define OPEN( a, b, c )    open( a, b | O_BINARY, c )#else#ifdef _LARGEFILE64_SOURCE#ifdef HAVE_O_BINARY#define OPEN( a, b, c )    open( a, b | O_LARGEFILE | O_BINARY, c )#else#define OPEN( a, b, c )    open( a, b | O_LARGEFILE, c )#endif#else#ifdef HAVE_O_BINARY#define OPEN( a, b, c )    open( a, b | O_BINARY, c )#else#define OPEN( a, b, c )    open( a, b, c )#endif#endif#endif])AC_INIT()AC_PREREQ(2.52)AC_CONFIG_HEADER(mpe_logging_conf.h)dnlecho "Configuring MPE Logging Library with $ac_configure_args"dnldnl Set top_srcdir_abs to be the ABSOLUTE path to the home directory of MPEdnl top_srcdir is in relative path.if test "X$srcdir" != "X." -a -s $srcdir/include/mpe_log.h ; then    top_srcdir_abs=$srcdirelse    PAC_GETWD( top_srcdir_abs, include/mpe_log.h )fiAC_SUBST(top_srcdir_abs) AC_ARG_ENABLE( echo,[--enable-echo                      - Turn on strong echoing.                                     The default is enable=no.],set -x )AC_ARG_ENABLE( softerror,[--enable-softerror                 - Turn on soft error, i.e. instead of                                     issuing MSG_ERROR, MSG_WARN + exit 0                                     are used.  The default is enable=no.],, enable_softerror=${mpe_enable_softerror:-no} )MAKE=${MAKE:-make}MPI_IMPL=${MPI_IMPL:-UserSupplied}MPE_BUILD_FORTRAN2C=${MPE_BUILD_FORTRAN2C:-no}CC=${CC:-cc}CLINKER=${CLINKER:-$CC}CFLAGS=${MPE_CFLAGS}MPI_CC=${MPI_CC:-${CC}}MPI_INC=${MPI_INC}MPI_LIBS=${MPI_LIBS}MPE_LIBNAME=${MPE_LIBNAME:-mpe}PROF_LIBNAME="$MPE_LIBNAME"PROF_LIBS="-l$PROF_LIBNAME" dnl Fixup for makePAC_MAKE_IS_GNUMAKEPAC_MAKE_IS_BSD44PAC_MAKE_IS_OSFPAC_MAKE_VPATHAC_SUBST(MAKE) dnl If we are relying on vpath and no vpath is set, then we must exitif test ! -s include/mpe_log.h -a -z "$VPATH" ; then    AC_MSG_ERROR( [No virtual MAKE path command found.	You may need to set your make command	The GNU make (sometimes available as gnumake) can be used.] )fidnl CPRP is the version of cp that accepts -r and -p arguments.MKDIR=mkdirCPRP=cpRM=rmMV=mvAC_SUBST(MKDIR)AC_SUBST(CPRP)AC_SUBST(RM)AC_SUBST(MV) if test -z "$nonopt" ; then nonopt=NONE ; fiAC_CANONICAL_HOSTcase "$host" in   *cray*)        host=cray        CFLAGS="$CFLAGS -DMPI_CRAY"        ;;esacdnl Set the various build directories from their mpe_ prefixed env variables.dnldnl includebuild_dir is for all user header filesdnl libbuild_dir is used to build the libraries in before they are installed.dnl binbuild_dir is for the scripts/programsdnl sbinbuild_dir is for all system admin toolsdnl etcbuild_dir is for all system admin configuration settingsdnlrootbuild_dir=`pwd`for dir in include lib bin etc ; do    dirname=${dir}build_dir    mpe_dirname=mpe_${dirname}    eval dirvalue=\$"$dirname"    eval $dirname=\$\{${mpe_dirname}\}donefor dir in include lib bin etc ; do    dirname=${dir}build_dir    eval dirvalue=\$"$dirname"    if test -n "$dirvalue" ; then        if test ! -d $dirvalue ; then            if mkdir -p $dirvalue ; then                :            else                PAC_MSG_ERROR( $enable_softerror,                               [Could not create directory $dirvalue] )            fi        fi    fidoneAC_SUBST(includebuild_dir)AC_SUBST(libbuild_dir)AC_SUBST(binbuild_dir)AC_SUBST(etcbuild_dir)AC_PROG_CCAC_OBJEXTAC_EXEEXTdnl Check for broken handling of common symbolsdnl PAC_PROG_C_BROKEN_COMMONAC_CHECK_PROG(AR, ar, ar, ;)AC_PROG_RANLIBdnl We need to check that this has worked.  The autoconf macro is brokenAC_PROG_CPPif test "$CPP" = "/lib/cpp" -a ! -x /lib/cpp ; then   AC_MSG_ERROR( [configure could not find a working C preprocessor] )fiAC_HEADER_STDCAC_C_CONSTdnl   -- Check if byteswapping needs to be done.if test "$cross_compiling" = "yes" -o "$cross_compiling" = 1 ; then    AC_MSG_CHECKING([for byte ordering])    if test "X$CROSS_BIGENDIAN" != "X" ; then        if test "$CROSS_BIGENDIAN" = "true" \             -o "$CROSS_BIGENDIAN" = "false" ; then            if test "$CROSS_BIGENDIAN" = "true" ; then                AC_DEFINE( WORDS_BIGENDIAN, 1,                           [Define if byte order is bigendian] )                AC_MSG_RESULT( [defined to be big endian] )            else                AC_MSG_RESULT( [defined to be little endian] )            fi        else            AC_DEFINE( WORDS_BIGENDIAN, 1,                       [Define if byte order is bigendian] )            AC_MSG_RESULT( [Unknown CROSS_BIGENDIAN, $CROSS_BIGENDIAN! Assumed big endian] )        fi    else        AC_DEFINE( WORDS_BIGENDIAN, 1, [Define if byte order is bigendian] )        AC_MSG_RESULT( [Undefined CROSS_BIGENDIAN! Assumed big endian] )    fielse    AC_C_BIGENDIANfidnl ****   Checking for specific functions needed for the package.dnl snprintf may have been missing in headerfile,dnl e.g. gcc -ansi remove snprintf's prototypeAC_CHECK_FUNCS(snprintf)if test "$ac_cv_func_snprintf" = "yes" ; then    PAC_FUNC_NEEDS_DECL([#include <stdio.h>],snprintf)fidnl mkstemp() is a better replacement for mktemp()AC_HAVE_FUNCS(mkstemp)if test "$ac_cv_func_mkstemp" = "yes" ; then    PAC_FUNC_NEEDS_DECL([#include <stdlib.h>],mkstemp)fidnl srand48 may have been missing in headerfile,dnl e.g. gcc -ansi remove srand48's prototypeAC_CHECK_FUNCS(srand48)if test "$ac_cv_func_srand48" = "yes" ; then    PAC_FUNC_NEEDS_DECL([#include <stdlib.h>],srand48)fidnl lrand48 may have been missing in headerfile,dnl e.g. gcc -ansi remove lrand48's prototypeAC_CHECK_FUNCS(lrand48)if test "$ac_cv_func_lrand48" = "yes" ; then    PAC_FUNC_NEEDS_DECL([#include <stdlib.h>],lrand48)fidnl check if uuid_generate existsdnl AC_CHECK_HEADERS( uuid/uuid.h,dnl     AC_MSG_CHECKING( [for uuid_generate] )dnl     AC_TRY_COMPILE( [dnl         #include <uuid/uuid.h>dnl         ], [dnl         uuid_t new_uuid;dnl         uuid_generate( new_uuid );dnl         ],dnl         AC_DEFINE( HAVE_UUID_GENERATE, 1,dnl                    [Define if uuid_generate() exists.] )dnl         AC_MSG_RESULT(yes),dnl         AC_MSG_RESULT(no)dnl     )dnl )dnl check if Large File support is available for 32-bit OSAC_CHECK_HEADERS( unistd.h,    AC_MSG_CHECKING( [for large file support in 32-bit OS] )    AC_TRY_COMPILE( [        #define _LARGEFILE64_SOURCE 1        #include <unistd.h>        ], [        #ifndef _LFS64_LARGEFILE        #error no largefile support        #endif        ],        AC_DEFINE( _LARGEFILE64_SOURCE, 1,                   [Define if 64-bit file address support in 32-bit OS.] )        AC_DEFINE( _FILE_OFFSET_BITS, 64,                   [Define if 64-bit file address support in 32-bit OS.] )        AC_MSG_RESULT(yes),        AC_MSG_RESULT(none)    ))AC_CHECK_HEADERS( fcntl.h,    AC_MSG_CHECKING( [for O_BINARY for open()] )    AC_TRY_LINK( [        #include <fcntl.h>        ], [        open( "tmpfile", O_CREAT | O_BINARY );        ],        AC_DEFINE( HAVE_O_BINARY, 1,                   [Define to 1 if O_BINARY flag for open() exists.] )        AC_MSG_RESULT(yes),        AC_MSG_RESULT(no)    ))AC_CHECK_HEADERS( stdio.h stdlib.h string.h sys/time.h )dnl   Determine if PMPI_Comm_create_keyval existsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then    AC_MSG_CHECKING( [for PMPI_Comm_create_keyval()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$CFLAGS $MPI_INC], $MPI_LIBS,                          [ int comm_keyval ], [#ifndef NULL#define NULL 0#endif                          PMPI_Comm_create_keyval( MPI_COMM_NULL_COPY_FN,                                                   MPI_COMM_NULL_DELETE_FN,                                                   &comm_keyval, NULL )                          ],              [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)else#   only MPICH2 has PMPI_Comm_{create|free}_keyval, PMPI_Comm_{set|get}_attr    if test "$MPI_IMPL" = "MPICH2" ; then        mpe_link_ok=yes    else        mpe_link_ok=no    fifiif test "$mpe_link_ok" = "yes" ; then    AC_DEFINE( HAVE_PMPI_COMM_CREATE_KEYVAL, 1,               [Define if PMPI_Comm_Create_keyval() available] )fidnl   Determine if PMPI_Comm_free_keyval existsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then    AC_MSG_CHECKING( [for PMPI_Comm_free_keyval()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$CFLAGS $MPI_INC], $MPI_LIBS,                          [ int comm_keyval ], [                          PMPI_Comm_free_keyval( &comm_keyval )                          ],              [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)else#   only MPICH2 has PMPI_Comm_{create|free}_keyval, PMPI_Comm_{set|get}_attr    if test "$MPI_IMPL" = "MPICH2" ; then        mpe_link_ok=yes    else        mpe_link_ok=no    fifiif test "$mpe_link_ok" = "yes" ; then    AC_DEFINE( HAVE_PMPI_COMM_FREE_KEYVAL, 1,               [Define if PMPI_Comm_free_keyval() available] )fidnl   Determine if PMPI_Comm_set_attr existsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then    AC_MSG_CHECKING( [for PMPI_Comm_set_attr()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$CFLAGS $MPI_INC], $MPI_LIBS,                          [ int comm_keyval ], [                          PMPI_Comm_set_attr( MPI_COMM_WORLD, comm_keyval,                                              (void *)5 )                          ],              [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)else#   only MPICH2 has PMPI_Comm_{create|free}_keyval, PMPI_Comm_{set|get}_attr    if test "$MPI_IMPL" = "MPICH2" ; then        mpe_link_ok=yes    else        mpe_link_ok=no    fifiif test "$mpe_link_ok" = "yes" ; then    AC_DEFINE( HAVE_PMPI_COMM_SET_ATTR, 1,               [Define if PMPI_Comm_set_attr() available] )fidnl   Determine if PMPI_Comm_get_attr existsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then    AC_MSG_CHECKING( [for PMPI_Comm_get_attr()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$CFLAGS $MPI_INC], $MPI_LIBS,                          [ int comm_keyval, comm_val, istatus ], [                          PMPI_Comm_get_attr( MPI_COMM_WORLD, comm_keyval,                                              &comm_val, &istatus )                          ],              [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)else#   only MPICH2 has PMPI_Comm_{create|free}_keyval, PMPI_Comm_{set|get}_attr    if test "$MPI_IMPL" = "MPICH2" ; then        mpe_link_ok=yes    else        mpe_link_ok=no    fifiif test "$mpe_link_ok" = "yes" ; then    AC_DEFINE( HAVE_PMPI_COMM_GET_ATTR, 1,               [Define if PMPI_Comm_get_attr() available] )fiAC_SUBST(MPE_BUILD_FORTRAN2C)AC_SUBST(CC)AC_SUBST(CLINKER)AC_SUBST(CFLAGS)AC_SUBST(MPI_CC)AC_SUBST(MPI_INC)AC_SUBST(MPI_LIBS)AC_SUBST(PROF_LIBNAME)AC_OUTPUT( Makefile src/Makefile \           etc/mpe_log.conf etc/mpe_nolog.conf )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -