From: Bruno Haible Date: Fri, 13 Apr 2007 12:14:00 +0000 (+0000) Subject: Try harder to find sched_yield on Solaris. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75032ae61b82138c1d1b9552eec2f96ab1040dc4;p=pspp Try harder to find sched_yield on Solaris. --- diff --git a/ChangeLog b/ChangeLog index 7cba442c85..db7b681833 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-13 Bruno Haible + + * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4. + * modules/tls-tests (configure.ac): Likewise. + Reported by Arto C. Nirkko . + 2007-04-13 Bruno Haible * lib/tls.c (glthread_tls_get): Fix return type. diff --git a/modules/lock-tests b/modules/lock-tests index 2e410c99a2..e4ec5cbd10 100644 --- a/modules/lock-tests +++ b/modules/lock-tests @@ -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]) diff --git a/modules/tls-tests b/modules/tls-tests index 7868519c10..9910af59c2 100644 --- a/modules/tls-tests +++ b/modules/tls-tests @@ -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])