Re: MPI recognition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again!

On 12/21/2010 03:16 PM, Olaf Lenz wrote:
> The problem seems to be that AC_PROG_CC doesn't work when using it in
> a conditional, is that right? Is there any simple way to do what I
> want?

After some trial and error I have found a solution for my problem that
is very simple. Now I wonder whether this is actually the correct way to
do it, or are there some hidden pitfalls?

Olaf

-- 
Dr. rer. nat. Olaf Lenz
Institut fÃr Computerphysik, Pfaffenwaldring 27, D-70569 Stuttgart
Phone: +49-711-685-63607
AC_INIT(ESPResSo, [2.9.0], [espressomd-users@xxxxxxxxxx])

AC_ARG_WITH(mpi,,, [with_mpi=guess])
if test x"$with_mpi" != xno; then
  COMPILERS="mpicc hcc mpxlc_r mpxlc mpcc cmpicc gcc cc"
else
  COMPILERS="gcc cc"
fi
AC_PROG_CC($COMPILERS)

AS_IF([test x"$with_mpi" != xno], [
  # 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
  ])
])

# if requested, use the fake implementation
#AM_CONDITIONAL(MPI_FAKE, [test x$use_mpi_fake = xyes])
begin:vcard
fn:Olaf Lenz
n:Lenz;Olaf
org;quoted-printable;quoted-printable:Universit=C3=A4t Stuttgart;Institut f=C3=BCr Computerphysik
adr:;;Pfaffenwaldring 27;Stuttgart;;70569;Germany
email;internet:olenz@xxxxxxxxxxxxxxxxxxxx
title:Dr. rer. nat.
tel;work:+49.711.685.63607
tel;fax:+49.711.685.63658 
url:http://www.icp.uni-stuttgart.de/~icp/Olaf_Lenz
version:2.1
end:vcard

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux