-AC_MSG_CHECKING([for working %m in printf])
-AC_TRY_RUN([int main() { char s[100];
- sprintf(s,"%m");
- return(!(strcmp(s,"m") && strcmp(s,"%m")));
- }],AC_DEFINE(PRINTF_WORKS_PM) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(avoiding))
+GCC_NEED_DECLARATION(gethostname,[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif])
+GCC_NEED_DECLARATION(kill,[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif])
+GCC_NEED_DECLARATION(snprintf,[
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif])
+GCC_NEED_DECLARATION(vsnprintf,[
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif])
+GCC_NEED_DECLARATION(strdup,[
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif])
+GCC_NEED_DECLARATION(usleep,[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif])
+GCC_NEED_DECLARATION(strcasecmp,[
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif])
+GCC_NEED_DECLARATION(siginterrupt,[
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif])
+GCC_NEED_DECLARATION(popen,[
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif])
+GCC_NEED_DECLARATION(pclose,[
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif])