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

📄 configure.in

📁 刚才是说明 现在是安装程序在 LINUX环境下进行编程的MPICH安装文件
💻 IN
字号:
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(wtime.c)dnldnl Definitions will be placed in this file rather than in the DEFS variableAC_CONFIG_HEADER(timerconf.h)AC_CONFIG_AUX_DIR(../../../confdb)dnlecho "RUNNING CONFIGURE FOR TIMER"dnldnldnl Use AC_ARG_ENABLE to look for --enable-feature and AC_ARG_WITH to look fordnl --with-capabilitydnl Enable better caching controlPAC_ARG_CACHINGAC_ARG_ENABLE(echo, [--enable-echo  - Turn on strong echoing. The default is enable=no.] ,set -x)AC_ARG_ENABLE(strict,[--enable-strict - Turn on strict debugging with gcc],CFLAGS="$CFLAGS -O -Wall -Wstrict-prototypes -Wmissing-prototypes")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 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_srcdirdnldnl 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_PATH_PROG(AR,ar)AC_PATH_PROG(RANLIB,ranlib)dnldnl Find SSH.  If SSH is defined, use that insteaddnl AC_PATH_PROG(SSH,ssh)dnldnldnl Check for shared libraryPAC_ARG_SHAREDLIBSdnldnl Is there libnsl needed for gethostbyname?dnl AC_SEARCH_LIBS(gethostbyname,nsl)dnldnl Look for Standard headersAC_HEADER_STDCdnl Check for a specific headerdnl AC_CHECK_HEADERS(sys/systeminfo.h)AC_CHECK_HEADERS(sys/time.h unistd.h)dnldnl Default type for timer stamp.MPID_TIMER_TYPE=longdnldnl Check for functions.  This invokes another test if the function is dnl found.  The braces around the second test are essential. dnl AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP])# clock_gettime is the POSIX gettimeofday# gethrtime is the Solaris high-resolution timerdnldnl Specific checks that a function works correctlydnldnldnl Now that we know what the options are, choose the timer to usednldnl The default preference isdnl    Solaris gethrtimednl    Posix   clock_gettimednl    Unix    gettimeofday (one of two versions)dnldnl Also available are various hardware time stampsdnl    Linux-x86 cycle counterdnl    Linux-alpha cycle counterdnldnl We also allow --enable-timer-type=name to select a timer typeAC_ARG_ENABLE(timer-type,[--enable-timer-type=name - Select the timer to usefor MPI_Wtime and internal timestamps.  name may be one of    gethrtime - Solaris timer (Solaris systems only)    clock_gettime   - Posix timer (where available)    gettimeofday - Most Unix systems    linux86_cycle - Linux x86; returns cycle counts, not time in seconds    linuxalpha_cycle - Like linux86_cycle, but for Linux Alpha        ],timer_type=$enable_timer_type)dnlif test -z "$timer_type" ; then     AC_CHECK_FUNCS(clock_gettime clock_getres gethrtime gettimeofday)    if test "$ac_cv_func_gethrtime" = "yes" ; then        timer_type=gethrtime    elif test "$ac_cv_func_clock_gettime" = "yes" ; then        timer_type=clock_gettime    elif test "$ac_cv_func_gettimeofday" = "yes" ; then        timer_type=gettimeofday    fifiif test -z "$timer_type" ; then    AC_MSG_ERROR([No timer found])fidnldnl Check for valid timer and select datatypes for the time stampcase "$timer_type" in    gethrtime)    MPID_TIMER_TYPE=hrtime_t    AC_CHECK_FUNC(gethrtime,,[         AC_MSG_ERROR([Requested timer gethrtime is not available])])    ;;    clock_gettime)    AC_CHECK_FUNCS(clock_gettime clock_getres)    MPID_TIMER_TYPE="struct timespec"    # FreeBSD 4.3 incorrectly puts the header into sys/time.h;     # time.h is required (see pages 45 and 46 in the POSIX standard).    # See if we can compile    AC_CACHE_CHECK([for CLOCK_REALTIME defined in time.h],pac_cv_posix_clock_realtime,[    AC_TRY_COMPILE([#include <time.h>],[    clockid_t cid = CLOCK_REALTIME;],pac_cv_posix_clock_realtime=yes,pac_cv_posix_clock_realtime=no)])    if test "$pac_cv_posix_clock_realtime" = "no" ; then         AC_MSG_ERROR([POSIX timer requires definitions in time.h])    fi    ;;    gettimeofday)    MPID_TIMER_TYPE="struct timeval"    AC_CHECK_FUNC(gettimeofday,,[         AC_MSG_ERROR([Requested timer gettimeofday is not available])])    ;;    linux86_cycle|linux86_cycle_2)    MPID_TIMER_TYPE="long long"    ;;    linuxalpha_cycle)    MPID_TIMER_TYPE="long"    ;;    *)    AC_MSG_ERROR([Invalid timer type $timer_type])    ;;esacdnl Convert timer type to upper casechangequote(<<,>>)timer_type=`echo $timer_type | tr '[a-z]' '[A-Z]'`changequote([,])MPICH_TIMER_KIND=USE_$timer_typeAC_SUBST(MPICH_TIMER_KIND)dnldnl Setup other replaceable valuesdnl These are exported by the top-level configureAC_SUBST(NO_WEAK_SYM)AC_SUBST(NO_WEAK_SYM_TARGET)AC_SUBST(PROFILE_DEF_MPI)dnl MPILIBNAME is exported from the calling environmentdnldnl Choose the timer type (e.g., long, double, array).  long is the defaultAC_SUBST(MPILIBNAME)AC_SUBST(MPID_TIMER_TYPE)dnl Generate the Makefile from Makefile.inAC_OUTPUT_COMMANDS(if test ! -d ../../include ; then mkdir ../../include ; fi)AC_OUTPUT_COMMANDS(cp mpichtimer.h ../../include)AC_OUTPUT(Makefile mpichtimer.h)

⌨️ 快捷键说明

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