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

📄 configure.ac

📁 Path MPICH-V for MPICH the MPI Implementation
💻 AC
字号:
dnl MPICH-Vdnl Copyright (C) 2002, 2004 Groupe Cluster et Grid, LRI, Universite de Paris Suddnldnl This file is part of MPICH-V.dnldnl MPICH-V is free software; you can redistribute it and/or modifydnl it under the terms of the GNU General Public License as published bydnl the Free Software Foundation; either version 2 of the License, ordnl (at your option) any later version.dnldnl MPICH-V is distributed in the hope that it will be useful,dnl but WITHOUT ANY WARRANTY; without even the implied warranty ofdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thednl GNU General Public License for more details.dnldnl You should have received a copy of the GNU General Public Licensednl along with MPICH-V; if not, write to the Free Softwarednl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USAdnlAC_INIT(ch_v, 0.9, mpich-v@mpich-v.net)AC_CONFIG_HEADER([config.h:config.h.in])AC_CONFIG_FILES([Makefile.in utils/Makefile driver/Makefile daemon/Makefile checkpoint/Makefile checkpoint/CheckpointServer/Makefile mpirun/Makefile mpirun/mpirun.lst mpirun/mpirun.ch_v])AC_ARG_WITH([debug],	AC_HELP_STRING([--with-debug],[Activate debug information]),	[ac_cv_use_debug=$withval], [ac_cv_use_debug=no])if test $ac_cv_use_debug != no ; then	AC_DEFINE([DEBUG])fiAC_ARG_WITH([protocol],	AC_HELP_STRING([--with-protocol=protocol],[Choose the FT protocol (among Vcl Vdummy)]),	[ac_cv_use_protocol=$withval], [ac_cv_use_protocol=no])if test "$ac_cv_use_protocol" = no ; then	echo "******* You MUST choose a protocol."	echo "******* Cannot compile without one!"	exit 2else	case $ac_cv_use_protocol in		Vcausal)			PROTOCOL="Vcausal"		;;		Vdummy)			PROTOCOL="Vdummy"		;;                Vcl)                        PROTOCOL="Vcl"                ;;                VgangSched)                        PROTOCOL="VgangSched"                ;;		VLogOn)                        PROTOCOL="VLogOn"		;;		*)			echo "******* Protocol $ac_cv_use_protocol invalid!"			echo "******* Protocol must be one of [Vcausal Vcl Vdummy VLogOn VGangSched]"			exit 2		;;	esacfiVERSION="$PACKAGE_VERSION -- $PROTOCOL"AC_DEFINE_UNQUOTED([VERSION], ["$PACKAGE_VERSION -- $PROTOCOL"])AC_SUBST(PROTOCOL)#protocol_need_option proto opt prints no and returns 0 if # protocol does not accept the option, prints maybe and returns 1 # if protocol accepts the option, prints yes and returns 2 if protocol # has no meaning without the optionfunction protocol_need_option (){	case "$1" in		Vdummy)			echo no			return 0		;;		Vcausal)			if test "$2" = "events" ; then				echo yes				return 2			fi			if test "$2" = "checkpoint" ; then				echo maybe				return 1			fi		;;		VLogOn)			if test "$2" = "events" ; then				echo yes				return 2			fi			if test "$2" = "checkpoint" ; then				echo maybe				return 1			fi		;;		Vcl)			if test "$2" = "events" ; then				echo no				return 0			fi			if test "$2" = "checkpoint" ; then				echo yes				return 2			fi		;;		VgangSched)			if test "$2" = "events" ; then				echo no				return 0			fi			if test "$2" = "checkpoint" ; then				echo yes				return 2			fi		;;	esac}dnldnl options for Vcausaldnlif test $PROTOCOL = "Vcausal" ; then	AC_ARG_WITH([causal-stats],	AC_HELP_STRING([--with-causal-stats],[Enable collection of statistics about Event logging]),	[ac_cv_causal_stat=$withval], [ac_cv_causal_stat=no])	if test "$ac_cv_causal_stat" = yes ; then		AC_DEFINE(CAUSALITY_STATISTICS)		DAEMON_LDFLAGS="$DAEMON_LDFLAGS -lm"	fi	AC_ARG_WITH([causal-manetho],	AC_HELP_STRING([--with-causal-manetho],[Use the manetho algorithm for event logging]),	[ac_cv_causal_manetho=$withval], [ac_cv_causal_manetho=no])	if test "$ac_cv_causal_manetho" = yes ; then		AC_DEFINE(MANETHO)	fifidnldnl options for VLogOndnlif test $PROTOCOL = "VLogOn" ; then	AC_ARG_WITH([causal-stats],	AC_HELP_STRING([--with-causal-stats],[Enable collection of statistics about Event logging]),	[ac_cv_causal_stat=$withval], [ac_cv_causal_stat=no])	if test "$ac_cv_causal_stat" = yes ; then		AC_DEFINE(CAUSALITY_STATISTICS)		DAEMON_LDFLAGS="$DAEMON_LDFLAGS -lm"	fifiAC_ARG_WITH([daemonprof],	AC_HELP_STRING([--with-daemonprof],[Activate profiling information on daemon]),	[ac_cv_use_dprof=$withval], [ac_cv_use_dprof=no])if test "$ac_cv_use_dprof" != no ; then	DAEMON_CFLAGS=-pg	DAEMON_LDFLAGS="$DAEMON_LDFLAGS -pg"fidnldnl V_OPTION_CHECK([option], [variable], [variable to define], [value when default])dnlAC_DEFUN([V_OPTION_CHECK],[pa=`protocol_need_option $PROTOCOL "$1"`eval pb=$`echo $2`case "$pa" in	yes)	if test "$pb" = no ; then		echo "***"		echo "*** $PROTOCOL has no meaning without $1"		echo "*** setting $1 to $4"		echo "***"		AC_DEFINE([$3])		eval `echo $2=$4`	fi	if test "$pb" = def ; then		eval `echo $2=$4`	fi	;;	maybe)	if test "$pb" = no ; then		AC_DEFINE([$3])	else		if test "$pb" = def ; then			eval `echo $2=$4`		fi	fi	;;	no)	if test "$pb" = yes ; then		echo "***"		echo "*** --with-$1 has no effect on protocol $PROTOCOL"		echo "***"	else		eval `echo $2`=no		AC_DEFINE([$3])	fi	;;esac])pa=`protocol_need_option $PROTOCOL "events"`if test "$pa" = "no" ; then   AC_DEFINE(NO_EVENTLOGGER)fiCKPT_HELPER_LIB="no-ckpt"AC_ARG_WITH([checkpoint],	AC_HELP_STRING([--with-checkpoint=helper], [Activate checkpointing using helper (default is blcr)]),	[ac_cv_use_cp=$withval], [ac_cv_use_cp=def])V_OPTION_CHECK([checkpoint], [ac_cv_use_cp], [NO_CHECKPOINT], [blcr])if test $ac_cv_use_cp != no ; then	case $ac_cv_use_cp in	condor)		echo -n checking if gcc is version 2.96		if gcc --version | grep 2\.96 2>&1 >/dev/null ; then			echo " "yes		else			echo no " ****** condor will probably not work"		fi		echo "Setting condor links and scripts"		if test -d `pwd`/checkpoint/condor-libs ; then			ln -sf `pwd`/checkpoint/condor-libs ../../lib/condor-libs 		else			echo "*** You must install the condor-libs in `pwd`/checkpoint/condor-libs"			echo "*** condor will not work..."			exit 4		fi		CKPT_HELPER_LIB=condor-libs	;;	ckpt)		CH_V_ENVIRONMENT='MPIRUN_HOME=$MPIRUN_HOME RESTART=$MPIRUN_HOME/restart LD_LIBRARY_PATH=$MPIRUN_HOME:$LD_LIBRARY_PATH'		CKPT_HELPER_LIB=ckpt		AC_CONFIG_FILES([checkpoint/ckpt/Makefile])	;;	blcr)		AC_ARG_WITH(blcr-libdir, AS_HELP_STRING([--with-blcr-libdir=<dir>], [uses dir as library directory for BLCR (default to blcrhomedir/lib)]),			    [BLCR_LIBDIR_SET="y"			     BLCR_LDFLAGS="-L$withval -Wl,-rpath,$withval"], [BLCR_LIBDIR_SET="n"])		AC_ARG_WITH(blcr-incdir, AS_HELP_STRING([--with-blcr-incdir=<dir>], [uses dir as include directory for BLCR (default to blcrdir/include)]),			    [BLCR_INCDIR_SET="y"			     BLCR_CPPFLAGS="-I$withval"], [BLCR_INCDIR_SET="n"])		AC_ARG_WITH(blcr, AS_HELP_STRING([--with-blcr=<blcrdir>], [uses blcrdirdir as home directory for BLCR (default /usr/local)]),			    [if test "$BLCR_INCDIR_SET" == "n" ; then				BLCR_CPPFLAGS="-I$withval/include"			     fi			     if test "$BLCR_LIBDIR_SET" == "n" ; then			        BLCR_LDFLAGS="-L$withval/lib"			     fi], [])		OLDCPPFLAGS=$CPPFLAGS		CPPFLAGS="$BLCR_CPPFLAGS"		AC_CHECK_HEADER(libcr.h, [], 				[echo "*** must find libcr.h when blcr is enabled"				 exit 1])		CPPFLAGS=$OLDCPPFLAGS		OLDLDFLAGS=$LDFLAGS		LDFLAGS="$BLCR_LDFLAGS"		AC_CHECK_LIB(cr, cr_init, 			[BLCR_LDFLAGS="$BLCR_LDFLAGS -lcr -Wl,-rpath,/usr/local/lib -lpthread"], 			[echo "*** Must find libcr when blcr is enabled"			 exit 1])		LDFLAGS=$OLDLDFLAGS		CKPT_HELPER_LIB=blcr		AC_SUBST(BLCR_LDFLAGS)		AC_SUBST(BLCR_CPPFLAGS)		AC_CONFIG_FILES([patches/mpicc-blcr.in])		DAEMON_CFLAGS="$DAEMON_CFLAGS $BLCR_CPPFLAGS"		DAEMON_LDFLAGS="$DAEMON_LDFLAGS $BLCR_LDFLAGS"	;;	*)		if test $ac_cv_use_cp != no ; then			echo "*** method $ac_cv_use_cp is undefined right now..."			echo "*** use --without-checkpoint or"			echo "***     --with-checkpoint (defaults to condor) or"			echo "***     --with-checkpoint=condor or"			echo "***     --with-checkpoint=ckpt or"			echo "***     --with-checkpoint=blcr"			exit 3		fi	;;	esac	AC_ARG_WITH([BCP],		AC_HELP_STRING([--with-BCP], [Use a blocking checkpointing mechanism]),		[ac_cv_use_bcp=$withval], [ac_cv_use_bcp=no])	if test "$ac_cv_use_bcp" = yes ; then		AC_DEFINE([CHECKP0INT_WAIT])	fifiAC_SUBST(CKPT_HELPER_LIB)AC_SUBST(CH_V_ENVIRONMENT)AC_CONFIG_FILES([checkpoint/$CKPT_HELPER_LIB/Makefile])AC_ARG_WITH([tmpdir],	AC_HELP_STRING([--with-tmpdir], [set the temporary directory (defaults to /tmp/)]),	[ac_cv_use_tmpdir=$withval], [ac_cv_use_tmpdir="/tmp/"])AC_DEFINE_UNQUOTED([TMPDIR], ["$ac_cv_use_tmpdir"])if test -f ../../configure ; then   echo "Patching the mpich-1.2.5 configure files (check the following output)"   if grep -q ch_v ../../configure ; then	   echo "../../configure seems already patched (get a new one if new patch has to be applied)"    else	  	    patch -Nsp1 ../../configure < patches/configure    fi    if grep -q ch_v ../../configure.in ; then	    echo "../../configure.in seems already patched (get a new one if new patch has to be applied)"    else	    patch -Nsp1 ../../configure.in < patches/configure.in    fi    echo "Installing the new mpi<compilers>.in"    cp -f patches/mpif77-$ac_cv_use_cp.in ../../src/fortran/src/mpif77.in    cp -f patches/mpif90-$ac_cv_use_cp.in ../../src/fortran/src/mpif90.in    cp -f patches/mpicc-$ac_cv_use_cp.in  ../../util/mpicc.inelse    echo "no ../../configure file : ch_v is not inside the mpid subdirectory (it should be)"fiAC_PROG_MAKE_SETAR_LOCAL=${AR_LOCAL:-"l"}AR="ar cr$AR_LOCAL"ARCMD="ar"AC_SUBST(ARCMD)AC_SUBST(AR)AC_PROG_RANLIBAC_PROG_CC(gcc cc)DEVICE=ch_vAC_SUBST(DEVICE)AC_SUBST(DAEMON_CFLAGS)AC_SUBST(DAEMON_LDFLAGS)AC_OUTPUTchmod a+x mpirun/mpirun.lstdnldnl V_OPTION_DISPLAY([option], [variable], [comment])dnlAC_DEFUN([V_OPTION_DISPLAY],[pa=`protocol_need_option $PROTOCOL $1`eval pb=$`echo $2`if test "$pa" != no ; then	echo -n ' $3@<:@44G'	if test "$pa" = yes -a "$pb" = no ; then		echo "no (*** potential error)"	else		echo $pb	fielse	if test "$pb" = yes ; then		echo  ' $3@<:@44Gyes (probably ignored)'	fifi])echo ""echo "Thank you for using MPICH-V"echo "You may contact us by mail at fci@lri.fr"echo ""echo "summary of configuration:"echo "DEBUG"echo " debugging information                     "$ac_cv_use_debugecho " profiling of daemon                       "$ac_cv_use_dprofecho "PROTOCOL"echo " fault-tolerant protocol                   "$PROTOCOLif test \( $PROTOCOL = "Vcausal" \) -o \( $PROTOCOL = "VLogOn" \) ; then	if test "$ac_cv_causal_stat" = "yes" ; then		echo "  (with causality statistics)"	fi	if test \( $PROTOCOL = "Vcausal" \) -a \( "$ac_cv_causal_manetho" = "yes" \) ; then		echo "  (manetho-like)"	fifiV_OPTION_DISPLAY([checkpoint], [ac_cv_use_cp], [checkpoint])if test $ac_cv_use_cp = yes ; then	echo " AdHOC                                     "$ac_cv_use_adhoc	if test $ac_cv_use_adhoc = yes ; then		echo " AdHoc min value                           "$ac_cv_use_adhocmin		echo " AdHoc max value                           "$ac_cv_use_adhocmax	fifiecho "VARIOUS"echo " temporary dir (for creating pipes)        "$ac_cv_use_tmpdirecho ""echo "you may now run ./configure in mpich root directory (../..)"echo ""

⌨️ 快捷键说明

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