2 dnl $Heimdal: check-netinet-ip-and-tcp.m4 14162 2004-08-26 11:27:32Z joda $
6 dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
7 dnl you have to include standards.h before including these files
9 AC_DEFUN([CHECK_NETINET_IP_AND_TCP],
11 AC_CHECK_HEADERS(standards.h)
12 for i in netinet/ip.h netinet/tcp.h; do
14 cv=`echo "$i" | sed 'y%./+-%__p_%'`
16 AC_CACHE_CHECK([for $i],ac_cv_header_$cv,
17 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
18 #ifdef HAVE_STANDARDS_H
19 #include <standards.h>
23 [eval "ac_cv_header_$cv=yes"],
24 [eval "ac_cv_header_$cv=no"])])
25 ac_res=`eval echo \\$ac_cv_header_$cv`
26 if test "$ac_res" = yes; then
27 ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
28 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
32 AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h)