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

📄 configure.in

📁 mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境
💻 IN
字号:
AC_PREREQ(2.59)dnl Process this file with autoconf to produce a configure script.dnldnl aclocal_cache.m4, included by sowing/confdb/aclocal.m4, fixes dnl bugs in autoconf caching.dnldnl The file name here refers to a file in the source being configuredAC_INIT(mpiexec.c)dnldnl Definitions will be placed in this file rather than in the DEFS variableAC_CONFIG_HEADER(smpdconf.h)dnldnl Set the directory that contains support scripts such as install-sh anddnl config.guessAC_CONFIG_AUX_DIR(../../../confdb)dnlecho "RUNNING CONFIGURE FOR THE SMPD PM"dnldnl Use AC_ARG_ENABLE to look for --enable-feature and AC_ARG_WITH to look fordnl --with-capabilitydnldnl Enable better caching controlPAC_ARG_CACHINGdnlAC_ARG_ENABLE(echo, [--enable-echo  - Turn on strong echoing. The default is enable=no.] ,set -x)dnlAC_ARG_ENABLE(strict,[--enable-strict - Turn on strict debugging with gcc],CFLAGS="$CFLAGS -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes")dnldnldnl Set single for nowAC_ARG_ENABLE(g,[--enable-g=option - Control the level of debugging support in the PMIimplementation.  option may be a list of common separated names including    none  - No debugging    all   - All of the above choices],,enable_g=none)dnldnldnl 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 Process any enable or with valuesdnldnl enable-gcase "$enable_g" in     no|none)    ;;    mem|dbg|all|yes)    CFLAGS="$CFLAGS -g"    ;;    *)    AC_MSG_WARN([Unknown value $enable_g for enable-g])    ;;esacdnldnl This test is complicated by the fact that top_srcdir is not set untildnl the very end of configure.  Instead, we get it ourselvesif test -z "$top_srcdir" ; then   use_top_srcdir=$srcdir   else   use_top_srcdir=$top_srcdirfidnl The recommended order for items in a configure.in file isdnl     check for programsdnl     check for librariesdnl     check for header filesdnl     check for typedefsdnl     check for structuresdnl     check for compiler characteristicsdnl     check for library functionsdnl     check for system servicesdnl Here are some sample testsdnldnl Find a C compiler (choose gcc first)AC_PROG_CCAC_PROG_INSTALLPAC_PROG_CHECK_INSTALL_WORKSPAC_PROG_MKDIR_PPAC_PROG_MAKEdnldnl     check for compiler characteristicsAC_C_CONSTPAC_C_VOLATILEPAC_C_RESTRICTAC_C_INLINEdnldnl Look for Standard headersAC_HEADER_STDCdnldnl Setup other replaceable valuesMPILIBNAME=${MPILIBNAME:-"mpich"}AC_SUBST(MPILIBNAME)AC_CHECK_HEADERS( sys/types.h sys/wait.h signal.h unistd.h stdlib.h errno.h stdarg.h pthread.h sys/socket.h sys/stat.h ctype.h )AC_CHECK_HEADERS( math.h stdio.h termios.h string.h sys/stat.h malloc.h uuid/uuid.h )AC_CHECK_FUNCS( sigaction usleep CFUUIDCreate uuid_generate setenv md5_calc )AC_SEARCH_LIBS( uuid_generate, uuid )AC_MSG_CHECKING([for poll stdin capability])AC_TRY_RUN([#include <stdio.h>#include <stdlib.h>#include <poll.h>#include <unistd.h>#include <fcntl.h>int main(int argc, char *argv[]){    int fd;    struct pollfd a[1];    int result;    int flags;    fd = fileno(stdin);    flags = fcntl(fd, F_GETFL, 0);    if (flags == -1)    {	return -1;    }    flags = fcntl(fd, F_SETFL, flags | O_NONBLOCK);    if (flags == -1)    {	return -1;    }    a[0].fd = fd;    a[0].events = POLLIN;    a[0].revents = 0;    result = poll(a, 1, 1);    if (result == 1)    {	if (a[0].revents & POLLNVAL)	{	    return 0;	}    }    return -1;}], AC_MSG_RESULT(no)   AC_DEFINE(USE_PTHREAD_STDIN_REDIRECTION,1,[define if the file descriptor for stdin cannot be passed to poll]),    AC_MSG_RESULT(yes),   AC_MSG_RESULT(not checking when cross compiling))AC_SEARCH_LIBS( MD5, ssl crypto )AC_SEARCH_LIBS( md5_calc, md5 )AC_MSG_CHECKING([for md5_calc function])AC_TRY_COMPILE([#include <md5.h>],[unsigned char hash[16];unsigned char c='a';md5_calc(hash,&c,1);],ac_cv_have_md5_calc=yes,ac_cv_have_md5_calc=no)if test "$ac_cv_have_md5_calc" = yes ; then    AC_DEFINE(HAVE_MD5_CALC,1,[Define if you have the md5_calc function.])    AC_MSG_RESULT(yes)else    AC_MSG_RESULT(no)fi#AC_SEARCH_LIBS( MD5, crypto, SMPD_LIBS="$SMPD_LIBS -lcrypto" )SMPD_LIBS="$SMPD_LIBS $LIBS"AC_SUBST(SMPD_LIBS)AC_SUBST(AR)AC_SUBST(RANLIB)AC_SUBST(MPILIBNAME)AC_SUBST(CC)AC_SUBST(CPPFLAGS)AC_SUBST(CFLAGS)AC_SUBST(CC_SHL)AC_SUBST(C_LINK_SHL)AC_SUBST(ENABLE_SHLIB)AC_SUBST(master_top_srcdir)dnldnl Dependency handlingAC_SUBST(MAKE_DEPEND_C)dnldnl Get any LIBS required by the sock implementationdnl. ../../mpid/common/sock/localdefs. ../../pmi/smpd/localdefsdnldnl Generate the Makefiles from Makefile.inAC_OUTPUT(Makefile localdefs)

⌨️ 快捷键说明

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