From dcf49e35108a6a1897f15090e22dcd9763872292 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 31 Aug 2008 00:01:36 +0200 Subject: Undo unintentional commit. --- modules/lock-tests | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules/lock-tests') diff --git a/modules/lock-tests b/modules/lock-tests index d0e5010508..7c72c94734 100644 --- a/modules/lock-tests +++ b/modules/lock-tests @@ -2,12 +2,20 @@ Files: tests/test-lock.c Depends-on: -thread -yield configure.ac: +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 + 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 = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @LIBSCHED@ -- cgit v1.2.1