X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=configure.ac;h=6bf1cb928c3626aa258d7ab776343db31383bec7;hp=d83e0270fd3b4fd49a26fb3ae741f3ddea62ddd6;hb=fe999c058bf1c1595890e9d71aacc6decc64bb49;hpb=a641253675b6005329234c0c7354b88dea7a4245 diff --git a/configure.ac b/configure.ac index d83e027..6bf1cb9 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,14 @@ AS_IF([test "$host_cpu" = "armv7l"],[ # ARM-specific checks AS_IF([test "x$ARCHTYPE" = "xarm"],[ AC_MSG_CHECKING([for dmb instruction]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[asm volatile("dmb":::"memory");]])],[ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + int main() + { + asm volatile("dmb":::"memory"); + return 0; + } + ]]) + ],[ AC_MSG_RESULT([yes]) AC_DEFINE([CONFIG_RCU_ARM_HAVE_DMB], [1]) ],[ @@ -102,9 +109,8 @@ AS_IF([test "x$ARCHTYPE" = "xx86"],[ # Check if sys_futex() is available AC_MSG_CHECKING([for sys_futex()]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include - ]],[[ #ifndef __NR_futex #error "futexes not available" #endif @@ -173,11 +179,14 @@ AC_CHECK_FUNCS([sched_setaffinity],[ # We do have it. Confirm that we have CPU_ZERO, and it actually works. AC_MSG_CHECKING([whether CPU_ZERO works]) AH_TEMPLATE([HAVE_CPU_ZERO], [Defined to 1 if we have CPU_ZERO and it works]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #define _GNU_SOURCE #include - ]],[[ - cpu_set_t foo; CPU_ZERO (&foo); + int main() + { + cpu_set_t foo; CPU_ZERO (&foo); + return 0; + } ]]) ],[ # Works! @@ -190,11 +199,14 @@ AC_CHECK_FUNCS([sched_setaffinity],[ # Check how many arguments does sched_setaffinity take. # Should be 3 or 2. AC_MSG_CHECKING([how many arguments sched_setaffinity takes]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include - ]],[[ - cpu_set_t foo; - sched_setaffinity (0, sizeof (foo), &foo); + int main() + { + cpu_set_t foo; + sched_setaffinity (0, sizeof (foo), &foo); + return 0; + } ]]) ], [sched_set_affinity_args=3], @@ -217,6 +229,7 @@ AC_CONFIG_LINKS([ ]) AC_CONFIG_FILES([ Makefile + doc/Makefile tests/Makefile liburcu.pc liburcu-bp.pc