]> Savannah Git Hosting - gnulib.git/commitdiff
threadlib: Fix link errors on FreeBSD 5.2.1/i386.
authorBruno Haible <bruno@clisp.org>
Sun, 15 Oct 2023 19:55:28 +0000 (21:55 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 5 Nov 2023 19:16:56 +0000 (20:16 +0100)
* m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be
found in -lpthread, try -lthr.

ChangeLog
m4/threadlib.m4

index beb1e0fde21cd36f1975568e74e9f22d2f9ae70d..1888aea1cc624e17c8e5cb1eb0458ed96a77acdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-10-15  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        lock: Make Autoconf macro more robust.
index 39c4896ae613840935cf7b20108a734d43fbc7e2..cbe2d66369fea8aa27a62d8e9fe91653ab6b58aa 100644 (file)
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 32b
+# threadlib.m4 serial 32c
 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.