📄 configure.in
字号:
# -*- Mode: shell-script -*-# build with# autoconf --localdir=../confdb configure.in# (or wherever the confdb is)## Open MPI: Modifications to this file were done on an "let's do the# minimum possible" basis, not so that we can skip on the work or# provide any less functionality, but more from a perspective that we# want to be able to import new versions of ROMIO in as easy a fashion# as possible. Hence, there are some things in this file that are# irrelevant / unnecessary in an Open MPI environment, but are# harmless and are left here solely for the sake of ease of future# patching/importing.AC_PREREQ(2.59)# if this blows up, it's because you forgot to run autoheaderAC_INIT(adio/include/romioconf.h.in)# VERSION=1.2.6# AC_MSG_RESULT([Configuring ROMIO Version $VERSION])CONFIGURE_ARGS="$*"if test -n "$CONFIGURE_ARGS" ; then echo "Configuring with args $CONFIGURE_ARGS"fiAC_CONFIG_HEADER(adio/include/romioconf.h)# Open MPI: added AH_TOPAH_TOP([#include "romioconf-undefs.h"])# Open MPI: this configure script doesn't seem to define these# anywhere, so just do them manually here because "we know better"# (i.e., Open MPI can be hard-wired to these values).AC_DEFINE([HAVE_MPI_OFFSET], [1], [Will always be 1 - OMPI has MPI_OFFSET]) # Open MPI: look for top Open MPI directoryAC_MSG_CHECKING([for Open MPI support files])if test -f "$srcdir/../../../../../config/mca_configure.ac"; then # This is needed for VPATH builds, so that it will -I the # appropriate include directory (don't know why automake # doesn't do this # automatically). top_ompi_srcdir='$(top_srcdir)/../../../../..' top_ompi_builddir='$(top_builddir)/../../../../..' AC_MSG_RESULT([in Open MPI source tree -- good]) AC_SUBST(top_ompi_srcdir) AC_SUBST(top_ompi_builddir)else AC_MSG_RESULT([not found]) AC_MSG_WARN([*** Could not find Open MPI support files]) AC_MSG_WARN([*** Can only build this version of ROMIO in an Open MPI source tree]) AC_MSG_ERROR([*** Cannot continue])fidnl# Open MPI: disable the f77 and f90 tests, as we provide our own# MPI interface and use only the C parts of ROMIONOF77=1NOF90=1ARCH=""arch_IRIX=""MPI=""MPI_INCLUDE_DIR=""ROMIO_INCLUDE=""TEST_LIBNAME=""FILE_SYSTEM=""# Do not set variables to empty that may be communicated from the# outside environment (e.g., MPI_LIB, MPI_BIN_DIR, LIBNAME)DEBUG=noMIPS=0BITS=0FROM_MPICH=${FROM_MPICH:-no}FROM_MPICH2=${FROM_MPICH2:-no}if test "$FROM_MPICH" = yes -a "$FROM_MPICH2" = yes ; then AC_MSG_WARN([Both FROM_MPICH and FROM_MPICH set to yes; at most one should be yes]) fiFROM_LAM=${FROM_LAM:-no}if test "$FROM_LAM" = 1 ; then FROM_LAM=yes ; fiCFLAGS=${CFLAGS:-""}LL="lld"AR_LOCAL=""DEFINE_HAVE_MPI_GREQUEST="#undef HAVE_MPI_GREQUEST"HAVE_MPI_INFO=""BUILD_MPI_INFO=""MPI_FINFO1=""MPI_FINFO2=""MPI_FINFO3=""MPI_FINFO4=""MPI_FARRAY1=""MPI_FARRAY2=""MPI_FARRAY3=""MPI_FARRAY4=""MPI_FARRAY5=""MPI_FARRAY6=""MPI_FARRAY7=""DEFS=""ROMIO_LFLAGS=""ROMIO_LIBLIST=""ROMIO_TCFLAGS=""ROMIO_TCPPFLAGS=""ROMIO_TFFLAGS=""NOPROFILE=0MPIRUN=""FORTRAN_TEST=""# Open MPI: This (setting make) is a Bad Thing to do in Automake-based build systems# MAKE=${MAKE:-"make"}# foll. needed for f77 test programsF77GETARG="call getarg(i,str)"F77IARGC="iargc()"F77MPIOINC=""FTESTDEFINE=""FORTRAN_MPI_OFFSET=""MPIOF_H_INCLUDED=0MPI_OFFSET_KIND1="!"MPI_OFFSET_KIND2="!"TEST_CC=""TEST_F77=""# Open MPI: don't want a profiling layer... - change weak from 1 to 0TRY_WEAK_SYMBOLS=0## Error handlers (not used with MPICH2, which provides its own routines)MPIO_EXTRA_OBJECTS="get_errh.o set_errh.o"MPIO_EXTRA_TMP_POBJECTS="get_errh.p set_errh.p"MPIO_EXTRA_REAL_POBJECTS="_get_errh.o _set_errh.o"## Completion routines for MPIO_Requests. MPI Implementations with# generalized requests do not need these# ioreq_c2f and ioreq_f2c are not MPIO_Requests; rather, they MPIO_REQOBJECTS="iotest.o iotestall.o iotestany.o iotestsome.o iowait.o iowaitall.o iowaitany.o iowaitsome.o ioreq_c2f.o ioreq_f2c.o"MPIO_REQ_TMP_POBJECTS="iotest.p iowait.p iowaitall.p iowaitany.p iotestall.p iotestany.p iowaitsome.p iotestsome.p"MPIO_REQ_REAL_POBJECTS="_iotest.o _iowait.o _iowaitall.o _iowaitany.o _iotestall.o _iotestany.o _iowaitsome.o _iotestsome.o"#have_aio=no#known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"# Open MPI: added "open_mpi_mpi"known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi open_mpi_mpi"## DefaultsAC_ARG_ENABLE(aio,[--enable-aio - Request use of asynchronous I/O routines (default)],[ if test "x$enableval" = "xno" ; then disable_aio=yes else disable_aio=no fi], disable_aio=no)AC_ARG_ENABLE(echo, [--enable-echo - Turn on strong echoing. The default is enable=no.] ,set -x)AC_ARG_ENABLE(f77,[--enable-f77 - Turn on support for Fortran 77 (default)],,enable_f77=yes)AC_ARG_ENABLE(f90,[--enable-f90 - Turn on support for Fortran 90 (default)],,enable_f90=yes)AC_ARG_ENABLE(weak-symbols,[--enable-weak-symbols - Turn on support for weak symbols],,enable_weak_symbols=yes)AC_ARG_ENABLE(debug,[--enable-debug - Build a debugging version],,)AC_ARG_WITH(file-system,[--with-file-system=name - Build with support for the named file systems],,)AC_ARG_WITH(mpi,[--with-mpi=name - Specify MPI implementation to build ROMIO for],,)dnlif test "$enable_f77" != "yes" ; then NOF77=1fiif test "$enable_f90" != "yes" ; then NOF90=1fiif test "$enable_debug" = "yes" ; then DEBUG=yesfiif test "$enable_weak_symbols" = "no" ; then TRY_WEAK_SYMBOLS=0fiMPI=$with_mpiFILE_SYSTEM=$with_file_system#dnl AC_CONFIG_AUX_DIR(../../../confdb)dnl Set the directory that contains the required install-sh, config.sub,dnl and config.guess . Make sure that these are updated (in MPICH2, usednl the top-level confdb files). This separate directory is used fordnl the moment to allow ROMIO to be separatedly distributed.dnl scripts.AC_CONFIG_AUX_DIR(confdb)# Open MPI: Init automakeAM_INIT_AUTOMAKE(io-romio, 1.0.0, 'no')## Check that an arch was set# If it wasn't set, try to guess using "util/tarch"## Sometimes tarch looses its execute bit (!)if test -s $srcdir/util/tarch -a ! -x $srcdir/util/tarch ; then chmod a+x $srcdir/util/tarchfiif test -z "$ARCH" -a -x $srcdir/util/tarch ; then AC_MSG_CHECKING(for architecture) ARCH=`$srcdir/util/tarch | sed s/-/_/g` if test -z "$ARCH" ; then AC_MSG_RESULT(Unknown!) AC_MSG_ERROR([Error: Couldn\'t guess target architecture, you must set an architecture type with the environment variable ARCH]) fi eval "arch_$ARCH=1" AC_MSG_RESULT($ARCH)fi## check for valid architecture. Use __ so that _ALPHA_ does not match# LINUX_ALPHA_#### WE SHOULD REMOVE THIS SOONgrep __"$ARCH"_ $srcdir/.config_params > /dev/null 2>&1if test $? != 0 ; then AC_MSG_WARN([Unknown architecture $arch... proceeding anyway])fi### Find the home directory if not specifiedif test "X$srcdir" != "X." -a -s $srcdir/mpi-io/Makefile.in ; then ROMIO_HOME_TRIAL=$srcdirelse # Take advantage of autoconf2 features if test -n "$ac_confdir" ; then ROMIO_HOME_TRIAL=$ac_confdir else if test -s configure ; then ROMIO_HOME_TRIAL=`pwd` else ac_confdir=`dirname "$0" 2>/dev/null` if test -n "$ac_confdir" ; then ROMIO_HOME_TRIAL=$ac_confdir fi fi fifiAC_MSG_RESULT([ROMIO home directory is $ROMIO_HOME_TRIAL])ROMIO_HOME=$ROMIO_HOME_TRIAL# get a fully qualified pathname for our build directorytop_build_dir=`pwd`# used in romioinstallAC_SUBST(top_build_dir)# Open MPI: these shouldn't be needed with AM## Create the "autoconf" style directory names...# Most of these are done for us; add the documentation directories## mandir is the root for the man pages#if test -z "$mandir" ; then mandir='${prefix}/man' ; fi#AC_SUBST(mandir)#if test -z "$docdir" ; then docdir='${prefix}/doc' ; fi#AC_SUBST(docdir)#if test -z "$htmldir" ; then htmldir='${prefix}/www' ; fi#AC_SUBST(htmldir) ## check for valid file systemif test -n "$FILE_SYSTEM" ; then # if multiple filesystems are passed in, they are '+'-delimited # we could set the IFS to tokenize FILE_SYSTEM, but the FILE_SYSTEM env var # is used in multiple places in the build system: get rid of the '+'s so we # can use the 'for x in $FILE_SYSTEM ...' idiom FILE_SYSTEM=`echo $FILE_SYSTEM|sed -e 's/\+/ /g'` for x in $FILE_SYSTEM do found=no # We could also do test -d "ad_$y" to test for known file systems # based on having access to the adio code. Then adding a file # system would not require changing configure to change known_filesystems for y in $known_filesystems ; do if test $x = $y ; then found=yes eval "file_system_`echo $x`=1" break fi done if test "$found" = "no" ; then AC_MSG_WARN([Unknown file system $x... proceeding anyway]) fi donefi## If we are building within a known MPI implementation, we must avoid the# tests about an existing implementationif test "$FROM_MPICH" != no -o "$FROM_MPICH2" != no -o "$FROM_LAM" != no ; then WITHIN_KNOWN_MPI_IMPL=yeselse WITHIN_KNOWN_MPI_IMPL=nofi# Open MPI: Make it think we're a known MPI implementationWITHIN_KNOWN_MPI_IMPL=yes# check for valid MPI implementationif test -n "$MPI" ; then found=no for mpi in $known_mpi_impls ; do if test "${MPI}_mpi" = "$mpi" ; then found=yes break fi done if test $found = no ; then AC_MSG_WARN([Unknown MPI implementation $MPI... proceeding anyway]) fifi## check for valid MPI include directory if specifiedif test $WITHIN_KNOWN_MPI_IMPL = no ; then if test -n "$MPI_INCLUDE_DIR"; then if test ! -f "$MPI_INCLUDE_DIR/mpi.h" ; then AC_MSG_ERROR([Include file $MPI_INCLUDE_DIR/mpi.h not found]) fi else# assume that mpi.h is in the default path# set MPI_INCLUDE_DIR to ".", so that it translates to -I. in the# compile command. Some compilers complain if it's only -I MPI_INCLUDE_DIR=. fielse MPI_INCLUDE_DIR=.fi## check for valid MPI library if specifiedif test $WITHIN_KNOWN_MPI_IMPL = no ; then if test -n "$MPI_LIB" ; then if test ! -f "$MPI_LIB" ; then AC_MSG_ERROR([MPI library $MPI_LIB not found]) fi fifi### Open MPI - bad for Automake#AR="${AR:-ar} cr$AR_LOCAL"# Open MPI - don't test for ranlib - use AC_PROG_RANLIB all the time#if test -z "$RANLIB" ; then AC_PROG_RANLIB#fi# Open MPI - don't set make# MAKE=${MAKE:-make}## USER_CFLAGS and USER_FFLAGS are used only in test/Makefile.inif test $DEBUG = "yes"; then USER_CFLAGS="$CFLAGS -g" USER_FFLAGS="$FFLAGS -g"else USER_CFLAGS="$CFLAGS -O" USER_FFLAGS="$FFLAGS -O"fi## Here begin the architecture-specific tests. # --------------------------------------------------------------------------# We must first select the C and Fortran compilers. Because of the # way that the PROG_CC autoconf macro works (and all of the macros that# require it, including CHECK_HEADERS), that macro must occur exactly# once in the configure.in file, at least as of autoconf 2.57 . # Unfortunately, this requirement is not enforced. To handle this,# we first case on the architecture; then use PROG_CC, then case on the# architecture again for any arch-specific features. We also set the# C_DEBUG_FLAG and F77_DEBUG_FLAG in case debugging is selected.# # For the MPICH and MPICH2 configures, the compilers will already be# selected, so most of the compiler-selection code will be bypassed.# --------------------------------------------------------------------------# For historical reasonsif test -z "$FC" ; then FC=$F77fi#C_DEBUG_FLAG="-g"F77_DEBUG_FLAG="-g"C_OPT_FLAG=${CFLAGS:-"-O"}# MPICH1 uses OPTFLAGS and OPTFLAGSC to specify separate optimization# flags for the C compiler (this is better that adding it to the# undifferentiated CFLAGS, at least on input).if test -n "$OPTFLAGS" ; then C_OPT_FLAG="$C_OPT_FLAG $OPTFLAGS"fiif test -n "$OPTFLAGSC" ; then C_OPT_FLAG="$C_OPT_FLAG $OPTFLAGSC"fi# Open MPI: ignore all setting of CC, f77, FC, etc. in this sectioncase $ARCH in solaris|solaris86) #CC=${CC:-cc} #F77=${FC:-f77} if test "$CC" != "gcc" ; then C_DEBUG_FLAG="-g -v" fi ;; rs6000) #F77=${FC} # Try to use mpcc if no CC specified #AC_PROGRAMS_CHECK(CC, mpcc, cc) #if test $NOF77 = 0 && test -z "$F77"; then # AC_PROGRAMS_CHECK(F77, mpxlf, f77) #fi ;; tflop|tflops) #CC=${CC:-pgcc} #F77=${FC:-pgf77} CFLAGS="$CFLAGS -cougar -D__PUMA" if test "$CC" = "pgcc" ; then C_OPT_FLAG="-Knoieee -Mvect -O3" fi ;; freebsd|LINUX|netbsd|openbsd|LINUX_ALPHA) #CC=${CC:-gcc} # Let the prog_f77 file g77/f77/others #F77=${FC} ;; SX4) #CC=${CC:-mpicc} #F77=${FC:-mpif90} #if test $DEBUG != "yes" ; then # USER_FFLAGS="$FFLAGS -Chopt" # F77_OPT_FLAG="-Chopt" #fi ;; hpux|sppux) C_DEBUG_FLAG="-g +w1" ;; alpha|ALPHA)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -