1 dnl Check for a scanf that understands about %as as format specifier
3 AC_DEFUN(tinc_SCANF_AS,
5 AC_CACHE_CHECK([for a scanf that groks %as], tinc_cv_scanf_as,
8 /* Very naive program which will probably give a segmentation
9 fault if the sscanf doesn't work as expected. */
13 sscanf("string\n", "%as\n", &s);
16 return strcmp("string", s);
18 ], [tinc_cv_scanf_as="yes"], [tinc_cv_scanf_as="no"])
21 if test "$tinc_cv_scanf_as" = "yes" ; then
22 AC_DEFINE(HAVE_SCANF_AS)
23 AC_SUBST(HAVE_SCANF_AS)