Commit 1ab83396 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r7127] Allow for LDFLAGS to be added into the inter-library dependency list

as well.

Reviewed by goodell.
parent 1902b34b
......@@ -149,10 +149,10 @@ optinstall_LIB = lib/lib${MPIFWRAPNAME}.a
# UNUSED, example for experimentation only
#lib${MPILIBNAME}_so_EXPORTS = maint/mpi.def
#libf${MPILIBNAME}_so_EXPORTS = maint/fmpi.def
lib${MPILIBNAME}_so_LIBS = -L. @LIB_DEPS@
libf${MPILIBNAME}_so_LIBS = -L. -l$(MPILIBNAME) @LIB_DEPS@
lib${MPILIBNAME}f90_so_LIBS = -L. -l$(MPILIBNAME) @LIB_DEPS@
lib${MPICXXLIBNAME}_so_LIBS = -L. -l$(MPILIBNAME) @LIB_DEPS@
lib${MPILIBNAME}_so_LIBS = -L. @LDFLAGS_DEPS@ @LIB_DEPS@
libf${MPILIBNAME}_so_LIBS = -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@
lib${MPILIBNAME}f90_so_LIBS = -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@
lib${MPICXXLIBNAME}_so_LIBS = -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@
install_INCLUDE = src/include/mpi.h
......
......@@ -10,7 +10,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
# is adding lib64 by default really the right thing to do? What if
# we are on a 32-bit host that happens to have both lib dirs available?
LDFLAGS="$LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
CPPFLAGS="$CPPFLAGS -I${with_$1}/include"
WRAPPER_CFLAGS="$WRAPPER_CFLAGS -I${with_$1}/include"
fi,
......@@ -28,7 +27,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
[specify path where $1 lib directory can be found]),
if test "${with_$1_lib}" != "yes" -a "${with_$1_lib}" != "no" ; then
LDFLAGS="$LDFLAGS -L${with_$1_lib}"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1_lib}"
fi,
)
])
......
......@@ -241,15 +241,16 @@ PAC_PREFIX_ALL_FLAGS(USER)
# autoconf link tests can use them. Libraries that are built by MPICH2
# at make time (and hence are not available for autoconf link tests to
# use), such as OPA and MPL, should be added to WRAPPER_LIBS for
# static builds. All libraries in LIBS are added to WRAPPER_LIBS as
# well, at the end of configure.
# static builds. All libraries in LIBS are added to WRAPPER_LIBS
# (similarly LDFLAGS are added to WRAPPER_LDFLAGS) as well, at the end
# of configure.
PAC_PREFIX_ALL_FLAGS(WRAPPER)
WRAPPER_CFLAGS="$CFLAGS $MPICH2_MPICC_FLAGS"
WRAPPER_CPPFLAGS="$CPPFLAGS $MPICH2_MPICPP_FLAGS"
WRAPPER_CXXFLAGS="$CXXFLAGS $MPICH2_MPICXX_FLAGS"
WRAPPER_FFLAGS="$FFLAGS $MPICH2_MPIF77_FLAGS"
WRAPPER_FCFLAGS="$FCFLAGS $MPICH2_MPIFC_FLAGS"
WRAPPER_LDFLAGS="$LDFLAGS $MPICH2_LDFLAGS"
WRAPPER_LDFLAGS="$MPICH2_LDFLAGS"
WRAPPER_LIBS="$MPICH2_LIBS"
# Add MPICH2LIB_* to the appropriate flags
......@@ -2694,7 +2695,6 @@ case $ENABLE_SHLIB in
#
# [goodell@ 2010-02-09]
PAC_APPEND_FLAG([-Wl,-flat_namespace], [LDFLAGS])
PAC_APPEND_FLAG([-Wl,-flat_namespace], [WRAPPER_LDFLAGS])
;;
cygwin-gcc)
if test "$PMPILIBNAME_set" = "no" ; then
......@@ -4886,7 +4886,6 @@ EOF
else
LDFLAGSsave="$LDFLAGS"
LDFLAGS="$LDFLAGS -ftest-coverage -fprofile-arcs"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -ftest-coverage -fprofile-arcs"
if AC_TRY_EVAL(link_only) ; then
AC_MSG_RESULT([need -ftest-coverage -fprofile-arcs])
else
......@@ -6240,14 +6239,22 @@ AC_SUBST(MPIFC)
AC_DEFINE(HAVE_MPICHCONF,1,[Define so that we can test whether the mpichconf.h file has been included])
# Add the LIBS we got so far to WRAPPER_LIBS
# Add the LDFLAGS/LIBS we got so far to WRAPPERs
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS $LDFLAGS"
WRAPPER_LIBS="$WRAPPER_LIBS $LIBS"
# Setup required inter-library dependencies
LIB_DEPS=""
LDFLAGS_DEPS=""
if test "$ENABLE_SHLIB" != "none" -a "$enable_lib_depend" = "yes" ; then
LIB_DEPS="$WRAPPER_LIBS"
WRAPPER_LIBS=""
LDFLAGS_DEPS="$WRAPPER_LDFLAGS"
# WRAPPER_LDFLAGS are not reset as they point to the position of
# the dependency libraries when rpath builds are not enabled
fi
AC_SUBST(LIB_DEPS)
AC_SUBST(LDFLAGS_DEPS)
if test "$USE_PMI2_API" = "yes" ; then
AC_DEFINE(USE_PMI2_API, 1, [Define if PMI2 API must be used])
......
......@@ -10,7 +10,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
# is adding lib64 by default really the right thing to do? What if
# we are on a 32-bit host that happens to have both lib dirs available?
LDFLAGS="$LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
CPPFLAGS="$CPPFLAGS -I${with_$1}/include"
WRAPPER_CFLAGS="$WRAPPER_CFLAGS -I${with_$1}/include"
fi,
......@@ -28,7 +27,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
[specify path where $1 lib directory can be found]),
if test "${with_$1_lib}" != "yes" -a "${with_$1_lib}" != "no" ; then
LDFLAGS="$LDFLAGS -L${with_$1_lib}"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1_lib}"
fi,
)
])
......
......@@ -89,7 +89,6 @@ PAC_SET_HEADER_LIB_PATH(psm)
AC_ARG_WITH(newmad, [--with-newmad=path - specify path where pm2 software can be found],
if test "${with_newmad}" != "yes" -a "${with_newmad}" != "no" ; then
LDFLAGS="$LDFLAGS `${with_newmad}/bin/pm2-config --flavor=$PM2_FLAVOR --libs`"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS `${with_newmad}/bin/pm2-config --flavor=$PM2_FLAVOR --libs`"
CPPFLAGS="$CPPFLAGS `${with_newmad}/bin/pm2-config --flavor=$PM2_FLAVOR --cflags`"
fi,)
......
......@@ -10,7 +10,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
# is adding lib64 by default really the right thing to do? What if
# we are on a 32-bit host that happens to have both lib dirs available?
LDFLAGS="$LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
CPPFLAGS="$CPPFLAGS -I${with_$1}/include"
WRAPPER_CFLAGS="$WRAPPER_CFLAGS -I${with_$1}/include"
fi,
......@@ -28,7 +27,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
[specify path where $1 lib directory can be found]),
if test "${with_$1_lib}" != "yes" -a "${with_$1_lib}" != "no" ; then
LDFLAGS="$LDFLAGS -L${with_$1_lib}"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1_lib}"
fi,
)
])
......
......@@ -10,7 +10,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
# is adding lib64 by default really the right thing to do? What if
# we are on a 32-bit host that happens to have both lib dirs available?
LDFLAGS="$LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1}/lib64 -L${with_$1}/lib"
CPPFLAGS="$CPPFLAGS -I${with_$1}/include"
WRAPPER_CFLAGS="$WRAPPER_CFLAGS -I${with_$1}/include"
fi,
......@@ -28,7 +27,6 @@ AC_DEFUN([PAC_SET_HEADER_LIB_PATH],[
[specify path where $1 lib directory can be found]),
if test "${with_$1_lib}" != "yes" -a "${with_$1_lib}" != "no" ; then
LDFLAGS="$LDFLAGS -L${with_$1_lib}"
WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS -L${with_$1_lib}"
fi,
)
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment