Fix bug 4248 “Suport C99 compilers in m4/spamassassin.m4”
[claws.git] / m4 / spamassassin.m4
index 04007371537613e8a28eba6f82d5e0119020536b..c70228ca663aa36bb6baa47c4a5e51b95a8322b4 100644 (file)
@@ -1,4 +1,8 @@
 dnl check for libspamc required includes
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([AC_SPAMASSASSIN],
 [dnl
@@ -9,6 +13,7 @@ AC_CHECK_HEADERS(time.h sysexits.h sys/socket.h netdb.h netinet/in.h)
 AC_CACHE_CHECK([for SHUT_RD],
        spamassassin_cv_has_shutrd, [
                 AC_TRY_COMPILE([#include <sys/types.h>
+#include <stdio.h>
 #include <sys/socket.h>],
                         [printf ("%d", SHUT_RD); return 0;],
                                         [spamassassin_cv_has_shutrd=yes],
@@ -26,7 +31,9 @@ dnl ----------------------------------------------------------------------
 
 AC_CACHE_CHECK([for h_errno],
         spamassassin_cv_has_herrno, [
-                AC_TRY_COMPILE([#include <netdb.h>],
+                AC_TRY_COMPILE([#include <netdb.h>
+#include <stdio.h>
+],
                         [printf ("%d", h_errno); return 0;],
                                         [spamassassin_cv_has_herrno=yes],
                                         [spamassassin_cv_has_herrno=no]),