aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWilliam Orr <will@worrbase.com>2014-09-19 21:54:27 -0700
committerWilliam Orr <will@worrbase.com>2014-09-19 21:54:27 -0700
commit38b84946479accd07b44f9b3dd46c3d293d4bf84 (patch)
treee9abb38b1be0e2aa3de3e0d1a56b725e5d5ed206 /configure.ac
parent7d50120316b62499d1ec64580acc8ff32fceb147 (diff)
downloadprotobuf-38b84946479accd07b44f9b3dd46c3d293d4bf84.tar.gz
protobuf-38b84946479accd07b44f9b3dd46c3d293d4bf84.tar.bz2
protobuf-38b84946479accd07b44f9b3dd46c3d293d4bf84.zip
Add check for sched_yield in librt
In Solaris, sched_yield lives in librt, rather than libc. This patch adds a check which will link in librt if necessary.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bc496c93..d8a8ee7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,6 +139,9 @@ AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"])
ACX_PTHREAD
AC_CXX_STL_HASH
+# Need to link against rt on Solaris
+AC_SEARCH_LIBS([sched_yield], [rt], [], [AC_MSG_FAILURE([sched_yield was not found on your system])])
+
# HACK: Make gtest's configure script pick up our copy of CFLAGS and CXXFLAGS,
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gtest
# too.