?? configure.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)dnl The MPICH2 top-level configure adds a bunch of flags to thednl user-defined CFLAGS by processing different configure command-linednl arguments (--enable-g, --enable-default-optimization). These updateddnl flags are passed down as a separate flag. Here, we don't care aboutdnl the user-defined flags, but rather this updated flags, so we justdnl overwrite CFLAGS with them.PAC_SUBCONFIG_INIT()dnldnl Definitions will be placed in this file rather than in the DEFS variablednlAC_CONFIG_HEADER(include/mpidi_ch3_conf.h)AH_TOP([/* -*- Mode: C; c-basic-offset:4 ; -*- *//* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */#ifndef MPIDI_CH3_CONF_H_INCLUDED#define MPIDI_CH3_CONF_H_INCLUDED])AH_BOTTOM([#endif])AC_DEFINE(HAVE_MPIDI_CH3_CONF,1,[Define so that we can test whether the mpidi_ch3_conf.h file has been included])echo "RUNNING CONFIGURE FOR CH3 DEVICE"# First check that we have a clean build if we are doing a VPATH buildPAC_VPATH_CHECK()# -----------------------------------------------------------------------------# experiment with creating a cache file. Load if it exists#if test -n "$CONF_BASE_CACHEFILE" -a -s "$CONF_BASE_CACHEFILE" ; then# echo "Loading base cachefile $CONF_BASE_CACHEFILE"# . $CONF_BASE_CACHEFILE# export CONF_BASE_CACHEFILE#fiPAC_LOAD_BASE_CACHE# -----------------------------------------------------------------------------# Extract the device and channel namefile=${master_top_srcdir}/src/mpid/${device_name}/setup_device.argsif test -f ${file} ; then . ${file}else echo "ERROR: ${file} not found" exit 1fiexport channel_nameexport channel_argsAC_SUBST(device_name)AC_SUBST(channel_name)if test ! -d $srcdir/channels/${channel_name} ; then AC_MSG_ERROR([Channel ${channel_name} is unknown])elif test ! -x $srcdir/channels/${channel_name}/configure ; then AC_MSG_ERROR([Channel ${channel_name} has no configure])fiPAC_PROG_MAKE# Some channels will make use of common utility routines (in ch3/src/util)# For modularity, the channel can specify these here# FIXME: Some utility routines are specified at the top level (devsubsystem)# even though their scope is really ch3 in practice. We haven't resolved# the best way to handle these systems# Note that the "setup_<channelname>" script must also set # needs_sock=yes# if util/sock is used, and# needs_shm=yes# if util/shm is used.if test -s $srcdir/channels/$channel_name/setup_$channel_name ; then # Typically, this will set ch3subsystems. For now, # we use this configure to create the configuration file # for those subsystems. Eventually, they may have their # own configure . $srcdir/channels/$channel_name/setup_$channel_name if test "$needs_sock" = yes ; then AC_DEFINE(HAVE_UTIL_SOCK,1,[Define if the channel needs util/sock]) CPPFLAGS="${CPPFLAGS} -I${master_top_srcdir}/src/mpid/ch3/util/sock" AC_CONFIG_SUBDIRS(util/sock) fi if test "$needs_shm" = yes ; then AC_DEFINE(HAVE_UTIL_SHM,1,[Define if the channel needs util/shm]) #CPPFLAGS="${CPPFLAGS} -I${master_top_srcdir}/src/mpid/ch3/util/shm" fi fiAC_SUBST(ch3subsystems)AC_CHECK_HEADERS(assert.h limits.h string.h sys/types.h sys/uio.h uuid/uuid.h \ time.h ctype.h unistd.h arpa/inet.h sys/socket.h net/if.h)# Check for special typesAC_TYPE_PID_T# Check for functionsAC_CHECK_FUNCS(inet_pton)AC_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)fiAC_CHECK_FUNCS(CFUUIDCreate uuid_generate time)AC_SEARCH_LIBS(uuid_generate, uuid)AC_CACHE_CHECK([whether CPP accepts variable length argument lists],pac_cv_have_cpp_varargs,[AC_TRY_COMPILE([#include <stdio.h>#define MY_PRINTF(rank, fmt, args...) printf("%d: " fmt, rank, ## args)],[MY_PRINTF(0, "hello");MY_PRINTF(1, "world %d", 3);], pac_cv_have_cpp_varargs=yes, pac_cv_have_cpp_varargs=no)])if test $pac_cv_have_cpp_varargs = "yes" ; then AC_DEFINE(HAVE_CPP_VARARGS,,[Define if CPP supports macros with a variable number arguments])fiAC_C_BIGENDIAN# If we need the socket code, see if we can use struct ifconf# sys/socket.h is needed on SolarisAC_CACHE_CHECK([whether we can use struct ifconf],pac_cv_have_struct_ifconf,[AC_TRY_COMPILE([#include <sys/types.h>#ifdef HAVE_SYS_SOCKET_H#include <sys/socket.h>#endif#include <net/if.h>],[struct ifconf conftest;],pac_cv_have_struct_ifconf=yes,pac_cv_have_struct_ifconf=no)])if test "$pac_cv_have_struct_ifconf" = "no" ; then # Try again with _SVID_SOURCE AC_CACHE_CHECK([whether we can use struct ifconf with _SVID_SOURCE],pac_cv_have_struct_ifconf_with_svid,[AC_TRY_COMPILE([#define _SVID_SOURCE#include <sys/types.h>#ifdef HAVE_SYS_SOCKET_H#include <sys/socket.h>#endif#include <net/if.h>],[struct ifconf conftest;],pac_cv_have_struct_ifconf_with_svid=yes,pac_cv_have_struct_ifconf_with_svid=no)]) if test "$pac_cv_have_struct_ifconf_with_svid" = yes ; then AC_DEFINE(USE_SVIDSOURCE_FOR_IFCONF,1,[Define if _SVID_SOURCE needs to be defined for struct ifconf]) fifiif test "$pac_cv_have_struct_ifconf" = "no" -a \ "$pac_cv_have_struct_ifconf_with_svid" = "no" ; then # Try again with undef _POSIX_C_SOURCE AC_CACHE_CHECK([whether we can use struct ifconf without _POSIX_C_SOURCE],pac_cv_have_struct_ifconf_without_posix,[AC_TRY_COMPILE([#undef _POSIX_C_SOURCE#include <sys/types.h>#ifdef HAVE_SYS_SOCKET_H#include <sys/socket.h>#endif#include <net/if.h>],[struct ifconf conftest;],pac_cv_have_struct_ifconf_without_posix=yes,pac_cv_have_struct_ifconf_without_posix=no)]) if test "$pac_cv_have_struct_ifconf_without_posix" = yes ; then AC_DEFINE(USE_NOPOSIX_FOR_IFCONF,1,[Define if _POSIX_C_SOURCE needs to be undefined for struct ifconf]) fifiif test "$pac_cv_have_struct_ifconf" = "yes" -o \ "$pac_cv_have_struct_ifconf_with_svid" = "yes" -o \ "$pac_cv_have_struct_ifconf_without_posix" ; then AC_DEFINE(HAVE_STRUCT_IFCONF,1,[Define if struct ifconf can be used])fi## We need to know whether to use %d or %ld for writing out MPI_Aint valuesAC_CHECK_SIZEOF(int,$CROSS_SIZEOF_INT)AC_CHECK_SIZEOF(long,$CROSS_SIZEOF_LONG)AC_CHECK_SIZEOF(long long,$CROSS_SIZEOF_LONG)AC_CHECK_SIZEOF(void *,$CROSS_SIZEOF_VOID_P)if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_void_p" ; then :elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_void_p" ; then AC_DEFINE(MPI_AINT_IS_LONG_INT,1,[Define if the size of an MPI_Aint is long])elif test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_void_p" ; then AC_DEFINE(MPI_AINT_IS_LONG_LONG_INT,1,[Define if the size of an MPI_Aint is long long])fi## bring in the default implementation of the MPID_Thread package#MPID_THREAD_SRCDIR="../common/thread"builtin(include,../common/thread/mpid_thread.m4)AC_SUBST(AR)AC_SUBST(RANLIB)AC_SUBST(MPILIBNAME)AC_SUBST(CC)AC_SUBST(DEFS)AC_SUBST(CFLAGS)AC_SUBST(CPPFLAGS)PAC_CC_SUBDIR_SHLIBSAC_SUBST(master_top_srcdir)# Master_top_builddir is imported from the top; use it for the "top"AC_SUBST(master_top_builddir)export master_top_builddirdnl Dependency handlingAC_SUBST(MAKE_DEPEND_C)dnl EtagsAC_CHECK_PROGS(ETAGS,etags,true)AC_SUBST(ETAGS)AC_SUBST(ETAGSADD)export ETAGSexport ETAGSADDAC_SUBST(EXTRA_LIBS)PAC_SUBDIR_CACHEPAC_UPDATE_BASE_CACHE# Ensure that all subdir configures get the shared library itemsexport CC_SHLexport C_LINK_SHLexport C_LINKPATH_SHLexport SHLIB_EXTexport ENABLE_SHLIBexport LIBTOOLAC_CONFIG_SUBDIRS(channels/${channel_name})# Add the MPICH2 include flags to CPPFLAGS. See the discussion above about# which include flags should start in MPICH2_INCLUDE_FLAGS and which in # CPPFLAGSCPPFLAGS="$CPPFLAGS $MPICH2_INCLUDE_FLAGS"dnl Place holder macro for finalizationPAC_SUBCONFIG_FINALIZE()AC_OUTPUT(Makefile src/Makefile util/Makefile util/shm/Makefile util/shmbase/Makefile channels/Makefile localdefs $MPID_THREAD_OUTPUT_FILES)PAC_SUBDIR_CACHE_CLEANUP
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -