Fix 274078  improved configure logic for mpicc

Patch from Dave Goodell.
See bug 274078 for detailed patch description.

Tested on deb6/amd64 with a static MPI (now it will be ignored
rather than make the Valgrind build failing), with a shared MPI,
and with no MPI.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12567 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/mpi/Makefile.am b/mpi/Makefile.am
index c96701f..709c0a4 100644
--- a/mpi/Makefile.am
+++ b/mpi/Makefile.am
@@ -31,15 +31,14 @@
 endif
 
 
+## NOTE: this logic, the AM_FLAG_M3264_ logic in ../Makefile.all.am, and the
+## mflag_primary/mflag_secondary logic in ../configure.in unfortunately all need
+## to be kept in sync with each other
 if VGCONF_OS_IS_LINUX
- CFLAGS_MPI  = -g -O -fno-omit-frame-pointer -Wall -fpic
- LDFLAGS_MPI = -fpic -shared
  MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI)
  MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC)
 endif
 if VGCONF_OS_IS_DARWIN
- CFLAGS_MPI  = -g -O -fno-omit-frame-pointer -Wall -dynamic
- LDFLAGS_MPI = -dynamic -dynamiclib -all_load
  MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI)
  MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC)
 endif