mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +00:00
[4009] Added --with-boost-libs for Fedora 22 where it can be required
This commit is contained in:
@@ -8,6 +8,7 @@ LCOV=@LCOV@
|
|||||||
GENHTML=@GENHTML@
|
GENHTML=@GENHTML@
|
||||||
DISTCHECK_GTEST_CONFIGURE_FLAG=@DISTCHECK_GTEST_CONFIGURE_FLAG@
|
DISTCHECK_GTEST_CONFIGURE_FLAG=@DISTCHECK_GTEST_CONFIGURE_FLAG@
|
||||||
DISTCHECK_CRYPTO_CONFIGURE_FLAG=@DISTCHECK_CRYPTO_CONFIGURE_FLAG@
|
DISTCHECK_CRYPTO_CONFIGURE_FLAG=@DISTCHECK_CRYPTO_CONFIGURE_FLAG@
|
||||||
|
DISTCHECK_BOOST_CONFIGURE_FLAG=@DISTCHECK_BOOST_CONFIGURE_FLAG@
|
||||||
|
|
||||||
DISTCLEANFILES = config.report
|
DISTCLEANFILES = config.report
|
||||||
|
|
||||||
@@ -20,6 +21,9 @@ DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_GTEST_CONFIGURE_FLAG)
|
|||||||
# Keep the crypto backend config
|
# Keep the crypto backend config
|
||||||
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_CRYPTO_CONFIGURE_FLAG)
|
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_CRYPTO_CONFIGURE_FLAG)
|
||||||
|
|
||||||
|
# Keep the Boost configuration which becomes sensible
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_BOOST_CONFIGURE_FLAG)
|
||||||
|
|
||||||
dist_doc_DATA = AUTHORS COPYING ChangeLog README
|
dist_doc_DATA = AUTHORS COPYING ChangeLog README
|
||||||
|
|
||||||
.PHONY: check-valgrind check-valgrind-suppress
|
.PHONY: check-valgrind check-valgrind-suppress
|
||||||
|
@@ -14,12 +14,16 @@ dnl sets corresponding variables so the caller can react to (or ignore,
|
|||||||
dnl depending on other configuration) specific issues appropriately.
|
dnl depending on other configuration) specific issues appropriately.
|
||||||
dnl
|
dnl
|
||||||
dnl Boost.Asio depends on Boost.System which can be header only with
|
dnl Boost.Asio depends on Boost.System which can be header only with
|
||||||
dnl versions >= 1.56. On older versions libboost_system is required.
|
dnl versions >= 1.56. On older and perhaps some recent versions
|
||||||
|
dnl libboost_system is required.
|
||||||
|
dnl --with-boost-libs can help giving extra arguments or forcing link
|
||||||
|
dnl with a Boost library
|
||||||
dnl
|
dnl
|
||||||
dnl This macro calls:
|
dnl This macro calls:
|
||||||
dnl
|
dnl
|
||||||
dnl AC_SUBST(BOOST_INCLUDES)
|
dnl AC_SUBST(BOOST_INCLUDES)
|
||||||
dnl AC_SUBST(BOOST_LIBS)
|
dnl AC_SUBST(BOOST_LIBS)
|
||||||
|
dnl AC_SUBST(DISTCHECK_BOOST_CONFIGURE_FLAG)
|
||||||
dnl
|
dnl
|
||||||
dnl And possibly sets:
|
dnl And possibly sets:
|
||||||
dnl CPPFLAGS_BOOST_THREADCONF should be added to CPPFLAGS by caller
|
dnl CPPFLAGS_BOOST_THREADCONF should be added to CPPFLAGS by caller
|
||||||
@@ -34,6 +38,8 @@ AC_DEFUN([AX_BOOST_FOR_KEA], [
|
|||||||
AC_LANG_SAVE
|
AC_LANG_SAVE
|
||||||
AC_LANG([C++])
|
AC_LANG([C++])
|
||||||
|
|
||||||
|
DISTCHECK_BOOST_CONFIGURE_FLAG=
|
||||||
|
|
||||||
# No library by default (and as goal)
|
# No library by default (and as goal)
|
||||||
BOOST_LIBS=
|
BOOST_LIBS=
|
||||||
|
|
||||||
@@ -55,6 +61,8 @@ if test -z "$with_boost_include"; then
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
DISTCHECK_BOOST_CONFIGURE_FLAG="--with-boost-include=${boost_include_path}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check the path with some specific headers.
|
# Check the path with some specific headers.
|
||||||
@@ -132,34 +140,52 @@ void testfn(void) { BOOST_STATIC_ASSERT(true); }
|
|||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
BOOST_STATIC_ASSERT_WOULDFAIL=yes])
|
BOOST_STATIC_ASSERT_WOULDFAIL=yes])
|
||||||
|
|
||||||
|
# Get libs when explicitly configured
|
||||||
|
AC_ARG_WITH([boost-libs],
|
||||||
|
AC_HELP_STRING([--with-boost-libs=SPEC],
|
||||||
|
[specify Boost libraries to link with]),
|
||||||
|
[BOOST_LIBS="$withval"
|
||||||
|
DISTCHECK_BOOST_CONFIGURE_FLAG="$DISTCHECK_BOOST_CONFIGURE_FLAG --with-boost-libs=$withval"])
|
||||||
|
|
||||||
# BOOST_ERROR_CODE_HEADER_ONLY in versions below Boost 1.56.0 can fail
|
# BOOST_ERROR_CODE_HEADER_ONLY in versions below Boost 1.56.0 can fail
|
||||||
# to find the error_code.cpp file.
|
# to find the error_code.cpp file.
|
||||||
AC_MSG_CHECKING([BOOST_ERROR_CODE_HEADER_ONLY works])
|
if test "x${BOOST_LIBS}" = "x"; then
|
||||||
CXXFLAGS_SAVED2="$CPPFLAGS"
|
AC_MSG_CHECKING([BOOST_ERROR_CODE_HEADER_ONLY works])
|
||||||
CPPFLAGS="$CPPFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY"
|
CXXFLAGS_SAVED2="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS -DBOOST_SYSTEM_NO_DEPRECATED"
|
CPPFLAGS="$CPPFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY"
|
||||||
AC_TRY_COMPILE([
|
CPPFLAGS="$CPPFLAGS -DBOOST_SYSTEM_NO_DEPRECATED"
|
||||||
#include <boost/system/error_code.hpp>
|
|
||||||
],,
|
AC_TRY_COMPILE([
|
||||||
[AC_MSG_RESULT(yes)],
|
#include <boost/system/error_code.hpp>
|
||||||
[AC_MSG_RESULT(no)
|
],,
|
||||||
AC_MSG_WARN([The Boost system library is required.])
|
[AC_MSG_RESULT(yes)],
|
||||||
BOOST_LIBS="-lboost_system"
|
[AC_MSG_RESULT(no)
|
||||||
LIBS_SAVED="$LIBS"
|
AC_MSG_WARN([The Boost system library is required.])
|
||||||
LIBS="$BOOST_LIBS $LIBS"
|
BOOST_LIBS="-lboost_system"])
|
||||||
CPPFLAGS="$CXXFLAGS_SAVED2"
|
|
||||||
AC_LINK_IFELSE(
|
CPPFLAGS="$CXXFLAGS_SAVED2"
|
||||||
[AC_LANG_PROGRAM([#include <boost/system/error_code.hpp>],
|
fi
|
||||||
[boost::system::error_code ec;])],
|
|
||||||
[AC_MSG_RESULT([checking for Boost system library... yes])],
|
# A Boost library is used.
|
||||||
[AC_MSG_RESULT([checking for Boost system library... no])
|
if test "x${BOOST_LIBS}" != "x"; then
|
||||||
AC_MSG_ERROR([Linking with ${BOOST_LIBS} is not enough: please make sure libboost_system is installed])])
|
LIBS_SAVED="$LIBS"
|
||||||
LIBS="$LIBS_SAVED"])
|
LIBS="$BOOST_LIBS $LIBS"
|
||||||
|
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([#include <boost/system/error_code.hpp>],
|
||||||
|
[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])])
|
||||||
|
|
||||||
|
LIBS="$LIBS_SAVED"
|
||||||
|
fi
|
||||||
|
|
||||||
CXXFLAGS="$CXXFLAGS_SAVED"
|
CXXFLAGS="$CXXFLAGS_SAVED"
|
||||||
|
|
||||||
AC_SUBST(BOOST_INCLUDES)
|
AC_SUBST(BOOST_INCLUDES)
|
||||||
AC_SUBST(BOOST_LIBS)
|
AC_SUBST(BOOST_LIBS)
|
||||||
|
AC_SUBST(DISTCHECK_BOOST_CONFIGURE_FLAG)
|
||||||
|
|
||||||
dnl Determine the Boost version, used mainly for config.report.
|
dnl Determine the Boost version, used mainly for config.report.
|
||||||
AC_MSG_CHECKING([Boost version])
|
AC_MSG_CHECKING([Boost version])
|
||||||
|
Reference in New Issue
Block a user