summaryrefslogtreecommitdiff
path: root/m4/inttypes_h.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-11-30 13:35:35 +0000
committerJim Meyering <jim@meyering.net>1997-11-30 13:35:35 +0000
commitd29ca4559565d93b829312293630aa1a110382a1 (patch)
treec2907a06355ee3721fd0d03ad4261b4d2b83bf77 /m4/inttypes_h.m4
parent9e2eec1ca901ae33a19bc74e7da4fe8c6e5c1c56 (diff)
downloadcoreutils-d29ca4559565d93b829312293630aa1a110382a1.tar.xz
.
Diffstat (limited to 'm4/inttypes_h.m4')
-rw-r--r--m4/inttypes_h.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
new file mode 100644
index 000000000..c020f418e
--- /dev/null
+++ b/m4/inttypes_h.m4
@@ -0,0 +1,20 @@
+#serial 1
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
+[
+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_inttypes_h=yes,
+ jm_ac_cv_header_inttypes_h=no)])
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ AC_DEFINE(HAVE_INTTYPES_H)
+ fi
+])