From dd8281204f5365f0f6987f989e71208d3c218289 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sat, 2 Aug 2025 14:48:04 +0000 Subject: [PATCH] Update common.m4. --- scripts/common.m4 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/scripts/common.m4 b/scripts/common.m4 index 1f476617..7129204f 100644 --- a/scripts/common.m4 +++ b/scripts/common.m4 @@ -23,6 +23,7 @@ AC_DEFUN([TORRENT_WITH_SYSROOT], [ AC_DEFUN([TORRENT_REMOVE_UNWANTED], [ + AC_REQUIRE([AC_PROG_GREP]) values_to_check=`for i in $2; do echo $i; done` unwanted_values=`for i in $3; do echo $i; done` if test -z "${unwanted_values}"; then @@ -156,6 +157,26 @@ AC_DEFUN([TORRENT_CHECK_POPCOUNT], [ ]) ]) +AC_DEFUN([TORRENT_CHECK_CACHELINE], [ + AC_MSG_CHECKING(for cacheline) + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #include + #include + void* vptr __cacheline_aligned; + void f() { posix_memalign(&vptr, SMP_CACHE_BYTES, 42); } + ])], + [ + AC_MSG_RESULT(found builtin) +dnl Need to fix this so that it uses the stuff defined by the system. + + AC_DEFINE(LT_SMP_CACHE_BYTES, 128, Largest L1 cache size we know of should work on all archs.) + ], [ + AC_MSG_RESULT(using default 128 bytes) + AC_DEFINE(LT_SMP_CACHE_BYTES, 128, Largest L1 cache size we know of should work on all archs.) + ]) +]) + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ AC_MSG_CHECKING(the byte alignment) @@ -223,3 +244,14 @@ AC_DEFUN([TORRENT_ENABLE_INTERRUPT_SOCKET], [ ] ) ]) + +AC_DEFUN([TORRENT_DISABLE_IPV6], [ + AC_ARG_ENABLE(ipv6, + AS_HELP_STRING([--enable-ipv6], + [enable ipv6 [[default=no]]]), + [ + if test "$enableval" = "yes"; then + AC_DEFINE(RAK_USE_INET6, 1, enable ipv6 stuff) + fi + ]) +])