configure.in
来自「刚才是说明 现在是安装程序在 LINUX环境下进行编程的MPICH安装文件」· IN 代码 · 共 1,075 行 · 第 1/3 页
IN
1,075 行
dnldnl This has been derived from the MPICH-1 configure for the Fortrandnl binding. It still needs major editing.dnlAC_INIT(Makefile.in)dnlAC_PREREQ(2.13) dnl needed for SHELL, added in 2.13rm -f ${srcdir}/mpi_fortconf.h mpi_fortconf.hAC_CONFIG_HEADER(mpi_fortconf.h)dnl We need install.sh, config.guess, etc. for the code thatdnl finds the Fortran librariesAC_CONFIG_AUX_DIR(../../../confdb)dnldnl Allow device to supply a mpid_fortdefs.h header filednldnl To enable this feature, the device setup script must set the environmentdnl variable HAVE_MPID_FORTDEFS_H and copy mpid_fortdefs.h to mpich/includednl and mpich2/src/binding/f77. The device is also responsible fordnl installing the header file.dnlif test -z "$HAVE_MPID_FORTDEFS_H" ; then HAVE_MPID_FORTDEFS_H=0fiAC_SUBST(HAVE_MPID_FORTDEFS_H)PAC_ARG_CACHINGAC_ARG_ENABLE(strict,[--enable-strict - Turn on strict compilation testing when using gcc],COPTIONS="${COPTIONS} -Wall -O -Wstrict-prototypes -Wmissing-prototypes -DGCC_WALL")AC_ARG_ENABLE(echo,[--enable-echo - Turn on echoing from within the configure script],set -x)AC_ARG_ENABLE(weak-symbols,[--enable-weak-symbols - Use weak symbols to provide the profiling interface (default)],enable_weak=$enableval,enable_weak="yes")AC_ARG_ENABLE(f90,[--enable-f90 - Find and use a Fortran 90 compiler (default:enable)],enable_f90=$enableval,enable_f90="yes")AC_ARG_ENABLE(f90modules,[--enable-f90modules - Build an MPI module for use with Fortran 90],do_f90_modules=$enableval,do_f90_modules="yes")AC_ARG_ENABLE(use-pointer,[--enable-use-pointer - Use the common pointer extension for MPI_BOTTOM and related special values], use_pointer_in_f77=$enableval,use_pointer_in_f77="no")dnl Change the default to yes soonAC_ARG_ENABLE(runtimevalues,[--enable-runtimevalues - Determine various parameters of the Fortran environment at run time, such as the values for .TRUE. and .FALSE. . This allows a single MPICH library to be used with multiple Fortran compilers],use_runtimevalues=$enableval,use_rutimevalues=false)dnldnldnl The default is the usual MPICH libraryAC_ARG_WITH(flibname,[--with-flibname=name - Specify name of library containing Fortran interfaceroutines],[FLIBNAME=$withval;set_FLIBNAME="yes"],FLIBNAME=mpich)AC_SUBST(FLIBNAME)dnldnl The default is a special wrapper libraryAC_ARG_WITH(fwrapname,[--with-fwrapname=name - Specify name of library containing Fortran interfaceroutines],[FWRAPNAME=$withval;set_FWRAPNAME="yes"],FWRAPNAME=fmpich)AC_SUBST(FWRAPNAME)AC_ARG_WITH(cross,[--with-cross=file - Specify the values of variables that configure cannotdetermine in a cross-compilation environment],,with_cross=no)dnl [--with-cross=file - Use the file for cross compilation. The file should dnl contain assignments of the formdnl CROSS_SIZEOF_INT=4dnl for each cross compilation variable. The commanddnl egrep 'CROSS_[A-Z_]*=' configure | sed 's/=.*//g'dnl will list each variable],AC_ARG_WITH(mpichconfig,[--with-mpichconfig=file - Use file for the MPICH configuration. Normally, this file is mpichlib.conf, but other files may be used.],[if test -z "$withval" -o "X$withval" = "Xyes" ; then mpichconfig_file=../../util/mpichlib.confelse mpichconfig_file=$withvalfi],mpichconfig_file="")AC_ARG_WITH(subname,[--with-subname=name - Use this name for forming the names of the directories to install the mpif.h include file and libraries, as well as the mpif77-name.conf file. This should be used to support multiple Fortran compilers with a single MPICH build. It must be used in conjunction with --with-mpichconfig],subname=$withval,subname="")dnldnl First check that we have a clean build if we are doing a VPATH buildif test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status ; then AC_MSG_ERROR([You cannot do a VPATH build if the source directory has been configured. Run "make distclean" in $srcdir first.])fidnldnl Get the "master" top srcdir if we are a subdir configureif test -z "$top_srcdir" ; then use_top_srcdir=$srcdir else use_top_srcdir=$top_srcdirfiif test -z "$master_top_srcdir" ; then master_top_srcdir=$use_top_srcdirfiAC_SUBST(master_top_srcdir)export master_top_srcdirif test "$with_cross" != "no" ; then if test -s "$with_cross" ; then AC_MSG_RESULT([Reading values from cross-compilation file $with_cross]) . $with_cross fi # with_cross may have been passed down from above (in a calling configure) # so set the cross-compilation options independent of whether the # file exists. # Autoconf 2.52 no longer sets cross_compiling except with the # awkward "targethost" options. pac_cross_compiling=yes cross_compiling=yes ac_cv_prog_cc_cross=yes ac_cv_prog_f77_cross=yes ac_cv_prog_cxx_cross=yes export cross_compilingfiif test "$use_runtimevalues" = "yes" ; then AC_DEFINE(F77_RUNTIME_VALUES,,[Define if Fortran environment should be determined at runtime])fidnl PAC_ARG_MPICH_BUILDINGif test -n "$subname" -a -z "$mpichconfig_file" ; then AC_MSG_ERROR([Must specify --with-mpichconfig with --with-subname])fi# Read any cross-compilation variable valuesif test "$cross_file" != "/dev/null" -a -s "$cross_file" ; then . $cross_filefiif test -n "$mpichconfig_file" -a -s "$mpichconfig_file" ; then . $mpichconfig_file pac_lib_mpi_is_building="yes"fi## Define the installation directory names (defaults)if test -n "$subname" ; then # add the leading hyphen subname="-$subname" f77includedir='${includedir}'"/${subname}" f77libdir='${libdir}' f77bindir='${bindir}' if test "$set_FLIBNAME" != "yes" ; then FLIBNAME="mpich$subname" fi if test "$set_FWRAPNAME" != "yes" ; then FWRAPNAME="fmpich$subname" fielse subname="-`echo $F77 | sed 's/ /-/g'`" # Don't include the (sub)name in the defaults f77includedir='${includedir}' f77libdir='${libdir}' f77bindir='${bindir}'fiAC_SUBST(f77includedir)AC_SUBST(f77libdir)AC_SUBST(f77bindir)AC_SUBST(subname)# To make this compatible with the MPICH configure, the library# directory can be set with libbuild_dir; if not set, it is built in the# src directoryif test -z "$libbuild_dir" ; then libbuild_dir=`pwd`/srcfiAC_SUBST(libbuild_dir)AC_SUBST(FORTRAN_INITOBJ)AC_SUBST(INCLUDES) FORTRAN_INITOBJ="initfutil.o" # We should replace mpicc with the values used in the MPICH build. # This is best done with an environment variable (? what about # config.status re-execution?) INCLUDES="$mpich_includes" if test "$hasMPE" = "unknown" ; then hasMPE="yes" fi AC_SUBST(MPIVERSION)# Directory for building the library in (in src if not specified)if test -z "$libbuild_dir" ; then libbuild_dir=`pwd`/src if test ! -d $libbuild_dir ; then mkdir $libbuild_dir ; fifiAC_SUBST(libbuild_dir)PAC_PROG_CCAC_C_CONST# Check on support for long double and long long types.AC_CACHE_CHECK([whether long double is supported],pac_cv_have_long_double,[AC_TRY_COMPILE(,[long double a;],pac_cv_have_long_double=yes,pac_cv_have_long_double=no)])if test "$pac_cv_have_long_double" = "yes" ; then AC_DEFINE(HAVE_LONG_DOUBLE,,[Define if long double is supported])fiAC_CACHE_CHECK([whether long long is supported],pac_cv_have_long_long,[AC_TRY_COMPILE(,[long double a;],pac_cv_have_long_long=yes,pac_cv_have_long_long=no)])if test "$pac_cv_have_long_long" = "yes" ; then AC_DEFINE(HAVE_LONG_LONG_INT,,[Define if long long is supported])fidnldnl Autoconf bug: AC_PROG_F77 sets FFLAGS save_FFLAGS="$FFLAGS"AC_PROG_F77FFLAGS="$save_FFLAGS"# Bug in autoconf. Restore cross settingsif test "$pac_cross_compiling" = "yes" -a "$ac_cv_prog_f77_cross" = "no" ; then AC_MSG_RESULT([Resetting cross compilation to yes]) cross_compiling=yes ac_cv_prog_cc_cross=yes ac_cv_prog_f77_cross=yes ac_cv_prog_f90_cross=yes ac_cv_prog_cxx_cross=yesfiAC_SUBST(FOPTIONS)if test -z "$FLINKER" ; then FLINKER="$F77"fiAC_SUBST(FLINKER)# We need F90 to get the OFFSET_KIND and ADDRESS_KIND values.if test "$enable_f90" != "no" ; then PAC_PROG_F90 if test -z "$F90" ; then enable_f90=no else if test -z "$F90LINKER" ; then F90LINKER="$F90" fi fi AC_SUBST(F90LINKER)fidnldnl Checks for programsPAC_PROG_MAKE# archive program# In some cases, the AR definition in the MPICH configure is exported.# Define our own AR here, just in caseif test -n "$ARCMD" ; then AR="$ARCMD"else AR=arfiAC_SUBST(AR)AC_PROG_INSTALLAC_PATH_PROG(RANLIB,ranlib)AC_SUBST(RANLIB)# allow for a different linker for Fortran programsAC_SUBST(F77LINKER)if test -z "$F77LINKER" ; then F77LINKER="$F77"fiAC_SUBST(MPILIBNAME)## The following variables are used in mpif77.in and reflect the MPI# implementation that is in use.# if test "$pac_lib_mpi_is_building" = "yes" ; then # These values are EXPORTED by the MPICH configure # Alternately, if we are building a *new* Fortran library for a # pre-existing MPICH build, we need to get these variables from # the MPICH library configuration file. AC_SUBST(LIB_PATH) AC_SUBST(BASE_LIB_LIST) AC_SUBST(HASMPE) F77_LDFLAGS="$ROMIO_LFLAGS" AC_SUBST(F77_LDFLAGS) BASE_FFLAGS="$ROMIO_TFFLAGS" AC_SUBST(BASE_FFLAGS) AC_SUBST(includebuild_dir) AC_SUBST(MPI_WITH_PMPI) # Shared library support (replace with libtool?) AC_SUBST(SHAREDKIND) AC_SUBST(SHARED_LIB_SEARCH_PATH_LEADER) AC_SUBST(SHARED_LIB_LOCALDIR) AC_SUBST(sharedlibbuild_dir) AC_SUBST(sharedlib_dir) MPI2_OBJECTS='${MPI2_OBJECTS}' AC_SUBST(MPI2_OBJECTS)fiif test "$DEBUG_DUMP" = "yes" ; then rm -f config.env echo "Environment before push" >>config.env set >>config.env echo "End of env" >> config.envfiPAC_LANG_PUSH_COMPILERSif test "$DEBUG_DUMP" = "yes" ; then echo "Environment after push" >>config.env set >>config.env echo "End of env" >> config.envfidnldnl Why is this here? Please explain why -lg2c must be excluded whendnl using the NAG compilers. dnl The reason is that when it is included, codes fail in exit. Thednl problem was tracked down to the fact that the nag fortran routinesdnl do not initialize the argument values in the way that g2c expects.dnl So, g2c is discovered, but it will not work.dnl if test "$f90nag" = "1" -o "$f95nag" = "1" ; then NOG2C=yes else NOG2C=nofidnldnl This option requires the config.guess etc.FLIBS_save="$FLIBS"FLIBS=""AC_F77_LIBRARY_LDFLAGSPAC_PROG_F77_CHECK_FLIBSdnlPAC_PROG_F77_LINKER_WITH_Cdnl For name mangle, we need the library flagsPAC_PROG_F77_NAME_MANGLEdnl Once we have name mangle, we can try to limit the number of needed libsPAC_PROG_F77_IN_C_LIBSAC_SUBST(F77_IN_C_LIBS)AC_LANG_FORTRAN77PAC_PROG_F77_EXCLAIM_COMMENTS(has_exclaim="yes",has_exclaim="no")PAC_PROG_F77_NEW_CHAR_DECL(CHARDECL="(LEN=*)",CHARDECL="*(*)")AC_SUBST(CHARDECL)dnl PAC_F77_CHECK_COMPILER_OPTION(-g)PAC_PROG_F77_HAS_INCDIR(include)if test -n "$F77_INCDIR" ; then
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?