AS_VAR_POPDEF([ac_Search])dnl
])
-dnl checks that the system provides a given struct type
-dnl defines HAVE_FOO if the type struct FOO exists.
-AC_DEFUN([SQUID_CHECK_STRUCT],[
- squid_chk_struct="HAVE_$1"
- AC_MSG_CHECKING([for struct $1])
- SQUID_TOUPPER_VAR_CONTENTS([squid_chk_struct])
- AC_COMPILE_IFELSE([
- AC_LANG_SOURCE([[$2]],[[struct $1 a;]])
- ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED([$squid_chk_struct],1,[Define to 1 if struct $1 is provided by the system])
- ],[
- AC_MSG_RESULT(no)
- ])
- unset squid_chk_struct
-])
-
dnl Check for Cyrus SASL
AC_DEFUN([SQUID_CHECK_SASL],[
squid_cv_check_sasl="auto"
AC_MSG_RESULT(no)
])
-SQUID_CHECK_STRUCT([cmsghdr],[
+AC_CHECK_TYPE(struct cmsghdr,AC_DEFINE(HAVE_CMSGHDR,1,[The system provides struct cmsghdr]),,[
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
])
-SQUID_CHECK_STRUCT([iovec],[
+AC_CHECK_TYPE(struct iovec,AC_DEFINE(HAVE_IOVEC,1,[The system provides struct iovec]),,[
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
])
-SQUID_CHECK_STRUCT([msghdr],[
+AC_CHECK_TYPE(struct msghdr,AC_DEFINE(HAVE_MSGHDR,1,[The system provides struct msghdr]),,[
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
])
-SQUID_CHECK_STRUCT([sockaddr_un],[
+AC_CHECK_TYPE(struct sockaddr_un,AC_DEFINE(HAVE_SOCKADDR_UN,1,[The system provides sockaddr_un]),,[
#if HAVE_SYS_UN_H
#include <sys/un.h>
#endif