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

📄 aclocal.m4

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 M4
📖 第 1 页 / 共 5 页
字号:
      else	  CC=$CCval      fi	;;    ncube)   CC=ncc ;;    rs6000)      CCval=""      PAC_PROGRAMS_CHECK(CCval,xlC xlc cc)      if test -n "$CCval" ; then	 CC=$CCval         GCC=""      fi      ;;    *)      CCval=""      # Pick the vendor's cc ahead of gcc.      PAC_PROGRAMS_CHECK(CCval,cc gcc)      if test -n "$CCval" ; then	 CC=$CCval      fi      ;;esacfidnl if test -n "$CC" ; thendnl    PAC_PROGRAM_CHECK(HAS_CC,$CC,1,0)dnl fiif test -z "$USERCLINKER" -a -z "$CLINKER" ; then    CLINKER="$CC"fi])dnldnldnl PAC_GET_ANSI_CC(...) is like PAC_GET_CC, but it checks that CCdnl accepts ANSI-style prototypes.  If not, it then tries to use gccdnldefine(PAC_GET_ANSI_CC,[PAC_GET_CC($1)PAC_CHECK_CC_PROTOTYPES(,noproto=1)if test -n "$noproto" ; then    print_error "The compiler $CC does not accept ANSI prototypes"    CC=""    PAC_PROGRAM_CHECK(CC,gcc,gcc)    if test -n "$CC" ; then	PAC_CHECK_COMPILER_OK(,exit 1)	PAC_CHECK_CC_PROTOTYPES(,exit 1)        print_error "Using $CC as the C compiler instead"	CLINKER=$CC    else	CC=""        CLINKER=""    fifi])dnldnldnldnl May also set F77GETARG (routine to get commandline arguments)dnl Also sets HAS_F77 (makes sure that the chosen compiler is present!)dnldefine(PAC_GET_F77,[if test -z "$USERF77" ; thencase $1 in    intelnx|paragon|i860) F77=if77 ;;   cm5) # TMC Told us this should be f77        F77=f77 ; if test -z "$USERFLINKER" ; then		      FLINKER="cmmd-ld -comp $F77"		  fi ;;   CRAY)   # The Fortran compiler might be cf77 or f77   # This wierd function uses the VALUE of the first argument before   # the second!   F77=	   PAC_PROGRAMS_CHECK(F77,cf77 f77)   ;;   cray_t3d)        # The dp switch on the following lines allows compilation of "double precision"# at the cost of violating the Fortran standard   print_error Setting double precision to be the same as real, in violation    print_error of the Fortran standard.  This is needed because Cray Fortran    print_error for the T3D does not support double precision and hence is    print_error not actually Fortran.   F77="/mpp/bin/cf77"   FFLAGS="$FFLAGS -Ccray-t3d -dp"   F77GETARG="call pxfgetarg(i,s,len(s),ierr)"   if test -z "$USERFLINKER" ; then       FLINKER="$F77 -Ccray-t3d"   fi   ;;##  SX4 Floating Point formats##  float = float0 : Conforms IEEE 754 standard.#                   C:       sizeof (int)     = 4; sizeof (float) = 4#                   FORTRAN: sizeof (INTEGER) = 4; sizeof (REAL)  = 4##  float = float1 : IBM  floating point format#                   C:       sizeof (int)     = 4; sizeof (float) = 4#                   FORTRAN: sizeof (INTEGER) = 4; sizeof (REAL)  = 4##  float = float2 : CRAY floating point format#                   C:       sizeof (int)     = 4; sizeof (float) = 8#                   FORTRAN: sizeof (INTEGER) = 8; sizeof (REAL)  = 8#                   !!! Will not work for FORTRAN and MPICH !!!##  float = float2_int64 : CRAY floating point format#                   C:       sizeof (int)     = 8; sizeof (float) = 8#                   FORTRAN: sizeof (INTEGER) = 8; sizeof (REAL)  = 8#   SX_4_float0 | SX_4_float1 | SX_4_float2 | SX_4_float2_int64)         arch_SX_4=1#         float=`expr $CARCH : 'SX_4_\(float.\).*'`         w8=`expr $CARCH : "SX_4_float._\(ew\).*" \| "dw"`         sx4int=`expr $CARCH : ".*_\(int64\).*" \| "int32"`#         echo "Generating MPICH for floating point format \`\`$float''"#         if test "$w8" = "ew" ; then            echo "                 and extended numeric storage \`\`$w8''"         else            if test "$sx4int" = "int64" ; then               echo "                 and sizeof (int) = 64"            elif test "$float" = "float2" ; then               cat << EOF*************************************************************************   WARNING:**   MPICH is generated for floating point format \`\`float2'' without*         expanding C int's to 64 bits.*         This version will not run together with FORTRAN codes.************************************************************************EOF            fi         fi#         CCC="CC"         CC="cc"; ASM="as -m -h $float"         OPTFLAGSC="-h2 -hsetmain -hnoflunf -pvctl,nomsg"         CFLAGS="-h$float -DCHAR_PTR_IS_ADDRESS"         FFLAGS="-$float"         LIB_LIST="$LIB_LIST -li77sx"#         if test -z "$USERCLINKER" ; then            CLINKER="cc -h$float"; fi         if test -z "$USERCCLINKER" ; then            CCLINKER="CC -h$float"; fi         if test -z "$USERFLINKER" ; then            FLINKER="f77 -$float"; fi#         if test "$w8" = "ew" ; then            FLINKER="$FLINKER -ew"            CFLAGS="$CFLAGS -D_W8"            FFLAGS="$FFLAGS -ew"         fi#         if test "$sx4int" = "int64" ; then            CFLAGS="$CFLAGS -hint64"            CLINKER="$CLINKER -hint64"            FLINKER="$FLINKER -Wl'-int64'"         fi#         CCFLAGS="$CFLAGS"    ;;#   hpux)     # This may eliminate the need for +U77 ....    if test "`which $F77`" != "/usr/convex/bin/fc" ; then         F77GETARG=["call igetarg(i,s,len(s))"]	# mgates reports that the +T option makes MPICH work on some HPUX	# platforms.  The documentation for +T is truely scary; it seems	# to imply that without it, a Fortran program will NOT run correctly.        # The hpux F90 compiler doesn't accept +T.  Since we currently set	# F90FLAGS to FFLAGS by default,         if test -z "$USER_SET_F90FLAGS" -a -z "$F90FLAGS" ; then	    F90FLAGS="$FFLAGS"	    USER_SET_F90FLAGS=1	fi	FFLAGS="$FFLAGS +T"    else        # The Convex compiler needs to have optimization messages suppressed        FFLAGS="$FFLAGS -or none"    fi    # There are reports that version 10 Fortran requires +U77    ;;    convex_spp)  F77="/usr/convex/bin/fc" ;;    ibmpoe)         dnl This is intended for the Standard POE/MPL version	 F77=mpxlf    ;;    meiko)       PAC_PROGRAMS_CHECK(FCval,f77 apf77 pgf77)      if test -n "$FCval" -a "$FCval" = f77 ; then	F77="f77 -g -cg92"      else        F77="$FCval"      fi      ;;    ncube)   F77=nf77 ;;    rs6000)  F77=xlf ;;    LINUX|linux)       PAC_PROGRAMS_CHECK(F77,f77 fort77 g77)      ;;esacfiif test -z "$USERFLINKER" -a -z "$FLINKER" ; then    FLINKER="$F77"fi## Check that the Fortran compiler is actually available:HAS_F77=if test -n "$F77" ; then    PAC_PROGRAM_CHECK(HAS_F77,$F77,1,0,F77FULL)    # if test -n "$F77FULL" ; then	# Really should replace with full path....        # but would need to capture arguments as well...	dnl F77=$F77FULL    # fifi])dnldnldnl Fortran runtime for Fortran/C linkingdnl On suns, trydnl FC_LIB          =/usr/local/lang/SC2.0.1/libM77.a \ dnl              /usr/local/lang/SC2.0.1/libF77.a -lm \dnl              /usr/local/lang/SC2.0.1/libm.a \dnl              /usr/local/lang/SC2.0.1/libansi.adnldnl AIX requires -bI:/usr/lpp/xlf/lib/lowsys.expdnl ------------------------------------------------------------------------dnldnl Get the format of Fortran names.  Uses F77, FFLAGS, and sets WDEF.dnl If the test fails, sets NOF77 to 1, HAS_FORTRAN to 0dnldefine(PAC_GET_FORTNAMES,[   # Check for strange behavior of Fortran.  For example, some FreeBSD   # systems use f2c to implement f77, and the version of f2c that they    # use generates TWO (!!!) trailing underscores   # Currently, WDEF is not used but could be...   #   # Eventually, we want to be able to override the choices here and   # force a particular form.  This is particularly useful in systems   # where a Fortran compiler option is used to force a particular   # external name format (rs6000 xlf, for example).   cat > confftest.f <<EOF       subroutine mpir_init_fop( a )       integer a       a = 1       return       endEOF   $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        HAS_FORTRAN=0   elif test -z "$FORTRANNAMES" ; then    # We have to be careful here, since the name may occur in several    # forms.  We try to handle this by testing for several forms    # directly.    if test $arch_CRAY ; then     # Cray doesn't accept -a ...     nameform1=`strings confftest.o | grep mpir_init_fop_  | sed -n -e '1p'`     nameform2=`strings confftest.o | grep MPIR_INIT_FOP   | sed -n -e '1p'`     nameform3=`strings confftest.o | grep mpir_init_fop   | sed -n -e '1p'`     nameform4=`strings confftest.o | grep mpir_init_fop__ | sed -n -e '1p'`    else     nameform1=`strings -a confftest.o | grep mpir_init_fop_  | sed -n -e '1p'`     nameform2=`strings -a confftest.o | grep MPIR_INIT_FOP   | sed -n -e '1p'`     nameform3=`strings -a confftest.o | grep mpir_init_fop   | sed -n -e '1p'`     nameform4=`strings -a confftest.o | grep mpir_init_fop__ | sed -n -e '1p'`    fi    /bin/rm -f confftest.f confftest.o    if test -n "$nameform4" ; then	echo "Fortran externals are lower case and have 1 or 2 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 "If you have problems linking, try using the -nof77 option"#        print_error "to configure and rebuild MPICH."	print_error "Turning off Fortran (-nof77 being assumed)."	NOF77=1        HAS_FORTRAN=0    fi#   case $nameform in #       MPIR_INIT_FOP | _MPIR_INIT_FOP)#	echo "Fortran externals are uppercase"     #	WDEF=-DFORTRANCAPS #	;;#       mpir_init_fop_ | _mpir_init_fop_)   #	 # We don't set this in CFLAGS; it is a default case#        echo "Fortran externals have a trailing underscore and are lowercase"#	WDEF=-DFORTRANUNDERSCORE ;;##       mpir_init_fop | _mpir_init_fop)     #	echo "Fortran externals are lower case"#	WDEF=-DFORTRANNOUNDERSCORE #	;;##           # Fortran no underscore is the "default" case for the wrappers; #	   # having this defined allows us to have an explicit test, #	   # particularly since the most common UNIX case is FORTRANUNDERSCORE#       mpir_init_fop__ | _mpir_init_fop__)  #	echo "Fortran externals are lower case and have 1 or 2 trailing underscores"#	WDEF=-DFORTRANDOUBLEUNDERSCORE#        ;;##       *)#	print_error "Unable to determine the form of Fortran external names"#	print_error "If you have problems linking, try using the -nof77 option"#        print_error "to configure and rebuild MPICH."#	NOF77=1#        HAS_FORTRAN=0#	;;#   esac    fi    if test -n "$FORTRANNAMES" ; then        WDEF="-D$FORTRANNAMES"    fi    ])dnldnldnl ------------------------------------------------------------------------dnldnl AR = name with args to create/add to archivednl As input, ARLOCAL is the arg that should be use for using the local dnl directorydnl ARNAME = just namednl ARARGS = just argsdefine(PAC_GET_AR,[if test -z "$USERAR" ; thencase $1 in    intelnx|paragon|i860) AR="ar860 crl" ; ARNAME="ar860" ; ARARGS="crl" ;;   cm5) AR="ar cr" ; ARNAME="ar" ; ARARGS="cr"   ;;   meiko|solaris) AR="ar cr" ; ARNAME="ar" ; ARARGS="cr"    ;;   ncube) AR="nar cr" ; ARNAME="nar" ; ARARGS="cr" ;;esacfiif test -z "$AR" ; then     AR="ar cr$ARLOCAL" ; ARNAME="ar" ; ARARGS="cr$ARLOCAL" fi])dnldnl --------------------------------------------------------dnl Find X11.  This is more careful than the AC versiondnl Uses USERXLIB; sets x_includes, X11INC, x_libraries, X11LIB, no_xdnldefine(PAC_FIND_X11,[   # FIND_X doesn't always work correctly when cross compiling, so we   # try to be more careful and conservative   if test -z "$USERXLIB" ; then     # The user has specified the libraries/include paths; pick them up     # below....    if test -z "$cross_compiling" -o "$cross_compiling" = 0 ; then        AC_FIND_X()       if test -n "$no_x" ; then	  print_error "Did not find X11 libraries and/or include files"       fi    else       # Try to compile a program with an include file.       # I didn't use HEADER_CHECK because I want to insist that the        # code try to compile with the header       no_x=true       AC_COMPILE_CHECK([X11 headers],[#include <X11/Xlib.h>],,no_x="")       if test -z "$no_x" ; then           # Try to link a simple X program          AC_HAVE_LIBRARY(X11,no_x="",no_x="true")       fi       if test -n "$no_x" ; then         print_error " "          print_error "X11 is not used when cross compiling (because of the"         print_error "difficulties in finding the correct libraries)"         print_error " "       fi     fi   else	# Pick up the paths from the user if possible	if test -z "$x_includes" -a -n "$X11INC" ; then 	    x_includes="$X11INC"            XINCLUDES="-Ix_includes"	fi	if test -z "$x_libraries" -a -n "$X11LIB" ; then 	    x_libraries="$X11LIB"	fi   fi   if test -n "$x_includes" ; then       XINCLUDES="-I$x_includes"   fi   if test -z "$no_x" ; then       # may STILL not have x if the include files aren't around       if test -n "$x_includes" ; then           f_test=$x_includes/X11/Xlib.h       else           f_test=/usr/include/X11/Xlib.h       fi       if test ! -f $f_test ; then           no_x=true	   print_error "X11 include files were not found in $f_test!"       fi   fi])dnldnldnl --------------------------------------------------------dnl Internal subroutine of AC_FIND_X.  We had to update this because itdnl did not know about R6.define([AC_FIND_X_DIRECT],[echo checking for X include and library files directlyAC_TEST_CPP([#include <X11/Intrinsic.h>], no_x=,  for dir in \    /usr/local/include \    /usr/unsupported/include \    /usr/x386/include \    /usr/local/X11R6/include \    /usr/local/X11R5/include \    /usr/local/x11r6/include \    /usr/local/x11r5/include \    /usr/include/X11R6 \    /usr/include/X11R5 \    /usr/include/X11R4 \    /usr/X11R6/include \    /usr/X11R5/include \    /usr/X11/include \    /usr/openwin/include \    /usr/openwin/share/include \    /usr/lpp/Xamples/include \    ; \  do    if test -r $dir/X11/Intrinsic.h; then      x_includes=$dir; no_x=      break    fi  done)# Check for the libraries.  First see if replacing the `include' by# `lib' works.

⌨️ 快捷键说明

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