From b7c0ba8b1a73126d39ecb3c5e7a81d88bbc5a5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 24 Aug 2012 19:53:15 +0200 Subject: [PATCH] Expose the Boost library directory to the build system. This enables explicitly encoding the directory, e.g., in the OPM-Core run-path. This, in turn, reduces the burden on library clients that would otherwise have to satisfy library link requirements in addition to any other link requirements they might have. --- m4/opm_boost_base.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/m4/opm_boost_base.m4 b/m4/opm_boost_base.m4 index 430f9abb..4f4ea066 100644 --- a/m4/opm_boost_base.m4 +++ b/m4/opm_boost_base.m4 @@ -103,6 +103,7 @@ if test "x$want_boost" = "xyes"; then for ac_boost_path_tmp in $libsubdirs; do if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then OPM_BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" + OPM_BOOST_LIBDIR="${ac_boost_path}/${ac_boost_path_tmp}" break fi done @@ -114,6 +115,7 @@ if test "x$want_boost" = "xyes"; then done OPM_BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" OPM_BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" + OPM_BOOST_LIBDIR="${ac_boost_path_tmp}/${libsubdir}" break; fi done @@ -123,6 +125,7 @@ if test "x$want_boost" = "xyes"; then dnl --with-boost-libdir parameter if test "$ac_boost_lib_path" != ""; then OPM_BOOST_LDFLAGS="-L$ac_boost_lib_path" + OPM_BOOST_LIBDIR="${ac_boost_lib_path}" fi CPPFLAGS_SAVED="$CPPFLAGS" @@ -191,6 +194,7 @@ if test "x$want_boost" = "xyes"; then if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done OPM_BOOST_LDFLAGS="-L$best_path/$libsubdir" + OPM_BOOST_LIBDIR="$best_path/$libsubdir" fi fi @@ -207,6 +211,7 @@ if test "x$want_boost" = "xyes"; then AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) OPM_BOOST_CPPFLAGS="-I$BOOST_ROOT" OPM_BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" + OPM_BOOST_LIBDIR="$BOOST_ROOT/stage/$libsubdir" fi fi fi @@ -248,6 +253,7 @@ if test "x$want_boost" = "xyes"; then else AC_SUBST([OPM_BOOST_CPPFLAGS]) AC_SUBST([OPM_BOOST_LDFLAGS]) + AC_SUBST([OPM_BOOST_LIBDIR]) AC_DEFINE([OPM_HAVE_BOOST], [1], [define if the Boost library is available]) # execute ACTION-IF-FOUND (if present): ifelse([$2], , :, [$2])