aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-03-22 20:03:45 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-03-22 20:03:45 +0200
commit264ef6a7dad099f3fdb10c7cab88f1d4e6257c96 (patch)
treeea31ac104d7a903f9c86905abca5b65ceca5493b /configure.ac
parent9e06eb5b97fb92f15344a909dfbf7455946564c5 (diff)
parent047fa8844122d13e2898972c9e0a2332ddddc2f5 (diff)
downloadegawk-264ef6a7dad099f3fdb10c7cab88f1d4e6257c96.tar.gz
egawk-264ef6a7dad099f3fdb10c7cab88f1d4e6257c96.tar.bz2
egawk-264ef6a7dad099f3fdb10c7cab88f1d4e6257c96.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
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