Complete __sync_add_and_fetch autoconf test.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
diff --git a/testcases/realtime/configure.in b/testcases/realtime/configure.in
index e29767b..354954a 100644
--- a/testcases/realtime/configure.in
+++ b/testcases/realtime/configure.in
@@ -20,6 +20,22 @@
 AC_PROG_AR
 AC_PROG_RANLIB
 
+AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin function])
+AC_TRY_COMPILE([
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <stdlib.h>],[int main(void) {
+	char *c;
+	return __sync_add_and_fetch(c, 1);
+}],[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)
+else
+	AC_MSG_RESULT(no)
+fi
+
 REALTIME_CHECK_PRIO_INHERIT
 
 if test "x$has_priority_inherit" = xyes; then