• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1AC_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])
12AC_CANONICAL_HOST
13
14AC_PROG_CC
15# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
16# 2.62.
17AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
18AC_PROG_AR
19AC_PROG_RANLIB
20
21AC_MSG_CHECKING([for __sync_add_and_fetch gcc builtin function])
22AC_LINK_IFELSE([AC_LANG_SOURCE([
23#ifndef _GNU_SOURCE
24#define _GNU_SOURCE
25#endif
26#include <stdlib.h>
27int main(void) {
28	char *c;
29	return __sync_add_and_fetch(c, 1);
30}])],[has___sync_add_and_fetch=yes])
31if test "x$has___sync_add_and_fetch" = xyes; then
32	AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you have the __sync_add_and_fetch gcc builtin function])
33	AC_MSG_RESULT(yes)
34else
35	AC_MSG_RESULT(no)
36fi
37
38AC_CHECK_LIB([m], [exp10], [AC_DEFINE([HAVE_EXP10], 1, [Define to 1 if you have exp10 function])])
39
40REALTIME_CHECK_PRIO_INHERIT
41
42AC_OUTPUT
43