boost: use boost/integer/common_factor.hpp if available

The header `boost/math/common_factor.hpp` has been deprecated.
This commit is contained in:
Moritz Bunkus 2018-06-08 21:12:50 +02:00
parent 2bed987da4
commit 2f4daa5454
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 11 additions and 4 deletions

View File

@ -41,9 +41,12 @@ AX_BOOST_CHECK_HEADERS([boost/lexical_cast.hpp],,[
AC_MSG_ERROR([Boost's lexical_cast library is required but wasn't found])
])
AX_BOOST_CHECK_HEADERS([boost/math/common_factor.hpp],,[
AC_MSG_ERROR([Boost's math library is required but its headers weren't found])
])
AX_BOOST_CHECK_HEADERS([boost/integer/common_factor.hpp])
if test x"$ac_cv_header_boost_integer_common_factor_hpp" != xyes; then
AX_BOOST_CHECK_HEADERS([boost/math/common_factor.hpp],,[
AC_MSG_ERROR([Boost's math library is required but its headers weren't found])
])
fi
AX_BOOST_CHECK_HEADERS([boost/range.hpp],,[
AC_MSG_ERROR([Boost's Range library is required but wasn't found])

View File

@ -19,7 +19,11 @@
# include <intrin.h>
#endif
#include <boost/math/common_factor.hpp>
#if HAVE_BOOST_INTEGER_COMMON_FACTOR_HPP
# include <boost/integer/common_factor.hpp>
#else
# include <boost/math/common_factor.hpp>
#endif
#include "common/math_fwd.h"