changeset 8683:eb9089f3f491

Try harder to find sched_yield on Solaris.
author Bruno Haible <bruno@clisp.org>
date Fri, 13 Apr 2007 12:14:00 +0000
parents 0b98a4edecb2
children 9ea5590b49d1
files ChangeLog modules/lock-tests modules/tls-tests
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/modules/lock-tests
+++ b/modules/lock-tests
@@ -8,7 +8,10 @@
 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])
 
--- a/modules/tls-tests
+++ b/modules/tls-tests
@@ -8,7 +8,10 @@
 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])