Commit ebed71ab authored by allens's avatar allens

added code to handle library path updating

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@28176 18c085ea-50e0-402c-830e-de6fd14e8384
parent d44d16e3
......@@ -37,7 +37,7 @@ function bv_boost_depends_on
function bv_boost_initialize_vars
{
if [[ "$USE_SYSTEM_BOOST" == "no" ]]; then
BOOST_INSTALL_DIR="${VISITDIR}/boost/$BOOST_VERSION/${VISITARCH}"
BOOST_INSTALL_DIR="${VISITDIR}/boost/${BOOST_VERSION}/${VISITARCH}"
fi
}
......@@ -219,32 +219,33 @@ function build_boost
# version information.
#
info "Creating dynamic libraries for BOOST . . ."
INSTALLNAMEPATH="$VISITDIR/boost/${BOOST_VERSION}/$VISITARCH/lib"
INSTALLNAMEPATH="${BOOST_INSTALL_DIR}/lib"
for lib in $libs;
do
install_name_tool \
-id $INSTALLNAMEPATH/libboost_${lib}.${SO_EXT} \
$INSTALLNAMEPATH/libboost_${lib}.${SO_EXT}
# The filesystem, thread, and chrono libraries depend
# on the system library so fix up those paths as well
if [[ $lib == "filesystem" || $lib == "thread" || $lib == "chrono" ]] ; then
install_name_tool -change \
libboost_system.${SO_EXT} $INSTALLNAMEPATH/libboost_system.${SO_EXT} \
$INSTALLNAMEPATH/libboost_${lib}.${SO_EXT}
fi
# The timer library depends on the system and chrono
# library so fix up those paths as well
if [[ $lib == "timer" ]] ; then
install_name_tool -change \
libboost_system.${SO_EXT} $INSTALLNAMEPATH/libboost_system.${SO_EXT} \
$INSTALLNAMEPATH/libboost_${lib}.${SO_EXT}
install_name_tool -change \
libboost_chrono.${SO_EXT} $INSTALLNAMEPATH/libboost_chrono.${SO_EXT} \
$INSTALLNAMEPATH/libboost_${lib}.${SO_EXT}
fi
fulllibname=$INSTALLNAMEPATH/libboost_${lib}.${SO_EXT}
install_name_tool -id $fulllibname $fulllibname
# Find all the dependent libraries (more or less)
deplibs=`otool -L $fulllibname | sed "s/(.*)//g"`
for deplib in $deplibs;
do
# Only get the libraries related to boost and not itself.
if [[ `echo $deplib | grep -c libboost_` == 1 && \
`echo $deplib | grep -c libboost_${lib}` == 0 ]] ; then
# Get the library name sans the directory path
deplibname=`echo $deplib | sed "s/.*\///"`
# Set the library path
install_name_tool -change $deplib \
${INSTALLNAMEPATH}/$deplibname \
$fulllibname
fi
done
done
fi
......
......@@ -272,7 +272,7 @@ function build_uintah
info "Invoking command to configure UINTAH"
info "../src/configure CXX=\"$CXX_COMPILER\" CC=\"$C_COMPILER\" \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS\" CXXFLAGS=\"$CXXFLAGS $CXX_OPT_FLAGS\" \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS -headerpad_max_install_names\" CXXFLAGS=\"$CXXFLAGS $CXX_OPT_FLAGS\" \
MPI_EXTRA_LIB_FLAG=\"$PAR_LIBRARY_NAMES\" \
$FORTRANARGS \
--prefix=\"$VISITDIR/uintah/$UINTAH_VERSION/$VISITARCH\" \
......@@ -285,7 +285,7 @@ function build_uintah
# --with-mpi-lib="${PAR_INCLUDE_DIR}/../lib" "
sh -c "../src/configure CXX=\"$CXX_COMPILER\" CC=\"$C_COMPILER\" \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS\" CXXFLAGS=\"$CXXFLAGS $CXX_OPT_FLAGS\" \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS -headerpad_max_install_names\" CXXFLAGS=\"$CXXFLAGS $CXX_OPT_FLAGS\" \
MPI_EXTRA_LIB_FLAG=\"$PAR_LIBRARY_NAMES\" \
$FORTRANARGS \
--prefix=\"$VISITDIR/uintah/$UINTAH_VERSION/$VISITARCH\" \
......@@ -368,6 +368,32 @@ function build_uintah
# version information.
#
info "Creating dynamic libraries for UINTAH . . ."
INSTALLNAMEPATH="${UINTAH_INSTALL_DIR}/lib"
libs=`ls ${INSTALLNAMEPATH}/*.${SO_EXT}`
for lib in $libs;
do
# Get the library path right
install_name_tool -id $lib $lib
# Find all the dependent libraries (more or less)
deplibs=`otool -L $lib | sed "s/(.*)//g"`
for deplib in $deplibs;
do
# Only get the libraries related to Uintah
if [[ `echo $deplib | grep -c ${UINTAH_BUILD_DIR}` == 1 ]] ; then
# Get the library name sans the directory path
deplibname=`echo $deplib | sed "s/.*\///"`
# Finally set the library path
install_name_tool -change \
$deplib ${INSTALLNAMEPATH}/$deplibname $lib
fi
done
done
fi
if [[ "$DO_GROUP" == "yes" ]] ; then
......
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