|
From: <sv...@va...> - 2006-03-12 18:29:22
|
Author: sewardj
Date: 2006-03-12 18:29:18 +0000 (Sun, 12 Mar 2006)
New Revision: 5761
Log:
When testing 'mpicc', try at least somewhat to test for the primary
target, as that is what it will be used to compile for.
Modified:
trunk/configure.in
Modified: trunk/configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/configure.in 2006-03-12 17:27:44 UTC (rev 5760)
+++ trunk/configure.in 2006-03-12 18:29:18 UTC (rev 5761)
@@ -617,8 +617,20 @@
AC_CHECK_FUNCS([floor memchr memset mkdir strchr strdup strpbrk strrchr =
strstr semtimedop])
=20
=20
-# Do we have a useable MPI setup (mpicc, and suitable MPI2 headers?)
+# Do we have a useable MPI setup on the primary target
+# (mpicc, and suitable MPI2 headers?)
+# Note: this is a kludge in that it assumes the specified mpicc=20
+# understands '-m32' or '-m64', as established above
MPI_CC=3D"mpicc"
+mflag_primary=3D
+if test x$VG_PLATFORM_PRI =3D xX86_LINUX \
+ -o x$VG_PLATFORM_PRI =3D xPPC32_LINUX ; then
+ mflag_primary=3D$FLAG_M32
+elif test x$VG_PLATFORM_PRI =3D xAMD64_LINUX \
+ -o x$VG_PLATFORM_PRI =3D xPPC64_LINUX ; then
+ mflag_primary=3D$FLAG_M64
+fi
+
AC_ARG_WITH(mpicc,
[ --with-mpicc=3D Specify name of MPI2-ised C compiler],
MPI_CC=3D$withval
@@ -627,7 +639,7 @@
saved_CC=3D$CC
saved_CFLAGS=3D$CFLAGS
CC=3D$MPI_CC
-CFLAGS=3D
+CFLAGS=3D$mflag_primary
AC_TRY_LINK([
#include <mpi.h>
#include <stdio.h>
|