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 7cba442..db7b681 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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.
        Patch by Arto C. Nirkko <anirkko@insel.ch>.
 
index 2e410c9..e4ec5cb 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 7868519..9910af5 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])