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

📄 configure.in

📁 mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境
💻 IN
字号:
AC_PREREQ(2.59)AC_INIT(configure.in)dnldnl Set the directory that contains support scripts such as install-sh anddnl config.guessdnlAC_CONFIG_AUX_DIR(../../../../../confdb)dnldnl Definitions will be placed in this file rather than in the DEFS variablednlAC_CONFIG_HEADER(mpidu_socki_conf.h)echo "RUNNING CONFIGURE FOR THE POLL IMPLEMENTATION OF SOCK"AC_ARG_ENABLE(echo,   [--enable-echo - turn on echoing from within configure script],   set -x)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.])fiPAC_PROG_MAKEAC_C_INLINEdnldnl _XOPEN_SOURCE_EXTENDED=1 is required for Solaris to build properly */dnl (TEMPORARY - Setting the Unix source type must happen before dnl any tests are performed to ensure that all configure tests use thednl same environment.  In particular, under AIX, this causes dnl struct timespec to *not* be defined, dnl CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"AC_CHECK_FUNC(poll,pac_cv_have_func_poll=yes,pac_cv_have_func_poll=no)if test "$pac_cv_have_func_poll" != yes ; then    if test -f /sw/include/sys/poll.h ; then        dnl This is for Mac OSX (Darwin) which doesn't have a poll function is the standard libraries.  Instead we use a        dnl  contributedlibrary found off in la la land (/sw).        CFLAGS="$CFLAGS -I/sw/include"        TCP_LIBS="$TCP_LIBS -L/sw/lib -lpoll"    else        AC_MSG_ERROR([This device requires the poll function])    fifiAC_CHECK_HEADERS(                               \    assert.h                                    \    errno.h                                     \    fcntl.h                                     \    limits.h                                    \    netdb.h                                     \    netinet/in.h                                \    netinet/tcp.h                               \    poll.h					\    stdlib.h                                    \    sys/param.h                                 \    sys/poll.h                                  \    sys/types.h                                 \    sys/uio.h					\    unistd.h)AC_MSG_CHECKING([if struct poll is defined]);AC_TRY_COMPILE([#if defined(HAVE_POLL_H)#include <poll.h>#endif#if defined(HAVE_SYS_POLL_H)#include <sys/poll.h>#endif],[struct pollfd pollfd;pollfd.fd = -1;],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])AC_MSG_ERROR([This device requires the poll function])])AC_MSG_CHECKING([if a simple program using poll() can be compiled]);AC_TRY_COMPILE([#if defined(HAVE_POLL_H)#include <poll.h>#endif#if defined(HAVE_SYS_POLL_H)#include <sys/poll.h>#endif],[struct pollfd pollfds[2];int n_fds;pollfds[0].fd = -1;pollfds[1].fd = -1;n_fds = poll(pollfds, 2, -1);],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])AC_MSG_ERROR([This device requires the poll function])])dnldnl needed on AIXdnlAC_MSG_CHECKING([whether bit fields work in ip.h]);AC_TRY_COMPILE([#include <netinet/tcp.h>],[int i;],[AC_MSG_RESULT([yes])bit_fields=yes],[AC_MSG_RESULT([no])bit_fields=no])if test "$bit_fields" = "no" ; then     AC_MSG_RESULT([Adding -D_NO_BITFIELDS to CFLAGS])     CFLAGS="$CFLAGS -D_NO_BITFIELDS"fiAC_CHECK_FUNCS(gethostname)if test "$ac_cv_func_gethostname" = "yes" ; then    # Do we need to declare gethostname?    PAC_FUNC_NEEDS_DECL([#include <unistd.h>],gethostname)fisaveLIBS="$LIBS"LIBS=""AC_SEARCH_LIBS(socket,socket,,,$saveLIBS)AC_SEARCH_LIBS(gethostbyname,nsl,,,$saveLIBS)TCP_LIBS="$TCP_LIBS $LIBS"LIBS="$saveLIBS $LIBS"## Check for socklen_t .  If undefined, define it as intAC_CACHE_CHECK([whether socklen_t is defined],pac_cv_have_socklen_t,[AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>]typedef double socklen_t;,[socklen_t a;],pac_cv_have_socklen_t=no,pac_cv_have_socklen_t=yes)])if test "$pac_cv_have_socklen_t" = no ; then    AC_DEFINE(socklen_t,int,[Define if socklen_t is not defined])fiAC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[int a;],ac_cv_header_sys_socket_h=yes,ac_cv_header_sys_socket_h=no)if test "$ac_cv_header_sys_socket_h" = yes ; then    AC_DEFINE(HAVE_SYS_SOCKET_H,1,[Define if you have the <sys/socket.h> header file.])fiAC_SUBST(TCP_LIBS)AC_SUBST(AR)AC_SUBST(RANLIB)AC_SUBST(MPILIBNAME)AC_SUBST(CC)AC_SUBST(CFLAGS)AC_SUBST(CPPFLAGS)PAC_CC_SUBDIR_SHLIBSAC_SUBST(master_top_srcdir)AC_SUBST(master_top_builddir)dnldnl Dependency handlingAC_SUBST(MAKE_DEPEND_C)dnldnl EtagsAC_CHECK_PROGS(ETAGS,etags,true)AC_SUBST(ETAGS)AC_SUBST(ETAGSADD)export ETAGSexport ETAGSADDAC_OUTPUT(Makefile localdefs)

⌨️ 快捷键说明

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