xref: /minix3/crypto/external/bsd/heimdal/dist/cf/check-netinet-ip-and-tcp.m4 (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambucdnl
2*ebfedea0SLionel Sambucdnl Id
3*ebfedea0SLionel Sambucdnl
4*ebfedea0SLionel Sambuc
5*ebfedea0SLionel Sambucdnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
6*ebfedea0SLionel Sambucdnl you have to include standards.h before including these files
7*ebfedea0SLionel Sambuc
8*ebfedea0SLionel SambucAC_DEFUN([CHECK_NETINET_IP_AND_TCP],
9*ebfedea0SLionel Sambuc[
10*ebfedea0SLionel SambucAC_CHECK_HEADERS(standards.h)
11*ebfedea0SLionel Sambucfor i in netinet/ip.h netinet/tcp.h; do
12*ebfedea0SLionel Sambuc
13*ebfedea0SLionel Sambuccv=`echo "$i" | sed 'y%./+-%__p_%'`
14*ebfedea0SLionel Sambuc
15*ebfedea0SLionel SambucAC_CACHE_CHECK([for $i],ac_cv_header_$cv,
16*ebfedea0SLionel Sambuc[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
17*ebfedea0SLionel Sambuc#ifdef HAVE_STANDARDS_H
18*ebfedea0SLionel Sambuc#include <standards.h>
19*ebfedea0SLionel Sambuc#endif
20*ebfedea0SLionel Sambuc#include <$i>
21*ebfedea0SLionel Sambuc]])],
22*ebfedea0SLionel Sambuc[eval "ac_cv_header_$cv=yes"],
23*ebfedea0SLionel Sambuc[eval "ac_cv_header_$cv=no"])])
24*ebfedea0SLionel Sambucac_res=`eval echo \\$ac_cv_header_$cv`
25*ebfedea0SLionel Sambucif test "$ac_res" = yes; then
26*ebfedea0SLionel Sambuc	ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
27*ebfedea0SLionel Sambuc	AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
28*ebfedea0SLionel Sambucfi
29*ebfedea0SLionel Sambucdone
30*ebfedea0SLionel Sambucif false;then
31*ebfedea0SLionel Sambuc	AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h)
32*ebfedea0SLionel Sambucfi
33*ebfedea0SLionel Sambuc])
34