AC_INIT(ESPResSo, [2.9.0], address@hidden) AC_ARG_WITH(mpi,,, [with_mpi=guess]) AS_IF([test x"$with_mpi" = xno], [use_mpi_fake="yes"], [ # if MPI is wanted, look for MPI compiler AC_PROG_CC([mpicc hcc mpxlc_r mpxlc mpcc cmpicc]) # test whether MPI_Init is available now AC_CHECK_FUNC(MPI_Init,,, [ # if not, give up or use fake if test xyes = x"$with_mpi"; then AC_MSG_FAILURE([MPI compiler requested, but couldn't compile with MPI.]) else AC_MSG_WARN([No MPI compiler found, will use fake implementation!]) use_mpi_fake="yes" fi ]) ]) AS_IF([test x"$use_mpi_fake" = xyes], [ # use the fake implementation and the standard compiler AC_PROG_CC ESPRESSO_MPIEXEC="" ]) # if requested, use the fake implementation #AM_CONDITIONAL(MPI_FAKE, [test x$use_mpi_fake = xyes])