blob: e29767b2cda4bd79397548b99e3db1d1db28a089 [file] [log] [blame]
yaberauneya5ac23b12009-10-25 10:33:31 +00001AC_PREREQ(2.61)
2AC_INIT([realtime],[realtime-20090930],[ltp-results@lists.sourceforge.net])
3AC_CONFIG_AUX_DIR([.])
4AM_INIT_AUTOMAKE
5AC_CONFIG_HEADERS([include/realtime_config.h])
6AC_CONFIG_FILES([ \
7 m4/Makefile \
8])
9AC_CHECK_HEADERS_ONCE([ \
10 pthread.h \
11])
12AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
13
14AC_CANONICAL_HOST
15
16AC_PROG_CC
17# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
18# 2.62.
19AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
20AC_PROG_AR
21AC_PROG_RANLIB
22
23REALTIME_CHECK_PRIO_INHERIT
Garrett Cooper84ab8202010-11-09 02:00:43 -080024
25if test "x$has_priority_inherit" = xyes; then
26
27 AC_MSG_CHECKING([Checking for pthread mutex attr protocol functions])
28 AC_TRY_COMPILE([
29#ifndef _GNU_SOURCE
30#define _GNU_SOURCE
31#endif
32#include <pthread.h>],[int main(void) {
33 pthread_mutexattr_t attr;
34 (void) pthread_mutexattr_getprotocol(&attr, (void*) NULL);
35 (void) pthread_mutexattr_setprotocol(&attr, 0);
36 return 0;
37}],[has_pthread_mutexattr_protocol_functions="yes"])
38fi
39if test "x$has_pthread_mutexattr_protocol_functions" = "xyes" ; then
40 AC_DEFINE(HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS,1,[Define to 1 if you have the pthread_mutexattr protocol APIs])
41 AC_MSG_RESULT(yes)
42else
43 AC_MSG_RESULT(no)
44fi
yaberauneya5ac23b12009-10-25 10:33:31 +000045REALTIME_CHECK_ROBUST_APIS
46
47AC_OUTPUT