Hi,
there's an autoconf macro you can find at
http://autoconf-archive.cryp.to/acx_mpi.html
it might be useful to you. I prefer to use it just to test the existence of
MPI and then inside configure.ac something like (ugly):
(...)
MPI_CXXLIBS=`mpicxx --showme:link`
MPI_CXXFLAGS=`mpicxx --showme:compile`
AC_SUBST(MPI_CXXLIBS)
AC_SUBST(MPI_CXXFLAGS)
(...)
This is for C++, mind you, and then use these variables inside the
Makefile.am's which works fine for me, both for building libraries and
programs. Of course if mpicxx doesn't have the --showme you are out of luck
with this approach.
Another alternative would be to just use the macro and then define C/C++
compilers to point to the ones found by it, although I could never have it
working perfectly when I use it along with libtool.
If anyone has a better alternative, I would be glad to hear it!
Nuno
On Tuesday 05 June 2007 13:59, Lie-Quan Lee wrote:
> I am wondering if anyone has already had a way to identify openmpi in
> configure script using autoconf macro. By identifying openmpi in the
> configure, I will be able to handle those libraries. Thanks.
--
http://aeminium.org/slug/
|