+# Check if "%m" is supported by printf and Co
+AC_MSG_CHECKING([%m format])
+AC_TRY_RUN([
+#include <stdio.h>
+int main(void)
+{
+ char msg[256];
+ int rc;
+
+ rc = snprintf(msg, sizeof(msg), "%m\n");
+ if ((rc > 1) && (msg[0] != '%'))
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}],
+[fmt_m=yes], [fmt_m=no], [fmt_m=no])
+if test "x$fmt_m" = "xyes"; then
+ AC_DEFINE([HAVE_M_FORMAT], 1, [Have %m format])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+