aboutsummaryrefslogtreecommitdiff
path: root/testcases/realtime
diff options
context:
space:
mode:
authorGarrett Cooper <yanegomi@gmail.com>2010-11-16 08:58:55 -0800
committerGarrett Cooper <yanegomi@gmail.com>2010-11-16 08:58:55 -0800
commit08b93fd568978fb944cec175d4b29d0b67489a98 (patch)
tree2b20649b7087dd2a7c695d3e376d58c31dc9ee57 /testcases/realtime
parent10a4e17df50d402b7c07134033f3e48a8d934230 (diff)
Link the test for __sync_add_and_fetch.
AC_TRY_COMPILE doesn't catch undefined symbols because the linker symbol resolution step hasn't been run yet. Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Diffstat (limited to 'testcases/realtime')
-rw-r--r--testcases/realtime/configure.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/testcases/realtime/configure.in b/testcases/realtime/configure.in
index 858eef923..87e699b76 100644
--- a/testcases/realtime/configure.in
+++ b/testcases/realtime/configure.in
@@ -21,14 +21,15 @@ AC_PROG_AR
AC_PROG_RANLIB
AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin function])
-AC_TRY_COMPILE([
+AC_LINK_IFELSE([
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
-#include <stdlib.h>],[
+#include <stdlib.h>
+int main(void) {
char *c;
return __sync_add_and_fetch(c, 1);
-],[has___sync_add_and_fetch=yes])
+}],[has___sync_add_and_fetch=yes])
if test "x$has___sync_add_and_fetch" = xyes; then
AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you have the __sync_add_and_fetch gcc builtin function])
AC_MSG_RESULT(yes)