diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c6336759..e01513a1 100644 --- a/configure.ac +++ b/configure.ac @@ -395,6 +395,34 @@ then fi AC_MSG_RESULT($has_f_format) +dnl check for printf %a format +AC_MSG_CHECKING([for printf %a format]) +AC_RUN_IFELSE([ +AC_LANG_SOURCE([ +#include <stdio.h> + +int main() +{ + char buf[[100]]; + + sprintf(buf, "%a", 8.0); + + if (strncmp(buf, "0x", 2) == 0) + return 0; + else + return 1; +} +])], + has_a_format=yes, + has_a_format=no, + has_a_format=no dnl Cross-compiling, assuming the worst. +) +if test "$has_a_format" = yes +then + AC_DEFINE(PRINTF_HAS_A_FORMAT, 1, [Define to 1 if *printf supports %a format]) +fi +AC_MSG_RESULT($has_a_format) + dnl check for sockets GAWK_AC_LIB_SOCKETS |