set version to 8:0:0
[heimdal.git] / cf / check-netinet-ip-and-tcp.m4
blob482334285c4c8ead613c1d7c9574e8e3942cf2dd
1 dnl
2 dnl $Id$
3 dnl
5 dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
6 dnl you have to include standards.h before including these files
8 AC_DEFUN(CHECK_NETINET_IP_AND_TCP,
10 AC_CHECK_HEADERS(standards.h)
11 for i in netinet/ip.h netinet/tcp.h; do
13 cv=`echo "$i" | sed 'y%./+-%__p_%'`
15 AC_MSG_CHECKING([for $i])
16 AC_CACHE_VAL([ac_cv_header_$cv],
17 [AC_TRY_CPP([\
18 #ifdef HAVE_STANDARDS_H
19 #include <standards.h>
20 #endif
21 #include <$i>
23 eval "ac_cv_header_$cv=yes",
24 eval "ac_cv_header_$cv=no")])
25 AC_MSG_RESULT(`eval echo \\$ac_cv_header_$cv`)
26 changequote(, )dnl
27 if test `eval echo \\$ac_cv_header_$cv` = yes; then
28   ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
29 changequote([, ])dnl
30   AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
32 done
33 dnl autoheader tricks *sigh*
34 : << END
35 @@@headers="$headers netinet/ip.h netinet/tcp.h"@@@
36 END