Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / contrib / traceroute / configure.in
blob5455734b3a4a7d371e1955c0248eed2755427b5b
1 dnl @(#) $Id: configure.in,v 1.33 2000/12/18 09:38:26 leres Exp $ (LBL)
2 dnl
3 dnl Copyright (c) 1995, 1996, 1997, 1999, 2000
4 dnl     The Regents of the University of California.  All rights reserved.
5 dnl
6 dnl Process this file with autoconf to produce a configure script.
7 dnl
9 AC_INIT(traceroute.c)
11 AC_CANONICAL_SYSTEM
13 umask 002
15 if test -z "$PWD" ; then
16         PWD=`pwd`
19 AC_LBL_C_INIT(V_CCOPT, V_INCLS)
21 AC_CHECK_HEADERS(malloc.h sys/select.h sys/sockio.h net/route.h \
22     net/if_dl.h inet/mib2.h)
24 AC_REPLACE_FUNCS(strerror usleep)
25 AC_CHECK_FUNCS(setlinebuf)
26 if test $ac_cv_func_usleep = "no" ; then
27         AC_CHECK_FUNCS(nanosleep)
30 AC_LBL_LIBRARY_NET
32 case "$target_os" in
34 bsd4*)
35         AC_DEFINE(HAVE_RAW_OPTIONS)
36         ;;
38 bsdi*)
39         AC_DEFINE(HAVE_RAW_OPTIONS)
40         ;;
42 freebsd*)
43         AC_DEFINE(HAVE_RAW_OPTIONS)
44         ;;
46 linux*)
47         V_INCLS="$V_INCLS -Ilinux-include"
48         AC_DEFINE(BYTESWAP_IP_HDR)
49         ;;
51 osf3*)
52         dnl Workaround around ip_hl vs. ip_vhl problem in netinet/ip.h
53         AC_DEFINE(__STDC__,2)
54         ;;
56 solaris2.[[012345]]*)
57         AC_DEFINE(BYTESWAP_IP_HDR)
58         AC_DEFINE(CANT_HACK_IPCKSUM)
59         ;;
61 solaris*)
62         AC_DEFINE(BYTESWAP_IP_HDR)
63         ;;
64 esac
66 dnl
67 dnl What kind of routing table lookup do we have?
68 dnl
69 AC_MSG_CHECKING(routing table type)
70 t="generic"
71 if test $ac_cv_header_inet_mib2_h = yes ; then
72         t="mib"
73 elif test $ac_cv_header_net_route_h = yes -a \
74     $ac_cv_header_net_if_dl_h = yes ; then
75         t="socket"
76 elif test -f /proc/net/route ; then
77         t="linux"
80 AC_MSG_RESULT(${t})
81 V_FINDSADDR="findsaddr-${t}.c"
84 AC_LBL_CHECK_TYPE(int32_t, int)
85 AC_LBL_CHECK_TYPE(u_int32_t, u_int)
87 AC_LBL_DEVEL(V_CCOPT)
89 AC_LBL_SOCKADDR_SA_LEN
91 AC_MSG_CHECKING(if struct icmp has icmp_nextmtu)
92 AC_CACHE_VAL(ac_cv_struct_icmp_has_icmp_nextmtu,
93     LBL_SAVE_CFLAGS="$CFLAGS"
94     CFLAGS="$CFLAGS $V_INCLS"
95     AC_TRY_COMPILE([   
96 #       include <sys/param.h>
97 #       include <sys/socket.h>
98 #       include <netinet/in_systm.h>
99 #       if __STDC__
100         /* osf3 has REALLY good prototyes */
101         struct mbuf;
102         struct rtentry;
103 #       endif
104 #       include <netinet/in.h>
105 #       include <netinet/ip.h>
106 #       include <netinet/ip_icmp.h>
107 #       include <netinet/if_ether.h>],
108         [u_int i = sizeof(((struct icmp *)0)->icmp_nextmtu)],
109         ac_cv_struct_icmp_has_icmp_nextmtu=yes,
110         ac_cv_struct_icmp_has_icmp_nextmtu=no)
111     CFLAGS="$LBL_SAVE_CFLAGS")
112 AC_MSG_RESULT($ac_cv_struct_icmp_has_icmp_nextmtu)
113 if test $ac_cv_struct_icmp_has_icmp_nextmtu = yes ; then
114         AC_DEFINE(HAVE_ICMP_NEXTMTU)
117 if test "${srcdir}" = "." ; then
118         srcdirprefix=""
119 else
120         srcdirprefix="./"
123 if test -r ${srcdirprefix}lbl/gnuc.h ; then
124         rm -f gnuc.h
125         ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
128 AC_SUBST(V_CCOPT)
129 AC_SUBST(V_INCLS)
130 AC_SUBST(V_FINDSADDR)
132 AC_PROG_INSTALL
134 AC_OUTPUT(Makefile)
136 if test -f .devel ; then
137         make depend
140 exit 0