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 #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) +])