diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-03-22 18:39:52 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-03-22 18:39:52 +0200 |
commit | 047fa8844122d13e2898972c9e0a2332ddddc2f5 (patch) | |
tree | cbd95dcaa714ecdaa8bc66c39a15dee876587d91 /configure.ac | |
parent | 4fa6f57bf897e7f69dbb606115d4e17a88e90532 (diff) | |
parent | 20a79b31c9897f825323eedee4c0eb01922d53da (diff) | |
download | egawk-047fa8844122d13e2898972c9e0a2332ddddc2f5.tar.gz egawk-047fa8844122d13e2898972c9e0a2332ddddc2f5.tar.bz2 egawk-047fa8844122d13e2898972c9e0a2332ddddc2f5.zip |
Merge branch 'gawk-4.2-stable'
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 37c73b76..792e7462 100644 --- a/configure.ac +++ b/configure.ac @@ -379,6 +379,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 |