Build: Require Boost.Asio to be v1.69.0+

This commit is contained in:
2025-01-10 17:35:22 -04:00
parent d2d5b8960f
commit c696db9e45
2 changed files with 13 additions and 27 deletions
+5 -4
View File
@@ -32,7 +32,7 @@ AC_DEFINE_UNQUOTED([CONFIG_MIND_VOSCILLATOR_FREQ_MS],
[Frequency of the mind virtual oscillator in milliseconds])
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_bison.m4])
AC_PROG_CC
@@ -44,9 +44,10 @@ AC_PROG_YACC
AS_IF([test -z "${LEX}" || test -z "${YACC}"], [
AC_MSG_ERROR([LEX and YACC must both be available in PATH.])
])
#AX_BOOST_BASE
AX_BOOST_ASIO
AS_IF([test "x${HAVE_BOOST_ASIO}" != "xyes"], [
AX_BOOST_BASE([1.69.0], [], [AC_MSG_ERROR(m4_normalize([Boost v1.69.0 or higher
is required, because Boost.System is header-only from 1.69.0 onwards.]))])
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.
Try --with-boost-asio if need be.]))
])
@@ -32,7 +32,7 @@
#serial 18
AC_DEFUN([AX_BOOST_ASIO],
AC_DEFUN([AX_BOOST_ASIO_gte_1_69_0],
[
AC_ARG_WITH([boost-asio],
AS_HELP_STRING([--with-boost-asio@<:@=special-lib@:>@],
@@ -80,28 +80,13 @@ AC_DEFUN([AX_BOOST_ASIO],
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_asio" = "xyes"; then
AC_DEFINE(HAVE_BOOST_ASIO,,[define if the Boost::ASIO library is available])
BN=boost_system
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
if test "x$ax_boost_user_asio_lib" = "x"; then
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
AC_CHECK_LIB($ax_lib, main, [BOOST_ASIO_LIB="-l$ax_lib" AC_SUBST(BOOST_ASIO_LIB) link_thread="yes" break],
[link_thread="no"])
done
AC_DEFINE(HAVE_BOOST_ASIO,,
[define if the Boost::ASIO library is available])
BOOST_ASIO_LIB=""
AC_SUBST(BOOST_ASIO_LIB)
HAVE_BOOST_ASIO="yes"
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
HAVE_BOOST_ASIO="no"
fi
CPPFLAGS="$CPPFLAGS_SAVED"