Try harder to find sched_yield on Solaris.
authorBruno Haible <bruno@clisp.org>
Fri, 13 Apr 2007 12:14:00 +0000 (12:14 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 13 Apr 2007 12:14:00 +0000 (12:14 +0000)
ChangeLog
modules/lock-tests
modules/tls-tests

index 7cba442c851b208d378ae8fdb965a2c2aef70a3f..db7b681833e8adf016314ea1d13bb1e3230da1a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-13  Bruno Haible  <bruno@clisp.org>
+
+       * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
+       * modules/tls-tests (configure.ac): Likewise.
+       Reported by Arto C. Nirkko <anirkko@insel.ch>.
+
 2007-04-13  Bruno Haible  <bruno@clisp.org>
 
        * lib/tls.c (glthread_tls_get): Fix return type.
index 2e410c99a2c84eee3556a21162820e3b719a0ba1..e4ec5cbd10682f23381904930045030062496671 100644 (file)
@@ -8,7 +8,10 @@ dnl Checks for special libraries for the tests/test-lock test.
 dnl On some systems, sched_yield is in librt, rather than in libpthread.
 LIBSCHED=
 if test $gl_threads_api = posix; then
-  AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt])
+  dnl Solaris has sched_yield in librt, not in libpthread or libc.
+  AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt],
+    [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
+     AC_CHECK_LIB(posix4, sched_yield, [LIBSCHED=-lposix4])])
 fi
 AC_SUBST([LIBSCHED])
 
index 7868519c1031eaca6a8d3c1864e052b60525dcba..9910af59c2da1723dcba8b10418fe3df46a1b403 100644 (file)
@@ -8,7 +8,10 @@ dnl Checks for special libraries for the tests/test-tls test.
 dnl On some systems, sched_yield is in librt, rather than in libpthread.
 LIBSCHED=
 if test $gl_threads_api = posix; then
-  AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt])
+  dnl Solaris has sched_yield in librt, not in libpthread or libc.
+  AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt],
+    [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
+     AC_CHECK_LIB(posix4, sched_yield, [LIBSCHED=-lposix4])])
 fi
 AC_SUBST([LIBSCHED])