]> git.kaiwu.me - nginx.git/commitdiff
Solaris 10 has sched_yield() in libc
authorIgor Sysoev <igor@sysoev.ru>
Fri, 8 May 2009 09:36:16 +0000 (09:36 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 8 May 2009 09:36:16 +0000 (09:36 +0000)
auto/os/solaris
auto/unix

index f98c851c5cdcf1a2650cbe927480e21c95ad7e30..333f0aebd497f00dcc6616df83bf8240625dce15 100644 (file)
@@ -7,14 +7,14 @@ have=NGX_SOLARIS . auto/have_headers
 CORE_INCS="$UNIX_INCS"
 CORE_DEPS="$UNIX_DEPS $SOLARIS_DEPS"
 CORE_SRCS="$UNIX_SRCS $SOLARIS_SRCS "
-CORE_LIBS="$CORE_LIBS -lsocket -lnsl -lrt"
+CORE_LIBS="$CORE_LIBS -lsocket -lnsl"
 
 NGX_RPATH=YES
 
 # Solaris's make does not support a blank line between target and rules
 ngx_spacer=
 
-CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl -lrt"
+CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl"
 
 
 if [ $ZLIB_ASM != NO ]; then
index 447b0e2d35671ea2578671e719511f9881a6b441..399e54c2a0eca05f7574f04081dddc4268eccbcc 100755 (executable)
--- a/auto/unix
+++ b/auto/unix
@@ -173,6 +173,18 @@ ngx_feature_test="sched_yield()"
 . auto/feature
 
 
+if [ $ngx_found != yes ]; then
+
+    ngx_feature="sched_yield() in librt"
+    ngx_feature_libs="-lrt"
+    . auto/feature
+
+    if [ $ngx_found = yes ]; then
+        CORE_LIBS="$CORE_LIBS -lrt"
+    fi
+fi
+
+
 ngx_feature="mmap(MAP_ANON|MAP_SHARED)"
 ngx_feature_name="NGX_HAVE_MAP_ANON"
 ngx_feature_run=yes