-AC_CHECK_HEADERS([libaio.h], [
- AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
- AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
-])
+AC_CACHE_CHECK([for SA_RESTORER], [st_cv_sa_restorer],
+ [st_cv_sa_restorer="$(echo SA_RESTORER |
+ $CPP $CPPFLAGS -P -imacros asm/signal.h - |
+ grep ^0x)"
+ test -n "$st_cv_sa_restorer" || st_cv_sa_restorer=no])
+if test "x$st_cv_sa_restorer" != xno; then
+ AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_sa_restorer],
+ [SA_RESTORER defined in <asm/signal.h>])
+fi
+
+AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])],
+ [st_cv_have___builtin_popcount=yes],
+ [st_cv_have___builtin_popcount=no])])
+if test "x$st_cv_have___builtin_popcount" = xyes; then
+ AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1],
+ [Define to 1 if the system provides __builtin_popcount function])
+fi