dnl dnl CCAFE_EXTRACT_VAR( VARNAME, INPUT-FILE, INPUT-VARNAME, [ DEFAULT-VALUE ] ) dnl grep for lines of form INPUT-VARNAME = rest of line dnl and set VARNAME to be the value found. dnl If var is not found and default-value is supplied, var takes that value. dnl misfeatures: follows the autoconf convention that there should not dnl be sideeffects perpetrated on the output files -- only variables get dnl defined. AC_DEFUN(CCAFE_EXTRACT_VAR, [ AC_MSG_CHECKING([$2 for $3]) cevDefault= cev1=`grep "^$3 " $2` if test -z "$cev1"; then cev1=`grep "^$3 " $2` fi if test -z "$cev1"; then cev1=`grep "^$3=" $2` fi changequote(, )dnl cev2=`echo "$cev1" | sed 's/^[[:alnum:],[:space:],_,-,.]*=//'` cev3=`echo "$cev2" | sed 's/^[[:space:]]*//'` changequote([, ])dnl if test -z "$cev3" ; then ifelse([$4], , : , [ cev3="$4" ]) fi if test -z "$cev3" ; then AC_MSG_RESULT(no) else [$1]=$cev3 AC_MSG_RESULT([$cev3]) fi ] ) dnl dnl CCAFE_ENV_CHECK( VAR, [MESSAGE-IF-FOUND], [MESSAGE-IF-NOT-FOUND] ) dnl checks that VARNAME is or isn't defined. dnl When no MESSAGE-IFs are supplied, defaults to printing yes/no. dnl Side-effects: none, other than message output. dnl internally used variables are all prefixed cec_. dnl Internal variables (less prefix): dnl yes, no, var_eval, var_val, empty_eval, empty_test, there. dnl on normal completion: dnl cec_there == 1 if the variable is set (includes empty value) dnl cec_there == 0 if not set. dnl Bugs: dnl This macro would be 3 lines if we could assume bash syntax is portable. dnl It even works when checking for environment variables with the dnl value cec_not_there. AC_DEFUN(CCAFE_ENV_CHECK, [ if test -z "$1"; then AC_MSG_RESULT(CCAFE env_check called with empty VAR argument) else AC_MSG_CHECKING(environment for $1) # build a line which echos the name in $1 # get the value of that var cec_var_eval="echo $"`echo $1` cec_var_val=`eval $cec_var_eval` if test -z "$cec_var_val" ; then # either its there, not there or 0 len # 0 len may be meaningful so we need to distinguish. # at this point we don't need to worry about overwriting its value # temporarily since it's at most empty. cec_empty_eval="echo \${"`echo $1`"-cec_not_there}" cec_empty_test=`eval $cec_empty_eval` if test "X$cec_empty_test" = "Xcec_not_there" ; then cec_there=0 else cec_there=1 fi else cec_there=1 fi cec_yes=yes cec_no=no ifelse([$2], , : , [cec_yes="$2"]) ifelse([$3], , : , [cec_no="$3"]) if test $cec_there -eq 1 ; then AC_MSG_RESULT($cec_yes) else AC_MSG_RESULT($cec_no) fi fi ] ) dnl CCAFE_PATH_TO_FILE(VARIABLE, TEST_FILES, PATH, dnl [ RUN_IF_FOUND, [RUN_IF_NOT_FOUND) dnl Test for the presence of file(s) (TEST_FILES) in the given colon dnl separated list of directory paths (PATH). If all of the files for a dnl given path element are present, it sets VARIABLE to the matching PATH dnl element and calls AC_SUBST on it. The files appear in TEST_FILES as a dnl space separated list. The last two arguments are run if a path to the dnl files is found or not found respectively. AC_DEFUN(CCAFE_PATH_TO_FILE, [ var="$1" testFiles="$2" path="$3" result=_searching paths=`echo $path|tr ":" " "` for chome in $paths ; do for testFile in $testFiles ; do if ! test -f $chome/$testFile ; then result=_searching break fi result=$chome done if test "$result" = "$chome" ; then $1=$result if test -n '$4' ; then # if found $4 fi # echo " found: $result" break; fi done if test "$result" = _searching ; then if test -n '$5' ; then #if not found $5 fi fi ] ) AC_DEFUN(CCAFE_CHECK_BOOST, [ #-------------------------------------------------------------------- # See if we can find Boost # side effects: # BOOST_ROOT becomes defined if boost found or "" if not. # AC_SUBST for BOOST_ROOT is not a side effect, per autoconf macro # guidelines. #-------------------------------------------------------------------- AC_ARG_WITH(boost, [ --with-boost=BOOST_ROOT The full path to the BOOST install dir.], , [with_boost=yes] ) case $with_boost in no) # can't live without BOOST BOOST_ROOT=no AC_MSG_RESULT(BOOST disabled.) ;; yes) # The user didn't give the --with-boost # option or didn't give the library's location. # If that fails, disable and print a warning. BOOST_ROOT="yes" ;; *) # The user gave us --with-boost=BOOST_ROOT, use that as the # location of the BOOST library. BOOST_ROOT="$with_boost" AC_MSG_RESULT(BOOST root given.) ;; esac # test for success ccafe_boost_dirs="/usr/local:/usr/local/include:/usr/include:$HOME:$HOME/include" if test "$BOOST_ROOT" = "yes" ; then BOOST_ROOT="" AC_MSG_CHECKING([BOOST smart pointers]) CCAFE_PATH_TO_FILE(BOOST_ROOT, boost/shared_ptr.hpp, "$ccafe_boost_dirs", AC_MSG_RESULT([BOOST root dir found.]), [BOOST_ROOT=no]) fi ] ) #------------------------------------------------------------------------------ # NEOCCA_ROOT: See if the user gave us the location of cca-spec # then search $ccatut_cca_spec_dirs. # One of these directories must be # present and contain the correct files, or else the user # must give the directory that contains the correct files. # # buggy. needs to deal with package version ala babel. #------------------------------------------------------------------------------ # cca spec (must contain java and cxx binding subdirs) AC_DEFUN(NEOCLASSIC_SPEC_CCA, [ ccatut_cca_spec_dirs=" $prefix/cca-spec-neo $CCATUT_HOME/cca-spec-neo $TOP/cca-spec-neo $CURRDIR_PARENT/cca-spec-neo $CURRDIR_GRANDPARENT/cca-spec-neo $CURRDIR_GREATGRANDPARENT/cca-spec-neo $CURRDIR_ANCESTOR/cca-spec-neo /home/alice/CCA/cca-spec-neo $HOME/cca-spec-neo $HOME/cca/cca-spec-neo /usr/local/cca-spec-neo $prefix/cca /usr/local/cca $HOME/cca " AC_ARG_WITH(neo, [Location of neoclassic: --with-neo=SPEC_ROOT The prefix used when installing cca-spec-neo Give the full path: --with-neo='/usr/local/cca-spec-neo' or check out the spec from cvs in a directory next to CCAFFEINE. ] , , [with_neo=no]) case "$with_neo" in no) # lUser input error with_neo=_searching ;; yes) # User didn't give the option or didn't give useful # information, search for it ourselves with_neo=_searching ;; *) NEOCCA_ROOT="$with_neo" ;; esac if test "$with_neo" = _searching ; then AC_MSG_CHECKING([for REQUIRED cca-spec-neo]) for chome in $ccatut_cca_spec_dirs ; do if test -d $chome ; then with_neo=$chome AC_MSG_RESULT([found $chome.]) break fi done fi if test "$with_neo" = _searching ; then AC_MSG_RESULT([Cannot find CCA specification root directory.]) AC_MSG_ERROR([Please install it and/or use --with-cca=CCA_ROOT.]) fi if test ! -f "$with_neo/include/neocca.h" ; then AC_MSG_RESULT([No include/neocca.h in $with_neo.]) AC_MSG_ERROR([Please install a correct neoclassic specification directory.]) fi NEOCCA_INSTALL_ROOT="$with_cca" AC_SUBST(NEOCCA_INSTALL_ROOT) ] ) dnl ##################################################### dnl big pile of cruft for mpi. dnl ##################################################### AC_DEFUN(NEO_CHECK_MPI, [ # places to look ccafe_mpich_dirs=" $MPI_HOME $CCAFE_PARENT/mpi $CCAFE_ANCESTOR/mpi $CCAFE_PARENT/mpich $CCAFE_ANCESTOR/mpich $prefix/cca $prefix/mpich $prefix/mpi $HOME/mpich /usr/local/mpich /usr/local/mpi " # c++ compiler wrappers ccafe_mpicxx_bins=" mpCC mpicxx mpiCC " # c compiler wrappers ccafe_mpicc_bins=" mpcc mpicc " AC_ARG_WITH(mpi, [Location of mpi: --with-mpi=MPI_HOME The location of mpi 1.2 compatible mpi. Give the full path: --with-mpi='/share/bizarre/mpich-1.2.2,3' ], , [with_mpi=yes]) case "$with_mpi" in no) ccafe_have_mpi=no ;; yes) with_mpi=_searching ;; *) MPI="$with_mpi" ;; esac if test "$with_mpi" = _searching ; then ccafe_have_mpi=no AC_MSG_CHECKING([for mpi]) for mhome in $ccafe_mpich_dirs ; do echo checking for mpi in $mhome ... if test -x $mhome/bin/mpirun; then MPI=$mhome MPIRUN=$MPI/bin/mpirun MPI_ARCH=`$mhome/bin/tarch` AC_MSG_RESULT([$mhome ($MPI_ARCH) found.]) ccafe_have_mpi=yes break fi done if test -z "$MPI" ; then ccafe_have_mpi=no AC_MSG_RESULT([mpi not found. mpi-based interfaces disabled. --with-mpi=/path/of/mpi to enable them. See configure --help for additional mpi options management.]) fi fi # we think we have something. check that it runs # and if not, sigh and go to folklore. if test ! "X$ccafe_have_mpi" = Xno ; then if test -x $MPI/bin/mpirun ; then MPIRUN=$MPI/bin/mpirun else MPIRUN=broken AC_MSG_WARN([mpirun executable not found. Specify using --with-mpi-run.]) fi if test -x $MPI/bin/tarch ; then MPI_ARCH=`$MPI/bin/tarch` else MPI_ARCH="Set_MPI_ARCH_in_Makefile.Vars_manually" AC_MSG_WARN([tarch executable not found. Specify using --with-mpi-arch.]) fi if test -x $MPI/bin/mpicc ; then AC_MSG_CHECKING([mpicc]) $MPI/bin/mpicc -o config.cpi.exe config/cpi.c if test -x config.cpi.exe ; then AC_MSG_RESULT(yes) MPICC=$MPI/bin/mpicc else MPICC=broken BROKEN_MPICC=$MPI/bin/mpicc AC_MSG_RESULT(broken.) AC_MSG_WARN([mpicc found appears broken. Override using --with-mpi-cc=path.]) fi rm -f config.cpi.exe cpi.o fi if test -x $MPI/bin/mpiCC ; then AC_MSG_CHECKING([mpiCC]) $MPI/bin/mpiCC -o config.cppi.exe config/cpi.cpp if test -x config.cppi.exe ; then AC_MSG_RESULT(yes) MPICXX=$MPI/bin/mpiCC else MPICXX=broken BROKEN_MPICXX=$MPI/bin/mpiCC AC_MSG_RESULT(broken.) AC_MSG_WARN([mpiCC found appears broken. Override using --with-mpi-cxx=path.]) fi rm -f config.cppi.exe cpi.o fi MPI_HOME=$MPI if test -d $MPI/include ; then MPI_INC=-I$MPI/include fi if test -d $MPI/bin ; then MPI_BIN=$MPI/bin if test -x $MPI/bin/mpif77 ; then MPIF77=$MPI/bin/mpif77 fi if test -x $MPI/bin/mpif90 ; then MPIF90=$MPI/bin/mpif90 fi fi fi # hack around mpich 1.2.4 pmpich library bug if test -s "$MPI/lib/libmpich.a" ; then MPI_LIBDIR="$MPI/lib" MPILIB="$MPI/lib/libmpich.a" if test -s "$MPI_LIBDIR/libpmpich.a" ; then MPILIB="$MPILIB $MPI_LIBDIR/libpmpich.a" MPILIB="$MPILIB $MPILIB" fi fi # guess out the darned .so for rob if test -s "$MPI_LIBDIR/libmpi.so"; then MPI_SO_LIBDIR="$MPI_SO_LIBDIR" MPILD_SO_FLAGS="$MPI_LIBDIR/libmpi.so"; fi if test -s "$MPI_LIBDIR/libmpich.so"; then MPI_SO_LIBDIR="$MPI_SO_LIBDIR" MPILD_SO_FLAGS="$MPI_LIBDIR/libmpich.so"; fi if test -s "$MPI_LIBDIR/shared/libmpi.so"; then MPI_SO_LIBDIR="$MPI_SO_LIBDIR/shared" MPILD_SO_FLAGS="$MPI_LIBDIR/shared/libmpi.so"; fi if test -s "$MPI_LIBDIR/shared/libmpich.so"; then MPI_SO_LIBDIR="$MPI_SO_LIBDIR/shared" MPILD_SO_FLAGS="$MPI_LIBDIR/shared/libmpich.so"; fi if test -s "$MPI_LIBDIR/shared/libmpich.so"; then MPI_SO_LIBDIR="$MPI_SO_LIBDIR/shared" MPILD_SO_FLAGS="$MPI_LIBDIR/shared/libmpich.so"; fi MPI_STATIC_LIBS=$MPILIB MPI_SO_LIBS=$MPILD_SO_FLAGS # overrides after all our guessing junk # aux mpi switches # --with-mpi-mpd # --with-mpi-arch= # --with-mpi-bin= # --with-mpi-inc= # # --with-mpi-cc= # --with-mpi-cxx= # --with-mpi-f77= # --with-mpi-f90= # --with-mpi-run= # --with-mpi-prerun= #-------------------------------------------------------------------- # mpi mpd flag for launchscripts. #-------------------------------------------------------------------- AC_ARG_WITH(mpi-mpd, [ Machine is mpich mpd: --with-mpi-mpd ], , [with_mpi_mpd=no]) case "$with_mpi_mpd" in no) MPI_IS_MPD=0 AC_MSG_RESULT([checking mpi is mpd ... nope.]) ;; yes) MPI_IS_MPD=1 AC_MSG_RESULT([checking mpi is mpd ... mpi mpd specified.]) ;; *) MPI_IS_MPD=0 AC_MSG_ERROR([Option --with-mpi-mpd=$with_mpi_arch: value is yes/no only.]) ;; esac #-------------------------------------------------------------------- # mpi arch override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-arch, [ === The following options override those guessed based on --with-mpi, if given. === Try specifying them if the defaults don't work for your mpi. Likely needed === if you are not using mpich. Machine architecture of mpi: --with-mpi-arch=MPI_ARCH The \$ARCH value for mpi. --with-mpi-arch='LINUX' ], , [with_mpi_arch=no]) case "$with_mpi_arch" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-arch=yes': yes not a valid arch value.]) ;; *) MPI_ARCH="$with_mpi_arch" ;; esac #-------------------------------------------------------------------- # mpi includes override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-inc, [Special -I flags to get mpi headers when not using mpicc/mpiCC: --with-mpi-inc="MPI_INCLUDES" The flags for mpi includes in c/c++. e,g, --with-mpi-inc='-I/usr/local/include/mpich-ver' Others, like avoiding a broken c++ binding header: '-I\$MPI/include -I\$MPI/build/\$ARCH/\$DEVICE/include' ], , [with_mpi_inc=no]) case "$with_mpi_inc" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-inc=yes': yes not a valid value.]) ;; *) MPI_INC="$with_mpi_inc" ;; esac #-------------------------------------------------------------------- # mpi bin override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-bin, [Location of mpi bin directory: --with-mpi-bin=/path/to/bin/mpi* The full path to the bin/ for mpi-related programs. --with-mpi-bin='/usr/local/mpich-ver/bin' ], , [with_mpi_bin=no]) case "$with_mpi_bin" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-bin=yes': yes not a valid path value.]) ;; *) if test -x "$with_mpi_bin"/mpicc ; then MPICC="$with_mpi_bin"/mpicc else AC_MSG_WARN([Option '--with-mpi-bin: given bin contains no mpicc.]) fi if test -x "$with_mpi_bin"/mpiCC ; then MPICXX="$with_mpi_bin"/mpiCC else AC_MSG_WARN([Option '--with-mpi-bin: given bin contains no mpiCC.]) fi if test -x "$with_mpi_bin"/mpirun ; then MPIRUN="$with_mpi_bin"/mpirun else AC_MSG_WARN([Option '--with-mpi-bin: given bin contains no mpirun.]) fi if test -x "$with_mpi_bin"/mpif77 ; then MPIF77="$with_mpi_bin"/mpif77 else AC_MSG_WARN([Option '--with-mpi-bin: given bin contains no mpif77.]) fi if test -x "$with_mpi_bin"/mpif90 ; then MPIF90="$with_mpi_bin"/mpif90 else AC_MSG_WARN([Option '--with-mpi-bin: given bin contains no mpif90.]) fi ;; esac #-------------------------------------------------------------------- # mpif77 override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-f77, [ == The following mpi switches override defaults computed from --with-mpi == or --with-mpi-bin. Location of special mpif77 to use --with-mpi-f77=MPIF77 The full path to mpif77, if not in normal mpi bin/ dir. --with-mpi-f77=/usr/local/bin/odd/mpif77 ], , [with_mpi_f77=no]) case "$with_mpi_f77" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-f77=yes': yes not a valid compiler.]) ;; *) MPIF77="$with_mpi_f77" ;; esac #-------------------------------------------------------------------- # mpif90 override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-f90, [Location of special mpif90 to use --with-mpi-f90=MPIF90 The full path to mpif90, if not in normal mpi bin/ dir. --with-mpi-f90=/usr/local/bin/odd/mpif90 ], , [with_mpi_f90=no]) case "$with_mpi_f90" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-f90=yes': yes not a valid compiler.]) ;; *) MPIF90="$with_mpi_f90" ;; esac #-------------------------------------------------------------------- # mpicxx override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-cxx, [Location of special mpiCC to use --with-mpi-cxx=MPICXX The full path to mpiCC, if not in normal mpi bin/ dir. --with-mpi-cxx=/usr/local/bin/odd/mpiCC ], , [with_mpi_cxx=no]) case "$with_mpi_cxx" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-cxx=yes': yes not a valid compiler.]) ;; *) MPICXX="$with_mpi_cxx" ;; esac #-------------------------------------------------------------------- # mpicc override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-cc, [Location of special mpicc to use --with-mpi-cc=MPICC The full path to mpicc, if not in normal mpi bin/ dir. --with-mpi-cc=/usr/local/bin/odd/mpicc ], , [with_mpi_cc=no]) case "$with_mpi_cc" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-cc=yes': yes not a valid compiler.]) ;; *) MPICC="$with_mpi_cc" ;; esac #-------------------------------------------------------------------- # mpirun override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-run, [Location of special mpirun to use --with-mpi-run=MPIRUN The full path to mpirun if not in normal mpi bin/ dir. --with-mpi-run=/usr/local/bin/odd-mpirun Also used to specify mpiexec or other batch launches], , [with_mpi_run=no]) case "$with_mpi_run" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-run=yes': yes not a valid launcher.]) ;; *) MPIRUN="$with_mpi_run" ;; esac #-------------------------------------------------------------------- # mpiprerun override #-------------------------------------------------------------------- AC_ARG_WITH(mpi-prerun, [Location of special mpirun to use --with-mpi-prerun=MPIPRERUN The full path to prep script to launch before mpirun. --with-mpi-prerun=/usr/local/bin/start-parallel Used to specify mpd or other user-daemon launches], , [with_mpi_prerun=no]) case "$with_mpi_prerun" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-prerun=yes': yes not a valid launcher.]) ;; *) MPIPRERUN="$with_mpi_prerun" ;; esac # no-wrapper flags # --with-mpi-lib-static= # --with-mpi-lib-dynamic= # --with-mpi-ldflags-static= # --with-mpi-ldflags-dynamic= # --with-mpi-cflags= # --with-mpi-fflags= # --with-mpi-cxxflags= #-------------------------------------------------------------------- # mpi-lib-static #-------------------------------------------------------------------- AC_ARG_WITH(mpi-lib-static, [ == The following mpi switches override miscellaneous folklore used == when trying to build an mpi program without using the compiler == wrappers mpicc/mpiCC. Sometimes wrapper-avoidance is necessary == for complicated, multi-language driver linkage or for working == around broken compiler wrappers. Libraries for linking mpi statically --with-mpi-lib-static=MPI_STATIC_LIBS The full paths of libraries needed, e.g. --with-mpi-lib-static='/lib/libmpi.a /lib/libpmpi.a' ], , [with_mpi_lib_static=no]) case "$with_mpi_lib_static" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-lib-static=yes': yes not a valid link item.]) ;; *) MPI_STATIC_LIBS="$with_mpi_lib_static" MPILIB="$with_mpi_lib_static" ;; esac #-------------------------------------------------------------------- # mpi-lib-dynamic #-------------------------------------------------------------------- AC_ARG_WITH(mpi-lib-dynamic, [Libraries for linking mpi dynamically --with-mpi-lib-dynamic=MPI_SO_LIBS The full paths of libraries needed, e.g. --with-mpi-lib-dynamic='/lib/libmpi.so /lib/libpmpi.so' or something like '-L/usr/local/mpi/lib/solaris/ch_p4 -lmpi -L/opt/SUNWspro/SC4.2/lib /usr/local/lib/liblapack.a /usr/local/lib/libblas.a -lnsl -lsocket -lM77 -lF77 -lsunmath' ], , [with_mpi_lib_dynamic=no]) case "$with_mpi_lib_dynamic" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-lib-dynamic=yes': yes not a valid link item.]) ;; *) MPI_SO_LIBS="$with_mpi_lib_dynamic" ;; esac #-------------------------------------------------------------------- # mpi-ldflags-dynamic #-------------------------------------------------------------------- AC_ARG_WITH(mpi-ldflags-dynamic, [LD_FLAGS for linking mpi dynamically, other than the libraries --with-mpi-ldflags-dynamic=MPI_SO_LDFLAGS The flags to appear in the link line well before libraries. ], , [with_mpi_ldflags_dynamic=no]) case "$with_mpi_ldflags_dynamic" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-ldflags-dynamic=yes': yes not a valid flag.]) ;; *) MPI_SO_LDFLAGS="$with_mpi_ldflags_dynamic" ;; esac #-------------------------------------------------------------------- # mpi-ldflags-static #-------------------------------------------------------------------- AC_ARG_WITH(mpi-ldflags-static, [LD_FLAGS for linking mpi statically, other than the libraries --with-mpi-ldflags-static=MPI_STATIC_LDFLAGS The flags to appear in the link line well before libraries. ], , [with_mpi_ldflags_static=no]) case "$with_mpi_ldflags_static" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-ldflags-static=yes': yes not a valid flag.]) ;; *) MPI_STATIC_LDFLAGS="$with_mpi_ldflags_static" ;; esac #-------------------------------------------------------------------- # mpi-cflags #-------------------------------------------------------------------- AC_ARG_WITH(mpi-cflags, [Additional CFLAGS for compiling C with mpi.h but no mpicc wrapper. --with-mpi-cflags=MPI_CFLAGS ], , [with_mpi_cflags=no]) case "$with_mpi_cflags" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-cflags=yes': yes not a valid flag.]) ;; *) MPI_CFLAGS="$with_mpi_cflags" ;; esac #-------------------------------------------------------------------- # mpi-fflags #-------------------------------------------------------------------- AC_ARG_WITH(mpi-fflags, [Additional FFLAGS for compiling FORTRAN without mpif* --with-mpi-fflags=MPI_FFLAGS ], , [with_mpi_fflags=no]) case "$with_mpi_fflags" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-fflags=yes': yes not a valid flag.]) ;; *) MPI_FFLAGS="$with_mpi_fflags" ;; esac #-------------------------------------------------------------------- # mpi-cxxflags -- this needs to be the last mpi thing so that # the comment appearing in configure --help is correct. #-------------------------------------------------------------------- AC_ARG_WITH(mpi-cxxflags, [Additional CXXFLAGS for compiling C++ with mpi but no mpiCC wrapper. --with-mpi-cxxflags=MPI_CXXFLAGS === end of mpi-related switches. ===], , [with_mpi_cxxflags=no]) case "$with_mpi_cxxflags" in no) # so nothing ;; yes) AC_MSG_WARN([Option '--with-mpi-cxxflags=yes': yes not a valid flag.]) ;; *) MPI_CXXFLAGS="$with_mpi_cxxflags" ;; esac if test "${ccafe_have_mpi}" = "no"; then USEMPI=0 MPI_TARGET="" AC_MSG_WARN([Configured without MPI. Hope that is what you meant. See configure --help for other mpi switches if it is not what you meant.]) else AC_MSG_RESULT([Configured with MPI. 'grep MPI neo/src/varlist' for details.]) USEMPI=1 MPI_TARGET=mpi fi AC_SUBST(USEMPI) AC_SUBST(MPI_TARGET) AC_SUBST(MPI) AC_SUBST(MPI_IS_MPD) AC_SUBST(MPIRUN) AC_SUBST(MPIPRERUN) AC_SUBST(MPIF77) AC_SUBST(MPIF90) AC_SUBST(MPICC) AC_SUBST(MPICXX) AC_SUBST(MPI_ARCH) AC_SUBST(MPI_HOME) AC_SUBST(MPI_INC) AC_SUBST(MPI_BIN) AC_SUBST(MPI_STATIC_LIBS) AC_SUBST(MPI_STATIC_LDFLAGS) AC_SUBST(MPI_SO_LIBS) AC_SUBST(MPI_SO_LDFLAGS) AC_SUBST(MPI_CFLAGS) AC_SUBST(MPI_FFLAGS) AC_SUBST(MPI_CXXFLAGS) ] ) builtin(include,config/ccafe_xml2.m4) builtin(include,config/shlib.m4) builtin(include,config/ccafe_prefix.m4) builtin(include,config/ccafe_config_args.m4) builtin(include,config/cca_bundle_tag.m4) builtin(include,config/ccafe_babellibtool.m4)