Home | History | Annotate | Download | only in realtime
      1 AC_PREREQ(2.61)
      2 AC_INIT([realtime],[realtime-20090930],[ltp-results (a] lists.sourceforge.net])
      3 AC_CONFIG_AUX_DIR([.])
      4 AM_INIT_AUTOMAKE
      5 AC_CONFIG_HEADERS([include/realtime_config.h])
      6 AC_CONFIG_FILES([   \
      7 	m4/Makefile \
      8 ])
      9 AC_CHECK_HEADERS_ONCE([ \
     10 	pthread.h \
     11 ])
     12 AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
     13 
     14 AC_CANONICAL_HOST
     15 
     16 AC_PROG_CC
     17 # <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
     18 # 2.62.
     19 AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
     20 AC_PROG_AR
     21 AC_PROG_RANLIB
     22 
     23 AC_MSG_CHECKING([for __sync_add_and_fetch gcc builtin function])
     24 AC_LINK_IFELSE([AC_LANG_SOURCE([
     25 #ifndef _GNU_SOURCE
     26 #define _GNU_SOURCE
     27 #endif
     28 #include <stdlib.h>
     29 int main(void) {
     30 	char *c;
     31 	return __sync_add_and_fetch(c, 1);
     32 }])],[has___sync_add_and_fetch=yes])
     33 if test "x$has___sync_add_and_fetch" = xyes; then
     34 	AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you have the __sync_add_and_fetch gcc builtin function])
     35 	AC_MSG_RESULT(yes)
     36 else
     37 	AC_MSG_RESULT(no)
     38 fi
     39 
     40 REALTIME_CHECK_PRIO_INHERIT
     41 REALTIME_CHECK_ROBUST_APIS
     42 
     43 LTP_CHECK_EXP10
     44 
     45 AC_OUTPUT
     46