Block off realtime build if features are missing.
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
diff --git a/testcases/realtime/configure.in b/testcases/realtime/configure.in
index 256a492..e29767b 100644
--- a/testcases/realtime/configure.in
+++ b/testcases/realtime/configure.in
@@ -21,6 +21,27 @@
AC_PROG_RANLIB
REALTIME_CHECK_PRIO_INHERIT
+
+if test "x$has_priority_inherit" = xyes; then
+
+ AC_MSG_CHECKING([Checking for pthread mutex attr protocol functions])
+ AC_TRY_COMPILE([
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <pthread.h>],[int main(void) {
+ pthread_mutexattr_t attr;
+ (void) pthread_mutexattr_getprotocol(&attr, (void*) NULL);
+ (void) pthread_mutexattr_setprotocol(&attr, 0);
+ return 0;
+}],[has_pthread_mutexattr_protocol_functions="yes"])
+fi
+if test "x$has_pthread_mutexattr_protocol_functions" = "xyes" ; then
+ AC_DEFINE(HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS,1,[Define to 1 if you have the pthread_mutexattr protocol APIs])
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
REALTIME_CHECK_ROBUST_APIS
AC_OUTPUT