Index: ompi/mpi/cxx/Makefile.am
===================================================================
--- ompi/mpi/cxx/Makefile.am	(revision 18997)
+++ ompi/mpi/cxx/Makefile.am	(working copy)
@@ -42,6 +42,8 @@
 	file.cc
 endif

+libmpi_cxx_la_LIBADD = $(top_builddir)/ompi/libmpi.la
+
 headers = \
 	mpicxx.h \
         constants.h \
Index: ompi/mpi/f77/Makefile.am
===================================================================
--- ompi/mpi/f77/Makefile.am	(revision 18997)
+++ ompi/mpi/f77/Makefile.am	(working copy)
@@ -46,7 +46,7 @@
 #

 lib_LTLIBRARIES =
-libmpi_f77_la_LIBADD =
+libmpi_f77_la_LIBADD = $(top_builddir)/ompi/libmpi.la
 noinst_LTLIBRARIES =

 # Are we building the F77 bindings at all?
@@ -59,22 +59,7 @@
 # directory?
 if WANT_PMPI_F77_BINDINGS_LAYER
 libmpi_f77_la_LIBADD += profile/libmpi_f77_pmpi.la
-else
-# Is this else conditional really necessary?  There *used* to be an AM
-# bug that forced this; is it still there?  (there is no harm in
-# having this extra statement; I just don't know if it's *necessary*
-# anymore)
-libmpi_f77_la_LIBADD += 
 endif
-
-else
-
-# No, we are not building the F77 bindings at all.  Ditto on the
-# comment above about whether we really need these statements or
-# not...
-lib_LTLIBRARIES +=
-libmpi_f77_la_LIBADD += 
-noinst_LTLIBRARIES +=
 endif

 headers = \
Index: ompi/mpi/f90/Makefile.am
===================================================================
--- ompi/mpi/f90/Makefile.am	(revision 18997)
+++ ompi/mpi/f90/Makefile.am	(working copy)
@@ -143,6 +143,8 @@
      conversion_fn_null-f90-interface.h \
      mpi.f90

+libmpi_f90_la_LIBADD = $(top_builddir)/ompi/libmpi.la
+
 # These files are all generated by scripts in the scripts/ directory.

 trivial_sources = \
