Skip to content
Snippets Groups Projects
alugrid_serial_parallel.m4 1.6 KiB
Newer Older
# check wether ALUGrid can be used for serial and for parallel compilation 

AC_DEFUN([ALUGRID_SERIAL_PARALLEL],[
  # implicitly sets the HAVE_MPI-define and the MPICXX-substitution
  # if MPI was found yes is returned 
  CHECK_MPI([with_mpi="yes"])
  
  LD=$CXX
  AC_ARG_VAR(LD,[linker program])
  AC_SUBST(LD)
  ALUGRID_INC_FLAG_PARA="-I./src -I./src/serial -I./src/parallel -I./src/duneinterface"
  CXXFLAGS="$CPPFLAGS $ALUGRID_INC_FLAG_PARA"
  CPPFLAGS="$CPPFLAGS $ALUGRID_INC_FLAG_PARA"
  AC_CHECK_HEADER([alugrid_serial.h],[with_serial="yes"],
    AC_MSG_WARN([alugrid_serial.h could not be found or compiled!]) 
Robert Klöfkorn's avatar
Robert Klöfkorn committed
    with_parallel="serial"
    if test "x$with_mpi" = "xyes"; then 
    AC_CHECK_HEADER([alugrid_parallel.h],[with_parallel="parallel"],
      AC_MSG_WARN([alugrid_parallel.h could not be found or compiled! 
      Maybe you should rerun configure with the parameter CXX=$MPICXX 
      instead the choosen way! See the README file for more 
      information on compilers!]) 
    else 
      AC_MSG_WARN([MPI not found, not checking alugrid_parallel.h!]) 
    fi
  AC_MSG_CHECKING([for which type of run mode ALUGrid can be used])
  AM_CONDITIONAL(MPI, test x$with_parallel = xparallel)