diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 1999-08-09 19:17:20 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-08-09 19:17:20 +0000 |
commit | 05ca950a640db0fe4feccd68a30ef9cdaeac40a0 (patch) | |
tree | cb161e8350346d7ca324c6db654598f225009416 /libjava/configure.in | |
parent | ad171e80b8510737414c1e80159a6dd49dc414b0 (diff) | |
download | gcc-05ca950a640db0fe4feccd68a30ef9cdaeac40a0.zip gcc-05ca950a640db0fe4feccd68a30ef9cdaeac40a0.tar.gz gcc-05ca950a640db0fe4feccd68a30ef9cdaeac40a0.tar.bz2 |
configure.in (sched_yield): Try librt first, then libposix4.
Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in (sched_yield): Try librt first, then libposix4.
Add -lrt, -lposix4 to THREADSPEC.
From-SVN: r28629
Diffstat (limited to 'libjava/configure.in')
-rw-r--r-- | libjava/configure.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libjava/configure.in b/libjava/configure.in index 861530a..9a3f95e 100644 --- a/libjava/configure.in +++ b/libjava/configure.in @@ -381,15 +381,17 @@ else LIBS="$LIBS $THREADLIBS" AC_CHECK_FUNCS(pthread_mutexattr_settype pthread_mutexattr_setkind_np) - # Look for sched_yield. Sometimes it is in the posix4 library - # (Solaris) and sometimes in -lrt (x86 Solaris). + # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since + # Solaris 7 the name librt is preferred. AC_CHECK_FUNCS(sched_yield, , [ - AC_CHECK_LIB(posix4, sched_yield, [ + AC_CHECK_LIB(rt, sched_yield, [ AC_DEFINE(HAVE_SCHED_YIELD) - THREADLIBS="$THREADLIBS -lposix4"], [ - AC_CHECK_LIB(rt, sched_yield, [ + THREADLIBS="$THREADLIBS -lrt" + THREADSPECS="$THREADSPECS -lrt"], [ + AC_CHECK_LIB(posix4, sched_yield, [ AC_DEFINE(HAVE_SCHED_YIELD) - THREADLIBS="$THREADLIBS -lrt"])])]) + THREADLIBS="$THREADLIBS -lposix4" + THREADSPECS="$THREADSPECS -lposix4"])])]) LIBS="$save_LIBS" # We require a way to get the time. |