]> 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, 15 Oct 2023 19:55:28 +0000 (21:55 +0200)
* m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be
found in -lpthread, try -lthr.

ChangeLog
m4/threadlib.m4

index e0f228f264800676e16f8c5e362db52b5bdca9b6..6dc612cb49e4735816acbe0474c77597833e5fe0 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 303382881a21b4f7bf3f4558a2ef1fa3f75951b8..855e563d887e9b450b850384ce84cd11d035f816 100644 (file)
@@ -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.