Build: Require Boost.Asio to be v1.69.0+
This commit is contained in:
+5
-4
@@ -32,7 +32,7 @@ AC_DEFINE_UNQUOTED([CONFIG_MIND_VOSCILLATOR_FREQ_MS],
|
|||||||
[Frequency of the mind virtual oscillator in milliseconds])
|
[Frequency of the mind virtual oscillator in milliseconds])
|
||||||
|
|
||||||
m4_include([m4/ax_boost_base.m4])
|
m4_include([m4/ax_boost_base.m4])
|
||||||
m4_include([m4/ax_boost_asio.m4])
|
m4_include([m4/ax_boost_asio_1.69.0.m4])
|
||||||
m4_include([m4/ac_prog_flex.m4])
|
m4_include([m4/ac_prog_flex.m4])
|
||||||
m4_include([m4/ac_prog_bison.m4])
|
m4_include([m4/ac_prog_bison.m4])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@@ -44,9 +44,10 @@ AC_PROG_YACC
|
|||||||
AS_IF([test -z "${LEX}" || test -z "${YACC}"], [
|
AS_IF([test -z "${LEX}" || test -z "${YACC}"], [
|
||||||
AC_MSG_ERROR([LEX and YACC must both be available in PATH.])
|
AC_MSG_ERROR([LEX and YACC must both be available in PATH.])
|
||||||
])
|
])
|
||||||
#AX_BOOST_BASE
|
AX_BOOST_BASE([1.69.0], [], [AC_MSG_ERROR(m4_normalize([Boost v1.69.0 or higher
|
||||||
AX_BOOST_ASIO
|
is required, because Boost.System is header-only from 1.69.0 onwards.]))])
|
||||||
AS_IF([test "x${HAVE_BOOST_ASIO}" != "xyes"], [
|
AX_BOOST_ASIO_gte_1_69_0
|
||||||
|
AS_IF([test "x${HAVE_BOOST_ASIO}" == "x"], [
|
||||||
AC_MSG_ERROR(m4_normalize([Boost.Asio must be available in headers.
|
AC_MSG_ERROR(m4_normalize([Boost.Asio must be available in headers.
|
||||||
Try --with-boost-asio if need be.]))
|
Try --with-boost-asio if need be.]))
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#serial 18
|
#serial 18
|
||||||
|
|
||||||
AC_DEFUN([AX_BOOST_ASIO],
|
AC_DEFUN([AX_BOOST_ASIO_gte_1_69_0],
|
||||||
[
|
[
|
||||||
AC_ARG_WITH([boost-asio],
|
AC_ARG_WITH([boost-asio],
|
||||||
AS_HELP_STRING([--with-boost-asio@<:@=special-lib@:>@],
|
AS_HELP_STRING([--with-boost-asio@<:@=special-lib@:>@],
|
||||||
@@ -80,28 +80,13 @@ AC_DEFUN([AX_BOOST_ASIO],
|
|||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
])
|
])
|
||||||
if test "x$ax_cv_boost_asio" = "xyes"; then
|
if test "x$ax_cv_boost_asio" = "xyes"; then
|
||||||
AC_DEFINE(HAVE_BOOST_ASIO,,[define if the Boost::ASIO library is available])
|
AC_DEFINE(HAVE_BOOST_ASIO,,
|
||||||
BN=boost_system
|
[define if the Boost::ASIO library is available])
|
||||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
BOOST_ASIO_LIB=""
|
||||||
if test "x$ax_boost_user_asio_lib" = "x"; then
|
AC_SUBST(BOOST_ASIO_LIB)
|
||||||
for ax_lib in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.dylib* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_system.*\)\.a.*$;\1;' ` ; do
|
HAVE_BOOST_ASIO="yes"
|
||||||
AC_CHECK_LIB($ax_lib, main, [BOOST_ASIO_LIB="-l$ax_lib" AC_SUBST(BOOST_ASIO_LIB) link_thread="yes" break],
|
else
|
||||||
[link_thread="no"])
|
HAVE_BOOST_ASIO="no"
|
||||||
done
|
|
||||||
else
|
|
||||||
for ax_lib in $ax_boost_user_asio_lib $BN-$ax_boost_user_asio_lib; do
|
|
||||||
AC_CHECK_LIB($ax_lib, main,
|
|
||||||
[BOOST_ASIO_LIB="-l$ax_lib" AC_SUBST(BOOST_ASIO_LIB) link_asio="yes" break],
|
|
||||||
[link_asio="no"])
|
|
||||||
done
|
|
||||||
|
|
||||||
fi
|
|
||||||
if test "x$ax_lib" = "x"; then
|
|
||||||
AC_MSG_ERROR(Could not find a version of the Boost::Asio library!)
|
|
||||||
fi
|
|
||||||
if test "x$link_asio" = "xno"; then
|
|
||||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||||
Reference in New Issue
Block a user