X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=modules%2Flock-tests;h=7c72c94734db4958f73b6d01b017f31b20a7b4df;hb=ae22732e85d6c314545b2b4772e56d7b541ef2d2;hp=2e410c99a2c84eee3556a21162820e3b719a0ba1;hpb=563ea91ac9156e83e5a6dfed3510aaa3bf67c6ad;p=gnulib.git diff --git a/modules/lock-tests b/modules/lock-tests index 2e410c99a..7c72c9473 100644 --- a/modules/lock-tests +++ b/modules/lock-tests @@ -8,12 +8,14 @@ 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]) Makefile.am: TESTS += test-lock check_PROGRAMS += test-lock -test_lock_LDADD = @LIBMULTITHREAD@ @LIBSCHED@ $(LDADD) - +test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @LIBSCHED@