📄 configure.in
字号:
# -*- Mode: shell-script -*-# build with# autoconf --localdir=../confdb configure.in# (or wherever the confdb is)#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)dnlNOF77=0NOF90=0ARCH=""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=""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=""TRY_WEAK_SYMBOLS=1## 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"known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_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)## 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)## Create the "autoconf" style directory names...# Most of these are done for us; add the documentation directories## mandir is the root for the man pagesif test -z "$mandir" ; then mandir='${prefix}/man' ; fiAC_SUBST(mandir)if test -z "$docdir" ; then docdir='${prefix}/doc' ; fiAC_SUBST(docdir)if test -z "$htmldir" ; then htmldir='${prefix}/www' ; fiAC_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# 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##AR="${AR:-ar} cr$AR_LOCAL"if test -z "$RANLIB" ; then AC_PROG_RANLIBfiMAKE=${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"ficase $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) CC=${CC:-cc} F77=${FC:-f77} dnl CFLAGS="$CFLAGS -g -std1 -warnprotos -verbose" C_DEBUG_FLAG="-g -verbose" ;; CRAY) CC=${CC:-cc} F77=${FC:-f90} NOF77=1 CFLAGS="$CFLAGS -D_UNICOS" ;; sgi|IRIX64|IRIX32|IRIXN32) arch_IRIX=1 CC=${CC:-cc} F77=${FC:-f77} C_DEBUG_FLAG="-g -fullwarn" ;; sgi5) ;; *) # Fall-through case. Take FC F77=${FC:-f77} ;;esacAC_PROG_CCif test "$NOF77" != 1 ; then # Grrr. The autoconf test for F77 will abort the configure # if no compiler is found. We'd prefer to simply turn off # support for Fortran, and/or give a more informative message. AC_PROG_F77fiif test "$CC" = "gcc" -a -z "$C_DEBUG_FLAG" ; then C_DEBUG_FLAG="-g -O -Wall -Wstrict-prototypes -Wmissing-prototypes"fiif test $DEBUG = "yes" ; then CFLAGS="$CFLAGS $C_DEBUG_FLAG"else CFLAGS="$CFLAGS $C_OPT_FLAG"fi# ---------------------------------------------------------------------------# Here go the rest of the tests# ---------------------------------------------------------------------------if test -n "$arch_solaris" || test -n "$arch_solaris86" ; then if test -z "$MPI" ; then MPI=mpich mpi_mpich=1 fi if test $MPI = "mpich" ; then TEST_CC=mpicc TEST_F77=mpif77 else TEST_CC="$CC" TEST_F77="$F77" fi AR="ar cr"# solaris does not have l option to arfiif test -n "$arch_rs6000"; then if test -z "$MPI" ; then MPI=mpich mpi_mpich=1 fi AC_DEFINE(AIX,1,[Define for AIX])# assume long long exists. longlongsize=${longlongsize:-8} MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND" MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=8)"fi #if test -n "$arch_tflop" || test -n "$arch_tflops"; then # TFLOP_FLAGS="-cougar -D__PUMA" AR="xar cr$AR_LOCAL" RANLIB="xranlib" MPI_LIB="$MPI_LIB" if test -z "$MPI" ; then MPI=mpich mpi_mpich=1 fi if test -z "$FILE_SYSTEM" ; then file_system_ufs=1 FILE_SYSTEM="ufs" fifi#if test -n "$arch_freebsd" || test -n "$arch_LINUX" || test -n "$arch_LINUX_ALPHA" || test -n "$arch_netbsd" || test -n "$arch_openbsd" ; then if test -n "$arch_freebsd" || test -n "$arch_netbsd" || test -n "$arch_openbsd"; then longlongsize=${longlongsize:-0} # printf doesn't work properly and no integer*8 as far as I can tell fi # Find the CPP before the header check AC_PROG_CPP if test -z "$MPI" ; then MPI=mpich
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -