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

📄 configure.in

📁 fortran并行计算包
💻 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], )dnldnldnlAC_INIT()AC_PREREQ(2.52)AC_CONFIG_AUX_DIR([..])AC_CONFIG_HEADER(cross_conf.h)#echo "Configuring MPE Cross-Compilation Spec 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/cross_cc.c ; then    top_srcdir_abs=$srcdirelse    PAC_GETWD( top_srcdir_abs, cross_cc.c )fiAC_SUBST(top_srcdir_abs)# Determine this package's name based on its directory namechangequote(,)dnltmpname="`echo $top_srcdir_abs | sed -e 's%\(.*\)/\([^/]*\)%\2%'`"pkgname="`echo $tmpname | sed -e 'y%abcdefghijklmnopqrstuvwxyz/%ABCDEFGHIJKLMNOPQRSTUVWXYZ_%'`"changequote([,])dnlif test "x$pkgname" = "x" ; then    pkgname="MPE-2 Cross-Compilation Spec"fiAC_ARG_ENABLE( echo,[--enable-echo                      - Turn on strong echoing.                                     The default is enable=no.],set -x )VERSION=""CC=${CC:-cc}F77=${F77:-f77}CFLAGS=${CFLAGS}FFLAGS=${FFLAGS}MAKE=${MAKE:-make}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 cross_cc.c -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.] )fiRM=rmMV=mvCPRP=cpAC_SUBST(RM)AC_SUBST(MV)AC_SUBST(CPRP)AC_ARG_WITH( spec,[--with-spec=filename               - Specify the default filename to                                     store the cross-compilation                                     variables and property values to                                     be used in MPE2's --with-cross-spec                                     option.  The default filename is                                     cross_spec.txt],[CROSS_SPEC_FILE=$withval], [CROSS_SPEC_FILE="cross_spec.txt"] )dnl Export CROSS_SPEC_FILE so cross_env.in and *.c can use it.AC_SUBST(CROSS_SPEC_FILE)AC_DEFINE_UNQUOTED( CROSS_SPEC_FILE, "$CROSS_SPEC_FILE",                    [Define Cross-Spec's output filename] )dnl MPE_BUILD_FORTRAN2C=yes means that ALL subpackages will be buildingdnl the fortran2c wrapper libraries.  This does not necessarily mean thatdnl specific subpackage has to build fortran2c wrapper library.  One example:dnl src/wrappers may have --with-f2cmpilibs set by user, so src/wrappers'sdnl own libmpe_f2cmpi.a will not be built but MPE_BUILD_FORTRAN2C coulddnl still be set to yes because it means other subpackages like src/graphicsdnl and src/logging will build their fortran2c wrapper objects.  So treatdnl MPE_BUILD_FORTRAN2C as a directive, i.e. generally a necessary butdnl insufficient condition to build fortran2c wrapper library.AC_ARG_ENABLE( f77,[--enable-f77                       - Compile routines that require a Fortran                                     compiler.  If configuring with MPICH, the                                     configure in the top-level MPICH directory                                     will choose the appropriate value for you.                                     The default is enable=yes.], ,enable_f77=yes )if test "$enable_f77" = "yes" ; then    MPE_BUILD_FORTRAN2C=yeselse    MPE_BUILD_FORTRAN2C=nofidnldnl  Unknown MPI implmentation, i.e. User defined MPI_LIBS and MPI_INCdnlAC_ARG_WITH( mpicc,[--with-mpicc=MPI_CC                - C compiler used to compile MPI program                                     and to create parallel executable,                                     e.g. mpcc for IBM MPI, or mpicc from                                     MPICHx or LAM-MPI.],MPI_CC="$withval" )AC_ARG_WITH( mpif77,[--with-mpif77=MPI_F77              - F77 compiler used to compile MPI program                                     and to create parallel executable,                                     e.g. mpxlf for IBM MPI, or mpif77 from                                     MPICHx or LAM-MPI.],MPI_F77="$withval" )AC_ARG_WITH( mpiinc,[--with-mpiinc=MPI_INC              - MPI compiler's include flags prefixed                                     with -I.  It specifies where mpi.h and                                     mpif.h are located,                                     e.g. -I/pkgs/MPI/include.],MPI_INC="$withval" )AC_ARG_WITH( mpilibs,[--with-mpilibs=MPI_LIBS            - MPI compiler's library flags prefixed                                     with -L for the library path and prefixed                                     with -l for the name of the MPI libraries.                                     It specifies the location of the MPI                                     libraries.                                     e.g. -L/pkgs/MPI/lib -lpmpich -lmpich.],MPI_LIBS="$withval" )AC_ARG_VAR( MPI_LIBS, [MPI compiler's library flags prefixed with -L for the library path and prefixed with -l for the name of the MPI libraries. It specifies the location of the MPI libraries. e.g. -L/pkgs/MPI/lib -lpmpich -lmpich.] )AC_ARG_VAR( MPI_CC, [C compiler to compile MPI program and to create parallel executable, e.g. mpcc for IBM MPI, or mpicc from MPICHx, Open-MPI, or LAM-MPI.] )AC_ARG_VAR( MPI_F77, [Fortran compiler to compile MPI program and to create parallel executable, e.g. mpxlf for IBM MPI, or mpif77 from MPICHx, Open-MPI, or LAM-MPI.] )AC_ARG_VAR( MPI_INC, [MPI compiler's include path prefixed with -I.  It specifies where mpi.h and mpif.h are located, e.g. -I/pkgs/MPI/include. This flag will be added to MPI_CFLAGS and MPI_FFLAGS, i.e. the MPI include path can be explicitly set in MPI_CFLAGS and MPI_FFLAGS without setting MPI_INC.] )AC_ARG_VAR( MPI_CFLAGS, [MPI C compiler flags to compile MPI program.] )AC_ARG_VAR( MPI_FFLAGS, [MPI Fortran compiler flags to compile MPI Fortran program.] )AC_ARG_VAR( MPI_LIBS, [MPI compiler library flags which specifies the location of the MPI libraries.  The flags contains library path prefixed with -L and MPI library name prefixed with -l, e.g. -L/opt/MPI/lib -lpmpich -lmpich.] )dnl AC_ARG_VAR( MPI_LDFLAGS, [MPI linker flags used with MPI_CC or MPI_F77 during linking.] )AC_ARG_VAR( MPERUN, [MPI application launch command for the test programs created by this package.  This variable is necessary only if user needs a special command to launch MPI testing application to run in the backend compute nodes.] )# Preppend MPI_INC to MPI_CFLAGS/MPI_FFLAGSif test "x$MPI_INC" != "x" ; then    MPI_CFLAGS="$MPI_INC $MPI_CFLAGS"    MPI_FFLAGS="$MPI_INC $MPI_FFLAGS"fiAC_PROG_CCAC_OBJEXTAC_EXEEXTAC_HEADER_STDCAC_CHECK_HEADERS(stdio.h)AC_MSG_CHECKING( whether MPI_CC has been set )if test -z "$MPI_CC" ; then    MPI_CC="$CC $MPICPPFLAGS"fiAC_MSG_RESULT( $MPI_CC )if test "$MPE_BUILD_FORTRAN2C" = "yes" ; then    AC_PROG_F77    if test "x$F77" = "x" ; then        MPE_BUILD_FORTRAN2C=no    fi    AC_MSG_CHECKING( whether MPI_F77 has been set )    if test -z "$MPI_F77" ; then        # FIXME: Temporary for F77 accepting the same flags as CC for        # file includes        MPI_F77="$F77 $MPICPPFLAGS"    fi    AC_MSG_RESULT( $MPI_F77 )fiAC_MSG_CHECKING( [for the linkage of the supplied MPI C definitions] )PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , , ,                      [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )if test "$mpe_link_ok" = "yes" ; then    AC_MSG_RESULT(yes)else    AC_MSG_RESULT(no)    PAC_MSG_ERROR( $enable_softerror,                   [Cannot link with basic MPI C program!        Check your MPI include paths, MPI libraries and MPI CC compiler] )fiif test "$MPE_BUILD_FORTRAN2C" = "yes" ; then    AC_MSG_CHECKING( [for the linkage of the supplied MPI F77 definitions] )    PAC_MPI_LINK_F77_FUNC( $MPI_F77, [$MPI_FFLAGS], $MPI_LIBS, [        integer mytid        integer ierr    ], [        call MPI_Comm_rank( MPI_COMM_WORLD, mytid, ierr )    ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    if test "$mpe_link_ok" = "yes" ; then        AC_MSG_RESULT(yes)    else        AC_MSG_RESULT(no)        PAC_MSG_ERROR( $enable_softerror,                       [Cannot link with basic MPI F77 program!        Check your MPI include paths, MPI libraries and MPI F77 compiler ] )    fifiif test -z "$CC" -o -z "$MPI_CC"; then    PAC_MSG_ERROR( $enable_softerror,                   [You must configure MPE with a specific MPI] )fiif test -n "$F77" -a "$MPE_BUILD_FORTRAN2C" = "yes" ; then    FLIBS_save="$FLIBS"    FLIBS=""    AC_F77_LIBRARY_LDFLAGS    # The autoconf macro for finding FLIBS sometimes makes mistakes    # (particularly with the Fujitsu frt compiler).  This next step    # first sees if the FLIBS is valid with the Fortran compiler    PAC_PROG_F77_FLIBS_VALID    # Now see if FLIBS works with the C compiler    PAC_PROG_F77_CHECK_FLIBS    PAC_PROG_F77_LINKER_WITH_C    # For name mangle, we need the library flags    PAC_PROG_F77_NAME_MANGLE    # Check whether additional libraries are needed when linking with C    PAC_PROG_F77_AND_C_STDIO_LIBS    AC_SUBST(F77_OTHER_LIBS)    PAC_PROG_F77_LIBRARY_DIR_FLAG    if test -z "$FLIB_PATH_LEADER" ; then        FLIB_PATH_LEADER=$F77_LIBDIR_LEADER    fi    PAC_PROG_F77_HAS_INCDIR(f77tmpdir)    FINC_PATH_LEADER=$F77_INCDIRdnl Determine MPI_Fintdnl (same test done in graphics's configure.in)    AC_MSG_CHECKING( [for MPI_Fint] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Fint aa=1 ], ,                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    if test "$mpe_link_ok" = "yes" ; then        AC_MSG_RESULT(yes)        MPI_FINT_TYPE=MPI_Fint    else        AC_MSG_RESULT([no, assumed MPI_Fint to be int])        MPI_FINT_TYPE=int        AC_DEFINE( MPI_Fint, int, [Define MPI_Fint as int] )    fifiif test -z "$CLINKER" ; then CLINKER="$CC" ; fiif test -z "$FLINKER" ; then FLINKER="$F77" ; fiAC_SUBST(MPE_BUILD_FORTRAN2C)AC_SUBST(CC)AC_SUBST(CLINKER)AC_SUBST(MPI_CC)AC_SUBST(MPE_CLINKER)AC_SUBST(F77)AC_SUBST(FLINKER)AC_SUBST(MPI_F77)AC_SUBST(MPE_FLINKER)AC_SUBST(MPI_CFLAGS)AC_SUBST(MPI_FFLAGS)AC_SUBST(MPI_LIBS)AC_SUBST(LDFLAGS)AC_SUBST(MPERUN)AC_SUBST(AR)AC_SUBST(RANLIB)AC_OUTPUT_COMMANDS( [if test ! -x ./cross_env -a -s ./cross_env ; then    chmod u+x ./cross_envfi] )AC_OUTPUT( Makefile cross_env )

⌨️ 快捷键说明

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