summaryrefslogtreecommitdiff
path: root/m4/check-decl.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-01-22 14:22:42 +0000
committerJim Meyering <jim@meyering.net>2000-01-22 14:22:42 +0000
commitf5ff12fcbc8a9ebda262d3e10dff6002be3e2296 (patch)
treeaca0f3965e70208c07b3753762636cebce5b6931 /m4/check-decl.m4
parentc7bd32731ef6b4fe4158c6db697f2e57f8c7e111 (diff)
downloadcoreutils-f5ff12fcbc8a9ebda262d3e10dff6002be3e2296.tar.xz
(_jm_DECL_HEADERS): Define new function.
(jm_CHECK_DECLARATIONS): Require it.
Diffstat (limited to 'm4/check-decl.m4')
-rw-r--r--m4/check-decl.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
index 1e65abb8f..09685952c 100644
--- a/m4/check-decl.m4
+++ b/m4/check-decl.m4
@@ -5,6 +5,7 @@ dnl Putting it in a separate file like this helps share it between
dnl different packages.
AC_DEFUN(jm_CHECK_DECLS,
[
+ AC_REQUIRE([_jm_DECL_HEADERS])
headers='
#include <stdio.h>
#if HAVE_STRING_H
@@ -45,3 +46,11 @@ AC_DEFUN(jm_CHECK_DECLS,
jm_CHECK_DECLARATIONS($headers, free lseek malloc \
memchr realloc stpcpy strstr strtoul strtoull)
])
+
+dnl FIXME: when autoconf has support for it.
+dnl This is a little helper so we can require these header checks.
+AC_DEFUN(_jm_DECL_HEADERS,
+[
+ AC_REQUIRE([AC_HEADER_STDC])
+ AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h)
+])