+AC_MSG_CHECKING([for printf style attribute])
+AC_TRY_COMPILE([#include <stddef.h>
+void testf(char *fmt,...) __attribute__((format(printf,1,2)));
+void testf(char *fmt,...) {}], [testf("%d",1);],
+ AC_DEFINE(HAVE_PRINTFORMAT) AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ )
+