diff options
author | 2012-01-29 21:49:50 +0000 | |
---|---|---|
committer | 2012-01-29 22:13:29 +0000 | |
commit | 89797fa3d86ac17ddfa98c862ca273cb5ac18839 (patch) | |
tree | af53acd8da8537c8012e3ce6ac2f908a8a0dd776 | |
parent | 55df129f2f655df80b7b7eb64d6f2e5ecdc09cd0 (diff) | |
download | paludis-89797fa3d86ac17ddfa98c862ca273cb5ac18839.tar.gz paludis-89797fa3d86ac17ddfa98c862ca273cb5ac18839.tar.xz |
Support new Gentoo boost.python library names
See Gentoo bug #401215.
-rw-r--r-- | configure.ac | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 7b1ffb53a..6c378b861 100644 --- a/configure.ac +++ b/configure.ac @@ -1355,23 +1355,23 @@ if test "x$enable_python" = "xyes" ; then save_CXXFLAGS="$CXXFLAGS" save_LIBS="$LIBS" CXXFLAGS="$CXXFLAGS -I$PYTHON_INCLUDE_DIR" - LIBS="$LIBS -lboost_python -lpython$PYTHON_VERSION" - AC_LINK_IFELSE([AC_LANG_SOURCE([ -#include <boost/python.hpp> -int main() { boost::python::throw_error_already_set(); return 0; } - ])], - [BOOST_PYTHON_LIB="-lboost_python" - AC_MSG_RESULT([$BOOST_PYTHON_LIB])], - [LIBS="$save_LIBS -lboost_python-mt -lpython$PYTHON_VERSION" + BOOST_PYTHON_LIB= + for lib in boost_python-$PYTHON_VERSION boost_python-$PYTHON_VERSION-mt boost_python boost_python-mt; do + LIBS="$LIBS -l$lib -lpython$PYTHON_VERSION" AC_LINK_IFELSE([AC_LANG_SOURCE([ #include <boost/python.hpp> int main() { boost::python::throw_error_already_set(); return 0; } ])], - [BOOST_PYTHON_LIB="-lboost_python-mt" - AC_MSG_RESULT([$BOOST_PYTHON_LIB])], - [AC_MSG_RESULT([not found]) - AC_MSG_ERROR([Cannot work out how to link to boost.python. You may need to reinstall boost.python, especially \ - if you have upgraded Python since installing Boost.])])]) + [BOOST_PYTHON_LIB="-l$lib" + AC_MSG_RESULT([$BOOST_PYTHON_LIB]) + break], + [LIBS="$save_LIBS"]) + done + if test "x$BOOST_PYTHON_LIB" = x; then + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([Cannot work out how to link to boost.python. You may need to reinstall boost.python, especially \ + if you have upgraded Python since installing Boost.]) + fi AC_SUBST(BOOST_PYTHON_LIB) dnl Restore the C++ flags LIBS="$save_LIBS" |