From 222d8c7d41f75d186195d01e9282d757cea05e2e Mon Sep 17 00:00:00 2001 From: kaoru Date: Sat, 2 May 2026 16:09:05 +0900 Subject: [PATCH 1/3] chore: improved pthread flag handling to prevent redundant linking flags #349 Improved pthread flag handling to prevent redundant linking flags. - Reset AX_PTHREAD_LINK_CFLAGS to empty initially - Set AX_PTHREAD_LINK_CFLAGS only when PTHREAD_CFLAGS is exactly "-pthread" or "-pthreads" - Conditionally prepend AX_PTHREAD_LINK_CFLAGS to LDFLAGS only when non-empty - Ensures no duplicate pthread flags regardless of compiler (Clang/GCC) --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 3aec7b18..cdd9954b 100644 --- a/configure.ac +++ b/configure.ac @@ -184,10 +184,14 @@ test -z $DOXYGEN && \ #### Library Checks #### AX_PTHREAD -AX_PTHREAD_LINK_CFLAGS="${PTHREAD_CFLAGS}" +AX_PTHREAD_LINK_CFLAGS="" AS_IF( - [${CXX} --version 2>/dev/null | grep -qi clang], - [test "x${PTHREAD_CFLAGS}" = "x-pthread" && AX_PTHREAD_LINK_CFLAGS=""] + [test "x${PTHREAD_CFLAGS}" = "x-pthread" || test "x${PTHREAD_CFLAGS}" = "x-pthreads"], + [AX_PTHREAD_LINK_CFLAGS="${PTHREAD_CFLAGS}"] +) +AS_IF( + [test -n "${AX_PTHREAD_LINK_CFLAGS}"], + [LDFLAGS="${AX_PTHREAD_LINK_CFLAGS} ${LDFLAGS}"] ) LDFLAGS="${AX_PTHREAD_LINK_CFLAGS} ${LDFLAGS}" AC_SUBST([LIBS], "${PTHREAD_LIBS} ${LIBS}") From d636e06c9f853660147128c29322196035dfcb47 Mon Sep 17 00:00:00 2001 From: kaoru Date: Sat, 2 May 2026 16:29:10 +0900 Subject: [PATCH 2/3] fix: use AS_CASE for pthread flags detection #349 Modernize pthread handling to match Boost 1.91.0 requirement. Replaced AS_IF with AS_CASE to properly detect and set AX_PTHREAD_LINK_CFLAGS only when PTHREAD_CFLAGS is exactly "-pthread" or "-pthreads", avoiding incorrect handling of other values. This ensures consistent linking behavior across modern compilers. --- configure.ac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index cdd9954b..f947f330 100644 --- a/configure.ac +++ b/configure.ac @@ -185,9 +185,10 @@ test -z $DOXYGEN && \ #### Library Checks #### AX_PTHREAD AX_PTHREAD_LINK_CFLAGS="" -AS_IF( - [test "x${PTHREAD_CFLAGS}" = "x-pthread" || test "x${PTHREAD_CFLAGS}" = "x-pthreads"], - [AX_PTHREAD_LINK_CFLAGS="${PTHREAD_CFLAGS}"] +AS_CASE( + [" ${PTHREAD_CFLAGS} "], + [*" -pthread "*], [AX_PTHREAD_LINK_CFLAGS="-pthread"], + [*" -pthreads "*], [AX_PTHREAD_LINK_CFLAGS="-pthreads"] ) AS_IF( [test -n "${AX_PTHREAD_LINK_CFLAGS}"], From f656e99246f6b39a603e82ae873f74987dc4d27e Mon Sep 17 00:00:00 2001 From: kaoru Date: Sat, 2 May 2026 22:42:11 +0900 Subject: [PATCH 3/3] build: update kogyan submodule to latest commit #349 Modernizes the kogyan dependency as part of #349. --- kogyan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kogyan b/kogyan index 29f0fe8c..4217a272 160000 --- a/kogyan +++ b/kogyan @@ -1 +1 @@ -Subproject commit 29f0fe8c1f6ffc50a312d664983304e39cb4bef0 +Subproject commit 4217a272a2e25d6b7e8b49643a9177a9157aca72