diff options
author | Jim Meyering <jim@meyering.net> | 1997-10-23 13:28:01 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-10-23 13:28:01 +0000 |
commit | 1323b4bc135e50da66c308d4151a9393dce93050 (patch) | |
tree | c35b66d2aa92002c887a0a48bb747ceb2cbbf7f3 | |
parent | 9f1ddc8d01fe9b31a518d71759a47d3a33fcd326 (diff) | |
download | coreutils-1323b4bc135e50da66c308d4151a9393dce93050.tar.xz |
*** empty log message ***
-rw-r--r-- | m4/decl.m4 | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/m4/decl.m4 b/m4/decl.m4 index 65aed74ff..3af6a0cf3 100644 --- a/m4/decl.m4 +++ b/m4/decl.m4 @@ -1,20 +1,25 @@ AC_DEFUN(jm_CHECK_DECLARATION, [ -test -z "$ac_cv_header_strings_h" && AC_CHECK_HEADERS(strings.h) -test -z "$ac_cv_header_stdlib_h" && AC_CHECK_HEADERS(stdlib.h) -test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h) -AC_MSG_CHECKING([whether $1 is declared]) -AC_CACHE_VAL(jm_cv_func_decl_$1, -[AC_TRY_COMPILE([ + AC_REQUIRE(AC_HEADER_STDC) + test -z "$ac_cv_header_memory_h" && AC_CHECK_HEADERS(memory.h) + test -z "$ac_cv_header_string_h" && AC_CHECK_HEADERS(string.h) + test -z "$ac_cv_header_strings_h" && AC_CHECK_HEADERS(strings.h) + test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h) + AC_MSG_CHECKING([whether $1 is declared]) + AC_CACHE_VAL(jm_cv_func_decl_$1, + [AC_TRY_COMPILE([ #include <stdio.h> #ifdef HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif # include <string.h> #else # ifdef HAVE_STRINGS_H # include <strings.h> # endif #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include <stdlib.h> #endif #ifdef HAVE_UNISTD_H |