m4/acx_yield.m4
raw| 1 | AC_DEFUN([ACX_YIELD],[ |
| 2 | YIELD_LIB= |
| 3 | # Solaris has sched_yield in librt, not in libpthread or libc. |
| 4 | # Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. |
| 5 | AC_CHECK_LIB(rt, sched_yield, [YIELD_LIB=-lrt], |
| 6 | [AC_CHECK_LIB(posix4, sched_yield, [YIELD_LIB=-lposix4])]) |
| 7 | AC_SUBST([YIELD_LIB]) |
| 8 | |
| 9 | AC_CHECK_HEADER([sched.h]) |
| 10 | ]) |