From: Bruno Haible Date: Sun, 15 Oct 2023 19:55:28 +0000 (+0200) Subject: threadlib: Fix link errors on FreeBSD 5.2.1/i386. X-Git-Tag: v1.0~693 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a82b963d9c7b0ffbad4e95334a4edda8cdfbea08;p=gnulib.git threadlib: Fix link errors on FreeBSD 5.2.1/i386. * m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be found in -lpthread, try -lthr. --- diff --git a/ChangeLog b/ChangeLog index e0f228f264..6dc612cb49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-10-15 Bruno Haible + + threadlib: Fix link errors on FreeBSD 5.2.1/i386. + * m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be + found in -lpthread, try -lthr. + 2023-10-15 Bruno Haible lock: Make Autoconf macro more robust. diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 index 303382881a..855e563d88 100644 --- a/m4/threadlib.m4 +++ b/m4/threadlib.m4 @@ -1,4 +1,4 @@ -# threadlib.m4 serial 39 +# threadlib.m4 serial 40 dnl Copyright (C) 2005-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -269,6 +269,15 @@ changequote([,])dnl [Define if the pthread_in_use() detection is hard.]) esac fi + ], + [dnl This is needed on FreeBSD 5.2.1. + AC_CHECK_LIB([thr], [pthread_kill], + [if test $gl_pthread_in_glibc = yes; then + LIBPMULTITHREAD= + else + LIBPMULTITHREAD=-lthr + fi + ]) ]) elif test $gl_pthread_api != yes; then # Some library is needed. Try libpthread and libc_r.