From a422d98532caa0c95315985748c763b926cd5f95 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 15 Jan 2004 03:45:01 +0000 Subject: [PATCH] Fix bug 650: use general macros $(LIBLAM_LA) and $(LIBMPI_LA) to link to relative libraries -- need these to be variables because configure may decide to compile them both as libmpi (and therefore there is no libmpi). Correct usage is to use *ONE* of these two macros when adding it to LIBADD lines in Makefile.am's -- if you use $(LIBMPI_LA), it will automatically include liblam if it needs it. This commit was SVN r400. --- config/lam_configure_options.m4 | 6 ++++++ src/mca/lam/oob/cofs/Makefile.am | 2 +- src/mca/lam/pcm/cofs/Makefile.am | 2 +- src/mca/lam/registry/cofs/Makefile.am | 2 +- src/mca/mpi/coll/basic/Makefile.am | 3 +-- src/mca/mpi/pml/teg/Makefile.am | 2 +- src/mca/mpi/ptl/tcp/Makefile.am | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/config/lam_configure_options.m4 b/config/lam_configure_options.m4 index cac6c2a606..925a4c68e7 100644 --- a/config/lam_configure_options.m4 +++ b/config/lam_configure_options.m4 @@ -165,10 +165,16 @@ AC_ARG_ENABLE(single-lib, if test "$enable_single_lib" != "yes"; then AC_MSG_RESULT([no]) WANT_SINGLE_MPI_LIBRARY=0 + LIBLAM_LA='$(top_builddir)/src/lam/liblam.la' + LIBMPI_LA='$(top_builddir)/src/mpi/libmpi.la'" $LIBLAM_LA" else AC_MSG_RESULT([yes]) WANT_SINGLE_MPI_LIBRARY=1 + LIBLAM_LA='$(top_builddir)/src/libmpi.la' + LIBMPI_LA="$LIBLAM_LA" fi +AC_SUBST(LIBLAM_LA) +AC_SUBST(LIBMPI_LA) AM_CONDITIONAL(WANT_SINGLE_MPI_LIBRARY, test "$WANT_SINGLE_MPI_LIBRARY" = 1) # diff --git a/src/mca/lam/oob/cofs/Makefile.am b/src/mca/lam/oob/cofs/Makefile.am index 5e5c0d88ff..22836e3fdb 100644 --- a/src/mca/lam/oob/cofs/Makefile.am +++ b/src/mca/lam/oob/cofs/Makefile.am @@ -29,7 +29,7 @@ mcamodule_LTLIBRARIES = $(module_install) mca_oob_cofs_la_SOURCES = mca_oob_cofs_la_LIBADD = \ src/libmca_oob_cofs.la \ - $(top_lam_builddir)/src/lam/liblam.la + $(LIBLAM_LA) mca_oob_cofs_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/lam/pcm/cofs/Makefile.am b/src/mca/lam/pcm/cofs/Makefile.am index af82673d4b..e452e2612a 100644 --- a/src/mca/lam/pcm/cofs/Makefile.am +++ b/src/mca/lam/pcm/cofs/Makefile.am @@ -29,7 +29,7 @@ mcamodule_LTLIBRARIES = $(module_install) mca_pcm_cofs_la_SOURCES = mca_pcm_cofs_la_LIBADD = \ src/libmca_pcm_cofs.la \ - $(top_lam_builddir)/src/lam/liblam.la + $(LIBLAM_LA) mca_pcm_cofs_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/lam/registry/cofs/Makefile.am b/src/mca/lam/registry/cofs/Makefile.am index 5fc1e8b649..7afdd78e48 100644 --- a/src/mca/lam/registry/cofs/Makefile.am +++ b/src/mca/lam/registry/cofs/Makefile.am @@ -29,7 +29,7 @@ mcamodule_LTLIBRARIES = $(module_install) mca_registry_cofs_la_SOURCES = mca_registry_cofs_la_LIBADD = \ src/libmca_registry_cofs.la \ - $(top_lam_builddir)/src/lam/liblam.la + $(LIBLAM_LA) mca_registry_cofs_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/mpi/coll/basic/Makefile.am b/src/mca/mpi/coll/basic/Makefile.am index 9b7a74e6ca..380c3aec02 100644 --- a/src/mca/mpi/coll/basic/Makefile.am +++ b/src/mca/mpi/coll/basic/Makefile.am @@ -29,8 +29,7 @@ mcamodule_LTLIBRARIES = $(module_install) mca_coll_basic_la_SOURCES = mca_coll_basic_la_LIBADD = \ src/libmca_coll_basic.la \ - $(top_lam_builddir)/src/mpi/libmpi.la \ - $(top_lam_builddir)/src/lam/liblam.la + $(LIBMPI_LA) mca_coll_basic_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/mpi/pml/teg/Makefile.am b/src/mca/mpi/pml/teg/Makefile.am index 4722c19495..3c10c1fa69 100644 --- a/src/mca/mpi/pml/teg/Makefile.am +++ b/src/mca/mpi/pml/teg/Makefile.am @@ -28,7 +28,7 @@ mcamodule_LTLIBRARIES = $(module_install) mca_pml_teg_la_SOURCES = mca_pml_teg_la_LIBADD = \ src/libmca_pml_teg.la \ - $(top_lam_builddir)/src/lam/liblam.la + $(LIBLAM_LA) mca_pml_teg_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst) diff --git a/src/mca/mpi/ptl/tcp/Makefile.am b/src/mca/mpi/ptl/tcp/Makefile.am index 4529860792..76f9d0f5f6 100644 --- a/src/mca/mpi/ptl/tcp/Makefile.am +++ b/src/mca/mpi/ptl/tcp/Makefile.am @@ -28,7 +28,7 @@ mcamodule_LTLIBRARIES = $(module_install) mca_ptl_tcp_la_SOURCES = mca_ptl_tcp_la_LIBADD = \ src/libmca_ptl_tcp.la \ - $(top_lam_builddir)/src/lam/liblam.la + $(LIBLAM_LA) mca_ptl_tcp_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(module_noinst)