📄 configure.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(pmiimpl.h)dnldnl Definitions will be placed in this file rather than in the DEFS variableAC_CONFIG_HEADER(pmiconf.h)dnlecho "RUNNING CONFIGURE FOR THE WINMPD PMI"dnldnldnl 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")dnlAC_ARG_ENABLE(error-checking,[--enable-error-checking=level - Control the amount of error checking. level may be no - no error checking runtime - error checking controlable at runtime through environment variables all - error checking always enabled],,enable_error_checking=all)dnlAC_ARG_ENABLE(timing,[--enable-timing=level - Control the amount of timing information collected by the MPICH implementation. level may be none - Collect no data all - Collect lots of data runtime - Runtime control of data collectedThe default is all.],,enable_timing=all)dnldnl Set single for nowAC_ARG_ENABLE(threads,[--enable-threads=level - Control the level of thread support in the MPICH implementation. level may be single - Single threaded (MPI_THREAD_SINGLE and MPI_THREAD_FUNNELED) multiple - Multithreaded (MPI_THREAD_SERIAL and MPI_THREAD_MULTIPLE)],,enable_threads=single)dnlAC_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 mem - Memory usage tracing all - All of the above choices],,enable_g=none)dnldnlAC_ARG_ENABLE(sharedlibs,[--enable-sharedlibs=kind - Enable shared libraries. kind may be gnu - Standard gcc and GNU ld options for creating shared libraries libtool - GNU libtool This option is currently ignored])dnldnl Process any enable or with valuesdnl error-checkingcase "$enable_error_checking" in no) ;; all|yes|runtime) changequote(<<,>>) error_checking_kind=`echo $enable_error_checking | tr '[a-z]' '[A-Z]'` changequote([,]) error_checking_kind=MPID_ERROR_LEVEL_$error_checking_kind AC_DEFINE_UNQUOTED(HAVE_ERROR_CHECKING,$error_checking_kind,[define to enable error checking]) ;; *) AC_MSG_WARN([Unknown value $enable_error_checking for enable-error-checking]) ;;esacdnldnldnl 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 timingcase "$enable_timing" in no|none) ;; all|log|yes|time|runtime) changequote(<<,>>) timing_kind=`echo $enable_timing | tr '[a-z]' '[A-Z]'` changequote([,]) timing_kind=MPID_TIMING_KIND_$timing_kind AC_DEFINE_UNQUOTED(HAVE_TIMING,$timing_kind,[define to enable timing collection]) ;; *) AC_MSG_WARN([Unknown value $enable_timing for enable-timing]) ;; esacdnldnl threadscase "$enable_threads" in no|single) AC_DEFINE(MPICH_SINGLE_THREADED,,[define to for single threaded]) ;; runtime=*|multiple=*) thread_type=`echo $enable_threads | sed -e 's/^.*=//'g` ;; all|yes|multiple|runtime) thread_type=pthread ;; *) AC_MSG_WARN([Unknown value $enable_threads for enable-threads]) ;; esacdnldnl enable-gcase "$enable_g" in no|none) ;; mem|all) AC_DEFINE(USE_MEMORY_TRACING,,[Define to enable memory tracing]) enable_g_mem=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_PATH_PROG(AR,ar)AC_PATH_PROG(RANLIB,ranlib)dnldnl Find SSH. If SSH is defined, use that insteaddnl AC_PATH_PROG(SSH,ssh)dnldnl AC_PROG_MAKE_SETPAC_PROG_MAKEdnldnl check for compiler characteristicsPAC_PROG_C_WEAK_SYMBOLSAC_C_CONSTPAC_C_VOLATILEPAC_C_RESTRICTAC_C_INLINEPAC_C_STRUCT_ALIGNMENTdnldnl check for library functionsif test -n "$thread_type" ; then case $thread_type in pthread|posix) AC_SEARCH_LIBS(pthread_create,pthread, AC_DEFINE(HAVE_PTHREAD_CREATE,,[Define for pthreads])) ;; solaris|thr) AC_SEARCH_LIBS(thr_create,thread, AC_DEFINE(HAVE_THR_CREATE,,[Define for Solaris threads])) ;; *) AC_MSG_WARN([Unknown thread type $thread type]) ;; esacfidnldnl Look for Standard headersAC_HEADER_STDCdnl Check for a specific headerAC_CHECK_HEADERS(sys/types.h)dnldnl 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])if test "$enable_g_mem" != "yes" ; then dnl Strdup is needed only if memory tracing is not enabled. AC_CHECK_FUNCS(strdup)else dnl search.h is used for fancier output from trmem. Disabled for now, dnl since the tsearch routines have problematic prototypes. dnl AC_CHECK_HEADERS(search) dnl AC_CHECK_FUNCS(tsearch) dnl Check that we can compile tsearch without error dnl (not done yet) :fidnldnl Setup other replaceable valuesMPILIBNAME=mpichAC_SUBST(MPILIBNAME)dnl AC_SEARCH_LIBS(socket, socket)dnl AC_CHECK_LIB(thread, mutex_init)dnl AC_CHECK_HEADERS(pthread.h fcntl.h strings.h sys/time.h sys/sem.h sys/ipc.h sys/shm.h unistd.h sys/param.h sys/ioctl.h netinet/in.h netinet/tcp.h netdb.h sys/uio.h sys/select.h sys/types.h stdlib.h sys/socket.h sys/filio.h netinet/in.h values.h sys/uio.h sched.h)dnl AC_CHECK_HEADERS(sys/stat.h sys/ptrace.h sys/wait.h errno.h)AC_CHECK_HEADERS(stdlib.h)dnl AC_CHECK_FUNCS(yield mutex_init shmget shmat shmdt shmctl usleep sleep getcwd gethostname gettimeofday putenv select socket sched_yield)dnl AC_CHECK_FUNCS(pthread_mutexattr_setpshared pthread_mutexattr_init)dnldnl AC_OUTPUT_COMMANDS(cp pmiconf.h ../../../include)dnldnl Generate the Makefiles from Makefile.indnl Also generate mpi.h from mpi.h.in so that we can eliminate all ifdefsdnl from the file.AC_OUTPUT(Makefile)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -