diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4 index 0a90447b547e3c82c8de2f01d6957610ee476bea..f38601a2200d9ce8daa5808ec266817d8f1fe85f 100644 --- a/m4macros/ax_boost_for_kea.m4 +++ b/m4macros/ax_boost_for_kea.m4 @@ -206,8 +206,19 @@ if test "x${BOOST_LIBS}" != "x"; then [AC_LANG_PROGRAM([#include ], [boost::system::error_code ec;])], [AC_MSG_RESULT([checking for Boost system library... yes])], - [AC_MSG_RESULT([checking for Boost system library... no]) - AC_MSG_ERROR([Linking with ${BOOST_LIBS} is not enough: please make sure libboost_system is installed; Check config.log for details, you may be missing other libraries.])]) + [if test "x${BOOST_LIB_DIR}" = "x"; then + BOOST_LIB_DIR="$boost_lib_path" + fi + if test "x${BOOST_LIB_DIR}" != "x"; then + BOOST_LIBS="-L$BOOST_LIB_DIR $BOOST_LIBS" + fi + LIBS="$BOOST_LIBS $LIBS_SAVED" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], + [boost::system::error_code ec;])], + [AC_MSG_RESULT([checking for Boost system library... yes])], + [AC_MSG_RESULT([checking for Boost system library... no]) + AC_MSG_ERROR([Linking with ${BOOST_LIBS} is not enough: please make sure libboost_system is installed in an expected location; Check config.log for details, you may be missing other libraries.])])]) LIBS="$LIBS_SAVED" fi